diff --git a/.gitignore b/.gitignore index aa302623..ae5b9e55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.env .env.gcp.yaml -redis-volume/ \ No newline at end of file +redis-volume/ +backend/ui diff --git a/Dockerfile b/Dockerfile index 4d85a80f..6e626a1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,6 @@ RUN rm poetry.lock RUN pip install . # Copy the frontend build -COPY --from=builder /frontend/dist /ui +COPY --from=builder /frontend/dist ./ui ENTRYPOINT [ "uvicorn", "app.server:app", "--host", "0.0.0.0" ] diff --git a/backend/.gitignore b/backend/.gitignore index e2f13cab..90623aae 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -2,3 +2,4 @@ __pycache__/ .envrc .env *.swp +ui diff --git a/backend/ui/.gitignore b/backend/ui/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/ui/assets/index-030c7d0e.js b/backend/ui/assets/index-030c7d0e.js deleted file mode 100644 index 50e86f46..00000000 --- a/backend/ui/assets/index-030c7d0e.js +++ /dev/null @@ -1,123 +0,0 @@ -var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** - * @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 lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.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 w1=j,sr=TE;function ue(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"),lp=Object.prototype.hasOwnProperty,CE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(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 jE(e,t,n,r){if(t===null||typeof t>"u"||AE(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 zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(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){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` -`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(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 ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(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 fp(t);case 8:return t===Ah?"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 ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(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 dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(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 T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(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")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(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 hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={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},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({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 vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(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 nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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 uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(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=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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 ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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 Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();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=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(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 Vp(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 n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),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 r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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 qp(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=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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 Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;n(!0),await e.onSubmit(l),n(!1),i.message.value=""},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` -`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` -`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` -`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` -`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` -`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` -`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` -`+g}!b&&!g.trim()&&(b=!0),s+=C+` -`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` -`,o?'
'+(r?t:ir(t,!0))+`
-`:"
"+(r?t:ir(t,!0))+`
-`}blockquote(t){return`
-${t}
-`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
-`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" -`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` -`)].join(` -`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ -/* [wrapped with `+T+`] */ -`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` -`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:(g==null?void 0:g.messages)??[],run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:(p==null?void 0:p.messages)??[],run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:(h==null?void 0:h.messages)??[],run_id:h==null?void 0:h.run_id})),r(null)},onerror(h){throw t(p=>({status:"error",messages:(p==null?void 0:p.messages)??[],run_id:p==null?void 0:p.run_id})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/assets/index-0a533f7b.css b/backend/ui/assets/index-0a533f7b.css deleted file mode 100644 index 6fcdc65e..00000000 --- a/backend/ui/assets/index-0a533f7b.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}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-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}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,: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: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\[1px\]{top:-1px}.bottom-0{bottom:0}.left-0{left:0}.left-full{left:100%}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-40{z-index:40}.z-50{z-index:50}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-0{margin-left:-0px}.-ml-0\.5{margin-left:-.125rem}.-ml-px{margin-left:-1px}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-3{margin-left:.75rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.min-h-\[calc\(100\%-56px\)\]{min-height:calc(100% - 56px)}.w-16{width:4rem}.w-24{width:6rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;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))}.translate-x-0{--tw-translate-x: 0px;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))}.rotate-180{--tw-rotate: 180deg;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))}.transform{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))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-5{row-gap:1.25rem}.gap-y-7{row-gap:1.75rem}.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))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.self-stretch{align-self:stretch}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-r-gray-300{--tw-border-opacity: 1;border-right-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:#111827cc}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-4{padding:1rem}.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-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-\[76px\]{padding-bottom:76px}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-6{padding-right:1.5rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-5{padding-top:1.25rem}.text-\[0\.625rem\]{font-size:.625rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-500\/10{--tw-ring-color: rgb(107 114 128 / .1)}.invert{--tw-invert: invert(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)}.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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}html,body,#root{height:100%}body{background:#f5f5f5}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.focus-within\:z-10:focus-within{z-index:10}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.group:hover .group-hover\:border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.group:hover .group-hover\:text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:flex-row{flex-direction:row}}@media (min-width: 1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{top:0;bottom:0}.lg\:left-72{left:18rem}.lg\:z-50{z-index:50}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:flex-col{flex-direction:column}.lg\:items-stretch{align-items:stretch}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pl-72{padding-left:18rem}} diff --git a/backend/ui/assets/index-2a70d776.js b/backend/ui/assets/index-2a70d776.js deleted file mode 100644 index 47d95b41..00000000 --- a/backend/ui/assets/index-2a70d776.js +++ /dev/null @@ -1,119 +0,0 @@ -var yx=Object.defineProperty;var wx=(e,t,n)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bt=(e,t,n)=>(wx(e,typeof t!="symbol"?t+"":t,n),n),_x=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Lf=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Bs=(e,t,n)=>(_x(e,t,"access private method"),n);function xx(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function bx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l0={exports:{}},uc={},u0={exports:{}},rt={};/** - * @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 Hu=Symbol.for("react.element"),kx=Symbol.for("react.portal"),Sx=Symbol.for("react.fragment"),Ex=Symbol.for("react.strict_mode"),Tx=Symbol.for("react.profiler"),Cx=Symbol.for("react.provider"),Ox=Symbol.for("react.context"),jx=Symbol.for("react.forward_ref"),Ax=Symbol.for("react.suspense"),Nx=Symbol.for("react.memo"),Rx=Symbol.for("react.lazy"),Cg=Symbol.iterator;function Px(e){return e===null||typeof e!="object"?null:(e=Cg&&e[Cg]||e["@@iterator"],typeof e=="function"?e:null)}var s0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},a0=Object.assign,c0={};function Sl(e,t,n){this.props=e,this.context=t,this.refs=c0,this.updater=n||s0}Sl.prototype.isReactComponent={};Sl.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")};Sl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f0(){}f0.prototype=Sl.prototype;function kp(e,t,n){this.props=e,this.context=t,this.refs=c0,this.updater=n||s0}var Sp=kp.prototype=new f0;Sp.constructor=kp;a0(Sp,Sl.prototype);Sp.isPureReactComponent=!0;var Og=Array.isArray,d0=Object.prototype.hasOwnProperty,Ep={current:null},p0={key:!0,ref:!0,__self:!0,__source:!0};function h0(e,t,n){var r,o={},l=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(l=""+t.key),t)d0.call(t,r)&&!p0.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,V=J[P];if(0>>1;Po(ue,we))leo(ke,ue)?(J[P]=ke,J[le]=we,P=le):(J[P]=ue,J[te]=we,P=te);else if(leo(ke,we))J[P]=ke,J[le]=we,P=le;else break e}}return se}function o(J,se){var we=J.sortIndex-se.sortIndex;return we!==0?we:J.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,a=u.now();e.unstable_now=function(){return u.now()-a}}var c=[],d=[],p=1,h=null,g=3,y=!1,b=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(J){for(var se=n(d);se!==null;){if(se.callback===null)r(d);else if(se.startTime<=J)r(d),se.sortIndex=se.expirationTime,t(c,se);else break;se=n(d)}}function E(J){if(S=!1,k(J),!b)if(n(c)!==null)b=!0,ze(C);else{var se=n(d);se!==null&&Be(E,se.startTime-J)}}function C(J,se){b=!1,S&&(S=!1,x(F),F=-1),y=!0;var we=g;try{for(k(se),h=n(c);h!==null&&(!(h.expirationTime>se)||J&&!Y());){var P=h.callback;if(typeof P=="function"){h.callback=null,g=h.priorityLevel;var V=P(h.expirationTime<=se);se=e.unstable_now(),typeof V=="function"?h.callback=V:h===n(c)&&r(c),k(se)}else r(c);h=n(c)}if(h!==null)var ne=!0;else{var te=n(d);te!==null&&Be(E,te.startTime-se),ne=!1}return ne}finally{h=null,g=we,y=!1}}var R=!1,z=null,F=-1,ce=5,$=-1;function Y(){return!(e.unstable_now()-$J||125P?(J.sortIndex=we,t(d,J),n(c)===null&&J===n(d)&&(S?(x(F),F=-1):S=!0,Be(E,we-P))):(J.sortIndex=V,t(c,J),b||y||(b=!0,ze(C))),J},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(J){var se=g;return function(){var we=g;g=se;try{return J.apply(this,arguments)}finally{g=we}}}})(y0);v0.exports=y0;var Wx=v0.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 w0=M,Zn=Wx;function ie(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"),wd=Object.prototype.hasOwnProperty,Vx=/^[: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]*$/,Ag={},Ng={};function qx(e){return wd.call(Ng,e)?!0:wd.call(Ag,e)?!1:Vx.test(e)?Ng[e]=!0:(Ag[e]=!0,!1)}function Gx(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 Qx(e,t,n,r){if(t===null||typeof t>"u"||Gx(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 jn(e,t,n,r,o,l,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=u}var dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dn[e]=new jn(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){dn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cp=/[\-:]([a-z])/g;function Op(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(Cp,Op);dn[t]=new jn(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(Cp,Op);dn[t]=new jn(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(Cp,Op);dn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});dn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function jp(e,t,n,r){var o=dn.hasOwnProperty(t)?dn[t]:null;(o!==null?o.type!==0:r||!(2a||o[u]!==l[a]){var c=` -`+o[u].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=u&&0<=a);break}}}finally{zf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?au(e):""}function Yx(e){switch(e.tag){case 5:return au(e.type);case 16:return au("Lazy");case 13:return au("Suspense");case 19:return au("SuspenseList");case 0:case 2:case 15:return e=$f(e.type,!1),e;case 11:return e=$f(e.type.render,!1),e;case 1:return e=$f(e.type,!0),e;default:return""}}function kd(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 el:return"Fragment";case Ji:return"Portal";case _d:return"Profiler";case Ap:return"StrictMode";case xd:return"Suspense";case bd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b0:return(e.displayName||"Context")+".Consumer";case x0: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 Rp:return t=e.displayName||null,t!==null?t:kd(e.type)||"Memo";case Mo:t=e._payload,e=e._init;try{return kd(e(t))}catch{}}return null}function Kx(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 kd(t);case 8:return t===Ap?"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 ti(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function S0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xx(e){var t=S0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(u){r=""+u,l.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vs(e){e._valueTracker||(e._valueTracker=Xx(e))}function E0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=S0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oa(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 Sd(e,t){var n=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ti(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 T0(e,t){t=t.checked,t!=null&&jp(e,"checked",t,!1)}function Ed(e,t){T0(e,t);var n=ti(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")?Td(e,t.type,n):t.hasOwnProperty("defaultValue")&&Td(e,t.type,ti(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lg(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 Td(e,t,n){(t!=="number"||Oa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cu=Array.isArray;function fl(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hu={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},Zx=["Webkit","ms","Moz","O"];Object.keys(hu).forEach(function(e){Zx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hu[t]=hu[e]})});function A0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hu.hasOwnProperty(e)&&hu[e]?(""+t).trim():t+"px"}function N0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=A0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Jx=Mt({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 jd(e,t){if(t){if(Jx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function Ad(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 Nd=null;function Pp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rd=null,dl=null,pl=null;function zg(e){if(e=qu(e)){if(typeof Rd!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=dc(t),Rd(e.stateNode,e.type,t))}}function R0(e){dl?pl?pl.push(e):pl=[e]:dl=e}function P0(){if(dl){var e=dl,t=pl;if(pl=dl=null,zg(e),t)for(e=0;e>>=0,e===0?32:31-(cb(e)/fb|0)|0}var Gs=64,Qs=4194304;function fu(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 Ra(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,u=n&268435455;if(u!==0){var a=u&~o;a!==0?r=fu(a):(l&=u,l!==0&&(r=fu(l)))}else u=n&~o,u!==0?r=fu(u):l!==0&&(r=fu(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Wu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nr(t),e[t]=n}function mb(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=gu),qg=String.fromCharCode(32),Gg=!1;function J0(e,t){switch(e){case"keyup":return Hb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ey(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tl=!1;function Vb(e,t){switch(e){case"compositionend":return ey(t);case"keypress":return t.which!==32?null:(Gg=!0,qg);case"textInput":return e=t.data,e===qg&&Gg?null:e;default:return null}}function qb(e,t){if(tl)return e==="compositionend"||!Up&&J0(e,t)?(e=X0(),va=$p=Wo=null,tl=!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=Xg(n)}}function oy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iy(){for(var e=window,t=Oa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oa(e.document)}return t}function Bp(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 tk(e){var t=iy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&oy(n.ownerDocument.documentElement,n)){if(r!==null&&Bp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=Zg(n,l);var u=Zg(n,r);o&&u&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.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,nl=null,$d=null,yu=null,Md=!1;function Jg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Md||nl==null||nl!==Oa(r)||(r=nl,"selectionStart"in r&&Bp(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}),yu&&Ru(yu,r)||(yu=r,r=Ia($d,"onSelect"),0il||(e.current=Vd[il],Vd[il]=null,il--)}function kt(e,t){il++,Vd[il]=e.current,e.current=t}var ni={},_n=oi(ni),$n=oi(!1),Ti=ni;function yl(e,t){var n=e.type.contextTypes;if(!n)return ni;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Mn(e){return e=e.childContextTypes,e!=null}function za(){jt($n),jt(_n)}function lv(e,t,n){if(_n.current!==ni)throw Error(ie(168));kt(_n,t),kt($n,n)}function hy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ie(108,Kx(e)||"Unknown",o));return Mt({},n,r)}function $a(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ni,Ti=_n.current,kt(_n,e),kt($n,$n.current),!0}function uv(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=hy(e,t,Ti),r.__reactInternalMemoizedMergedChildContext=e,jt($n),jt(_n),kt(_n,e)):jt($n),kt($n,n)}var co=null,pc=!1,Zf=!1;function my(e){co===null?co=[e]:co.push(e)}function pk(e){pc=!0,my(e)}function ii(){if(!Zf&&co!==null){Zf=!0;var e=0,t=wt;try{var n=co;for(wt=1;e>=u,o-=u,fo=1<<32-Nr(t)+o|n<F?(ce=z,z=null):ce=z.sibling;var $=g(x,z,k[F],E);if($===null){z===null&&(z=ce);break}e&&z&&$.alternate===null&&t(x,z),w=l($,w,F),R===null?C=$:R.sibling=$,R=$,z=ce}if(F===k.length)return n(x,z),Rt&&mi(x,F),C;if(z===null){for(;FF?(ce=z,z=null):ce=z.sibling;var Y=g(x,z,$.value,E);if(Y===null){z===null&&(z=ce);break}e&&z&&Y.alternate===null&&t(x,z),w=l(Y,w,F),R===null?C=Y:R.sibling=Y,R=Y,z=ce}if($.done)return n(x,z),Rt&&mi(x,F),C;if(z===null){for(;!$.done;F++,$=k.next())$=h(x,$.value,E),$!==null&&(w=l($,w,F),R===null?C=$:R.sibling=$,R=$);return Rt&&mi(x,F),C}for(z=r(x,z);!$.done;F++,$=k.next())$=y(z,x,F,$.value,E),$!==null&&(e&&$.alternate!==null&&z.delete($.key===null?F:$.key),w=l($,w,F),R===null?C=$:R.sibling=$,R=$);return e&&z.forEach(function(H){return t(x,H)}),Rt&&mi(x,F),C}function j(x,w,k,E){if(typeof k=="object"&&k!==null&&k.type===el&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Ws:e:{for(var C=k.key,R=w;R!==null;){if(R.key===C){if(C=k.type,C===el){if(R.tag===7){n(x,R.sibling),w=o(R,k.props.children),w.return=x,x=w;break e}}else if(R.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Mo&&hv(C)===R.type){n(x,R.sibling),w=o(R,k.props),w.ref=Jl(x,R,k),w.return=x,x=w;break e}n(x,R);break}else t(x,R);R=R.sibling}k.type===el?(w=Si(k.props.children,x.mode,E,k.key),w.return=x,x=w):(E=Ea(k.type,k.key,k.props,null,x.mode,E),E.ref=Jl(x,w,k),E.return=x,x=E)}return u(x);case Ji:e:{for(R=k.key;w!==null;){if(w.key===R)if(w.tag===4&&w.stateNode.containerInfo===k.containerInfo&&w.stateNode.implementation===k.implementation){n(x,w.sibling),w=o(w,k.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=ld(k,x.mode,E),w.return=x,x=w}return u(x);case Mo:return R=k._init,j(x,w,R(k._payload),E)}if(cu(k))return b(x,w,k,E);if(Ql(k))return S(x,w,k,E);ta(x,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,w!==null&&w.tag===6?(n(x,w.sibling),w=o(w,k),w.return=x,x=w):(n(x,w),w=id(k,x.mode,E),w.return=x,x=w),u(x)):n(x,w)}return j}var _l=ky(!0),Sy=ky(!1),Gu={},Kr=oi(Gu),Du=oi(Gu),zu=oi(Gu);function _i(e){if(e===Gu)throw Error(ie(174));return e}function Xp(e,t){switch(kt(zu,t),kt(Du,e),kt(Kr,Gu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Od(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Od(t,e)}jt(Kr),kt(Kr,t)}function xl(){jt(Kr),jt(Du),jt(zu)}function Ey(e){_i(zu.current);var t=_i(Kr.current),n=Od(t,e.type);t!==n&&(kt(Du,e),kt(Kr,n))}function Zp(e){Du.current===e&&(jt(Kr),jt(Du))}var zt=oi(0);function Wa(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 Jf=[];function Jp(){for(var e=0;en?n:4,e(!0);var r=ed.transition;ed.transition={};try{e(!1),t()}finally{wt=n,ed.transition=r}}function Uy(){return gr().memoizedState}function vk(e,t,n){var r=Jo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},By(e))Hy(t,n);else if(n=wy(e,t,n,r),n!==null){var o=Tn();Rr(n,e,r,o),Wy(n,t,r)}}function yk(e,t,n){var r=Jo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(By(e))Hy(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var u=t.lastRenderedState,a=l(u,n);if(o.hasEagerState=!0,o.eagerState=a,Pr(a,u)){var c=t.interleaved;c===null?(o.next=o,Yp(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=wy(e,t,o,r),n!==null&&(o=Tn(),Rr(n,e,r,o),Wy(n,t,r))}}function By(e){var t=e.alternate;return e===$t||t!==null&&t===$t}function Hy(e,t){wu=Va=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ip(e,n)}}var qa={readContext:mr,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},wk={readContext:mr,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:mr,useEffect:gv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xa(4194308,4,Dy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xa(4194308,4,e,t)},useInsertionEffect:function(e,t){return xa(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();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=vk.bind(null,$t,e),[r.memoizedState,e]},useRef:function(e){var t=Vr();return e={current:e},t.memoizedState=e},useState:mv,useDebugValue:oh,useDeferredValue:function(e){return Vr().memoizedState=e},useTransition:function(){var e=mv(!1),t=e[0];return e=gk.bind(null,e[1]),Vr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$t,o=Vr();if(Rt){if(n===void 0)throw Error(ie(407));n=n()}else{if(n=t(),un===null)throw Error(ie(349));Oi&30||Oy(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,gv(Ay.bind(null,r,l,e),[e]),r.flags|=2048,Fu(9,jy.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Vr(),t=un.identifierPrefix;if(Rt){var n=po,r=fo;n=(r&~(1<<32-Nr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$u++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[qr]=t,e[Iu]=r,Jy(e,t,!1,!1),t.stateNode=e;e:{switch(u=Ad(n,r),n){case"dialog":Ot("cancel",e),Ot("close",e),o=r;break;case"iframe":case"object":case"embed":Ot("load",e),o=r;break;case"video":case"audio":for(o=0;okl&&(t.flags|=128,r=!0,eu(l,!1),t.lanes=4194304)}else{if(!r)if(e=Wa(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),eu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Rt)return vn(t),null}else 2*Gt()-l.renderingStartTime>kl&&n!==1073741824&&(t.flags|=128,r=!0,eu(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(n=l.last,n!==null?n.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Gt(),t.sibling=null,n=zt.current,kt(zt,r?n&1|2:n&1),t):(vn(t),null);case 22:case 23:return ch(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gn&1073741824&&(vn(t),t.subtreeFlags&6&&(t.flags|=8192)):vn(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function Ck(e,t){switch(Wp(t),t.tag){case 1:return Mn(t.type)&&za(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xl(),jt($n),jt(_n),Jp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zp(t),null;case 13:if(jt(zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(zt),null;case 4:return xl(),null;case 10:return Qp(t.type._context),null;case 22:case 23:return ch(),null;case 24:return null;default:return null}}var ra=!1,yn=!1,Ok=typeof WeakSet=="function"?WeakSet:Set,ve=null;function al(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ht(e,t,r)}else n.current=null}function rp(e,t,n){try{n()}catch(r){Ht(e,t,r)}}var Ev=!1;function jk(e,t){if(Fd=Pa,e=iy(),Bp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var u=0,a=-1,c=-1,d=0,p=0,h=e,g=null;t:for(;;){for(var y;h!==n||o!==0&&h.nodeType!==3||(a=u+o),h!==l||r!==0&&h.nodeType!==3||(c=u+r),h.nodeType===3&&(u+=h.nodeValue.length),(y=h.firstChild)!==null;)g=h,h=y;for(;;){if(h===e)break t;if(g===n&&++d===o&&(a=u),g===l&&++p===r&&(c=u),(y=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=y}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ud={focusedElem:e,selectionRange:n},Pa=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var S=b.memoizedProps,j=b.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?S:Or(t.type,S),j);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(E){Ht(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return b=Ev,Ev=!1,b}function _u(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&rp(t,n,l)}o=o.next}while(o!==r)}}function gc(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 op(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 n1(e){var t=e.alternate;t!==null&&(e.alternate=null,n1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qr],delete t[Iu],delete t[Wd],delete t[fk],delete t[dk])),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 r1(e){return e.tag===5||e.tag===3||e.tag===4}function Tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r1(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 ip(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=Da));else if(r!==4&&(e=e.child,e!==null))for(ip(e,t,n),e=e.sibling;e!==null;)ip(e,t,n),e=e.sibling}function lp(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(lp(e,t,n),e=e.sibling;e!==null;)lp(e,t,n),e=e.sibling}var cn=null,jr=!1;function Io(e,t,n){for(n=n.child;n!==null;)o1(e,t,n),n=n.sibling}function o1(e,t,n){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(sc,n)}catch{}switch(n.tag){case 5:yn||al(n,t);case 6:var r=cn,o=jr;cn=null,Io(e,t,n),cn=r,jr=o,cn!==null&&(jr?(e=cn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):cn.removeChild(n.stateNode));break;case 18:cn!==null&&(jr?(e=cn,n=n.stateNode,e.nodeType===8?Xf(e.parentNode,n):e.nodeType===1&&Xf(e,n),Au(e)):Xf(cn,n.stateNode));break;case 4:r=cn,o=jr,cn=n.stateNode.containerInfo,jr=!0,Io(e,t,n),cn=r,jr=o;break;case 0:case 11:case 14:case 15:if(!yn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,u=l.destroy;l=l.tag,u!==void 0&&(l&2||l&4)&&rp(n,t,u),o=o.next}while(o!==r)}Io(e,t,n);break;case 1:if(!yn&&(al(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ht(n,t,a)}Io(e,t,n);break;case 21:Io(e,t,n);break;case 22:n.mode&1?(yn=(r=yn)||n.memoizedState!==null,Io(e,t,n),yn=r):Io(e,t,n);break;default:Io(e,t,n)}}function Cv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ok),t.forEach(function(r){var o=$k.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Tr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=u),r&=~l}if(r=o,r=Gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nk(r/1960))-r,10e?16:e,Vo===null)var r=!1;else{if(e=Vo,Vo=null,Ya=0,ct&6)throw Error(ie(331));var o=ct;for(ct|=4,ve=e.current;ve!==null;){var l=ve,u=l.child;if(ve.flags&16){var a=l.deletions;if(a!==null){for(var c=0;cGt()-sh?ki(e,0):uh|=n),Fn(e,t)}function d1(e,t){t===0&&(e.mode&1?(t=Qs,Qs<<=1,!(Qs&130023424)&&(Qs=4194304)):t=1);var n=Tn();e=wo(e,t),e!==null&&(Wu(e,t,n),Fn(e,n))}function zk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d1(e,n)}function $k(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}r!==null&&r.delete(t),d1(e,n)}var p1;p1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$n.current)zn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zn=!1,Ek(e,t,n);zn=!!(e.flags&131072)}else zn=!1,Rt&&t.flags&1048576&&gy(t,Fa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ba(e,t),e=t.pendingProps;var o=yl(t,_n.current);ml(t,n),o=th(null,t,r,e,o,n);var l=nh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mn(r)?(l=!0,$a(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Kp(t),o.updater=hc,t.stateNode=o,o._reactInternals=t,Kd(t,r,e,n),t=Jd(null,t,r,!0,l,n)):(t.tag=0,Rt&&l&&Hp(t),Sn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ba(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Fk(r),e=Or(r,e),o){case 0:t=Zd(null,t,r,e,n);break e;case 1:t=bv(null,t,r,e,n);break e;case 11:t=_v(null,t,r,e,n);break e;case 14:t=xv(null,t,r,Or(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),Zd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),bv(e,t,r,o,n);case 3:e:{if(Ky(t),e===null)throw Error(ie(387));r=t.pendingProps,l=t.memoizedState,o=l.element,_y(e,t),Ha(t,r,null,n);var u=t.memoizedState;if(r=u.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=bl(Error(ie(423)),t),t=kv(e,t,r,n,o);break e}else if(r!==o){o=bl(Error(ie(424)),t),t=kv(e,t,r,n,o);break e}else for(Kn=Ko(t.stateNode.containerInfo.firstChild),Xn=t,Rt=!0,Ar=null,n=Sy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wl(),r===o){t=_o(e,t,n);break e}Sn(e,t,r,n)}t=t.child}return t;case 5:return Ey(t),e===null&&Gd(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,u=o.children,Bd(r,o)?u=null:l!==null&&Bd(r,l)&&(t.flags|=32),Yy(e,t),Sn(e,t,u,n),t.child;case 6:return e===null&&Gd(t),null;case 13:return Xy(e,t,n);case 4:return Xp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=_l(t,null,r,n):Sn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),_v(e,t,r,o,n);case 7:return Sn(e,t,t.pendingProps,n),t.child;case 8:return Sn(e,t,t.pendingProps.children,n),t.child;case 12:return Sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,u=o.value,kt(Ua,r._currentValue),r._currentValue=u,l!==null)if(Pr(l.value,u)){if(l.children===o.children&&!$n.current){t=_o(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){u=l.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(l.tag===1){c=ho(-1,n&-n),c.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?c.next=c:(c.next=p.next,p.next=c),d.pending=c}}l.lanes|=n,c=l.alternate,c!==null&&(c.lanes|=n),Qd(l.return,n,t),a.lanes|=n;break}c=c.next}}else if(l.tag===10)u=l.type===t.type?null:l.child;else if(l.tag===18){if(u=l.return,u===null)throw Error(ie(341));u.lanes|=n,a=u.alternate,a!==null&&(a.lanes|=n),Qd(u,n,t),u=l.sibling}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===t){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}Sn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ml(t,n),o=mr(o),r=r(o),t.flags|=1,Sn(e,t,r,n),t.child;case 14:return r=t.type,o=Or(r,t.pendingProps),o=Or(r.type,o),xv(e,t,r,o,n);case 15:return Gy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),ba(e,t),t.tag=1,Mn(r)?(e=!0,$a(t)):e=!1,ml(t,n),by(t,r,o),Kd(t,r,o,n),Jd(null,t,r,!0,e,n);case 19:return Zy(e,t,n);case 22:return Qy(e,t,n)}throw Error(ie(156,t.tag))};function h1(e,t){return F0(e,t)}function Mk(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 pr(e,t,n,r){return new Mk(e,t,n,r)}function dh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fk(e){if(typeof e=="function")return dh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Np)return 11;if(e===Rp)return 14}return 2}function ei(e,t){var n=e.alternate;return n===null?(n=pr(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 Ea(e,t,n,r,o,l){var u=2;if(r=e,typeof e=="function")dh(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case el:return Si(n.children,o,l,t);case Ap:u=8,o|=8;break;case _d:return e=pr(12,n,t,o|2),e.elementType=_d,e.lanes=l,e;case xd:return e=pr(13,n,t,o),e.elementType=xd,e.lanes=l,e;case bd:return e=pr(19,n,t,o),e.elementType=bd,e.lanes=l,e;case k0:return yc(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x0:u=10;break e;case b0:u=9;break e;case Np:u=11;break e;case Rp:u=14;break e;case Mo:u=16,r=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=pr(u,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Si(e,t,n,r){return e=pr(7,e,r,t),e.lanes=n,e}function yc(e,t,n,r){return e=pr(22,e,r,t),e.elementType=k0,e.lanes=n,e.stateNode={isHidden:!1},e}function id(e,t,n){return e=pr(6,e,null,t),e.lanes=n,e}function ld(e,t,n){return t=pr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uk(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ff(0),this.expirationTimes=Ff(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ff(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ph(e,t,n,r,o,l,u,a,c){return e=new Uk(e,t,n,a,c),t===1?(t=1,l===!0&&(t|=8)):t=0,l=pr(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kp(l),e}function Bk(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y1)}catch(e){console.error(e)}}y1(),g0.exports=Jn;var w1=g0.exports,Iv=w1;yd.createRoot=Iv.createRoot,yd.hydrateRoot=Iv.hydrateRoot;function Gk({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const Qk=M.forwardRef(Gk),Yk=Qk;function Kk({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const Xk=M.forwardRef(Kk),Zk=Xk;function _1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ta(l)))==null?void 0:u.classGroupId}const Dv=/^\[(.+)\]$/;function tS(e){if(Dv.test(e)){const t=Dv.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function nS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return oS(Object.entries(e.classGroups),n).forEach(([l,u])=>{fp(u,r,l,t)}),r}function fp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const l=o===""?t:zv(t,o);l.classGroupId=n;return}if(typeof o=="function"){if(rS(o)){fp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,u])=>{fp(u,zv(t,l),n,r)})})}function zv(e,t){let n=e;return t.split(vh).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function rS(e){return e.isThemeGetter}function oS(e,t){return t?e.map(([n,r])=>{const o=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,a])=>[t+u,a])):l);return[n,o]}):e}function iS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(l,u){n.set(l,u),t++,t>e&&(t=0,r=n,n=new Map)}return{get(l){let u=n.get(l);if(u!==void 0)return u;if((u=r.get(l))!==void 0)return o(l,u),u},set(l,u){n.has(l)?n.set(l,u):o(l,u)}}}const b1="!";function lS(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(u){const a=[];let c=0,d=0,p;for(let S=0;Sd?p-d:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function uS(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function sS(e){return{cache:iS(e.cacheSize),splitModifiers:lS(e),...eS(e)}}const aS=/\s+/;function cS(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,l=new Set;return e.trim().split(aS).map(u=>{const{modifiers:a,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:p}=n(u);let h=r(p?d.substring(0,p):d),g=!!p;if(!h){if(!p)return{isTailwindClass:!1,originalClassName:u};if(h=r(d),!h)return{isTailwindClass:!1,originalClassName:u};g=!1}const y=uS(a).join(":");return{isTailwindClass:!0,modifierId:c?y+b1:y,classGroupId:h,originalClassName:u,hasPostfixModifier:g}}).reverse().filter(u=>{if(!u.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:d}=u,p=a+c;return l.has(p)?!1:(l.add(p),o(c,d).forEach(h=>l.add(a+h)),!0)}).reverse().map(u=>u.originalClassName).join(" ")}function fS(){let e=0,t,n,r="";for(;eh(p),e());return n=sS(d),r=n.cache.get,o=n.cache.set,l=a,a(c)}function a(c){const d=r(c);if(d)return d;const p=cS(c,n);return o(c,p),p}return function(){return l(fS.apply(null,arguments))}}function Ct(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const S1=/^\[(?:([a-z-]+):)?(.+)\]$/i,pS=/^\d+\/\d+$/,hS=new Set(["px","full","screen"]),mS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,vS=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Cr(e){return xi(e)||hS.has(e)||pS.test(e)}function Do(e){return Cl(e,"length",TS)}function xi(e){return!!e&&!Number.isNaN(Number(e))}function la(e){return Cl(e,"number",xi)}function nu(e){return!!e&&Number.isInteger(Number(e))}function wS(e){return e.endsWith("%")&&xi(e.slice(0,-1))}function Qe(e){return S1.test(e)}function zo(e){return mS.test(e)}const _S=new Set(["length","size","percentage"]);function xS(e){return Cl(e,_S,E1)}function bS(e){return Cl(e,"position",E1)}const kS=new Set(["image","url"]);function SS(e){return Cl(e,kS,OS)}function ES(e){return Cl(e,"",CS)}function ru(){return!0}function Cl(e,t,n){const r=S1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function TS(e){return gS.test(e)}function E1(){return!1}function CS(e){return vS.test(e)}function OS(e){return yS.test(e)}function jS(){const e=Ct("colors"),t=Ct("spacing"),n=Ct("blur"),r=Ct("brightness"),o=Ct("borderColor"),l=Ct("borderRadius"),u=Ct("borderSpacing"),a=Ct("borderWidth"),c=Ct("contrast"),d=Ct("grayscale"),p=Ct("hueRotate"),h=Ct("invert"),g=Ct("gap"),y=Ct("gradientColorStops"),b=Ct("gradientColorStopPositions"),S=Ct("inset"),j=Ct("margin"),x=Ct("opacity"),w=Ct("padding"),k=Ct("saturate"),E=Ct("scale"),C=Ct("sepia"),R=Ct("skew"),z=Ct("space"),F=Ct("translate"),ce=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",Qe,t],H=()=>[Qe,t],he=()=>["",Cr,Do],Se=()=>["auto",xi,Qe],je=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ze=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],J=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",Qe],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[xi,la],V=()=>[xi,Qe];return{cacheSize:500,separator:":",theme:{colors:[ru],spacing:[Cr,Do],blur:["none","",zo,Qe],brightness:P(),borderColor:[e],borderRadius:["none","","full",zo,Qe],borderSpacing:H(),borderWidth:he(),contrast:P(),grayscale:se(),hueRotate:V(),invert:se(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[wS,Do],inset:Y(),margin:Y(),opacity:P(),padding:H(),saturate:P(),scale:P(),sepia:se(),skew:V(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",Qe]}],container:["container"],columns:[{columns:[zo]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...je(),Qe]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nu,Qe]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qe]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",nu,Qe]}],"grid-cols":[{"grid-cols":[ru]}],"col-start-end":[{col:["auto",{span:["full",nu,Qe]},Qe]}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":[ru]}],"row-start-end":[{row:["auto",{span:[nu,Qe]},Qe]}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qe]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Qe,t]}],"min-w":[{"min-w":["min","max","fit",Qe,Cr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[zo]},zo,Qe]}],h:[{h:[Qe,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Cr,Qe]}],"max-h":[{"max-h":[Qe,t,"min","max","fit"]}],"font-size":[{text:["base",zo,Do]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",la]}],"font-family":[{font:[ru]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qe]}],"line-clamp":[{"line-clamp":["none",xi,la]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cr,Qe]}],"list-image":[{"list-image":["none",Qe]}],"list-style-type":[{list:["none","disc","decimal",Qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ze(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cr,Do]}],"underline-offset":[{"underline-offset":["auto",Cr,Qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...je(),bS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SS]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...ze(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:ze()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...ze()]}],"outline-offset":[{"outline-offset":[Cr,Qe]}],"outline-w":[{outline:[Cr,Do]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Cr,Do]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zo,ES]}],"shadow-color":[{shadow:[ru]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",zo,Qe]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[h]}],saturate:[{saturate:[k]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qe]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Qe]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[nu,Qe]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qe]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Cr,Do,la]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const AS=dS(jS);function En(...e){return AS(Jk(e))}function T1(e){return W.jsxs("form",{className:En("mt-2 flex rounded-md shadow-sm",e.disabled&&"opacity-50 cursor-not-allowed"),onSubmit:t=>{if(t.preventDefault(),e.disabled)return;const n=t.target,r=n.message.value;e.onSubmit(r),n.message.value=""},children:[W.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[W.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:W.jsx(Yk,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),W.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message"})]}),W.jsxs("button",{type:"submit",disabled:e.disabled,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[W.jsx(Zk,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Send"]})]})}function C1(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function yh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Li=yh();function O1(e){Li=e}const j1=/[&<>"']/,NS=new RegExp(j1.source,"g"),A1=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,RS=new RegExp(A1.source,"g"),PS={"&":"&","<":"<",">":">",'"':""","'":"'"},$v=e=>PS[e];function Qn(e,t){if(t){if(j1.test(e))return e.replace(NS,$v)}else if(A1.test(e))return e.replace(RS,$v);return e}const LS=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function IS(e){return e.replace(LS,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const DS=/(^|[^\[])\^/g;function mt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(DS,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function Mv(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Za={exec:()=>null};function Fv(e,t){const n=e.replace(/\|/g,(l,u,a)=>{let c=!1,d=u;for(;--d>=0&&a[d]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const l=o.match(/^\s+/);if(l===null)return o;const[u]=l;return u.length>=r.length?o.slice(r.length):o}).join(` -`)}class Ja{constructor(t){bt(this,"options");bt(this,"rules");bt(this,"lexer");this.options=t||Li}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ua(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=$S(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=ua(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=ua(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const l=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:l,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,l={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const u=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",c="",d=!1;for(;t;){let p=!1;if(!(n=u.exec(t))||this.rules.block.hr.test(t))break;a=n[0],t=t.substring(a.length);let h=n[2].split(` -`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),g=t.split(` -`,1)[0],y=0;this.options.pedantic?(y=2,c=h.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=h.slice(y),y+=n[1].length);let b=!1;if(!h&&/^ *$/.test(g)&&(a+=g+` -`,t=t.substring(g.length+1),p=!0),!p){const x=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` -`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),k.test(g)||E.test(g)||x.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` -`+g.slice(y);else{if(b||h.search(/[^ ]/)>=4||k.test(h)||E.test(h)||w.test(h))break;c+=` -`+g}!b&&!g.trim()&&(b=!0),a+=C+` -`,t=t.substring(C.length+1),h=g.slice(y)}}l.loose||(d?l.loose=!0:/\n *\n *$/.test(a)&&(d=!0));let S=null,j;this.options.gfm&&(S=/^\[[ xX]\] /.exec(c),S&&(j=S[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),l.items.push({type:"list_item",raw:a,task:!!S,checked:j,loose:!1,text:c,tokens:[]}),l.raw+=a}l.items[l.items.length-1].raw=a.trimEnd(),l.items[l.items.length-1].text=c.trimEnd(),l.raw=l.raw.trimEnd();for(let p=0;py.type==="space"),g=h.length>0&&h.some(y=>/\n.*\n/.test(y.raw));l.loose=g}if(l.loose)for(let p=0;p$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:l}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Fv(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,l,u,a,c;for(l=0;l({text:d,tokens:[]}));for(o=r.header.length,u=0;u/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const u=ua(r.slice(0,-1),"\\");if((r.length-u.length)%2===0)return}else{const u=zS(n[2],"()");if(u>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],l="";if(this.options.pedantic){const u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);u&&(o=u[1],l=u[3])}else l=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),Uv(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:l&&l.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return Uv(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const u=[...o[0]].length-1;let a,c,d=u,p=0;const h=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,n=n.slice(-1*t.length+u);(o=h.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(c=[...a].length,o[3]||o[4]){d+=c;continue}else if((o[5]||o[6])&&u%3&&!((u+c)%3)){p+=c;continue}if(d-=c,d>0)continue;c=Math.min(c,c+d+p);const g=[...o[0]][0].length,y=t.slice(0,u+o.index+g+c);if(Math.min(u,c)%2){const S=y.slice(1,-1);return{type:"em",raw:y,text:S,tokens:this.lexer.inlineTokens(S)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),l=/^ /.test(r)&&/ $/.test(r);return o&&l&&(r=r.substring(1,r.length-1)),r=Qn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=Qn(n[1]),o="mailto:"+r):(r=Qn(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=Qn(n[0]),o="mailto:"+r;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(l!==n[0]);r=Qn(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Qn(n[0]),{type:"text",raw:n[0],text:r}}}}const Ce={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Za,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ce.def=mt(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex();Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ce.listItemStart=mt(/^( *)(bull) */).replace("bull",Ce.bullet).getRegex();Ce.list=mt(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex();Ce._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ce._comment=/|$)/;Ce.html=mt(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ce.lheading=mt(Ce.lheading).replace(/bull/g,Ce.bullet).getRegex();Ce.paragraph=mt(Ce._paragraph).replace("hr",Ce.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ce._tag).getRegex();Ce.blockquote=mt(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex();Ce.normal={...Ce};Ce.gfm={...Ce.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Ce.gfm.table=mt(Ce.gfm.table).replace("hr",Ce.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ce._tag).getRegex();Ce.gfm.paragraph=mt(Ce._paragraph).replace("hr",Ce.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ce.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ce._tag).getRegex();Ce.pedantic={...Ce.normal,html:mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Za,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const pe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Za,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Za,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";pe.punctuation=mt(pe.punctuation,"u").replace(/punctuation/g,pe._punctuation).getRegex();pe.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;pe.anyPunctuation=/\\[punct]/g;pe._escapes=/\\([punct])/g;pe._comment=mt(Ce._comment).replace("(?:-->|$)","-->").getRegex();pe.emStrong.lDelim=mt(pe.emStrong.lDelim,"u").replace(/punct/g,pe._punctuation).getRegex();pe.emStrong.rDelimAst=mt(pe.emStrong.rDelimAst,"gu").replace(/punct/g,pe._punctuation).getRegex();pe.emStrong.rDelimUnd=mt(pe.emStrong.rDelimUnd,"gu").replace(/punct/g,pe._punctuation).getRegex();pe.anyPunctuation=mt(pe.anyPunctuation,"gu").replace(/punct/g,pe._punctuation).getRegex();pe._escapes=mt(pe._escapes,"gu").replace(/punct/g,pe._punctuation).getRegex();pe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;pe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;pe.autolink=mt(pe.autolink).replace("scheme",pe._scheme).replace("email",pe._email).getRegex();pe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;pe.tag=mt(pe.tag).replace("comment",pe._comment).replace("attribute",pe._attribute).getRegex();pe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;pe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;pe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;pe.link=mt(pe.link).replace("label",pe._label).replace("href",pe._href).replace("title",pe._title).getRegex();pe.reflink=mt(pe.reflink).replace("label",pe._label).replace("ref",Ce._label).getRegex();pe.nolink=mt(pe.nolink).replace("ref",Ce._label).getRegex();pe.reflinkSearch=mt(pe.reflinkSearch,"g").replace("reflink",pe.reflink).replace("nolink",pe.nolink).getRegex();pe.normal={...pe};pe.pedantic={...pe.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",pe._label).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pe._label).getRegex()};pe.gfm={...pe.normal,escape:mt(pe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(d.length));let r,o,l,u;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(l=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const c=t.slice(1);let d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(a=Math.min(a,d))}),a<1/0&&a>=0&&(l=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(l))){o=n[n.length-1],u&&o.type==="paragraph"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),u=l.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,l,u=t,a,c,d;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(u))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(u))!=null;)u=u.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(u))!=null;)u=u.slice(0,a.index)+"++"+u.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(d=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(r=p.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,u,d)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(l=t,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},h),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(l=t.substring(0,p+1))}if(r=this.tokenizer.inlineText(l)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(d=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}}class ec{constructor(t){bt(this,"options");this.options=t||Li}code(t,n,r){var l;const o=(l=(n||"").match(/^\S*/))==null?void 0:l[0];return t=t.replace(/\n$/,"")+` -`,o?'
    '+(r?t:Qn(t,!0))+`
    -`:"
    "+(r?t:Qn(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
    -`}list(t,n,r){const o=n?"ol":"ul",l=n&&r!==1?' start="'+r+'"':"";return"<"+o+l+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=Mv(t);if(o===null)return r;t=o;let l='
    ",l}image(t,n,r){const o=Mv(t);if(o===null)return r;t=o;let l=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=j+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=j+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:j+" "}):S+=j+" "}S+=this.parse(g.tokens,d),p+=this.renderer.listitem(S,b,!!y)}r+=this.renderer.list(p,a,c);continue}case"html":{const u=l;r+=this.renderer.html(u.text,u.block);continue}case"paragraph":{const u=l;r+=this.renderer.paragraph(this.parseInline(u.tokens));continue}case"text":{let u=l,a=u.tokens?this.parseInline(u.tokens):u.text;for(;o+1{r=r.concat(this.walkTokens(a[c],n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){const u=n.renderers[l.name];u?n.renderers[l.name]=function(...a){let c=l.renderer.apply(this,a);return c===!1&&(c=u.apply(this,a)),c}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const u=n[l.level];u?u.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),o.extensions=n),r.renderer){const l=this.defaults.renderer||new ec(this.defaults);for(const u in r.renderer){const a=r.renderer[u],c=u,d=l[c];l[c]=(...p)=>{let h=a.apply(l,p);return h===!1&&(h=d.apply(l,p)),h||""}}o.renderer=l}if(r.tokenizer){const l=this.defaults.tokenizer||new Ja(this.defaults);for(const u in r.tokenizer){const a=r.tokenizer[u],c=u,d=l[c];l[c]=(...p)=>{let h=a.apply(l,p);return h===!1&&(h=d.apply(l,p)),h}}o.tokenizer=l}if(r.hooks){const l=this.defaults.hooks||new ku;for(const u in r.hooks){const a=r.hooks[u],c=u,d=l[c];ku.passThroughHooks.has(u)?l[c]=p=>{if(this.defaults.async)return Promise.resolve(a.call(l,p)).then(g=>d.call(l,g));const h=a.call(l,p);return d.call(l,h)}:l[c]=(...p)=>{let h=a.apply(l,p);return h===!1&&(h=d.apply(l,p)),h}}o.hooks=l}if(r.walkTokens){const l=this.defaults.walkTokens,u=r.walkTokens;o.walkTokens=function(a){let c=[];return c.push(u.call(this,a)),l&&(c=c.concat(l.call(this,a))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}Bu=new WeakSet,dp=function(t,n){return(r,o)=>{const l={...o},u={...this.defaults,...l};this.defaults.async===!0&&l.async===!1&&(u.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),u.async=!0);const a=Bs(this,lc,N1).call(this,!!u.silent,!!u.async);if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(u.hooks&&(u.hooks.options=u),u.async)return Promise.resolve(u.hooks?u.hooks.preprocess(r):r).then(c=>t(c,u)).then(c=>u.walkTokens?Promise.all(this.walkTokens(c,u.walkTokens)).then(()=>c):c).then(c=>n(c,u)).then(c=>u.hooks?u.hooks.postprocess(c):c).catch(a);try{u.hooks&&(r=u.hooks.preprocess(r));const c=t(r,u);u.walkTokens&&this.walkTokens(c,u.walkTokens);let d=n(c,u);return u.hooks&&(d=u.hooks.postprocess(d)),d}catch(c){return a(c)}}},lc=new WeakSet,N1=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+Qn(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Ni=new MS;function yt(e,t){return Ni.parse(e,t)}yt.options=yt.setOptions=function(e){return Ni.setOptions(e),yt.defaults=Ni.defaults,O1(yt.defaults),yt};yt.getDefaults=yh;yt.defaults=Li;yt.use=function(...e){return Ni.use(...e),yt.defaults=Ni.defaults,O1(yt.defaults),yt};yt.walkTokens=function(e,t){return Ni.walkTokens(e,t)};yt.parseInline=Ni.parseInline;yt.Parser=Qr;yt.parser=Qr.parse;yt.Renderer=ec;yt.TextRenderer=wh;yt.Lexer=Gr;yt.lexer=Gr.lex;yt.Tokenizer=Ja;yt.Hooks=ku;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;Qr.parse;Gr.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:R1,setPrototypeOf:Bv,isFrozen:FS,getPrototypeOf:US,getOwnPropertyDescriptor:P1}=Object;let{freeze:Cn,seal:Lr,create:L1}=Object,{apply:pp,construct:hp}=typeof Reflect<"u"&&Reflect;Cn||(Cn=function(t){return t});Lr||(Lr=function(t){return t});pp||(pp=function(t,n,r){return t.apply(n,r)});hp||(hp=function(t,n){return new t(...n)});const sa=vr(Array.prototype.forEach),Hv=vr(Array.prototype.pop),ou=vr(Array.prototype.push),Ta=vr(String.prototype.toLowerCase),ud=vr(String.prototype.toString),BS=vr(String.prototype.match),iu=vr(String.prototype.replace),HS=vr(String.prototype.indexOf),WS=vr(String.prototype.trim),qn=vr(RegExp.prototype.test),lu=VS(TypeError);function vr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ta;Bv&&Bv(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const l=n(o);l!==o&&(FS(t)||(t[r]=l),o=l)}e[o]=!0}return e}function Xi(e){const t=L1(null);for(const[n,r]of R1(e))P1(e,n)!==void 0&&(t[n]=r);return t}function aa(e,t){for(;e!==null;){const r=P1(e,t);if(r){if(r.get)return vr(r.get);if(typeof r.value=="function")return vr(r.value)}e=US(e)}function n(r){return console.warn("fallback value for",r),null}return n}const Wv=Cn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),sd=Cn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ad=Cn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),qS=Cn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),cd=Cn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),GS=Cn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vv=Cn(["#text"]),qv=Cn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),fd=Cn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gv=Cn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ca=Cn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QS=Lr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),YS=Lr(/<%[\w\W]*|[\w\W]*%>/gm),KS=Lr(/\${[\w\W]*}/gm),XS=Lr(/^data-[\-\w.\u00B7-\uFFFF]/),ZS=Lr(/^aria-[\-\w]+$/),I1=Lr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),JS=Lr(/^(?:\w+script|data):/i),eE=Lr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),D1=Lr(/^html$/i);var Qv=Object.freeze({__proto__:null,MUSTACHE_EXPR:QS,ERB_EXPR:YS,TMPLIT_EXPR:KS,DATA_ATTR:XS,ARIA_ATTR:ZS,IS_ALLOWED_URI:I1,IS_SCRIPT_OR_DATA:JS,ATTR_WHITESPACE:eE,DOCTYPE_NAME:D1});const tE=function(){return typeof window>"u"?null:window},nE=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}};function z1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tE();const t=_e=>z1(_e);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:u,Node:a,Element:c,NodeFilter:d,NamedNodeMap:p=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:g,trustedTypes:y}=e,b=c.prototype,S=aa(b,"cloneNode"),j=aa(b,"nextSibling"),x=aa(b,"childNodes"),w=aa(b,"parentNode");if(typeof u=="function"){const _e=n.createElement("template");_e.content&&_e.content.ownerDocument&&(n=_e.content.ownerDocument)}let k,E="";const{implementation:C,createNodeIterator:R,createDocumentFragment:z,getElementsByTagName:F}=n,{importNode:ce}=r;let $={};t.isSupported=typeof R1=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Y,ERB_EXPR:H,TMPLIT_EXPR:he,DATA_ATTR:Se,ARIA_ATTR:je,IS_SCRIPT_OR_DATA:ze,ATTR_WHITESPACE:Be}=Qv;let{IS_ALLOWED_URI:J}=Qv,se=null;const we=Ye({},[...Wv,...sd,...ad,...cd,...Vv]);let P=null;const V=Ye({},[...qv,...fd,...Gv,...ca]);let ne=Object.seal(L1(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,ue=null,le=!0,ke=!0,Ne=!1,Ue=!0,et=!1,We=!1,Ee=!1,Ze=!1,ot=!1,Me=!1,Je=!1,At=!0,Qt=!1;const Wt="user-content-";let St=!0,Et=!1,Re={},Vt=null;const rn=Ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dr=null;const _r=Ye({},["audio","video","img","source","image","track"]);let li=null;const bo=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xr="http://www.w3.org/1998/Math/MathML",xr="http://www.w3.org/2000/svg",An="http://www.w3.org/1999/xhtml";let br=An,Zr=!1,O=null;const N=Ye({},[Xr,xr,An],ud);let I=null;const G=["application/xhtml+xml","text/html"],q="text/html";let fe=null,me=null;const Fe=n.createElement("form"),ut=function(D){return D instanceof RegExp||D instanceof Function},Oe=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(me&&me===D)){if((!D||typeof D!="object")&&(D={}),D=Xi(D),I=G.indexOf(D.PARSER_MEDIA_TYPE)===-1?I=q:I=D.PARSER_MEDIA_TYPE,fe=I==="application/xhtml+xml"?ud:Ta,se="ALLOWED_TAGS"in D?Ye({},D.ALLOWED_TAGS,fe):we,P="ALLOWED_ATTR"in D?Ye({},D.ALLOWED_ATTR,fe):V,O="ALLOWED_NAMESPACES"in D?Ye({},D.ALLOWED_NAMESPACES,ud):N,li="ADD_URI_SAFE_ATTR"in D?Ye(Xi(bo),D.ADD_URI_SAFE_ATTR,fe):bo,Dr="ADD_DATA_URI_TAGS"in D?Ye(Xi(_r),D.ADD_DATA_URI_TAGS,fe):_r,Vt="FORBID_CONTENTS"in D?Ye({},D.FORBID_CONTENTS,fe):rn,te="FORBID_TAGS"in D?Ye({},D.FORBID_TAGS,fe):{},ue="FORBID_ATTR"in D?Ye({},D.FORBID_ATTR,fe):{},Re="USE_PROFILES"in D?D.USE_PROFILES:!1,le=D.ALLOW_ARIA_ATTR!==!1,ke=D.ALLOW_DATA_ATTR!==!1,Ne=D.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=D.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=D.SAFE_FOR_TEMPLATES||!1,We=D.WHOLE_DOCUMENT||!1,ot=D.RETURN_DOM||!1,Me=D.RETURN_DOM_FRAGMENT||!1,Je=D.RETURN_TRUSTED_TYPE||!1,Ze=D.FORCE_BODY||!1,At=D.SANITIZE_DOM!==!1,Qt=D.SANITIZE_NAMED_PROPS||!1,St=D.KEEP_CONTENT!==!1,Et=D.IN_PLACE||!1,J=D.ALLOWED_URI_REGEXP||I1,br=D.NAMESPACE||An,ne=D.CUSTOM_ELEMENT_HANDLING||{},D.CUSTOM_ELEMENT_HANDLING&&ut(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=D.CUSTOM_ELEMENT_HANDLING.tagNameCheck),D.CUSTOM_ELEMENT_HANDLING&&ut(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),D.CUSTOM_ELEMENT_HANDLING&&typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(ke=!1),Me&&(ot=!0),Re&&(se=Ye({},[...Vv]),P=[],Re.html===!0&&(Ye(se,Wv),Ye(P,qv)),Re.svg===!0&&(Ye(se,sd),Ye(P,fd),Ye(P,ca)),Re.svgFilters===!0&&(Ye(se,ad),Ye(P,fd),Ye(P,ca)),Re.mathMl===!0&&(Ye(se,cd),Ye(P,Gv),Ye(P,ca))),D.ADD_TAGS&&(se===we&&(se=Xi(se)),Ye(se,D.ADD_TAGS,fe)),D.ADD_ATTR&&(P===V&&(P=Xi(P)),Ye(P,D.ADD_ATTR,fe)),D.ADD_URI_SAFE_ATTR&&Ye(li,D.ADD_URI_SAFE_ATTR,fe),D.FORBID_CONTENTS&&(Vt===rn&&(Vt=Xi(Vt)),Ye(Vt,D.FORBID_CONTENTS,fe)),St&&(se["#text"]=!0),We&&Ye(se,["html","head","body"]),se.table&&(Ye(se,["tbody"]),delete te.tbody),D.TRUSTED_TYPES_POLICY){if(typeof D.TRUSTED_TYPES_POLICY.createHTML!="function")throw lu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof D.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=D.TRUSTED_TYPES_POLICY,E=k.createHTML("")}else k===void 0&&(k=nE(y,o)),k!==null&&typeof E=="string"&&(E=k.createHTML(""));Cn&&Cn(D),me=D}},st=Ye({},["mi","mo","mn","ms","mtext"]),it=Ye({},["foreignobject","desc","title","annotation-xml"]),Nt=Ye({},["title","style","font","a","script"]),lt=Ye({},sd);Ye(lt,ad),Ye(lt,qS);const Lt=Ye({},cd);Ye(Lt,GS);const gt=function(D){let re=w(D);(!re||!re.tagName)&&(re={namespaceURI:br,tagName:"template"});const ge=Ta(D.tagName),pt=Ta(re.tagName);return O[D.namespaceURI]?D.namespaceURI===xr?re.namespaceURI===An?ge==="svg":re.namespaceURI===Xr?ge==="svg"&&(pt==="annotation-xml"||st[pt]):!!lt[ge]:D.namespaceURI===Xr?re.namespaceURI===An?ge==="math":re.namespaceURI===xr?ge==="math"&&it[pt]:!!Lt[ge]:D.namespaceURI===An?re.namespaceURI===xr&&!it[pt]||re.namespaceURI===Xr&&!st[pt]?!1:!Lt[ge]&&(Nt[ge]||!lt[ge]):!!(I==="application/xhtml+xml"&&O[D.namespaceURI]):!1},_t=function(D){ou(t.removed,{element:D});try{D.parentNode.removeChild(D)}catch{D.remove()}},pn=function(D,re){try{ou(t.removed,{attribute:re.getAttributeNode(D),from:re})}catch{ou(t.removed,{attribute:null,from:re})}if(re.removeAttribute(D),D==="is"&&!P[D])if(ot||Me)try{_t(re)}catch{}else try{re.setAttribute(D,"")}catch{}},Nn=function(D){let re=null,ge=null;if(Ze)D=""+D;else{const Yt=BS(D,/^[\r\n\t ]+/);ge=Yt&&Yt[0]}I==="application/xhtml+xml"&&br===An&&(D=''+D+"");const pt=k?k.createHTML(D):D;if(br===An)try{re=new g().parseFromString(pt,I)}catch{}if(!re||!re.documentElement){re=C.createDocument(br,"template",null);try{re.documentElement.innerHTML=Zr?E:pt}catch{}}const qe=re.body||re.documentElement;return D&&ge&&qe.insertBefore(n.createTextNode(ge),qe.childNodes[0]||null),br===An?F.call(re,We?"html":"body")[0]:We?re.documentElement:qe},nr=function(D){return R.call(D.ownerDocument||D,D,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null)},Un=function(D){return D instanceof h&&(typeof D.nodeName!="string"||typeof D.textContent!="string"||typeof D.removeChild!="function"||!(D.attributes instanceof p)||typeof D.removeAttribute!="function"||typeof D.setAttribute!="function"||typeof D.namespaceURI!="string"||typeof D.insertBefore!="function"||typeof D.hasChildNodes!="function")},sn=function(D){return typeof a=="function"&&D instanceof a},Ft=function(D,re,ge){$[D]&&sa($[D],pt=>{pt.call(t,re,ge,me)})},zr=function(D){let re=null;if(Ft("beforeSanitizeElements",D,null),Un(D))return _t(D),!0;const ge=fe(D.nodeName);if(Ft("uponSanitizeElement",D,{tagName:ge,allowedTags:se}),D.hasChildNodes()&&!sn(D.firstElementChild)&&qn(/<[/\w]/g,D.innerHTML)&&qn(/<[/\w]/g,D.textContent))return _t(D),!0;if(!se[ge]||te[ge]){if(!te[ge]&&ui(ge)&&(ne.tagNameCheck instanceof RegExp&&qn(ne.tagNameCheck,ge)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(ge)))return!1;if(St&&!Vt[ge]){const pt=w(D)||D.parentNode,qe=x(D)||D.childNodes;if(qe&&pt){const Yt=qe.length;for(let Ut=Yt-1;Ut>=0;--Ut)pt.insertBefore(S(qe[Ut],!0),j(D))}}return _t(D),!0}return D instanceof c&&!gt(D)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&qn(/<\/no(script|embed|frames)/i,D.innerHTML)?(_t(D),!0):(et&&D.nodeType===3&&(re=D.textContent,sa([Y,H,he],pt=>{re=iu(re,pt," ")}),D.textContent!==re&&(ou(t.removed,{element:D.cloneNode()}),D.textContent=re)),Ft("afterSanitizeElements",D,null),!1)},rr=function(D,re,ge){if(At&&(re==="id"||re==="name")&&(ge in n||ge in Fe))return!1;if(!(ke&&!ue[re]&&qn(Se,re))){if(!(le&&qn(je,re))){if(!P[re]||ue[re]){if(!(ui(D)&&(ne.tagNameCheck instanceof RegExp&&qn(ne.tagNameCheck,D)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(D))&&(ne.attributeNameCheck instanceof RegExp&&qn(ne.attributeNameCheck,re)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(re))||re==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&qn(ne.tagNameCheck,ge)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(ge))))return!1}else if(!li[re]){if(!qn(J,iu(ge,Be,""))){if(!((re==="src"||re==="xlink:href"||re==="href")&&D!=="script"&&HS(ge,"data:")===0&&Dr[D])){if(!(Ne&&!qn(ze,iu(ge,Be,"")))){if(ge)return!1}}}}}}return!0},ui=function(D){return D.indexOf("-")>0},ft=function(D){Ft("beforeSanitizeAttributes",D,null);const{attributes:re}=D;if(!re)return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:P};let pt=re.length;for(;pt--;){const qe=re[pt],{name:Yt,namespaceURI:Ut,value:$r}=qe,Jr=fe(Yt);let xt=Yt==="value"?$r:WS($r);if(ge.attrName=Jr,ge.attrValue=xt,ge.keepAttr=!0,ge.forceKeepAttr=void 0,Ft("uponSanitizeAttribute",D,ge),xt=ge.attrValue,ge.forceKeepAttr||(pn(Yt,D),!ge.keepAttr))continue;if(!Ue&&qn(/\/>/i,xt)){pn(Yt,D);continue}et&&sa([Y,H,he],Nl=>{xt=iu(xt,Nl," ")});const Al=fe(D.nodeName);if(rr(Al,Jr,xt)){if(Qt&&(Jr==="id"||Jr==="name")&&(pn(Yt,D),xt=Wt+xt),k&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Ut)switch(y.getAttributeType(Al,Jr)){case"TrustedHTML":{xt=k.createHTML(xt);break}case"TrustedScriptURL":{xt=k.createScriptURL(xt);break}}try{Ut?D.setAttributeNS(Ut,Yt,xt):D.setAttribute(Yt,xt),Hv(t.removed)}catch{}}}Ft("afterSanitizeAttributes",D,null)},dt=function _e(D){let re=null;const ge=nr(D);for(Ft("beforeSanitizeShadowDOM",D,null);re=ge.nextNode();)Ft("uponSanitizeShadowNode",re,null),!zr(re)&&(re.content instanceof l&&_e(re.content),ft(re));Ft("afterSanitizeShadowDOM",D,null)};return t.sanitize=function(_e){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=null,ge=null,pt=null,qe=null;if(Zr=!_e,Zr&&(_e=""),typeof _e!="string"&&!sn(_e))if(typeof _e.toString=="function"){if(_e=_e.toString(),typeof _e!="string")throw lu("dirty is not a string, aborting")}else throw lu("toString is not a function");if(!t.isSupported)return _e;if(Ee||Oe(D),t.removed=[],typeof _e=="string"&&(Et=!1),Et){if(_e.nodeName){const $r=fe(_e.nodeName);if(!se[$r]||te[$r])throw lu("root node is forbidden and cannot be sanitized in-place")}}else if(_e instanceof a)re=Nn(""),ge=re.ownerDocument.importNode(_e,!0),ge.nodeType===1&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?re=ge:re.appendChild(ge);else{if(!ot&&!et&&!We&&_e.indexOf("<")===-1)return k&&Je?k.createHTML(_e):_e;if(re=Nn(_e),!re)return ot?null:Je?E:""}re&&Ze&&_t(re.firstChild);const Yt=nr(Et?_e:re);for(;pt=Yt.nextNode();)zr(pt)||(pt.content instanceof l&&dt(pt.content),ft(pt));if(Et)return _e;if(ot){if(Me)for(qe=z.call(re.ownerDocument);re.firstChild;)qe.appendChild(re.firstChild);else qe=re;return(P.shadowroot||P.shadowrootmode)&&(qe=ce.call(r,qe,!0)),qe}let Ut=We?re.outerHTML:re.innerHTML;return We&&se["!doctype"]&&re.ownerDocument&&re.ownerDocument.doctype&&re.ownerDocument.doctype.name&&qn(D1,re.ownerDocument.doctype.name)&&(Ut=" -`+Ut),et&&sa([Y,H,he],$r=>{Ut=iu(Ut,$r," ")}),k&&Je?k.createHTML(Ut):Ut},t.setConfig=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Oe(_e),Ee=!0},t.clearConfig=function(){me=null,Ee=!1},t.isValidAttribute=function(_e,D,re){me||Oe({});const ge=fe(_e),pt=fe(D);return rr(ge,pt,re)},t.addHook=function(_e,D){typeof D=="function"&&($[_e]=$[_e]||[],ou($[_e],D))},t.removeHook=function(_e){if($[_e])return Hv($[_e])},t.removeHooks=function(_e){$[_e]&&($[_e]=[])},t.removeAllHooks=function(){$={}},t}var rE=z1();function oE({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const iE=M.forwardRef(oE),lE=iE;function uE({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const sE=M.forwardRef(uE),aE=sE;function cE({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const fE=M.forwardRef(cE),$1=fE;function dE({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const pE=M.forwardRef(dE),hE=pE;function Yv(e){return W.jsxs(W.Fragment,{children:[e.call&&W.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&W.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&W.jsx("span",{className:En("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:W.jsx(aE,{className:En("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&W.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:W.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:W.jsx("table",{className:"divide-y divide-gray-300",children:W.jsx("tbody",{children:Object.entries(JSON.parse(e.args)).map(([t,n],r)=>W.jsxs("tr",{children:[W.jsx("td",{className:En(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:W.jsx("div",{className:"font-medium text-gray-500",children:t})}),W.jsx("td",{className:En(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:C1(n)})]},r))})})})})]})}function mE(e){var r;const[t,n]=M.useState(!1);return W.jsxs("div",{className:"leading-6 flex flex-row mb-8",children:[W.jsx("div",{className:En("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24",e.type==="function"&&"mt-2"),children:e.type}),W.jsxs("div",{className:"flex-1",children:[e.type==="function"&&W.jsx(Yv,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&W.jsx(Yv,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?W.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:rE.sanitize(yt(e.content)).trim()}}):W.jsx("div",{className:"text-gray-900 prose",children:C1(e.content)}):!1]})]})}function gE(e){var n,r,o,l;const t=[...e.chat.messages,...((n=e.stream)==null?void 0:n.messages.filter(u=>!e.chat.messages.includes(u)))??[]];return M.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[e.chat.messages,(r=e.stream)==null?void 0:r.messages]),W.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t.map((u,a)=>M.createElement(mE,{...u,key:a})),((o=e.stream)==null?void 0:o.status)==="inflight"&&W.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),W.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:W.jsx(T1,{onSubmit:e.startStream,disabled:((l=e.stream)==null?void 0:l.status)==="inflight"})})]})}function vE(e){return W.jsxs(W.Fragment,{children:[W.jsxs("div",{onClick:()=>e.enterChat(null),className:En(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[W.jsx("span",{className:En(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:W.jsx($1,{className:"h-4 w-4"})}),W.jsx("span",{className:"truncate",children:"New Chat"})]}),W.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),W.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:e.chats.slice().reverse().map(t=>{var n;return W.jsx("li",{children:W.jsxs("div",{onClick:()=>e.enterChat(t.id),className:En(t===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[W.jsx("span",{className:En(t===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((n=t.name)==null?void 0:n[0])??" "}),W.jsx("span",{className:"truncate",children:t.name})]})},t.id)})})]})}var yE=Object.defineProperty,wE=(e,t,n)=>t in e?yE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dd=(e,t,n)=>(wE(e,typeof t!="symbol"?t+"":t,n),n);let _E=class{constructor(){dd(this,"current",this.detect()),dd(this,"handoffState","pending"),dd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},mo=new _E,yr=(e,t)=>{mo.isServer?M.useEffect(e,t):M.useLayoutEffect(e,t)};function go(e){let t=M.useRef(e);return yr(()=>{t.current=e},[e]),t}function kc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ii(){let e=[],t={addEventListener(n,r,o,l){return n.addEventListener(r,o,l),t.add(()=>n.removeEventListener(r,o,l))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return kc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let l=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:l})})},group(n){let r=Ii();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function _h(){let[e]=M.useState(Ii);return M.useEffect(()=>()=>e.dispose(),[e]),e}let Pt=function(e){let t=go(e);return nt.useCallback((...n)=>t.current(...n),[t])};function xE(){let e=typeof document>"u";return"useSyncExternalStore"in Su?(t=>t.useSyncExternalStore)(Su)(()=>()=>{},()=>!1,()=>!e):!1}function Ol(){let e=xE(),[t,n]=M.useState(mo.isHandoffComplete);return t&&mo.isHandoffComplete===!1&&n(!1),M.useEffect(()=>{t!==!0&&n(!0)},[t]),M.useEffect(()=>mo.handoff(),[]),e?!1:t}var Kv;let jl=(Kv=nt.useId)!=null?Kv:function(){let e=Ol(),[t,n]=nt.useState(e?()=>mo.nextId():null);return yr(()=>{t===null&&n(mo.nextId())},[t]),t!=null?""+t:void 0};function wn(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,wn),r}function M1(e){return mo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let mp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var vi=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(vi||{}),F1=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(F1||{}),bE=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(bE||{});function kE(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(mp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U1=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U1||{});function SE(e,t=0){var n;return e===((n=M1(e))==null?void 0:n.body)?!1:wn(t,{0(){return e.matches(mp)},1(){let r=e;for(;r!==null;){if(r.matches(mp))return!0;r=r.parentElement}return!1}})}var EE=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(EE||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ei(e){e==null||e.focus({preventScroll:!0})}let TE=["textarea","input"].join(",");function CE(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,TE))!=null?n:!1}function OE(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),l=t(r);if(o===null||l===null)return 0;let u=o.compareDocumentPosition(l);return u&Node.DOCUMENT_POSITION_FOLLOWING?-1:u&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ca(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,u=Array.isArray(e)?n?OE(e):e:kE(e);o.length>0&&u.length>1&&(u=u.filter(y=>!o.includes(y))),r=r??l.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,u.indexOf(r))-1;if(t&4)return Math.max(0,u.indexOf(r))+1;if(t&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},p=0,h=u.length,g;do{if(p>=h||p+h<=0)return 0;let y=c+p;if(t&16)y=(y+h)%h;else{if(y<0)return 3;if(y>=h)return 1}g=u[y],g==null||g.focus(d),p+=a}while(g!==l.activeElement);return t&6&&CE(g)&&g.select(),2}function fa(e,t,n){let r=go(t);M.useEffect(()=>{function o(l){r.current(l)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B1(e,t,n){let r=go(t);M.useEffect(()=>{function o(l){r.current(l)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function jE(e,t,n=!0){let r=M.useRef(!1);M.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(u,a){if(!r.current||u.defaultPrevented)return;let c=a(u);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let d=function p(h){return typeof h=="function"?p(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let p of d){if(p===null)continue;let h=p instanceof HTMLElement?p:p.current;if(h!=null&&h.contains(c)||u.composed&&u.composedPath().includes(h))return}return!SE(c,U1.Loose)&&c.tabIndex!==-1&&u.preventDefault(),t(u,c)}let l=M.useRef(null);fa("pointerdown",u=>{var a,c;r.current&&(l.current=((c=(a=u.composedPath)==null?void 0:a.call(u))==null?void 0:c[0])||u.target)},!0),fa("mousedown",u=>{var a,c;r.current&&(l.current=((c=(a=u.composedPath)==null?void 0:a.call(u))==null?void 0:c[0])||u.target)},!0),fa("click",u=>{l.current&&(o(u,()=>l.current),l.current=null)},!0),fa("touchend",u=>o(u,()=>u.target instanceof HTMLElement?u.target:null),!0),B1("blur",u=>o(u,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H1=Symbol();function AE(e,t=!0){return Object.assign(e,{[H1]:t})}function Ir(...e){let t=M.useRef(e);M.useEffect(()=>{t.current=e},[e]);let n=Pt(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H1]))?void 0:n}function tc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var nc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(nc||{}),qo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(qo||{});function wr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:l=!0,name:u}){let a=W1(t,e);if(l)return da(a,n,r,u);let c=o??0;if(c&2){let{static:d=!1,...p}=a;if(d)return da(p,n,r,u)}if(c&1){let{unmount:d=!0,...p}=a;return wn(d?0:1,{0(){return null},1(){return da({...p,hidden:!0,style:{display:"none"}},n,r,u)}})}return da(a,n,r,u)}function da(e,t={},n,r){let{as:o=n,children:l,refName:u="ref",...a}=pd(e,["unmount","static"]),c=e.ref!==void 0?{[u]:e.ref}:{},d=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t));let p={};if(t){let h=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(h=!0),b===!0&&g.push(y);h&&(p["data-headlessui-state"]=g.join(" "))}if(o===M.Fragment&&Object.keys(Xv(a)).length>0){if(!M.isValidElement(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(b=>` - ${b}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` -`)].join(` -`));let h=d.props,g=typeof(h==null?void 0:h.className)=="function"?(...b)=>tc(h==null?void 0:h.className(...b),a.className):tc(h==null?void 0:h.className,a.className),y=g?{className:g}:{};return M.cloneElement(d,Object.assign({},W1(d.props,Xv(pd(a,["ref"]))),p,c,NE(d.ref,c.ref),y))}return M.createElement(o,Object.assign({},pd(a,["ref"]),o!==M.Fragment&&c,o!==M.Fragment&&p),d)}function NE(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W1(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...l){let u=n[r];for(let a of u){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...l)}}});return t}function tr(e){var t;return Object.assign(M.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Xv(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function pd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function RE(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&PE(n)?!1:r}function PE(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let LE="div";var rc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(rc||{});function IE(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return wr({ourProps:o,theirProps:r,slot:{},defaultTag:LE,name:"Hidden"})}let gp=tr(IE),xh=M.createContext(null);xh.displayName="OpenClosedContext";var Yn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Yn||{});function bh(){return M.useContext(xh)}function DE({value:e,children:t}){return nt.createElement(xh.Provider,{value:e},t)}var V1=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(V1||{});function kh(e,t){let n=M.useRef([]),r=Pt(e);M.useEffect(()=>{let o=[...n.current];for(let[l,u]of t.entries())if(n.current[l]!==u){let a=r(t,o);return n.current=t,a}},[r,...t])}function zE(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Qu(...e){return M.useMemo(()=>M1(...e),[...e])}var pu=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(pu||{});function $E(){let e=M.useRef(0);return B1("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Yu(){let e=M.useRef(!1);return yr(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function q1(e,t,n,r){let o=go(n);M.useEffect(()=>{e=e??window;function l(u){o.current(u)}return e.addEventListener(t,l,r),()=>e.removeEventListener(t,l,r)},[e,t,r])}function ME(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G1(e){let t=Pt(e),n=M.useRef(!1);M.useEffect(()=>(n.current=!1,()=>{n.current=!0,kc(()=>{n.current&&t()})}),[t])}function Q1(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let FE="div";var Y1=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Y1||{});function UE(e,t){let n=M.useRef(null),r=Ir(n,t),{initialFocus:o,containers:l,features:u=30,...a}=e;Ol()||(u=1);let c=Qu(n);WE({ownerDocument:c},!!(u&16));let d=VE({ownerDocument:c,container:n,initialFocus:o},!!(u&2));qE({ownerDocument:c,container:n,containers:l,previousActiveElement:d},!!(u&8));let p=$E(),h=Pt(S=>{let j=n.current;j&&(x=>x())(()=>{wn(p.current,{[pu.Forwards]:()=>{Ca(j,vi.First,{skipElements:[S.relatedTarget]})},[pu.Backwards]:()=>{Ca(j,vi.Last,{skipElements:[S.relatedTarget]})}})})}),g=_h(),y=M.useRef(!1),b={ref:r,onKeyDown(S){S.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(S){let j=Q1(l);n.current instanceof HTMLElement&&j.add(n.current);let x=S.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(K1(j,x)||(y.current?Ca(n.current,wn(p.current,{[pu.Forwards]:()=>vi.Next,[pu.Backwards]:()=>vi.Previous})|vi.WrapAround,{relativeTo:S.target}):S.target instanceof HTMLElement&&Ei(S.target)))}};return nt.createElement(nt.Fragment,null,!!(u&4)&&nt.createElement(gp,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:rc.Focusable}),wr({ourProps:b,theirProps:a,defaultTag:FE,name:"FocusTrap"}),!!(u&4)&&nt.createElement(gp,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:rc.Focusable}))}let BE=tr(UE),uu=Object.assign(BE,{features:Y1}),Ho=[];ME(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ho[0]!==t.target&&(Ho.unshift(t.target),Ho=Ho.filter(n=>n!=null&&n.isConnected),Ho.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function HE(e=!0){let t=M.useRef(Ho.slice());return kh(([n],[r])=>{r===!0&&n===!1&&kc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Ho.slice())},[e,Ho,t]),Pt(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function WE({ownerDocument:e},t){let n=HE(t);kh(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ei(n())},[t]),G1(()=>{t&&Ei(n())})}function VE({ownerDocument:e,container:t,initialFocus:n},r){let o=M.useRef(null),l=Yu();return kh(()=>{if(!r)return;let u=t.current;u&&kc(()=>{if(!l.current)return;let a=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===a){o.current=a;return}}else if(u.contains(a)){o.current=a;return}n!=null&&n.current?Ei(n.current):Ca(u,vi.First)===F1.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function qE({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let l=Yu();q1(e==null?void 0:e.defaultView,"focus",u=>{if(!o||!l.current)return;let a=Q1(n);t.current instanceof HTMLElement&&a.add(t.current);let c=r.current;if(!c)return;let d=u.target;d&&d instanceof HTMLElement?K1(a,d)?(r.current=d,Ei(d)):(u.preventDefault(),u.stopPropagation(),Ei(c)):Ei(r.current)},!0)}function K1(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X1=M.createContext(!1);function GE(){return M.useContext(X1)}function vp(e){return nt.createElement(X1.Provider,{value:e.force},e.children)}function QE(e){let t=GE(),n=M.useContext(Z1),r=Qu(e),[o,l]=M.useState(()=>{if(!t&&n!==null||mo.isServer)return null;let u=r==null?void 0:r.getElementById("headlessui-portal-root");if(u)return u;if(r===null)return null;let a=r.createElement("div");return a.setAttribute("id","headlessui-portal-root"),r.body.appendChild(a)});return M.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),M.useEffect(()=>{t||n!==null&&l(n.current)},[n,l,t]),o}let YE=M.Fragment;function KE(e,t){let n=e,r=M.useRef(null),o=Ir(AE(p=>{r.current=p}),t),l=Qu(r),u=QE(r),[a]=M.useState(()=>{var p;return mo.isServer?null:(p=l==null?void 0:l.createElement("div"))!=null?p:null}),c=M.useContext(yp),d=Ol();return yr(()=>{!u||!a||u.contains(a)||(a.setAttribute("data-headlessui-portal",""),u.appendChild(a))},[u,a]),yr(()=>{if(a&&c)return c.register(a)},[c,a]),G1(()=>{var p;!u||!a||(a instanceof Node&&u.contains(a)&&u.removeChild(a),u.childNodes.length<=0&&((p=u.parentElement)==null||p.removeChild(u)))}),d?!u||!a?null:w1.createPortal(wr({ourProps:{ref:o},theirProps:n,defaultTag:YE,name:"Portal"}),a):null}let XE=M.Fragment,Z1=M.createContext(null);function ZE(e,t){let{target:n,...r}=e,o={ref:Ir(t)};return nt.createElement(Z1.Provider,{value:n},wr({ourProps:o,theirProps:r,defaultTag:XE,name:"Popover.Group"}))}let yp=M.createContext(null);function JE(){let e=M.useContext(yp),t=M.useRef([]),n=Pt(l=>(t.current.push(l),e&&e.register(l),()=>r(l))),r=Pt(l=>{let u=t.current.indexOf(l);u!==-1&&t.current.splice(u,1),e&&e.unregister(l)}),o=M.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,M.useMemo(()=>function({children:l}){return nt.createElement(yp.Provider,{value:o},l)},[o])]}let e2=tr(KE),t2=tr(ZE),wp=Object.assign(e2,{Group:t2}),J1=M.createContext(null);function ew(){let e=M.useContext(J1);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ew),t}return e}function n2(){let[e,t]=M.useState([]);return[e.length>0?e.join(" "):void 0,M.useMemo(()=>function(n){let r=Pt(l=>(t(u=>[...u,l]),()=>t(u=>{let a=u.slice(),c=a.indexOf(l);return c!==-1&&a.splice(c,1),a}))),o=M.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return nt.createElement(J1.Provider,{value:o},n.children)},[t])]}let r2="p";function o2(e,t){let n=jl(),{id:r=`headlessui-description-${n}`,...o}=e,l=ew(),u=Ir(t);yr(()=>l.register(r),[r,l.register]);let a={ref:u,...l.props,id:r};return wr({ourProps:a,theirProps:o,slot:l.slot||{},defaultTag:r2,name:l.name||"Description"})}let i2=tr(o2),l2=Object.assign(i2,{}),Sh=M.createContext(()=>{});Sh.displayName="StackContext";var _p=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(_p||{});function u2(){return M.useContext(Sh)}function s2({children:e,onUpdate:t,type:n,element:r,enabled:o}){let l=u2(),u=Pt((...a)=>{t==null||t(...a),l(...a)});return yr(()=>{let a=o===void 0||o===!0;return a&&u(0,n,r),()=>{a&&u(1,n,r)}},[u,n,r,o]),nt.createElement(Sh.Provider,{value:u},e)}function a2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const c2=typeof Object.is=="function"?Object.is:a2,{useState:f2,useEffect:d2,useLayoutEffect:p2,useDebugValue:h2}=Su;function m2(e,t,n){const r=t(),[{inst:o},l]=f2({inst:{value:r,getSnapshot:t}});return p2(()=>{o.value=r,o.getSnapshot=t,hd(o)&&l({inst:o})},[e,r,t]),d2(()=>(hd(o)&&l({inst:o}),e(()=>{hd(o)&&l({inst:o})})),[e]),h2(r),r}function hd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!c2(n,r)}catch{return!0}}function g2(e,t,n){return t()}const v2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y2=!v2,w2=y2?g2:m2,_2="useSyncExternalStore"in Su?(e=>e.useSyncExternalStore)(Su):w2;function x2(e){return _2(e.subscribe,e.getSnapshot,e.getSnapshot)}function b2(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...l){let u=t[o].call(n,...l);u&&(n=u,r.forEach(a=>a()))}}}function k2(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,l=e-o;n.style(r,"paddingRight",`${l}px`)}}}function S2(){if(!zE())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(l){return r.containers.flatMap(u=>u()).some(u=>u.contains(l))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let u=Ii();u.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>u.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let l=null;n.addEventListener(t,"click",u=>{if(u.target instanceof HTMLElement)try{let a=u.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),d=t.querySelector(c);d&&!o(d)&&(l=d)}catch{}},!0),n.addEventListener(t,"touchmove",u=>{u.target instanceof HTMLElement&&!o(u.target)&&u.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}}function E2(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function T2(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let bi=b2(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Ii(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:T2(n)},o=[S2(),k2(),E2()];o.forEach(({before:l})=>l==null?void 0:l(r)),o.forEach(({after:l})=>l==null?void 0:l(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});bi.subscribe(()=>{let e=bi.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&bi.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&bi.dispatch("TEARDOWN",n)}});function C2(e,t,n){let r=x2(bi),o=e?r.get(e):void 0,l=o?o.count>0:!1;return yr(()=>{if(!(!e||!t))return bi.dispatch("PUSH",e,n),()=>bi.dispatch("POP",e,n)},[t,e]),l}let md=new Map,su=new Map;function Zv(e,t=!0){yr(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var u;if(!r)return;let a=(u=su.get(r))!=null?u:1;if(a===1?su.delete(r):su.set(r,a-1),a!==1)return;let c=md.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,md.delete(r))}let l=(n=su.get(r))!=null?n:0;return su.set(r,l+1),l!==0||(md.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function O2({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=M.useRef((r=n==null?void 0:n.current)!=null?r:null),l=Qu(o),u=Pt(()=>{var a;let c=[];for(let d of e)d!==null&&(d instanceof HTMLElement?c.push(d):"current"in d&&d.current instanceof HTMLElement&&c.push(d.current));if(t!=null&&t.current)for(let d of t.current)c.push(d);for(let d of(a=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?a:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(o.current)||c.some(p=>d.contains(p))||c.push(d));return c});return{resolveContainers:u,contains:Pt(a=>u().some(c=>c.contains(a))),mainTreeNodeRef:o,MainTreeNode:M.useMemo(()=>function(){return n!=null?null:nt.createElement(gp,{features:rc.Hidden,ref:o})},[o,n])}}var j2=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(j2||{}),A2=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(A2||{});let N2={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},oc=M.createContext(null);oc.displayName="DialogContext";function Ku(e){let t=M.useContext(oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ku),n}return t}function R2(e,t,n=()=>[document.body]){C2(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function P2(e,t){return wn(t.type,N2,e,t)}let L2="div",I2=nc.RenderStrategy|nc.Static;function D2(e,t){var n;let r=jl(),{id:o=`headlessui-dialog-${r}`,open:l,onClose:u,initialFocus:a,__demoMode:c=!1,...d}=e,[p,h]=M.useState(0),g=bh();l===void 0&&g!==null&&(l=(g&Yn.Open)===Yn.Open);let y=M.useRef(null),b=Ir(y,t),S=Qu(y),j=e.hasOwnProperty("open")||g!==null,x=e.hasOwnProperty("onClose");if(!j&&!x)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!j)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!x)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof l!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${l}`);if(typeof u!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${u}`);let w=l?0:1,[k,E]=M.useReducer(P2,{titleId:null,descriptionId:null,panelRef:M.createRef()}),C=Pt(()=>u(!1)),R=Pt(Ue=>E({type:0,id:Ue})),z=Ol()?c?!1:w===0:!1,F=p>1,ce=M.useContext(oc)!==null,[$,Y]=JE(),{resolveContainers:H,mainTreeNodeRef:he,MainTreeNode:Se}=O2({portals:$,defaultContainers:[(n=k.panelRef.current)!=null?n:y.current]}),je=F?"parent":"leaf",ze=g!==null?(g&Yn.Closing)===Yn.Closing:!1,Be=(()=>ce||ze?!1:z)(),J=M.useCallback(()=>{var Ue,et;return(et=Array.from((Ue=S==null?void 0:S.querySelectorAll("body > *"))!=null?Ue:[]).find(We=>We.id==="headlessui-portal-root"?!1:We.contains(he.current)&&We instanceof HTMLElement))!=null?et:null},[he]);Zv(J,Be);let se=(()=>F?!0:z)(),we=M.useCallback(()=>{var Ue,et;return(et=Array.from((Ue=S==null?void 0:S.querySelectorAll("[data-headlessui-portal]"))!=null?Ue:[]).find(We=>We.contains(he.current)&&We instanceof HTMLElement))!=null?et:null},[he]);Zv(we,se);let P=(()=>!(!z||F))();jE(H,C,P);let V=(()=>!(F||w!==0))();q1(S==null?void 0:S.defaultView,"keydown",Ue=>{V&&(Ue.defaultPrevented||Ue.key===V1.Escape&&(Ue.preventDefault(),Ue.stopPropagation(),C()))});let ne=(()=>!(ze||w!==0||ce))();R2(S,ne,H),M.useEffect(()=>{if(w!==0||!y.current)return;let Ue=new ResizeObserver(et=>{for(let We of et){let Ee=We.target.getBoundingClientRect();Ee.x===0&&Ee.y===0&&Ee.width===0&&Ee.height===0&&C()}});return Ue.observe(y.current),()=>Ue.disconnect()},[w,y,C]);let[te,ue]=n2(),le=M.useMemo(()=>[{dialogState:w,close:C,setTitleId:R},k],[w,k,C,R]),ke=M.useMemo(()=>({open:w===0}),[w]),Ne={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":k.titleId,"aria-describedby":te};return nt.createElement(s2,{type:"Dialog",enabled:w===0,element:y,onUpdate:Pt((Ue,et)=>{et==="Dialog"&&wn(Ue,{[_p.Add]:()=>h(We=>We+1),[_p.Remove]:()=>h(We=>We-1)})})},nt.createElement(vp,{force:!0},nt.createElement(wp,null,nt.createElement(oc.Provider,{value:le},nt.createElement(wp.Group,{target:y},nt.createElement(vp,{force:!1},nt.createElement(ue,{slot:ke,name:"Dialog.Description"},nt.createElement(uu,{initialFocus:a,containers:H,features:z?wn(je,{parent:uu.features.RestoreFocus,leaf:uu.features.All&~uu.features.FocusLock}):uu.features.None},nt.createElement(Y,null,wr({ourProps:Ne,theirProps:d,slot:ke,defaultTag:L2,features:I2,visible:w===0,name:"Dialog"}))))))))),nt.createElement(Se,null))}let z2="div";function $2(e,t){let n=jl(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:l,close:u}]=Ku("Dialog.Overlay"),a=Ir(t),c=Pt(p=>{if(p.target===p.currentTarget){if(RE(p.currentTarget))return p.preventDefault();p.preventDefault(),p.stopPropagation(),u()}}),d=M.useMemo(()=>({open:l===0}),[l]);return wr({ourProps:{ref:a,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:d,defaultTag:z2,name:"Dialog.Overlay"})}let M2="div";function F2(e,t){let n=jl(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:l},u]=Ku("Dialog.Backdrop"),a=Ir(t);M.useEffect(()=>{if(u.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[u.panelRef]);let c=M.useMemo(()=>({open:l===0}),[l]);return nt.createElement(vp,{force:!0},nt.createElement(wp,null,wr({ourProps:{ref:a,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:M2,name:"Dialog.Backdrop"})))}let U2="div";function B2(e,t){let n=jl(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:l},u]=Ku("Dialog.Panel"),a=Ir(t,u.panelRef),c=M.useMemo(()=>({open:l===0}),[l]),d=Pt(p=>{p.stopPropagation()});return wr({ourProps:{ref:a,id:r,onClick:d},theirProps:o,slot:c,defaultTag:U2,name:"Dialog.Panel"})}let H2="h2";function W2(e,t){let n=jl(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:l,setTitleId:u}]=Ku("Dialog.Title"),a=Ir(t);M.useEffect(()=>(u(r),()=>u(null)),[r,u]);let c=M.useMemo(()=>({open:l===0}),[l]);return wr({ourProps:{ref:a,id:r},theirProps:o,slot:c,defaultTag:H2,name:"Dialog.Title"})}let V2=tr(D2),q2=tr(F2),G2=tr(B2),Q2=tr($2),Y2=tr(W2),Jv=Object.assign(V2,{Backdrop:q2,Panel:G2,Overlay:Q2,Title:Y2,Description:l2});function K2(e=0){let[t,n]=M.useState(e),r=Yu(),o=M.useCallback(c=>{r.current&&n(d=>d|c)},[t,r]),l=M.useCallback(c=>!!(t&c),[t]),u=M.useCallback(c=>{r.current&&n(d=>d&~c)},[n,r]),a=M.useCallback(c=>{r.current&&n(d=>d^c)},[n]);return{flags:t,addFlag:o,hasFlag:l,removeFlag:u,toggleFlag:a}}function X2(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function gd(e,...t){e&&t.length>0&&e.classList.add(...t)}function vd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Z2(e,t){let n=Ii();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[l,u]=[r,o].map(c=>{let[d=0]=c.split(",").filter(Boolean).map(p=>p.includes("ms")?parseFloat(p):parseFloat(p)*1e3).sort((p,h)=>h-p);return d}),a=l+u;if(a!==0){n.group(d=>{d.setTimeout(()=>{t(),d.dispose()},a),d.addEventListener(e,"transitionrun",p=>{p.target===p.currentTarget&&d.dispose()})});let c=n.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function J2(e,t,n,r){let o=n?"enter":"leave",l=Ii(),u=r!==void 0?X2(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let a=wn(o,{enter:()=>t.enter,leave:()=>t.leave}),c=wn(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),d=wn(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return vd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),gd(e,...t.base,...a,...d),l.nextFrame(()=>{vd(e,...t.base,...a,...d),gd(e,...t.base,...a,...c),Z2(e,()=>(vd(e,...t.base,...a),gd(e,...t.base,...t.entered),u()))}),l.dispose}function eT({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:l}){let u=Yu(),a=_h(),c=go(n);yr(()=>{e&&(c.current="enter")},[e]),yr(()=>{let d=Ii();a.add(d.dispose);let p=t.current;if(p&&c.current!=="idle"&&u.current)return d.dispose(),o.current(c.current),d.add(J2(p,r.current,c.current==="enter",()=>{d.dispose(),l.current(c.current)})),d.dispose},[n])}function $o(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Sc=M.createContext(null);Sc.displayName="TransitionContext";var tT=(e=>(e.Visible="visible",e.Hidden="hidden",e))(tT||{});function nT(){let e=M.useContext(Sc);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function rT(){let e=M.useContext(Ec);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let Ec=M.createContext(null);Ec.displayName="NestingContext";function Tc(e){return"children"in e?Tc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tw(e,t){let n=go(e),r=M.useRef([]),o=Yu(),l=_h(),u=Pt((y,b=qo.Hidden)=>{let S=r.current.findIndex(({el:j})=>j===y);S!==-1&&(wn(b,{[qo.Unmount](){r.current.splice(S,1)},[qo.Hidden](){r.current[S].state="hidden"}}),l.microTask(()=>{var j;!Tc(r)&&o.current&&((j=n.current)==null||j.call(n))}))}),a=Pt(y=>{let b=r.current.find(({el:S})=>S===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>u(y,qo.Unmount)}),c=M.useRef([]),d=M.useRef(Promise.resolve()),p=M.useRef({enter:[],leave:[],idle:[]}),h=Pt((y,b,S)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([j])=>j!==y)),t==null||t.chains.current[b].push([y,new Promise(j=>{c.current.push(j)})]),t==null||t.chains.current[b].push([y,new Promise(j=>{Promise.all(p.current[b].map(([x,w])=>w)).then(()=>j())})]),b==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>S(b)):S(b)}),g=Pt((y,b,S)=>{Promise.all(p.current[b].splice(0).map(([j,x])=>x)).then(()=>{var j;(j=c.current.shift())==null||j()}).then(()=>S(b))});return M.useMemo(()=>({children:r,register:a,unregister:u,onStart:h,onStop:g,wait:d,chains:p}),[a,u,r,h,g,p,d])}function oT(){}let iT=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function e0(e){var t;let n={};for(let r of iT)n[r]=(t=e[r])!=null?t:oT;return n}function lT(e){let t=M.useRef(e0(e));return M.useEffect(()=>{t.current=e0(e)},[e]),t}let uT="div",nw=nc.RenderStrategy;function sT(e,t){var n,r;let{beforeEnter:o,afterEnter:l,beforeLeave:u,afterLeave:a,enter:c,enterFrom:d,enterTo:p,entered:h,leave:g,leaveFrom:y,leaveTo:b,...S}=e,j=M.useRef(null),x=Ir(j,t),w=(n=S.unmount)==null||n?qo.Unmount:qo.Hidden,{show:k,appear:E,initial:C}=nT(),[R,z]=M.useState(k?"visible":"hidden"),F=rT(),{register:ce,unregister:$}=F;M.useEffect(()=>ce(j),[ce,j]),M.useEffect(()=>{if(w===qo.Hidden&&j.current){if(k&&R!=="visible"){z("visible");return}return wn(R,{hidden:()=>$(j),visible:()=>ce(j)})}},[R,j,ce,$,k,w]);let Y=go({base:$o(S.className),enter:$o(c),enterFrom:$o(d),enterTo:$o(p),entered:$o(h),leave:$o(g),leaveFrom:$o(y),leaveTo:$o(b)}),H=lT({beforeEnter:o,afterEnter:l,beforeLeave:u,afterLeave:a}),he=Ol();M.useEffect(()=>{if(he&&R==="visible"&&j.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[j,R,he]);let Se=C&&!E,je=E&&k&&C,ze=(()=>!he||Se?"idle":k?"enter":"leave")(),Be=K2(0),J=Pt(ne=>wn(ne,{enter:()=>{Be.addFlag(Yn.Opening),H.current.beforeEnter()},leave:()=>{Be.addFlag(Yn.Closing),H.current.beforeLeave()},idle:()=>{}})),se=Pt(ne=>wn(ne,{enter:()=>{Be.removeFlag(Yn.Opening),H.current.afterEnter()},leave:()=>{Be.removeFlag(Yn.Closing),H.current.afterLeave()},idle:()=>{}})),we=tw(()=>{z("hidden"),$(j)},F);eT({immediate:je,container:j,classes:Y,direction:ze,onStart:go(ne=>{we.onStart(j,ne,J)}),onStop:go(ne=>{we.onStop(j,ne,se),ne==="leave"&&!Tc(we)&&(z("hidden"),$(j))})});let P=S,V={ref:x};return je?P={...P,className:tc(S.className,...Y.current.enter,...Y.current.enterFrom)}:(P.className=tc(S.className,(r=j.current)==null?void 0:r.className),P.className===""&&delete P.className),nt.createElement(Ec.Provider,{value:we},nt.createElement(DE,{value:wn(R,{visible:Yn.Open,hidden:Yn.Closed})|Be.flags},wr({ourProps:V,theirProps:P,defaultTag:uT,features:nw,visible:R==="visible",name:"Transition.Child"})))}function aT(e,t){let{show:n,appear:r=!1,unmount:o=!0,...l}=e,u=M.useRef(null),a=Ir(u,t);Ol();let c=bh();if(n===void 0&&c!==null&&(n=(c&Yn.Open)===Yn.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[d,p]=M.useState(n?"visible":"hidden"),h=tw(()=>{p("hidden")}),[g,y]=M.useState(!0),b=M.useRef([n]);yr(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let S=M.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);M.useEffect(()=>{if(n)p("visible");else if(!Tc(h))p("hidden");else{let k=u.current;if(!k)return;let E=k.getBoundingClientRect();E.x===0&&E.y===0&&E.width===0&&E.height===0&&p("hidden")}},[n,h]);let j={unmount:o},x=Pt(()=>{var k;g&&y(!1),(k=e.beforeEnter)==null||k.call(e)}),w=Pt(()=>{var k;g&&y(!1),(k=e.beforeLeave)==null||k.call(e)});return nt.createElement(Ec.Provider,{value:h},nt.createElement(Sc.Provider,{value:S},wr({ourProps:{...j,as:M.Fragment,children:nt.createElement(rw,{ref:a,...j,...l,beforeEnter:x,beforeLeave:w})},theirProps:{},defaultTag:M.Fragment,features:nw,visible:d==="visible",name:"Transition"})))}function cT(e,t){let n=M.useContext(Sc)!==null,r=bh()!==null;return nt.createElement(nt.Fragment,null,!n&&r?nt.createElement(xp,{ref:t,...e}):nt.createElement(rw,{ref:t,...e}))}let xp=tr(aT),rw=tr(sT),fT=tr(cT),pa=Object.assign(xp,{Child:fT,Root:xp});function dT(e){return W.jsxs(W.Fragment,{children:[W.jsx(pa.Root,{show:e.sidebarOpen,as:M.Fragment,children:W.jsxs(Jv,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[W.jsx(pa.Child,{as:M.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:W.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),W.jsx("div",{className:"fixed inset-0 flex",children:W.jsx(pa.Child,{as:M.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:W.jsxs(Jv.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[W.jsx(pa.Child,{as:M.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:W.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:W.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[W.jsx("span",{className:"sr-only",children:"Close sidebar"}),W.jsx(hE,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),W.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:W.jsx("nav",{className:"flex flex-1 flex-col",children:W.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:W.jsx("li",{children:e.sidebar})})})})]})})})]})}),W.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:W.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:W.jsx("nav",{className:"flex flex-1 flex-col",children:W.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:W.jsx("li",{children:e.sidebar})})})})}),W.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[W.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[W.jsx("span",{className:"sr-only",children:"Open sidebar"}),W.jsx(lE,{className:"h-6 w-6","aria-hidden":"true"})]}),W.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:"OpenGPTs"})]}),W.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:W.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function pT(e){return W.jsxs(W.Fragment,{children:[W.jsxs("div",{onClick:()=>e.enterConfig(null),className:En(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[W.jsx("span",{className:En(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:W.jsx($1,{className:"h-4 w-4"})}),W.jsx("span",{className:"truncate",children:"New Bot"})]}),W.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),W.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:e.configs.map(t=>{var n;return W.jsx("li",{children:W.jsxs("div",{onClick:()=>e.enterConfig(t.key),className:En(t===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[W.jsx("span",{className:En(t===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((n=t.key)==null?void 0:n[0])??" "}),W.jsx("span",{className:"truncate",children:t.key})]})},t.key)})})]})}function Eh(e){return W.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function hT(e){return W.jsxs("div",{children:[W.jsx(Eh,{id:e.id,title:e.title}),W.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function mT(e){var t;return W.jsxs("div",{children:[W.jsx(Eh,{id:e.id,title:e.title}),W.jsxs("fieldset",{children:[W.jsx("legend",{className:"sr-only",children:e.field.title}),W.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>W.jsxs("div",{className:"flex items-center",children:[W.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),W.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}function gT(e){var t,n,r;return W.jsxs("fieldset",{children:[W.jsx(Eh,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),W.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>W.jsxs("div",{className:"relative flex items-start",children:[W.jsx("div",{className:"flex h-6 items-center",children:W.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(u=>u!==o))}})}),W.jsx("div",{className:"ml-3 text-sm leading-6",children:W.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o})})]},o))})]})}function vT(e){var o,l,u;const[t,n]=M.useState(((o=e.config)==null?void 0:o.config)??e.configDefaults);M.useEffect(()=>{var a;n(((a=e.config)==null?void 0:a.config)??e.configDefaults)},[e.config,e.configDefaults]);const r=!!e.config;return W.jsxs(W.Fragment,{children:[W.jsxs("div",{className:"font-semibold text-lg leading-6 text-gray-600 mb-4",children:["Bot: ",((l=e.config)==null?void 0:l.key)??"New Bot"," ",W.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]}),W.jsxs("form",{className:En("flex flex-col gap-8",r&&"opacity-50 cursor-not-allowed"),onSubmit:a=>{a.preventDefault(),a.stopPropagation();const d=a.target.key.value;d&&e.saveConfig(d,t)},children:[Object.entries(((u=e.configSchema)==null?void 0:u.properties.configurable.properties)??{}).map(([a,c])=>{var p,h,g,y;const d=c.title;if(((p=c.allOf)==null?void 0:p.length)===1&&(c=c.allOf[0]),a==="agent_type")return W.jsx(mT,{id:a,field:c,title:d,value:(h=t==null?void 0:t.configurable)==null?void 0:h[a],setValue:b=>n({...t,configurable:{...t.configurable,[a]:b}}),readonly:r},a);if(a==="system_message")return W.jsx(hT,{id:a,field:c,title:d,value:(g=t==null?void 0:t.configurable)==null?void 0:g[a],setValue:b=>n({...t,configurable:{...t.configurable,[a]:b}}),readonly:r},a);if(a==="tools")return W.jsx(gT,{id:a,field:c,title:d,value:(y=t==null?void 0:t.configurable)==null?void 0:y[a],setValue:b=>n({...t,configurable:{...t.configurable,[a]:b}}),readonly:r},a)}),!e.config&&W.jsxs("div",{className:"flex flex-row",children:[W.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:W.jsx("input",{type:"text",name:"key",id:"key",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),W.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:"Save"})]})]})]})}function yT(e){return W.jsxs("div",{className:"flex flex-col items-stretch",children:[W.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[W.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:W.jsx(pT,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),W.jsx("main",{className:"flex-1",children:W.jsx("div",{className:"px-4",children:W.jsx(vT,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig})})})]}),W.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:W.jsx(T1,{onSubmit:e.startChat,disabled:!e.currentConfig})})]})}const t0="langgizmo-";function ow(e,t){const[n,r]=M.useState(()=>{const o=localStorage.getItem(t0+t);return o?JSON.parse(o):e});return M.useEffect(()=>{localStorage.setItem(t0+t,JSON.stringify(n))},[n,t]),[n,r]}function wT(){const[e,t]=ow([],"chats"),[n,r]=M.useState(null),o=M.useCallback(async(a,c,d)=>{const p={id:Math.random().toString(36).substr(2,9),name:a,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),messages:c,config:d};return t(h=>[...h,p]),r(p.id),p},[t]),l=M.useCallback(async(a,c)=>{t(d=>d.map(p=>p.id===a?{...p,...c}:p))},[t]),u=M.useCallback(a=>{r(a)},[]);return{chats:e,currentChat:e.find(a=>a.id===n)||null,createChat:o,updateChat:l,enterChat:u}}const _T=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,l){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:l})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var u in r)n.d(l,u,(function(a){return r[a]}).bind(null,u));return l},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(a){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(a)}var o=n(47),l=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,u=o||l||Function("return this")();e.exports=u},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(l,u){var a=o(l,u);return r(a)?a:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),l=n(7);e.exports=function(u){return l(u)?r(u):o(u)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(l){return l!=null&&o(l.length)&&!r(l)}},function(e,t,n){var r=n(9),o=n(101),l=n(102),u=r?r.toStringTag:void 0;e.exports=function(a){return a==null?a===void 0?"[object Undefined]":"[object Null]":u&&u in Object(a)?o(a):l(a)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),l=n(133),u=n(61),a=n(134),c=n(8),d=n(48),p=d(r),h=d(o),g=d(l),y=d(u),b=d(a),S=c;(r&&S(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&S(new o)!="[object Map]"||l&&S(l.resolve())!="[object Promise]"||u&&S(new u)!="[object Set]"||a&&S(new a)!="[object WeakMap]")&&(S=function(j){var x=c(j),w=x=="[object Object]"?j.constructor:void 0,k=w?d(w):"";if(k)switch(k){case p:return"[object DataView]";case h:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return x}),e.exports=S},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(h)}var l=n(2),u=n(121),a=o(t)=="object"&&t&&!t.nodeType&&t,c=a&&o(r)=="object"&&r&&!r.nodeType&&r,d=c&&c.exports===a?l.Buffer:void 0,p=(d?d.isBuffer:void 0)||u;r.exports=p}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(j){if(n===setTimeout)return setTimeout(j,0);if((n===l||!n)&&setTimeout)return n=setTimeout,setTimeout(j,0);try{return n(j,0)}catch{try{return n.call(null,j,0)}catch{return n.call(this,j,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:l}catch{n=l}try{r=typeof clearTimeout=="function"?clearTimeout:u}catch{r=u}})();var c,d=[],p=!1,h=-1;function g(){p&&c&&(p=!1,c.length?d=c.concat(d):h=-1,d.length&&y())}function y(){if(!p){var j=a(g);p=!0;for(var x=d.length;x;){for(c=d,d=[];++h1)for(var w=1;wj){var x=S;S=j,j=x}return S+""+j+""+(o.isUndefined(b)?"\0":b)}function d(h,g,y,b){var S=""+g,j=""+y;if(!h&&S>j){var x=S;S=j,j=x}var w={v:S,w:j};return b&&(w.name=b),w}function p(h,g){return c(h,g.v,g.w,g.name)}l.prototype._nodeCount=0,l.prototype._edgeCount=0,l.prototype.isDirected=function(){return this._isDirected},l.prototype.isMultigraph=function(){return this._isMultigraph},l.prototype.isCompound=function(){return this._isCompound},l.prototype.setGraph=function(h){return this._label=h,this},l.prototype.graph=function(){return this._label},l.prototype.setDefaultNodeLabel=function(h){return o.isFunction(h)||(h=o.constant(h)),this._defaultNodeLabelFn=h,this},l.prototype.nodeCount=function(){return this._nodeCount},l.prototype.nodes=function(){return o.keys(this._nodes)},l.prototype.sources=function(){var h=this;return o.filter(this.nodes(),function(g){return o.isEmpty(h._in[g])})},l.prototype.sinks=function(){var h=this;return o.filter(this.nodes(),function(g){return o.isEmpty(h._out[g])})},l.prototype.setNodes=function(h,g){var y=arguments,b=this;return o.each(h,function(S){y.length>1?b.setNode(S,g):b.setNode(S)}),this},l.prototype.setNode=function(h,g){return o.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=g),this):(this._nodes[h]=arguments.length>1?g:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]="\0",this._children[h]={},this._children["\0"][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},l.prototype.node=function(h){return this._nodes[h]},l.prototype.hasNode=function(h){return o.has(this._nodes,h)},l.prototype.removeNode=function(h){var g=this;if(o.has(this._nodes,h)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],o.each(this.children(h),function(b){g.setParent(b)}),delete this._children[h]),o.each(o.keys(this._in[h]),y),delete this._in[h],delete this._preds[h],o.each(o.keys(this._out[h]),y),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},l.prototype.setParent=function(h,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===h)throw new Error("Setting "+g+" as parent of "+h+" would create a cycle");this.setNode(g)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=g,this._children[g][h]=!0,this},l.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},l.prototype.parent=function(h){if(this._isCompound){var g=this._parent[h];if(g!=="\0")return g}},l.prototype.children=function(h){if(o.isUndefined(h)&&(h="\0"),this._isCompound){var g=this._children[h];if(g)return o.keys(g)}else{if(h==="\0")return this.nodes();if(this.hasNode(h))return[]}},l.prototype.predecessors=function(h){var g=this._preds[h];if(g)return o.keys(g)},l.prototype.successors=function(h){var g=this._sucs[h];if(g)return o.keys(g)},l.prototype.neighbors=function(h){var g=this.predecessors(h);if(g)return o.union(g,this.successors(h))},l.prototype.isLeaf=function(h){return(this.isDirected()?this.successors(h):this.neighbors(h)).length===0},l.prototype.filterNodes=function(h){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(S,j){h(j)&&g.setNode(j,S)}),o.each(this._edgeObjs,function(S){g.hasNode(S.v)&&g.hasNode(S.w)&&g.setEdge(S,y.edge(S))});var b={};return this._isCompound&&o.each(g.nodes(),function(S){g.setParent(S,function j(x){var w=y.parent(x);return w===void 0||g.hasNode(w)?(b[x]=w,w):w in b?b[w]:j(w)}(S))}),g},l.prototype.setDefaultEdgeLabel=function(h){return o.isFunction(h)||(h=o.constant(h)),this._defaultEdgeLabelFn=h,this},l.prototype.edgeCount=function(){return this._edgeCount},l.prototype.edges=function(){return o.values(this._edgeObjs)},l.prototype.setPath=function(h,g){var y=this,b=arguments;return o.reduce(h,function(S,j){return b.length>1?y.setEdge(S,j,g):y.setEdge(S,j),j}),this},l.prototype.setEdge=function(){var h,g,y,b,S=!1,j=arguments[0];r(j)==="object"&&j!==null&&"v"in j?(h=j.v,g=j.w,y=j.name,arguments.length===2&&(b=arguments[1],S=!0)):(h=j,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],S=!0)),h=""+h,g=""+g,o.isUndefined(y)||(y=""+y);var x=c(this._isDirected,h,g,y);if(o.has(this._edgeLabels,x))return S&&(this._edgeLabels[x]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(g),this._edgeLabels[x]=S?b:this._defaultEdgeLabelFn(h,g,y);var w=d(this._isDirected,h,g,y);return h=w.v,g=w.w,Object.freeze(w),this._edgeObjs[x]=w,u(this._preds[g],h),u(this._sucs[h],g),this._in[g][x]=w,this._out[h][x]=w,this._edgeCount++,this},l.prototype.edge=function(h,g,y){var b=arguments.length===1?p(this._isDirected,arguments[0]):c(this._isDirected,h,g,y);return this._edgeLabels[b]},l.prototype.hasEdge=function(h,g,y){var b=arguments.length===1?p(this._isDirected,arguments[0]):c(this._isDirected,h,g,y);return o.has(this._edgeLabels,b)},l.prototype.removeEdge=function(h,g,y){var b=arguments.length===1?p(this._isDirected,arguments[0]):c(this._isDirected,h,g,y),S=this._edgeObjs[b];return S&&(h=S.v,g=S.w,delete this._edgeLabels[b],delete this._edgeObjs[b],a(this._preds[g],h),a(this._sucs[h],g),delete this._in[g][b],delete this._out[h][b],this._edgeCount--),this},l.prototype.inEdges=function(h,g){var y=this._in[h];if(y){var b=o.values(y);return g?o.filter(b,function(S){return S.v===g}):b}},l.prototype.outEdges=function(h,g){var y=this._out[h];if(y){var b=o.values(y);return g?o.filter(b,function(S){return S.w===g}):b}},l.prototype.nodeEdges=function(h,g){var y=this.inEdges(h,g);if(y)return y.concat(this.outEdges(h,g))}},function(e,t,n){var r=n(15),o=n(95),l=n(96),u=n(97),a=n(98),c=n(99);function d(p){var h=this.__data__=new r(p);this.size=h.size}d.prototype.clear=o,d.prototype.delete=l,d.prototype.get=u,d.prototype.has=a,d.prototype.set=c,e.exports=d},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),l=n(115),u=n(116),a=n(117);function c(d){var p=-1,h=d==null?0:d.length;for(this.clear();++p-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(p)}var l=n(47),u=o(t)=="object"&&t&&!t.nodeType&&t,a=u&&o(r)=="object"&&r&&!r.nodeType&&r,c=a&&a.exports===u&&l.process,d=function(){try{var p=a&&a.require&&a.require("util").types;return p||c&&c.binding&&c.binding("util")}catch{}}();r.exports=d}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),l=Object.prototype.hasOwnProperty;e.exports=function(u){if(!r(u))return o(u);var a=[];for(var c in Object(u))l.call(u,c)&&c!="constructor"&&a.push(c);return a}},function(e,t,n){var r=n(56),o=n(57),l=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(c){return c==null?[]:(c=Object(c),r(u(c),function(d){return l.call(c,d)}))}:o;e.exports=a},function(e,t){e.exports=function(n,r){for(var o=-1,l=r.length,u=n.length;++o-1&&o%1==0&&oy))return!1;var S=h.get(u);if(S&&h.get(a))return S==a;var j=-1,x=!0,w=2&c?new r:void 0;for(h.set(u,a),h.set(a,u);++j0&&(b=x.removeMin(),(S=j[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return j}(u,String(a),c||l,d||function(p){return u.outEdges(p)})};var l=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(l){return l.key})},o.prototype.has=function(l){return r.has(this._keyIndices,l)},o.prototype.priority=function(l){var u=this._keyIndices[l];if(u!==void 0)return this._arr[u].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(l,u){var a=this._keyIndices;if(l=String(l),!r.has(a,l)){var c=this._arr,d=c.length;return a[l]=d,c.push({key:l,priority:u}),this._decrease(d),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var l=this._arr.pop();return delete this._keyIndices[l.key],this._heapify(0),l.key},o.prototype.decrease=function(l,u){var a=this._keyIndices[l];if(u>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+l+" Old: "+this._arr[a].priority+" New: "+u);this._arr[a].priority=u,this._decrease(a)},o.prototype._heapify=function(l){var u=this._arr,a=2*l,c=a+1,d=l;a>1].priority0&&S(x,H))}catch(he){E.call(new R(H),he)}}}function E($){var Y=this;Y.triggered||(Y.triggered=!0,Y.def&&(Y=Y.def),Y.msg=$,Y.state=2,Y.chain.length>0&&S(x,Y))}function C($,Y,H,he){for(var Se=0;Se-1?te=ue:(ne=o.isUndefined(P)?void 0:$(P),o.isUndefined(ne)?te=ue:((te=ne).path=d(u.join(ne.path,ue.path)),te.query=function(le,ke){var Ne={};function Ue(et){o.forOwn(et,function(We,Ee){Ne[Ee]=We})}return Ue(c.parse(le||"")),Ue(c.parse(ke||"")),Object.keys(Ne).length===0?void 0:c.stringify(Ne)}(ne.query,ue.query))),te.fragment=void 0,(b.indexOf(te.reference)===-1&&te.path.indexOf("../")===0?"../":"")+p.serialize(te)}function x(P){return y.indexOf(C(P))>-1}function w(P){return o.isUndefined(P.error)&&P.type!=="invalid"}function k(P,V){var ne=P;return V.forEach(function(te){if(!(te in ne))throw Error("JSON Pointer points to missing location: "+se(V));ne=ne[te]}),ne}function E(P){return Object.keys(P).filter(function(V){return V!=="$ref"})}function C(P){var V;switch(P.uriDetails.reference){case"absolute":case"uri":V="remote";break;case"same-document":V="local";break;default:V=P.uriDetails.reference}return V}function R(P,V){var ne=g[P],te=Promise.resolve(),ue=o.cloneDeep(V.loaderOptions||{});return o.isUndefined(ne)?(o.isUndefined(ue.processContent)&&(ue.processContent=function(le,ke){ke(void 0,JSON.parse(le.text))}),te=(te=a.load(decodeURI(P),ue)).then(function(le){return g[P]={value:le},le}).catch(function(le){throw g[P]={error:le},le})):te=te.then(function(){if(o.isError(ne.error))throw ne.error;return ne.value}),te=te.then(function(le){return o.cloneDeep(le)})}function z(P,V){var ne=!0;try{if(!o.isPlainObject(P))throw new Error("obj is not an Object");if(!o.isString(P.$ref))throw new Error("obj.$ref is not a String")}catch(te){if(V)throw te;ne=!1}return ne}function F(P){return P.indexOf("://")!==-1||u.isAbsolute(P)?P:u.resolve(r.cwd(),P)}function ce(P,V){P.error=V.message,P.missing=!0}function $(P){return p.parse(P)}function Y(P,V,ne){k(P,V.slice(0,V.length-1))[V[V.length-1]]=ne}function H(P,V){var ne,te;if(P=o.isUndefined(P)?{}:o.cloneDeep(P),!o.isObject(P))throw new TypeError("options must be an Object");if(!o.isUndefined(P.resolveCirculars)&&!o.isBoolean(P.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(P.filter)||o.isArray(P.filter)||o.isFunction(P.filter)||o.isString(P.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(P.includeInvalid)&&!o.isBoolean(P.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(P.location)&&!o.isString(P.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(P.refPreProcessor)&&!o.isFunction(P.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(P.refPostProcessor)&&!o.isFunction(P.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(P.subDocPath)&&!o.isArray(P.subDocPath)&&!Be(P.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(P.resolveCirculars)&&(P.resolveCirculars=!1),P.filter=function(ue){var le,ke;return o.isArray(ue.filter)||o.isString(ue.filter)?(ke=o.isString(ue.filter)?[ue.filter]:ue.filter,le=function(Ne){return ke.indexOf(Ne.type)>-1||ke.indexOf(C(Ne))>-1}):o.isFunction(ue.filter)?le=ue.filter:o.isUndefined(ue.filter)&&(le=function(){return!0}),function(Ne,Ue){return(Ne.type!=="invalid"||ue.includeInvalid===!0)&&le(Ne,Ue)}}(P),o.isUndefined(P.location)&&(P.location=F("./root.json")),(ne=P.location.split("#")).length>1&&(P.subDocPath="#"+ne[1]),te=decodeURI(P.location)===P.location,P.location=j(P.location,void 0),te&&(P.location=decodeURI(P.location)),P.subDocPath=function(ue){var le;return o.isArray(ue.subDocPath)?le=ue.subDocPath:o.isString(ue.subDocPath)?le=J(ue.subDocPath):o.isUndefined(ue.subDocPath)&&(le=[]),le}(P),!o.isUndefined(V))try{k(V,P.subDocPath)}catch(ue){throw ue.message=ue.message.replace("JSON Pointer","options.subDocPath"),ue}return P}function he(P){if(!o.isArray(P))throw new TypeError("path must be an array");return P.map(function(V){return o.isString(V)||(V=JSON.stringify(V)),V.replace(/~1/g,"/").replace(/~0/g,"~")})}function Se(P){if(!o.isArray(P))throw new TypeError("path must be an array");return P.map(function(V){return o.isString(V)||(V=JSON.stringify(V)),V.replace(/~/g,"~0").replace(/\//g,"~1")})}function je(P,V){var ne={};if(!o.isArray(P)&&!o.isObject(P))throw new TypeError("obj must be an Array or an Object");return function te(ue,le,ke,Ne){var Ue=!0;function et(We,Ee){ke.push(Ee),te(ue,We,ke,Ne),ke.pop()}o.isFunction(Ne)&&(Ue=Ne(ue,le,ke)),ue.indexOf(le)===-1&&(ue.push(le),Ue!==!1&&(o.isArray(le)?le.forEach(function(We,Ee){et(We,Ee.toString())}):o.isObject(le)&&o.forOwn(le,function(We,Ee){et(We,Ee)})),ue.pop())}(function(te,ue){var le,ke=[];return ue.length>0&&(le=te,ue.slice(0,ue.length-1).forEach(function(Ne){Ne in le&&(le=le[Ne],ke.push(le))})),ke}(P,(V=H(V,P)).subDocPath),k(P,V.subDocPath),o.cloneDeep(V.subDocPath),function(te,ue,le){var ke,Ne,Ue=!0;return z(ue)&&(o.isUndefined(V.refPreProcessor)||(ue=V.refPreProcessor(o.cloneDeep(ue),le)),ke=ze(ue),o.isUndefined(V.refPostProcessor)||(ke=V.refPostProcessor(ke,le)),V.filter(ke,le)&&(Ne=se(le),ne[Ne]=ke),E(ue).length>0&&(Ue=!1)),Ue}),ne}function ze(P){var V,ne,te,ue={def:P};try{if(z(P,!0),V=P.$ref,te=S[V],o.isUndefined(te)&&(te=S[V]=$(V)),ue.uri=V,ue.uriDetails=te,o.isUndefined(te.error)){ue.type=C(ue);try{["#","/"].indexOf(V[0])>-1?Be(V,!0):V.indexOf("#")>-1&&Be(te.fragment,!0)}catch(le){ue.error=le.message,ue.type="invalid"}}else ue.error=ue.uriDetails.error,ue.type="invalid";(ne=E(P)).length>0&&(ue.warning="Extra JSON Reference properties will be ignored: "+ne.join(", "))}catch(le){ue.error=le.message,ue.type="invalid"}return ue}function Be(P,V){var ne,te=!0;try{if(!o.isString(P))throw new Error("ptr is not a String");if(P!==""){if(ne=P.charAt(0),["#","/"].indexOf(ne)===-1)throw new Error("ptr must start with a / or #/");if(ne==="#"&&P!=="#"&&P.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(P.match(h))throw new Error("ptr has invalid token(s)")}}catch(ue){if(V===!0)throw ue;te=!1}return te}function J(P){try{Be(P,!0)}catch(ne){throw new Error("ptr must be a JSON Pointer: "+ne.message)}var V=P.split("/");return V.shift(),he(V)}function se(P,V){if(!o.isArray(P))throw new Error("path must be an Array");return(V!==!1?"#":"")+(P.length>0?"/":"")+Se(P).join("/")}function we(P,V){var ne=Promise.resolve();return ne=ne.then(function(){if(!o.isArray(P)&&!o.isObject(P))throw new TypeError("obj must be an Array or an Object");V=H(V,P),P=o.cloneDeep(P)}).then(function(){var te={deps:{},docs:{},refs:{}};return function ue(le,ke,Ne){var Ue,et,We=Promise.resolve(),Ee=se(ke.subDocPath),Ze=F(ke.location),ot=u.dirname(ke.location),Me=Ze+Ee;return o.isUndefined(Ne.docs[Ze])&&(Ne.docs[Ze]=le),o.isUndefined(Ne.deps[Me])&&(Ne.deps[Me]={},Ue=je(le,ke),o.forOwn(Ue,function(Je,At){var Qt,Wt,St=F(ke.location)+At,Et=Je.refdId=decodeURI(F(x(Je)?j(ot,Je.uri):ke.location)+"#"+(Je.uri.indexOf("#")>-1?Je.uri.split("#")[1]:""));Ne.refs[St]=Je,w(Je)&&(Je.fqURI=Et,Ne.deps[Me][At===Ee?"#":At.replace(Ee+"/","#/")]=Et,St.indexOf(Et+"/")!==0&&St!==Et?((et=o.cloneDeep(ke)).subDocPath=o.isUndefined(Je.uriDetails.fragment)?[]:J(decodeURI(Je.uriDetails.fragment)),x(Je)?(delete et.filter,et.location=Et.split("#")[0],We=We.then((Qt=Ne,Wt=et,function(){var Re=F(Wt.location),Vt=Qt.docs[Re];return o.isUndefined(Vt)?R(Re,Wt).catch(function(rn){return Qt.docs[Re]=rn,rn}):Promise.resolve().then(function(){return Vt})}))):We=We.then(function(){return le}),We=We.then(function(Re,Vt,rn){return function(Dr){if(o.isError(Dr))ce(rn,Dr);else try{return ue(Dr,Vt,Re).catch(function(_r){ce(rn,_r)})}catch(_r){ce(rn,_r)}}}(Ne,et,Je))):Je.circular=!0)})),We}(P,V,te).then(function(){return te})}).then(function(te){var ue={},le=[],ke=[],Ne=new l.Graph,Ue=F(V.location),et=Ue+se(V.subDocPath),We=u.dirname(Ue);return Object.keys(te.deps).forEach(function(Ee){Ne.setNode(Ee)}),o.forOwn(te.deps,function(Ee,Ze){o.forOwn(Ee,function(ot){Ne.setEdge(Ze,ot)})}),(le=l.alg.findCycles(Ne)).forEach(function(Ee){Ee.forEach(function(Ze){ke.indexOf(Ze)===-1&&ke.push(Ze)})}),o.forOwn(te.deps,function(Ee,Ze){o.forOwn(Ee,function(ot,Me){var Je,At=!1,Qt=Ze+Me.slice(1),Wt=te.refs[Ze+Me.slice(1)],St=x(Wt);ke.indexOf(ot)>-1&&le.forEach(function(Et){At||(Je=Et.indexOf(ot))>-1&&Et.forEach(function(Re){At||Qt.indexOf(Re+"/")===0&&(St&&Je!==Et.length-1&&ot[ot.length-1]==="#"||(At=!0))})}),At&&(Wt.circular=!0)})}),o.forOwn(Object.keys(te.deps).reverse(),function(Ee){var Ze=te.deps[Ee],ot=Ee.split("#"),Me=te.docs[ot[0]],Je=J(ot[1]);o.forOwn(Ze,function(At,Qt){var Wt=At.split("#"),St=te.docs[Wt[0]],Et=Je.concat(J(Qt)),Re=te.refs[ot[0]+se(Et)];if(o.isUndefined(Re.error)&&o.isUndefined(Re.missing))if(!V.resolveCirculars&&Re.circular)Re.value=o.cloneDeep(Re.def);else{try{Re.value=k(St,J(Wt[1]))}catch(Vt){return void ce(Re,Vt)}ot[1]===""&&Qt==="#"?te.docs[ot[0]]=Re.value:Y(Me,Et,Re.value)}})}),Object.keys(te.refs).forEach(function(Ee){var Ze,ot,Me=te.refs[Ee];Me.type!=="invalid"&&(Me.fqURI[Me.fqURI.length-1]==="#"&&Me.uri[Me.uri.length-1]!=="#"&&(Me.fqURI=Me.fqURI.substr(0,Me.fqURI.length-1)),Ze=Me.fqURI.split("/"),ot=Me.uri.split("/"),o.times(ot.length-1,function(Je){var At=ot[ot.length-Je-1],Qt=ot[ot.length-Je],Wt=Ze.length-Je-1;At!=="."&&At!==".."&&Qt!==".."&&(Ze[Wt]=At)}),Me.fqURI=Ze.join("/"),Me.fqURI.indexOf(Ue)===0?Me.fqURI=Me.fqURI.replace(Ue,""):Me.fqURI.indexOf(We)===0&&(Me.fqURI=Me.fqURI.replace(We,"")),Me.fqURI[0]==="/"&&(Me.fqURI="."+Me.fqURI)),Ee.indexOf(et)===0&&function Je(At,Qt,Wt){var St,Et=Qt.split("#"),Re=te.refs[Qt];ue[Et[0]===V.location?"#"+Et[1]:se(V.subDocPath.concat(Wt))]=Re,!Re.circular&&w(Re)?(St=te.deps[Re.refdId],Re.refdId.indexOf(At)!==0&&Object.keys(St).forEach(function(Vt){Je(Re.refdId,Re.refdId+Vt.substr(1),Wt.concat(J(Vt)))})):!Re.circular&&Re.error&&(Re.error=Re.error.replace("options.subDocPath","JSON Pointer"),Re.error.indexOf("#")>-1&&(Re.error=Re.error.replace(Re.uri.substr(Re.uri.indexOf("#")),Re.uri)),Re.error.indexOf("ENOENT:")!==0&&Re.error.indexOf("Not Found")!==0||(Re.error="JSON Pointer points to missing location: "+Re.uri))}(et,Ee,J(Ee.substr(et.length)))}),o.forOwn(ue,function(Ee,Ze){delete Ee.refdId,Ee.circular&&Ee.type==="local"&&(Ee.value.$ref=Ee.fqURI,Y(te.docs[Ue],J(Ze),Ee.value)),Ee.missing&&(Ee.error=Ee.error.split(": ")[0]+": "+Ee.def.$ref)}),{refs:ue,resolved:te.docs[Ue]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(P){return he(P)},e.exports.encodePath=function(P){return Se(P)},e.exports.findRefs=function(P,V){return je(P,V)},e.exports.findRefsAt=function(P,V){return function(ne,te){var ue=Promise.resolve();return ue=ue.then(function(){if(!o.isString(ne))throw new TypeError("location must be a string");return o.isUndefined(te)&&(te={}),o.isObject(te)&&(te.location=ne),R((te=H(te)).location,te)}).then(function(le){var ke=o.cloneDeep(g[te.location]),Ne=o.cloneDeep(te);return o.isUndefined(ke.refs)&&(delete Ne.filter,delete Ne.subDocPath,Ne.includeInvalid=!0,g[te.location].refs=je(le,Ne)),o.isUndefined(te.filter)||(Ne.filter=te.filter),{refs:je(le,Ne),value:le}})}(P,V)},e.exports.getRefDetails=function(P){return ze(P)},e.exports.isPtr=function(P,V){return Be(P,V)},e.exports.isRef=function(P,V){return function(ne,te){return z(ne,te)&&ze(ne).type!=="invalid"}(P,V)},e.exports.pathFromPtr=function(P){return J(P)},e.exports.pathToPtr=function(P,V){return se(P,V)},e.exports.resolveRefs=function(P,V){return we(P,V)},e.exports.resolveRefsAt=function(P,V){return function(ne,te){var ue=Promise.resolve();return ue=ue.then(function(){if(!o.isString(ne))throw new TypeError("location must be a string");return o.isUndefined(te)&&(te={}),o.isObject(te)&&(te.location=ne),R((te=H(te)).location,te)}).then(function(le){return we(le,te).then(function(ke){return{refs:ke.refs,resolved:ke.resolved,value:le}})})}(P,V)}}).call(this,n(13))},function(e,t,n){(function(r,o){var l;function u(a){return(u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(a)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var a="Expected a function",c="__lodash_placeholder__",d=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],p="[object Arguments]",h="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",S="[object Function]",j="[object GeneratorFunction]",x="[object Map]",w="[object Number]",k="[object Object]",E="[object RegExp]",C="[object Set]",R="[object String]",z="[object Symbol]",F="[object WeakMap]",ce="[object ArrayBuffer]",$="[object DataView]",Y="[object Float32Array]",H="[object Float64Array]",he="[object Int8Array]",Se="[object Int16Array]",je="[object Int32Array]",ze="[object Uint8Array]",Be="[object Uint16Array]",J="[object Uint32Array]",se=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,ne=/[&<>"']/g,te=RegExp(V.source),ue=RegExp(ne.source),le=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,Ne=/<%=([\s\S]+?)%>/g,Ue=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,We=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ee=/[\\^$.*+?()[\]{}|]/g,Ze=RegExp(Ee.source),ot=/^\s+|\s+$/g,Me=/^\s+/,Je=/\s+$/,At=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qt=/\{\n\/\* \[wrapped with (.+)\] \*/,Wt=/,? & /,St=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Et=/\\(\\)?/g,Re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,rn=/^[-+]0x[0-9a-f]+$/i,Dr=/^0b[01]+$/i,_r=/^\[object .+?Constructor\]$/,li=/^0o[0-7]+$/i,bo=/^(?:0|[1-9]\d*)$/,Xr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xr=/($^)/,An=/['\n\r\u2028\u2029\\]/g,br="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",O="[\\ud800-\\udfff]",N="["+Zr+"]",I="["+br+"]",G="\\d+",q="[\\u2700-\\u27bf]",fe="[a-z\\xdf-\\xf6\\xf8-\\xff]",me="[^\\ud800-\\udfff"+Zr+G+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Fe="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",st="[\\ud800-\\udbff][\\udc00-\\udfff]",it="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Nt="(?:"+fe+"|"+me+")",lt="(?:"+it+"|"+me+")",Lt="(?:"+I+"|"+Fe+")?",gt="[\\ufe0e\\ufe0f]?"+Lt+("(?:\\u200d(?:"+[ut,Oe,st].join("|")+")[\\ufe0e\\ufe0f]?"+Lt+")*"),_t="(?:"+[q,Oe,st].join("|")+")"+gt,pn="(?:"+[ut+I+"?",I,Oe,st,O].join("|")+")",Nn=RegExp("['’]","g"),nr=RegExp(I,"g"),Un=RegExp(Fe+"(?="+Fe+")|"+pn+gt,"g"),sn=RegExp([it+"?"+fe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[N,it,"$"].join("|")+")",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[N,it+Nt,"$"].join("|")+")",it+"?"+Nt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",it+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",G,_t].join("|"),"g"),Ft=RegExp("[\\u200d\\ud800-\\udfff"+br+"\\ufe0e\\ufe0f]"),zr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ui=-1,ft={};ft[Y]=ft[H]=ft[he]=ft[Se]=ft[je]=ft[ze]=ft["[object Uint8ClampedArray]"]=ft[Be]=ft[J]=!0,ft[p]=ft[h]=ft[ce]=ft[g]=ft[$]=ft[y]=ft[b]=ft[S]=ft[x]=ft[w]=ft[k]=ft[E]=ft[C]=ft[R]=ft[F]=!1;var dt={};dt[p]=dt[h]=dt[ce]=dt[$]=dt[g]=dt[y]=dt[Y]=dt[H]=dt[he]=dt[Se]=dt[je]=dt[x]=dt[w]=dt[k]=dt[E]=dt[C]=dt[R]=dt[z]=dt[ze]=dt["[object Uint8ClampedArray]"]=dt[Be]=dt[J]=!0,dt[b]=dt[S]=dt[F]=!1;var _e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},D=parseFloat,re=parseInt,ge=(r===void 0?"undefined":u(r))=="object"&&r&&r.Object===Object&&r,pt=(typeof self>"u"?"undefined":u(self))=="object"&&self&&self.Object===Object&&self,qe=ge||pt||Function("return this")(),Yt=u(t)=="object"&&t&&!t.nodeType&&t,Ut=Yt&&u(o)=="object"&&o&&!o.nodeType&&o,$r=Ut&&Ut.exports===Yt,Jr=$r&&ge.process,xt=function(){try{var B=Ut&&Ut.require&&Ut.require("util").types;return B||Jr&&Jr.binding&&Jr.binding("util")}catch{}}(),Al=xt&&xt.isArrayBuffer,Nl=xt&&xt.isDate,Ch=xt&&xt.isMap,Oh=xt&&xt.isRegExp,jh=xt&&xt.isSet,Ah=xt&&xt.isTypedArray;function Bn(B,Z,X){switch(X.length){case 0:return B.call(Z);case 1:return B.call(Z,X[0]);case 2:return B.call(Z,X[0],X[1]);case 3:return B.call(Z,X[0],X[1],X[2])}return B.apply(Z,X)}function lw(B,Z,X,de){for(var He=-1,at=B==null?0:B.length;++He-1}function Oc(B,Z,X){for(var de=-1,He=B==null?0:B.length;++de-1;);return X}function zh(B,Z){for(var X=B.length;X--&&Di(Z,B[X],0)>-1;);return X}function fw(B,Z){for(var X=B.length,de=0;X--;)B[X]===Z&&++de;return de}var dw=Rc({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),pw=Rc({"&":"&","<":"<",">":">",'"':""","'":"'"});function hw(B){return"\\"+_e[B]}function zi(B){return Ft.test(B)}function Dc(B){var Z=-1,X=Array(B.size);return B.forEach(function(de,He){X[++Z]=[He,de]}),X}function $h(B,Z){return function(X){return B(Z(X))}}function Eo(B,Z){for(var X=-1,de=B.length,He=0,at=[];++X",""":'"',"'":"'"}),To=function B(Z){var X,de=(Z=Z==null?qe:To.defaults(qe.Object(),Z,To.pick(qe,rr))).Array,He=Z.Date,at=Z.Error,Xt=Z.Function,Mr=Z.Math,Tt=Z.Object,zc=Z.RegExp,vw=Z.String,ir=Z.TypeError,es=de.prototype,yw=Xt.prototype,Mi=Tt.prototype,ts=Z["__core-js_shared__"],ns=yw.toString,vt=Mi.hasOwnProperty,ww=0,Mh=(X=/[^.]+$/.exec(ts&&ts.keys&&ts.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",rs=Mi.toString,_w=ns.call(Tt),xw=qe._,bw=zc("^"+ns.call(vt).replace(Ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),os=$r?Z.Buffer:void 0,Co=Z.Symbol,is=Z.Uint8Array,Fh=os?os.allocUnsafe:void 0,ls=$h(Tt.getPrototypeOf,Tt),Uh=Tt.create,Bh=Mi.propertyIsEnumerable,us=es.splice,Hh=Co?Co.isConcatSpreadable:void 0,Pl=Co?Co.iterator:void 0,si=Co?Co.toStringTag:void 0,ss=function(){try{var i=di(Tt,"defineProperty");return i({},"",{}),i}catch{}}(),kw=Z.clearTimeout!==qe.clearTimeout&&Z.clearTimeout,Sw=He&&He.now!==qe.Date.now&&He.now,Ew=Z.setTimeout!==qe.setTimeout&&Z.setTimeout,as=Mr.ceil,cs=Mr.floor,$c=Tt.getOwnPropertySymbols,Tw=os?os.isBuffer:void 0,Wh=Z.isFinite,Cw=es.join,Ow=$h(Tt.keys,Tt),Zt=Mr.max,hn=Mr.min,jw=He.now,Aw=Z.parseInt,Vh=Mr.random,Nw=es.reverse,Mc=di(Z,"DataView"),Ll=di(Z,"Map"),Fc=di(Z,"Promise"),Fi=di(Z,"Set"),Il=di(Z,"WeakMap"),Dl=di(Tt,"create"),fs=Il&&new Il,Ui={},Rw=pi(Mc),Pw=pi(Ll),Lw=pi(Fc),Iw=pi(Fi),Dw=pi(Il),ds=Co?Co.prototype:void 0,zl=ds?ds.valueOf:void 0,qh=ds?ds.toString:void 0;function _(i){if(Bt(i)&&!Ve(i)&&!(i instanceof tt)){if(i instanceof lr)return i;if(vt.call(i,"__wrapped__"))return Gm(i)}return new lr(i)}var Bi=function(){function i(){}return function(s){if(!Dt(s))return{};if(Uh)return Uh(s);i.prototype=s;var f=new i;return i.prototype=void 0,f}}();function ps(){}function lr(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=void 0}function tt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function ai(i){var s=-1,f=i==null?0:i.length;for(this.clear();++s=s?i:s)),i}function ur(i,s,f,m,v,T){var A,L=1&s,U=2&s,K=4&s;if(f&&(A=v?f(i,m,v,T):f(i)),A!==void 0)return A;if(!Dt(i))return i;var Q=Ve(i);if(Q){if(A=function(ee){var ae=ee.length,Ie=new ee.constructor(ae);return ae&&typeof ee[0]=="string"&&vt.call(ee,"index")&&(Ie.index=ee.index,Ie.input=ee.input),Ie}(i),!L)return Rn(i,A)}else{var oe=mn(i),xe=oe==S||oe==j;if(Ro(i))return wm(i,L);if(oe==k||oe==p||xe&&!v){if(A=U||xe?{}:$m(i),!L)return U?function(ee,ae){return Ur(ee,Dm(ee),ae)}(i,function(ee,ae){return ee&&Ur(ae,Ln(ae),ee)}(A,i)):function(ee,ae){return Ur(ee,df(ee),ae)}(i,Yh(A,i))}else{if(!dt[oe])return v?i:{};A=function(ee,ae,Ie){var ye=ee.constructor;switch(ae){case ce:return of(ee);case g:case y:return new ye(+ee);case $:return function($e,Xe){var Te=Xe?of($e.buffer):$e.buffer;return new $e.constructor(Te,$e.byteOffset,$e.byteLength)}(ee,Ie);case Y:case H:case he:case Se:case je:case ze:case"[object Uint8ClampedArray]":case Be:case J:return _m(ee,Ie);case x:return new ye;case w:case R:return new ye(ee);case E:return function($e){var Xe=new $e.constructor($e.source,Vt.exec($e));return Xe.lastIndex=$e.lastIndex,Xe}(ee);case C:return new ye;case z:return De=ee,zl?Tt(zl.call(De)):{}}var De}(i,oe,L)}}T||(T=new Sr);var be=T.get(i);if(be)return be;T.set(i,A),fg(i)?i.forEach(function(ee){A.add(ur(ee,s,f,ee,i,T))}):ag(i)&&i.forEach(function(ee,ae){A.set(ae,ur(ee,s,f,ae,i,T))});var Pe=Q?void 0:(K?U?af:sf:U?Ln:on)(i);return or(Pe||i,function(ee,ae){Pe&&(ee=i[ae=ee]),$l(A,ae,ur(ee,s,f,ae,i,T))}),A}function Kh(i,s,f){var m=f.length;if(i==null)return!m;for(i=Tt(i);m--;){var v=f[m],T=s[v],A=i[v];if(A===void 0&&!(v in i)||!T(A))return!1}return!0}function Xh(i,s,f){if(typeof i!="function")throw new ir(a);return Vl(function(){i.apply(void 0,f)},s)}function Ml(i,s,f,m){var v=-1,T=Xu,A=!0,L=i.length,U=[],K=s.length;if(!L)return U;f&&(s=It(s,Hn(f))),m?(T=Oc,A=!1):s.length>=200&&(T=Rl,A=!1,s=new ci(s));e:for(;++v-1},eo.prototype.set=function(i,s){var f=this.__data__,m=hs(f,i);return m<0?(++this.size,f.push([i,s])):f[m][1]=s,this},to.prototype.clear=function(){this.size=0,this.__data__={hash:new ai,map:new(Ll||eo),string:new ai}},to.prototype.delete=function(i){var s=Ts(this,i).delete(i);return this.size-=s?1:0,s},to.prototype.get=function(i){return Ts(this,i).get(i)},to.prototype.has=function(i){return Ts(this,i).has(i)},to.prototype.set=function(i,s){var f=Ts(this,i),m=f.size;return f.set(i,s),this.size+=f.size==m?0:1,this},ci.prototype.add=ci.prototype.push=function(i){return this.__data__.set(i,"__lodash_hash_undefined__"),this},ci.prototype.has=function(i){return this.__data__.has(i)},Sr.prototype.clear=function(){this.__data__=new eo,this.size=0},Sr.prototype.delete=function(i){var s=this.__data__,f=s.delete(i);return this.size=s.size,f},Sr.prototype.get=function(i){return this.__data__.get(i)},Sr.prototype.has=function(i){return this.__data__.has(i)},Sr.prototype.set=function(i,s){var f=this.__data__;if(f instanceof eo){var m=f.__data__;if(!Ll||m.length<199)return m.push([i,s]),this.size=++f.size,this;f=this.__data__=new to(m)}return f.set(i,s),this.size=f.size,this};var Oo=Sm(Fr),Zh=Sm(Wc,!0);function Fw(i,s){var f=!0;return Oo(i,function(m,v,T){return f=!!s(m,v,T)}),f}function ms(i,s,f){for(var m=-1,v=i.length;++m0&&f(L)?s>1?an(L,s-1,f,m,v):So(v,L):m||(v[v.length]=L)}return v}var Hc=Em(),em=Em(!0);function Fr(i,s){return i&&Hc(i,s,on)}function Wc(i,s){return i&&em(i,s,on)}function gs(i,s){return ko(s,function(f){return lo(i[f])})}function Hi(i,s){for(var f=0,m=(s=Ao(s,i)).length;i!=null&&fs}function Uw(i,s){return i!=null&&vt.call(i,s)}function Bw(i,s){return i!=null&&s in Tt(i)}function qc(i,s,f){for(var m=f?Oc:Xu,v=i[0].length,T=i.length,A=T,L=de(T),U=1/0,K=[];A--;){var Q=i[A];A&&s&&(Q=It(Q,Hn(s))),U=hn(Q.length,U),L[A]=!f&&(s||v>=120&&Q.length>=120)?new ci(A&&Q):void 0}Q=i[0];var oe=-1,xe=L[0];e:for(;++oe=be)return Pe;var ee=U[K];return Pe*(ee=="desc"?-1:1)}}return A.index-L.index}(v,T,f)})}function cm(i,s,f){for(var m=-1,v=s.length,T={};++m-1;)L!==i&&us.call(L,U,1),us.call(i,U,1);return i}function fm(i,s){for(var f=i?s.length:0,m=f-1;f--;){var v=s[f];if(f==m||v!==T){var T=v;io(v)?us.call(i,v,1):ef(i,v)}}return i}function Xc(i,s){return i+cs(Vh()*(s-i+1))}function Zc(i,s){var f="";if(!i||s<1||s>9007199254740991)return f;do s%2&&(f+=i),(s=cs(s/2))&&(i+=i);while(s);return f}function Ke(i,s){return gf(Um(i,s,In),i+"")}function Ww(i){return Qh(Qi(i))}function Vw(i,s){var f=Qi(i);return Cs(f,fi(s,0,f.length))}function Bl(i,s,f,m){if(!Dt(i))return i;for(var v=-1,T=(s=Ao(s,i)).length,A=T-1,L=i;L!=null&&++vv?0:v+s),(f=f>v?v:f)<0&&(f+=v),v=s>f?0:f-s>>>0,s>>>=0;for(var T=de(v);++m>>1,A=i[T];A!==null&&!Vn(A)&&(f?A<=s:A=200){var K=s?null:Kw(i);if(K)return Ju(K);A=!1,v=Rl,U=new ci}else U=s?[]:L;e:for(;++m=m?i:sr(i,s,f)}var ym=kw||function(i){return qe.clearTimeout(i)};function wm(i,s){if(s)return i.slice();var f=i.length,m=Fh?Fh(f):new i.constructor(f);return i.copy(m),m}function of(i){var s=new i.constructor(i.byteLength);return new is(s).set(new is(i)),s}function _m(i,s){var f=s?of(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function xm(i,s){if(i!==s){var f=i!==void 0,m=i===null,v=i==i,T=Vn(i),A=s!==void 0,L=s===null,U=s==s,K=Vn(s);if(!L&&!K&&!T&&i>s||T&&A&&U&&!L&&!K||m&&A&&U||!f&&U||!v)return 1;if(!m&&!T&&!K&&i1?f[v-1]:void 0,A=v>2?f[2]:void 0;for(T=i.length>3&&typeof T=="function"?(v--,T):void 0,A&&bn(f[0],f[1],A)&&(T=v<3?void 0:T,v=1),s=Tt(s);++m-1?v[T?s[A]:A]:void 0}}function Om(i){return oo(function(s){var f=s.length,m=f,v=lr.prototype.thru;for(i&&s.reverse();m--;){var T=s[m];if(typeof T!="function")throw new ir(a);if(v&&!A&&Es(T)=="wrapper")var A=new lr([],!0)}for(m=A?m:f;++m1&&ye.reverse(),Q&&UL))return!1;var K=T.get(i);if(K&&T.get(s))return K==s;var Q=-1,oe=!0,xe=2&f?new ci:void 0;for(T.set(i,s),T.set(s,i);++Q-1&&i%1==0&&i1?"& ":"")+T[L],T=T.join(A>2?", ":" "),v.replace(At,`{ -/* [wrapped with `+T+`] */ -`)}(m,function(v,T){return or(d,function(A){var L="_."+A[0];T&A[1]&&!Xu(v,L)&&v.push(L)}),v.sort()}(function(v){var T=v.match(Qt);return T?T[1].split(Wt):[]}(m),f)))}function Vm(i){var s=0,f=0;return function(){var m=jw(),v=16-(m-f);if(f=m,v>0){if(++s>=800)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}function Cs(i,s){var f=-1,m=i.length,v=m-1;for(s=s===void 0?m:s;++f1?i[s-1]:void 0;return f=typeof f=="function"?(i.pop(),f):void 0,Jm(i,f)});function eg(i){var s=_(i);return s.__chain__=!0,s}function Os(i,s){return s(i)}var y_=oo(function(i){var s=i.length,f=s?i[0]:0,m=this.__wrapped__,v=function(T){return Bc(T,i)};return!(s>1||this.__actions__.length)&&m instanceof tt&&io(f)?((m=m.slice(f,+f+(s?1:0))).__actions__.push({func:Os,args:[v],thisArg:void 0}),new lr(m,this.__chain__).thru(function(T){return s&&!T.length&&T.push(void 0),T})):this.thru(v)}),w_=_s(function(i,s,f){vt.call(i,f)?++i[f]:no(i,f,1)}),__=Cm(Qm),x_=Cm(Ym);function tg(i,s){return(Ve(i)?or:Oo)(i,Ae(s,3))}function ng(i,s){return(Ve(i)?uw:Zh)(i,Ae(s,3))}var b_=_s(function(i,s,f){vt.call(i,f)?i[f].push(s):no(i,f,[s])}),k_=Ke(function(i,s,f){var m=-1,v=typeof s=="function",T=Pn(i)?de(i.length):[];return Oo(i,function(A){T[++m]=v?Bn(s,A,f):Fl(A,s,f)}),T}),S_=_s(function(i,s,f){no(i,f,s)});function js(i,s){return(Ve(i)?It:im)(i,Ae(s,3))}var E_=_s(function(i,s,f){i[f?0:1].push(s)},function(){return[[],[]]}),T_=Ke(function(i,s){if(i==null)return[];var f=s.length;return f>1&&bn(i,s[0],s[1])?s=[]:f>2&&bn(s[0],s[1],s[2])&&(s=[s[0]]),am(i,an(s,1),[])}),As=Sw||function(){return qe.Date.now()};function rg(i,s,f){return s=f?void 0:s,ro(i,128,void 0,void 0,void 0,void 0,s=i&&s==null?i.length:s)}function og(i,s){var f;if(typeof s!="function")throw new ir(a);return i=Ge(i),function(){return--i>0&&(f=s.apply(this,arguments)),i<=1&&(s=void 0),f}}var wf=Ke(function(i,s,f){var m=1;if(f.length){var v=Eo(f,qi(wf));m|=32}return ro(i,m,s,f,v)}),ig=Ke(function(i,s,f){var m=3;if(f.length){var v=Eo(f,qi(ig));m|=32}return ro(s,m,i,f,v)});function lg(i,s,f){var m,v,T,A,L,U,K=0,Q=!1,oe=!1,xe=!0;if(typeof i!="function")throw new ir(a);function be(De){var $e=m,Xe=v;return m=v=void 0,K=De,A=i.apply(Xe,$e)}function Pe(De){return K=De,L=Vl(ae,s),Q?be(De):A}function ee(De){var $e=De-U;return U===void 0||$e>=s||$e<0||oe&&De-K>=T}function ae(){var De=As();if(ee(De))return Ie(De);L=Vl(ae,function($e){var Xe=s-($e-U);return oe?hn(Xe,T-($e-K)):Xe}(De))}function Ie(De){return L=void 0,xe&&m?be(De):(m=v=void 0,A)}function ye(){var De=As(),$e=ee(De);if(m=arguments,v=this,U=De,$e){if(L===void 0)return Pe(U);if(oe)return ym(L),L=Vl(ae,s),be(U)}return L===void 0&&(L=Vl(ae,s)),A}return s=cr(s)||0,Dt(f)&&(Q=!!f.leading,T=(oe="maxWait"in f)?Zt(cr(f.maxWait)||0,s):T,xe="trailing"in f?!!f.trailing:xe),ye.cancel=function(){L!==void 0&&ym(L),K=0,m=U=v=L=void 0},ye.flush=function(){return L===void 0?A:Ie(As())},ye}var C_=Ke(function(i,s){return Xh(i,1,s)}),O_=Ke(function(i,s,f){return Xh(i,cr(s)||0,f)});function Ns(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new ir(a);var f=function m(){var v=arguments,T=s?s.apply(this,v):v[0],A=m.cache;if(A.has(T))return A.get(T);var L=i.apply(this,v);return m.cache=A.set(T,L)||A,L};return f.cache=new(Ns.Cache||to),f}function Rs(i){if(typeof i!="function")throw new ir(a);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}Ns.Cache=to;var j_=Yw(function(i,s){var f=(s=s.length==1&&Ve(s[0])?It(s[0],Hn(Ae())):It(an(s,1),Hn(Ae()))).length;return Ke(function(m){for(var v=-1,T=hn(m.length,f);++v=s}),hi=nm(function(){return arguments}())?nm:function(i){return Bt(i)&&vt.call(i,"callee")&&!Bh.call(i,"callee")},Ve=de.isArray,P_=Al?Hn(Al):function(i){return Bt(i)&&xn(i)==ce};function Pn(i){return i!=null&&Ps(i.length)&&!lo(i)}function qt(i){return Bt(i)&&Pn(i)}var Ro=Tw||Nf,L_=Nl?Hn(Nl):function(i){return Bt(i)&&xn(i)==y};function xf(i){if(!Bt(i))return!1;var s=xn(i);return s==b||s=="[object DOMException]"||typeof i.message=="string"&&typeof i.name=="string"&&!ql(i)}function lo(i){if(!Dt(i))return!1;var s=xn(i);return s==S||s==j||s=="[object AsyncFunction]"||s=="[object Proxy]"}function sg(i){return typeof i=="number"&&i==Ge(i)}function Ps(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=9007199254740991}function Dt(i){var s=u(i);return i!=null&&(s=="object"||s=="function")}function Bt(i){return i!=null&&u(i)=="object"}var ag=Ch?Hn(Ch):function(i){return Bt(i)&&mn(i)==x};function cg(i){return typeof i=="number"||Bt(i)&&xn(i)==w}function ql(i){if(!Bt(i)||xn(i)!=k)return!1;var s=ls(i);if(s===null)return!0;var f=vt.call(s,"constructor")&&s.constructor;return typeof f=="function"&&f instanceof f&&ns.call(f)==_w}var bf=Oh?Hn(Oh):function(i){return Bt(i)&&xn(i)==E},fg=jh?Hn(jh):function(i){return Bt(i)&&mn(i)==C};function Ls(i){return typeof i=="string"||!Ve(i)&&Bt(i)&&xn(i)==R}function Vn(i){return u(i)=="symbol"||Bt(i)&&xn(i)==z}var Gi=Ah?Hn(Ah):function(i){return Bt(i)&&Ps(i.length)&&!!ft[xn(i)]},I_=Ss(Yc),D_=Ss(function(i,s){return i<=s});function dg(i){if(!i)return[];if(Pn(i))return Ls(i)?kr(i):Rn(i);if(Pl&&i[Pl])return function(f){for(var m,v=[];!(m=f.next()).done;)v.push(m.value);return v}(i[Pl]());var s=mn(i);return(s==x?Dc:s==C?Ju:Qi)(i)}function uo(i){return i?(i=cr(i))===1/0||i===-1/0?17976931348623157e292*(i<0?-1:1):i==i?i:0:i===0?i:0}function Ge(i){var s=uo(i),f=s%1;return s==s?f?s-f:s:0}function pg(i){return i?fi(Ge(i),0,4294967295):0}function cr(i){if(typeof i=="number")return i;if(Vn(i))return NaN;if(Dt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Dt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=i.replace(ot,"");var f=Dr.test(i);return f||li.test(i)?re(i.slice(2),f?2:8):rn.test(i)?NaN:+i}function hg(i){return Ur(i,Ln(i))}function ht(i){return i==null?"":Wn(i)}var z_=Wi(function(i,s){if(Wl(s)||Pn(s))Ur(s,on(s),i);else for(var f in s)vt.call(s,f)&&$l(i,f,s[f])}),mg=Wi(function(i,s){Ur(s,Ln(s),i)}),Is=Wi(function(i,s,f,m){Ur(s,Ln(s),i,m)}),$_=Wi(function(i,s,f,m){Ur(s,on(s),i,m)}),M_=oo(Bc),F_=Ke(function(i,s){i=Tt(i);var f=-1,m=s.length,v=m>2?s[2]:void 0;for(v&&bn(s[0],s[1],v)&&(m=1);++f1),T}),Ur(i,af(i),f),m&&(f=ur(f,7,Xw));for(var v=s.length;v--;)ef(f,s[v]);return f}),G_=oo(function(i,s){return i==null?{}:function(f,m){return cm(f,m,function(v,T){return Sf(f,T)})}(i,s)});function vg(i,s){if(i==null)return{};var f=It(af(i),function(m){return[m]});return s=Ae(s),cm(i,f,function(m,v){return s(m,v[0])})}var yg=Rm(on),wg=Rm(Ln);function Qi(i){return i==null?[]:Ic(i,on(i))}var Q_=Vi(function(i,s,f){return s=s.toLowerCase(),i+(f?_g(s):s)});function _g(i){return Ef(ht(i).toLowerCase())}function xg(i){return(i=ht(i))&&i.replace(Xr,dw).replace(nr,"")}var Y_=Vi(function(i,s,f){return i+(f?"-":"")+s.toLowerCase()}),K_=Vi(function(i,s,f){return i+(f?" ":"")+s.toLowerCase()}),X_=Tm("toLowerCase"),Z_=Vi(function(i,s,f){return i+(f?"_":"")+s.toLowerCase()}),J_=Vi(function(i,s,f){return i+(f?" ":"")+Ef(s)}),ex=Vi(function(i,s,f){return i+(f?" ":"")+s.toUpperCase()}),Ef=Tm("toUpperCase");function bg(i,s,f){return i=ht(i),(s=f?void 0:s)===void 0?function(m){return zr.test(m)}(i)?function(m){return m.match(sn)||[]}(i):function(m){return m.match(St)||[]}(i):i.match(s)||[]}var kg=Ke(function(i,s){try{return Bn(i,void 0,s)}catch(f){return xf(f)?f:new at(f)}}),tx=oo(function(i,s){return or(s,function(f){f=Br(f),no(i,f,wf(i[f],i))}),i});function Tf(i){return function(){return i}}var nx=Om(),rx=Om(!0);function In(i){return i}function Cf(i){return om(typeof i=="function"?i:ur(i,1))}var ox=Ke(function(i,s){return function(f){return Fl(f,i,s)}}),ix=Ke(function(i,s){return function(f){return Fl(i,f,s)}});function Of(i,s,f){var m=on(s),v=gs(s,m);f!=null||Dt(s)&&(v.length||!m.length)||(f=s,s=i,i=this,v=gs(s,on(s)));var T=!(Dt(f)&&"chain"in f&&!f.chain),A=lo(i);return or(v,function(L){var U=s[L];i[L]=U,A&&(i.prototype[L]=function(){var K=this.__chain__;if(T||K){var Q=i(this.__wrapped__),oe=Q.__actions__=Rn(this.__actions__);return oe.push({func:U,args:arguments,thisArg:i}),Q.__chain__=K,Q}return U.apply(i,So([this.value()],arguments))})}),i}function jf(){}var lx=lf(It),ux=lf(Nh),sx=lf(Ac);function Sg(i){return pf(i)?Nc(Br(i)):function(s){return function(f){return Hi(f,s)}}(i)}var ax=Am(),cx=Am(!0);function Af(){return[]}function Nf(){return!1}var fx=bs(function(i,s){return i+s},0),dx=uf("ceil"),px=bs(function(i,s){return i/s},1),hx=uf("floor"),Rf,mx=bs(function(i,s){return i*s},1),gx=uf("round"),vx=bs(function(i,s){return i-s},0);return _.after=function(i,s){if(typeof s!="function")throw new ir(a);return i=Ge(i),function(){if(--i<1)return s.apply(this,arguments)}},_.ary=rg,_.assign=z_,_.assignIn=mg,_.assignInWith=Is,_.assignWith=$_,_.at=M_,_.before=og,_.bind=wf,_.bindAll=tx,_.bindKey=ig,_.castArray=function(){if(!arguments.length)return[];var i=arguments[0];return Ve(i)?i:[i]},_.chain=eg,_.chunk=function(i,s,f){s=(f?bn(i,s,f):s===void 0)?1:Zt(Ge(s),0);var m=i==null?0:i.length;if(!m||s<1)return[];for(var v=0,T=0,A=de(as(m/s));vK?0:K+L),(U=U===void 0||U>K?K:Ge(U))<0&&(U+=K),U=L>U?0:pg(U);L>>0)?(i=ht(i))&&(typeof s=="string"||s!=null&&!bf(s))&&!(s=Wn(s))&&zi(i)?No(kr(i),0,f):i.split(s,f):[]},_.spread=function(i,s){if(typeof i!="function")throw new ir(a);return s=s==null?0:Zt(Ge(s),0),Ke(function(f){var m=f[s],v=No(f,0,s);return m&&So(v,m),Bn(i,this,v)})},_.tail=function(i){var s=i==null?0:i.length;return s?sr(i,1,s):[]},_.take=function(i,s,f){return i&&i.length?sr(i,0,(s=f||s===void 0?1:Ge(s))<0?0:s):[]},_.takeRight=function(i,s,f){var m=i==null?0:i.length;return m?sr(i,(s=m-(s=f||s===void 0?1:Ge(s)))<0?0:s,m):[]},_.takeRightWhile=function(i,s){return i&&i.length?ws(i,Ae(s,3),!1,!0):[]},_.takeWhile=function(i,s){return i&&i.length?ws(i,Ae(s,3)):[]},_.tap=function(i,s){return s(i),i},_.throttle=function(i,s,f){var m=!0,v=!0;if(typeof i!="function")throw new ir(a);return Dt(f)&&(m="leading"in f?!!f.leading:m,v="trailing"in f?!!f.trailing:v),lg(i,s,{leading:m,maxWait:s,trailing:v})},_.thru=Os,_.toArray=dg,_.toPairs=yg,_.toPairsIn=wg,_.toPath=function(i){return Ve(i)?It(i,Br):Vn(i)?[i]:Rn(qm(ht(i)))},_.toPlainObject=hg,_.transform=function(i,s,f){var m=Ve(i),v=m||Ro(i)||Gi(i);if(s=Ae(s,4),f==null){var T=i&&i.constructor;f=v?m?new T:[]:Dt(i)&&lo(T)?Bi(ls(i)):{}}return(v?or:Fr)(i,function(A,L,U){return s(f,A,L,U)}),f},_.unary=function(i){return rg(i,1)},_.union=a_,_.unionBy=c_,_.unionWith=f_,_.uniq=function(i){return i&&i.length?jo(i):[]},_.uniqBy=function(i,s){return i&&i.length?jo(i,Ae(s,2)):[]},_.uniqWith=function(i,s){return s=typeof s=="function"?s:void 0,i&&i.length?jo(i,void 0,s):[]},_.unset=function(i,s){return i==null||ef(i,s)},_.unzip=yf,_.unzipWith=Jm,_.update=function(i,s,f){return i==null?i:mm(i,s,rf(f))},_.updateWith=function(i,s,f,m){return m=typeof m=="function"?m:void 0,i==null?i:mm(i,s,rf(f),m)},_.values=Qi,_.valuesIn=function(i){return i==null?[]:Ic(i,Ln(i))},_.without=d_,_.words=bg,_.wrap=function(i,s){return _f(rf(s),i)},_.xor=p_,_.xorBy=h_,_.xorWith=m_,_.zip=g_,_.zipObject=function(i,s){return vm(i||[],s||[],$l)},_.zipObjectDeep=function(i,s){return vm(i||[],s||[],Bl)},_.zipWith=v_,_.entries=yg,_.entriesIn=wg,_.extend=mg,_.extendWith=Is,Of(_,_),_.add=fx,_.attempt=kg,_.camelCase=Q_,_.capitalize=_g,_.ceil=dx,_.clamp=function(i,s,f){return f===void 0&&(f=s,s=void 0),f!==void 0&&(f=(f=cr(f))==f?f:0),s!==void 0&&(s=(s=cr(s))==s?s:0),fi(cr(i),s,f)},_.clone=function(i){return ur(i,4)},_.cloneDeep=function(i){return ur(i,5)},_.cloneDeepWith=function(i,s){return ur(i,5,s=typeof s=="function"?s:void 0)},_.cloneWith=function(i,s){return ur(i,4,s=typeof s=="function"?s:void 0)},_.conformsTo=function(i,s){return s==null||Kh(i,s,on(s))},_.deburr=xg,_.defaultTo=function(i,s){return i==null||i!=i?s:i},_.divide=px,_.endsWith=function(i,s,f){i=ht(i),s=Wn(s);var m=i.length,v=f=f===void 0?m:fi(Ge(f),0,m);return(f-=s.length)>=0&&i.slice(f,v)==s},_.eq=Er,_.escape=function(i){return(i=ht(i))&&ue.test(i)?i.replace(ne,pw):i},_.escapeRegExp=function(i){return(i=ht(i))&&Ze.test(i)?i.replace(Ee,"\\$&"):i},_.every=function(i,s,f){var m=Ve(i)?Nh:Fw;return f&&bn(i,s,f)&&(s=void 0),m(i,Ae(s,3))},_.find=__,_.findIndex=Qm,_.findKey=function(i,s){return Rh(i,Ae(s,3),Fr)},_.findLast=x_,_.findLastIndex=Ym,_.findLastKey=function(i,s){return Rh(i,Ae(s,3),Wc)},_.floor=hx,_.forEach=tg,_.forEachRight=ng,_.forIn=function(i,s){return i==null?i:Hc(i,Ae(s,3),Ln)},_.forInRight=function(i,s){return i==null?i:em(i,Ae(s,3),Ln)},_.forOwn=function(i,s){return i&&Fr(i,Ae(s,3))},_.forOwnRight=function(i,s){return i&&Wc(i,Ae(s,3))},_.get=kf,_.gt=N_,_.gte=R_,_.has=function(i,s){return i!=null&&zm(i,s,Uw)},_.hasIn=Sf,_.head=Xm,_.identity=In,_.includes=function(i,s,f,m){i=Pn(i)?i:Qi(i),f=f&&!m?Ge(f):0;var v=i.length;return f<0&&(f=Zt(v+f,0)),Ls(i)?f<=v&&i.indexOf(s,f)>-1:!!v&&Di(i,s,f)>-1},_.indexOf=function(i,s,f){var m=i==null?0:i.length;if(!m)return-1;var v=f==null?0:Ge(f);return v<0&&(v=Zt(m+v,0)),Di(i,s,v)},_.inRange=function(i,s,f){return s=uo(s),f===void 0?(f=s,s=0):f=uo(f),function(m,v,T){return m>=hn(v,T)&&m=-9007199254740991&&i<=9007199254740991},_.isSet=fg,_.isString=Ls,_.isSymbol=Vn,_.isTypedArray=Gi,_.isUndefined=function(i){return i===void 0},_.isWeakMap=function(i){return Bt(i)&&mn(i)==F},_.isWeakSet=function(i){return Bt(i)&&xn(i)=="[object WeakSet]"},_.join=function(i,s){return i==null?"":Cw.call(i,s)},_.kebabCase=Y_,_.last=ar,_.lastIndexOf=function(i,s,f){var m=i==null?0:i.length;if(!m)return-1;var v=m;return f!==void 0&&(v=(v=Ge(f))<0?Zt(m+v,0):hn(v,m-1)),s==s?function(T,A,L){for(var U=L+1;U--;)if(T[U]===A)return U;return U}(i,s,v):Zu(i,Ph,v,!0)},_.lowerCase=K_,_.lowerFirst=X_,_.lt=I_,_.lte=D_,_.max=function(i){return i&&i.length?ms(i,In,Vc):void 0},_.maxBy=function(i,s){return i&&i.length?ms(i,Ae(s,2),Vc):void 0},_.mean=function(i){return Lh(i,In)},_.meanBy=function(i,s){return Lh(i,Ae(s,2))},_.min=function(i){return i&&i.length?ms(i,In,Yc):void 0},_.minBy=function(i,s){return i&&i.length?ms(i,Ae(s,2),Yc):void 0},_.stubArray=Af,_.stubFalse=Nf,_.stubObject=function(){return{}},_.stubString=function(){return""},_.stubTrue=function(){return!0},_.multiply=mx,_.nth=function(i,s){return i&&i.length?sm(i,Ge(s)):void 0},_.noConflict=function(){return qe._===this&&(qe._=xw),this},_.noop=jf,_.now=As,_.pad=function(i,s,f){i=ht(i);var m=(s=Ge(s))?$i(i):0;if(!s||m>=s)return i;var v=(s-m)/2;return ks(cs(v),f)+i+ks(as(v),f)},_.padEnd=function(i,s,f){i=ht(i);var m=(s=Ge(s))?$i(i):0;return s&&ms){var m=i;i=s,s=m}if(f||i%1||s%1){var v=Vh();return hn(i+v*(s-i+D("1e-"+((v+"").length-1))),s)}return Xc(i,s)},_.reduce=function(i,s,f){var m=Ve(i)?jc:Ih,v=arguments.length<3;return m(i,Ae(s,4),f,v,Oo)},_.reduceRight=function(i,s,f){var m=Ve(i)?sw:Ih,v=arguments.length<3;return m(i,Ae(s,4),f,v,Zh)},_.repeat=function(i,s,f){return s=(f?bn(i,s,f):s===void 0)?1:Ge(s),Zc(ht(i),s)},_.replace=function(){var i=arguments,s=ht(i[0]);return i.length<3?s:s.replace(i[1],i[2])},_.result=function(i,s,f){var m=-1,v=(s=Ao(s,i)).length;for(v||(v=1,i=void 0);++m9007199254740991)return[];var f=4294967295,m=hn(i,4294967295);i-=4294967295;for(var v=Lc(m,s=Ae(s));++f=T)return i;var L=f-$i(m);if(L<1)return m;var U=A?No(A,0,L).join(""):i.slice(0,L);if(v===void 0)return U+m;if(A&&(L+=U.length-L),bf(v)){if(i.slice(L).search(v)){var K,Q=U;for(v.global||(v=zc(v.source,ht(Vt.exec(v))+"g")),v.lastIndex=0;K=v.exec(Q);)var oe=K.index;U=U.slice(0,oe===void 0?L:oe)}}else if(i.indexOf(Wn(v),L)!=L){var xe=U.lastIndexOf(v);xe>-1&&(U=U.slice(0,xe))}return U+m},_.unescape=function(i){return(i=ht(i))&&te.test(i)?i.replace(V,gw):i},_.uniqueId=function(i){var s=++ww;return ht(i)+s},_.upperCase=ex,_.upperFirst=Ef,_.each=tg,_.eachRight=ng,_.first=Xm,Of(_,(Rf={},Fr(_,function(i,s){vt.call(_.prototype,s)||(Rf[s]=i)}),Rf),{chain:!1}),_.VERSION="4.17.15",or(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),or(["drop","take"],function(i,s){tt.prototype[i]=function(f){f=f===void 0?1:Zt(Ge(f),0);var m=this.__filtered__&&!s?new tt(this):this.clone();return m.__filtered__?m.__takeCount__=hn(f,m.__takeCount__):m.__views__.push({size:hn(f,4294967295),type:i+(m.__dir__<0?"Right":"")}),m},tt.prototype[i+"Right"]=function(f){return this.reverse()[i](f).reverse()}}),or(["filter","map","takeWhile"],function(i,s){var f=s+1,m=f==1||f==3;tt.prototype[i]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ae(v,3),type:f}),T.__filtered__=T.__filtered__||m,T}}),or(["head","last"],function(i,s){var f="take"+(s?"Right":"");tt.prototype[i]=function(){return this[f](1).value()[0]}}),or(["initial","tail"],function(i,s){var f="drop"+(s?"":"Right");tt.prototype[i]=function(){return this.__filtered__?new tt(this):this[f](1)}}),tt.prototype.compact=function(){return this.filter(In)},tt.prototype.find=function(i){return this.filter(i).head()},tt.prototype.findLast=function(i){return this.reverse().find(i)},tt.prototype.invokeMap=Ke(function(i,s){return typeof i=="function"?new tt(this):this.map(function(f){return Fl(f,i,s)})}),tt.prototype.reject=function(i){return this.filter(Rs(Ae(i)))},tt.prototype.slice=function(i,s){i=Ge(i);var f=this;return f.__filtered__&&(i>0||s<0)?new tt(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),s!==void 0&&(f=(s=Ge(s))<0?f.dropRight(-s):f.take(s-i)),f)},tt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},tt.prototype.toArray=function(){return this.take(4294967295)},Fr(tt.prototype,function(i,s){var f=/^(?:filter|find|map|reject)|While$/.test(s),m=/^(?:head|last)$/.test(s),v=_[m?"take"+(s=="last"?"Right":""):s],T=m||/^find/.test(s);v&&(_.prototype[s]=function(){var A=this.__wrapped__,L=m?[1]:arguments,U=A instanceof tt,K=L[0],Q=U||Ve(A),oe=function(Ie){var ye=v.apply(_,So([Ie],L));return m&&xe?ye[0]:ye};Q&&f&&typeof K=="function"&&K.length!=1&&(U=Q=!1);var xe=this.__chain__,be=!!this.__actions__.length,Pe=T&&!xe,ee=U&&!be;if(!T&&Q){A=ee?A:new tt(this);var ae=i.apply(A,L);return ae.__actions__.push({func:Os,args:[oe],thisArg:void 0}),new lr(ae,xe)}return Pe&&ee?i.apply(this,L):(ae=this.thru(oe),Pe?m?ae.value()[0]:ae.value():ae)})}),or(["pop","push","shift","sort","splice","unshift"],function(i){var s=es[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return s.apply(Ve(T)?T:[],v)}return this[f](function(A){return s.apply(Ve(A)?A:[],v)})}}),Fr(tt.prototype,function(i,s){var f=_[s];if(f){var m=f.name+"";vt.call(Ui,m)||(Ui[m]=[]),Ui[m].push({name:s,func:f})}}),Ui[xs(void 0,2).name]=[{name:"wrapper",func:void 0}],tt.prototype.clone=function(){var i=new tt(this.__wrapped__);return i.__actions__=Rn(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Rn(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Rn(this.__views__),i},tt.prototype.reverse=function(){if(this.__filtered__){var i=new tt(this);i.__dir__=-1,i.__filtered__=!0}else(i=this.clone()).__dir__*=-1;return i},tt.prototype.value=function(){var i=this.__wrapped__.value(),s=this.__dir__,f=Ve(i),m=s<0,v=f?i.length:0,T=function(Xe,Te,Le){for(var Jt=-1,kn=Le.length;++Jt=this.__values__.length;return{done:i,value:i?void 0:this.__values__[this.__index__++]}},_.prototype.plant=function(i){for(var s,f=this;f instanceof ps;){var m=Gm(f);m.__index__=0,m.__values__=void 0,s?v.__wrapped__=m:s=m;var v=m;f=f.__wrapped__}return v.__wrapped__=i,s},_.prototype.reverse=function(){var i=this.__wrapped__;if(i instanceof tt){var s=i;return this.__actions__.length&&(s=new tt(this)),(s=s.reverse()).__actions__.push({func:Os,args:[vf],thisArg:void 0}),new lr(s,this.__chain__)}return this.thru(vf)},_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=function(){return gm(this.__wrapped__,this.__actions__)},_.prototype.first=_.prototype.head,Pl&&(_.prototype[Pl]=function(){return this}),_}();u(n(46))=="object"&&n(46)?(qe._=To,(l=(function(){return To}).call(t,n,t,o))===void 0||(o.exports=l)):Ut?((Ut.exports=To)._=To,Yt._=To):qe._=To}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),l=n(49),u=n(118),a=n(124),c=n(127),d=n(128),p=n(129),h=n(130),g=n(59),y=n(131),b=n(10),S=n(135),j=n(136),x=n(141),w=n(0),k=n(12),E=n(142),C=n(5),R=n(144),z=n(6),F={};F["[object Arguments]"]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F["[object Object]"]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F["[object Function]"]=F["[object WeakMap]"]=!1,e.exports=function ce($,Y,H,he,Se,je){var ze,Be=1&Y,J=2&Y,se=4&Y;if(H&&(ze=Se?H($,he,Se,je):H($)),ze!==void 0)return ze;if(!C($))return $;var we=w($);if(we){if(ze=S($),!Be)return d($,ze)}else{var P=b($),V=P=="[object Function]"||P=="[object GeneratorFunction]";if(k($))return c($,Be);if(P=="[object Object]"||P=="[object Arguments]"||V&&!Se){if(ze=J||V?{}:x($),!Be)return J?h($,a(ze,$)):p($,u(ze,$))}else{if(!F[P])return Se?$:{};ze=j($,P,Be)}}je||(je=new r);var ne=je.get($);if(ne)return ne;je.set($,ze),R($)?$.forEach(function(le){ze.add(ce(le,Y,H,le,$,je))}):E($)&&$.forEach(function(le,ke){ze.set(ke,ce(le,Y,H,ke,$,je))});var te=se?J?y:g:J?keysIn:z,ue=we?void 0:te($);return o(ue||$,function(le,ke){ue&&(le=$[ke=le]),l(ze,ke,ce(le,Y,H,ke,$,je))}),ze}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(l){var u=this.__data__,a=r(u,l);return!(a<0)&&(a==u.length-1?u.pop():o.call(u,a,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var l=this.__data__,u=r(l,o);return u<0?void 0:l[u][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,l){var u=this.__data__,a=r(u,o);return a<0?(++this.size,u.push([o,l])):u[a][1]=l,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),l=n(32);e.exports=function(u,a){var c=this.__data__;if(c instanceof r){var d=c.__data__;if(!o||d.length<199)return d.push([u,a]),this.size=++c.size,this;c=this.__data__=new l(d)}return c.set(u,a),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),l=n(5),u=n(48),a=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,p=c.toString,h=d.hasOwnProperty,g=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!l(y)||o(y))&&(r(y)?g:a).test(u(y))}},function(e,t,n){var r=n(9),o=Object.prototype,l=o.hasOwnProperty,u=o.toString,a=r?r.toStringTag:void 0;e.exports=function(c){var d=l.call(c,a),p=c[a];try{c[a]=void 0;var h=!0}catch{}var g=u.call(c);return h&&(d?c[a]=p:delete c[a]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),l=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(u){return!!l&&l in u}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),l=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(l||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),l=n(110),u=n(111),a=n(112);function c(d){var p=-1,h=d==null?0:d.length;for(this.clear();++p0&&c(y)?a>1?l(y,a-1,c,d,p):r(p,y):d||(p[p.length]=y)}return p}},function(e,t,n){var r=n(9),o=n(21),l=n(0),u=r?r.isConcatSpreadable:void 0;e.exports=function(a){return l(a)||o(a)||!!(u&&a&&a[u])}},function(e,t,n){var r=n(25),o=n(195),l=n(197);e.exports=function(u,a){return l(o(u,a,r),u+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(l,u,a){return u=o(u===void 0?l.length-1:u,0),function(){for(var c=arguments,d=-1,p=o(c.length-u,0),h=Array(p);++d0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),l=n(206),u=n(69),a=n(207),c=n(42);e.exports=function(d,p,h){var g=-1,y=o,b=d.length,S=!0,j=[],x=j;if(h)S=!1,y=l;else if(b>=200){var w=p?null:a(d);if(w)return c(w);S=!1,y=u,x=new r}else x=p?[]:j;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),l=n(205);e.exports=function(u,a,c){return a==a?l(u,a,c):r(u,o,c)}},function(e,t){e.exports=function(n,r,o,l){for(var u=n.length,a=o+(l?1:-1);l?a--:++a1||u.length===1&&l.hasEdge(u[0],u[0])})}},function(e,t,n){var r=n(1);e.exports=function(l,u,a){return function(c,d,p){var h={},g=c.nodes();return g.forEach(function(y){h[y]={},h[y][y]={distance:0},g.forEach(function(b){y!==b&&(h[y][b]={distance:Number.POSITIVE_INFINITY})}),p(y).forEach(function(b){var S=b.v===y?b.w:b.v,j=d(b);h[y][S]={distance:j,predecessor:y}})}),g.forEach(function(y){var b=h[y];g.forEach(function(S){var j=h[S];g.forEach(function(x){var w=j[y],k=b[x],E=j[x],C=w.distance+k.distance;C0;){if(c=h.removeMin(),r.has(p,c))d.setEdge(c,p[c]);else{if(y)throw new Error("Input graph is not connected: "+u);y=!0}u.nodeEdges(c).forEach(g)}return d}},function(e,t,n){(function(r){function o(a,c){for(var d=0,p=a.length-1;p>=0;p--){var h=a[p];h==="."?a.splice(p,1):h===".."?(a.splice(p,1),d++):d&&(a.splice(p,1),d--)}if(c)for(;d--;d)a.unshift("..");return a}function l(a,c){if(a.filter)return a.filter(c);for(var d=[],p=0;p=-1&&!c;d--){var p=d>=0?arguments[d]:r.cwd();if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");p&&(a=p+"/"+a,c=p.charAt(0)==="/")}return(c?"/":"")+(a=o(l(a.split("/"),function(h){return!!h}),!c).join("/"))||"."},t.normalize=function(a){var c=t.isAbsolute(a),d=u(a,-1)==="/";return(a=o(l(a.split("/"),function(p){return!!p}),!c).join("/"))||c||(a="."),a&&d&&(a+="/"),(c?"/":"")+a},t.isAbsolute=function(a){return a.charAt(0)==="/"},t.join=function(){var a=Array.prototype.slice.call(arguments,0);return t.normalize(l(a,function(c,d){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(a,c){function d(j){for(var x=0;x=0&&j[w]==="";w--);return x>w?[]:j.slice(x,w-x+1)}a=t.resolve(a).substr(1),c=t.resolve(c).substr(1);for(var p=d(a.split("/")),h=d(c.split("/")),g=Math.min(p.length,h.length),y=g,b=0;b=1;--g)if((c=a.charCodeAt(g))===47){if(!h){p=g;break}}else h=!1;return p===-1?d?"/":".":d&&p===1?"/":a.slice(0,p)},t.basename=function(a,c){var d=function(p){typeof p!="string"&&(p+="");var h,g=0,y=-1,b=!0;for(h=p.length-1;h>=0;--h)if(p.charCodeAt(h)===47){if(!b){g=h+1;break}}else y===-1&&(b=!1,y=h+1);return y===-1?"":p.slice(g,y)}(a);return c&&d.substr(-1*c.length)===c&&(d=d.substr(0,d.length-c.length)),d},t.extname=function(a){typeof a!="string"&&(a+="");for(var c=-1,d=0,p=-1,h=!0,g=0,y=a.length-1;y>=0;--y){var b=a.charCodeAt(y);if(b!==47)p===-1&&(h=!1,p=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!h){d=y+1;break}}return c===-1||p===-1||g===0||g===1&&c===p-1&&c===d+1?"":a.slice(c,p)};var u="ab".substr(-1)==="b"?function(a,c,d){return a.substr(c,d)}:function(a,c,d){return c<0&&(c=a.length+c),a.substr(c,d)}}).call(this,n(13))},function(e,t,n){function r(u){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(u)}var o={file:n(225),http:n(81),https:n(81)},l=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(u,a){var c=Promise.resolve();return a===void 0&&(a={}),c=(c=c.then(function(){if(u===void 0)throw new TypeError("location is required");if(typeof u!="string")throw new TypeError("location must be a string");if(a!==void 0){if(r(a)!=="object")throw new TypeError("options must be an object");if(a.processContent!==void 0&&typeof a.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(d,p){(function(h){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(h),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=l}return y})(u).load(u,a||{},function(h,g){h?p(h):d(g)})})}).then(function(d){return a.processContent?new Promise(function(p,h){r(d)!=="object"&&(d={text:d}),d.location=u,a.processContent(d,function(g,y){g?h(g):p(y)})}):r(d)==="object"?d.text:d})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(E){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(E)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var l=n(227),u=n(228),a=n(82),c=n(229),d=n(231);function p(){}var h=t=e.exports=function(E,C){return typeof C=="function"?new t.Request("GET",E).end(C):arguments.length==1?new t.Request("GET",E):new t.Request(E,C)};t.Request=w,h.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(E){return E.trim()}:function(E){return E.replace(/(^\s*|\s*$)/g,"")};function y(E){if(!a(E))return E;var C=[];for(var R in E)b(C,R,E[R]);return C.join("&")}function b(E,C,R){if(R!=null)if(Array.isArray(R))R.forEach(function(F){b(E,C,F)});else if(a(R))for(var z in R)b(E,C+"["+z+"]",R[z]);else E.push(encodeURIComponent(C)+"="+encodeURIComponent(R));else R===null&&E.push(encodeURIComponent(C))}function S(E){for(var C,R,z={},F=E.split("&"),ce=0,$=F.length;ce<$;++ce)(R=(C=F[ce]).indexOf("="))==-1?z[decodeURIComponent(C)]="":z[decodeURIComponent(C.slice(0,R))]=decodeURIComponent(C.slice(R+1));return z}function j(E){return/[\/+]json($|[^-\w])/.test(E)}function x(E){this.req=E,this.xhr=this.req.xhr,this.text=this.req.method!="HEAD"&&(this.xhr.responseType===""||this.xhr.responseType==="text")||this.xhr.responseType===void 0?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var C=this.xhr.status;C===1223&&(C=204),this._setStatusProperties(C),this.header=this.headers=function(R){for(var z,F,ce,$,Y=R.split(/\r?\n/),H={},he=0,Se=Y.length;he=2&&E._responseTimeoutTimer&&clearTimeout(E._responseTimeoutTimer),Y==4){var H;try{H=C.status}catch{H=0}if(!H)return E.timedout||E._aborted?void 0:E.crossDomainError();E.emit("end")}};var z=function(Y,H){H.total>0&&(H.percent=H.loaded/H.total*100),H.direction=Y,E.emit("progress",H)};if(this.hasListeners("progress"))try{C.onprogress=z.bind(null,"download"),C.upload&&(C.upload.onprogress=z.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(Y){return this.callback(Y)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof R!="string"&&!this._isHost(R)){var F=this._header["content-type"],ce=this._serializer||h.serialize[F?F.split(";")[0]:""];!ce&&j(F)&&(ce=h.serialize["application/json"]),ce&&(R=ce(R))}for(var $ in this.header)this.header[$]!=null&&this.header.hasOwnProperty($)&&C.setRequestHeader($,this.header[$]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send(R!==void 0?R:null),this},h.agent=function(){return new d},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(E){d.prototype[E.toLowerCase()]=function(C,R){var z=new h.Request(E,C);return this._setDefaults(z),R&&z.end(R),z}}),d.prototype.del=d.prototype.delete,h.get=function(E,C,R){var z=h("GET",E);return typeof C=="function"&&(R=C,C=null),C&&z.query(C),R&&z.end(R),z},h.head=function(E,C,R){var z=h("HEAD",E);return typeof C=="function"&&(R=C,C=null),C&&z.query(C),R&&z.end(R),z},h.options=function(E,C,R){var z=h("OPTIONS",E);return typeof C=="function"&&(R=C,C=null),C&&z.send(C),R&&z.end(R),z},h.del=k,h.delete=k,h.patch=function(E,C,R){var z=h("PATCH",E);return typeof C=="function"&&(R=C,C=null),C&&z.send(C),R&&z.end(R),z},h.post=function(E,C,R){var z=h("POST",E);return typeof C=="function"&&(R=C,C=null),C&&z.send(C),R&&z.end(R),z},h.put=function(E,C,R){var z=h("PUT",E);return typeof C=="function"&&(R=C,C=null),C&&z.send(C),R&&z.end(R),z}},function(e,t,n){function r(o){if(o)return function(l){for(var u in r.prototype)l[u]=r.prototype[u];return l}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,l){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(l),this},r.prototype.once=function(o,l){function u(){this.off(o,u),l.apply(this,arguments)}return u.fn=l,this.on(o,u),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,l){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var u,a=this._callbacks["$"+o];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var d=this._retryCallback(a,c);if(d===!0)return!0;if(d===!1)return!1}catch(p){console.error(p)}return!!(c&&c.status&&c.status>=500&&c.status!=501||a&&(a.code&&~u.indexOf(a.code)||a.timeout&&a.code=="ECONNABORTED"||a.crossDomain))},l.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},l.prototype.then=function(a,c){if(!this._fullfilledPromise){var d=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(p,h){d.end(function(g,y){g?h(g):p(y)})})}return this._fullfilledPromise.then(a,c)},l.prototype.catch=function(a){return this.then(void 0,a)},l.prototype.use=function(a){return a(this),this},l.prototype.ok=function(a){if(typeof a!="function")throw Error("Callback required");return this._okCallback=a,this},l.prototype._isResponseOK=function(a){return!!a&&(this._okCallback?this._okCallback(a):a.status>=200&&a.status<300)},l.prototype.get=function(a){return this._header[a.toLowerCase()]},l.prototype.getHeader=l.prototype.get,l.prototype.set=function(a,c){if(o(a)){for(var d in a)this.set(d,a[d]);return this}return this._header[a.toLowerCase()]=c,this.header[a]=c,this},l.prototype.unset=function(a){return delete this._header[a.toLowerCase()],delete this.header[a],this},l.prototype.field=function(a,c){if(a==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(a)){for(var d in a)this.field(d,a[d]);return this}if(Array.isArray(c)){for(var p in c)this.field(a,c[p]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(a,c),this},l.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},l.prototype._auth=function(a,c,d,p){switch(d.type){case"basic":this.set("Authorization","Basic "+p(a+":"+c));break;case"auto":this.username=a,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+a)}return this},l.prototype.withCredentials=function(a){return a==null&&(a=!0),this._withCredentials=a,this},l.prototype.redirects=function(a){return this._maxRedirects=a,this},l.prototype.maxResponseSize=function(a){if(typeof a!="number")throw TypeError("Invalid argument");return this._maxResponseSize=a,this},l.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},l.prototype.send=function(a){var c=o(a),d=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(a)?this._data=[]:this._isHost(a)||(this._data={});else if(a&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var p in a)this._data[p]=a[p];else typeof a=="string"?(d||this.type("form"),d=this._header["content-type"],this._data=d=="application/x-www-form-urlencoded"?this._data?this._data+"&"+a:a:(this._data||"")+a):this._data=a;return!c||this._isHost(a)||d||this.type("json"),this},l.prototype.sortQuery=function(a){return this._sort=a===void 0||a,this},l.prototype._finalizeQueryString=function(){var a=this._query.join("&");if(a&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+a),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var d=this.url.substring(c+1).split("&");typeof this._sort=="function"?d.sort(this._sort):d.sort(),this.url=this.url.substring(0,c)+"?"+d.join("&")}}},l.prototype._appendQueryString=function(){console.trace("Unsupported")},l.prototype._timeoutError=function(a,c,d){if(!this._aborted){var p=new Error(a+c+"ms exceeded");p.timeout=c,p.code="ECONNABORTED",p.errno=d,this.timedout=!0,this.abort(),this.callback(p)}},l.prototype._setTimeouts=function(){var a=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){a._timeoutError("Timeout of ",a._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){a._timeoutError("Response timeout of ",a._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(l){if(l)return function(u){for(var a in o.prototype)u[a]=o.prototype[a];return u}(l)}e.exports=o,o.prototype.get=function(l){return this.header[l.toLowerCase()]},o.prototype._setHeaderProperties=function(l){var u=l["content-type"]||"";this.type=r.type(u);var a=r.params(u);for(var c in a)this[c]=a[c];this.links={};try{l.link&&(this.links=r.parseLinks(l.link))}catch{}},o.prototype._setStatusProperties=function(l){var u=l/100|0;this.status=this.statusCode=l,this.statusType=u,this.info=u==1,this.ok=u==2,this.redirect=u==3,this.clientError=u==4,this.serverError=u==5,this.error=(u==4||u==5)&&this.toError(),this.created=l==201,this.accepted=l==202,this.noContent=l==204,this.badRequest=l==400,this.unauthorized=l==401,this.notAcceptable=l==406,this.forbidden=l==403,this.notFound=l==404,this.unprocessableEntity=l==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,l){var u=l.split(/ *= */),a=u.shift(),c=u.shift();return a&&c&&(o[a]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,l){var u=l.split(/ *; */),a=u[0].slice(1,-1);return o[u[1].split(/ *= */)[1].slice(1,-1)]=a,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,l=Function.prototype.apply;function u(a,c){this._id=a,this._clearFn=c}t.setTimeout=function(){return new u(l.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new u(l.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(a){a&&a.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(a,c){clearTimeout(a._idleTimeoutId),a._idleTimeout=c},t.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},t._unrefActive=t.active=function(a){clearTimeout(a._idleTimeoutId);var c=a._idleTimeout;c>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(l,u){if(!l.setImmediate){var a,c,d,p,h,g=1,y={},b=!1,S=l.document,j=Object.getPrototypeOf&&Object.getPrototypeOf(l);j=j&&j.setTimeout?j:l,{}.toString.call(l.process)==="[object process]"?a=function(k){o.nextTick(function(){w(k)})}:function(){if(l.postMessage&&!l.importScripts){var k=!0,E=l.onmessage;return l.onmessage=function(){k=!1},l.postMessage("","*"),l.onmessage=E,k}}()?(p="setImmediate$"+Math.random()+"$",h=function(k){k.source===l&&typeof k.data=="string"&&k.data.indexOf(p)===0&&w(+k.data.slice(p.length))},l.addEventListener?l.addEventListener("message",h,!1):l.attachEvent("onmessage",h),a=function(k){l.postMessage(p+k,"*")}):l.MessageChannel?((d=new MessageChannel).port1.onmessage=function(k){w(k.data)},a=function(k){d.port2.postMessage(k)}):S&&"onreadystatechange"in S.createElement("script")?(c=S.documentElement,a=function(k){var E=S.createElement("script");E.onreadystatechange=function(){w(k),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):a=function(k){setTimeout(w,0,k)},j.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var E=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(l,u){return Object.prototype.hasOwnProperty.call(l,u)}e.exports=function(l,u,a,c){u=u||"&",a=a||"=";var d={};if(typeof l!="string"||l.length===0)return d;var p=/\+/g;l=l.split(u);var h=1e3;c&&typeof c.maxKeys=="number"&&(h=c.maxKeys);var g=l.length;h>0&&g>h&&(g=h);for(var y=0;y=0?(b=w.substr(0,k),S=w.substr(k+1)):(b=w,S=""),j=decodeURIComponent(b),x=decodeURIComponent(S),r(d,j)?o(d[j])?d[j].push(x):d[j]=[d[j],x]:d[j]=x}return d};var o=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,d,p,h){return d=d||"&",p=p||"=",c===null&&(c=void 0),r(c)==="object"?u(a(c),function(g){var y=encodeURIComponent(o(g))+p;return l(c[g])?u(c[g],function(b){return y+encodeURIComponent(o(b))}).join(d):y+encodeURIComponent(o(c[g]))}).join(d):h?encodeURIComponent(o(h))+p+encodeURIComponent(o(c)):""};var l=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function u(c,d){if(c.map)return c.map(d);for(var p=[],h=0;h1){N[0]=N[0].slice(0,-1);for(var G=N.length-1,q=1;q= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=Math.floor,z=String.fromCharCode;function F(O){throw new RangeError(C[O])}function ce(O,N){var I=O.split("@"),G="";I.length>1&&(G=I[0]+"@",O=I[1]);var q=function(fe,me){for(var Fe=[],ut=fe.length;ut--;)Fe[ut]=me(fe[ut]);return Fe}((O=O.replace(E,".")).split("."),N).join(".");return G+q}function $(O){for(var N=[],I=0,G=O.length;I=55296&&q<=56319&&I>1,O+=R(O/N);O>455;G+=36)O=R(O/35);return R(G+36*O/(O+38))},he=function(O){var N,I=[],G=O.length,q=0,fe=128,me=72,Fe=O.lastIndexOf("-");Fe<0&&(Fe=0);for(var ut=0;ut=128&&F("not-basic"),I.push(O.charCodeAt(ut));for(var Oe=Fe>0?Fe+1:0;Oe=G&&F("invalid-input");var lt=(N=O.charCodeAt(Oe++))-48<10?N-22:N-65<26?N-65:N-97<26?N-97:36;(lt>=36||lt>R((x-q)/it))&&F("overflow"),q+=lt*it;var Lt=Nt<=me?1:Nt>=me+26?26:Nt-me;if(ltR(x/gt)&&F("overflow"),it*=gt}var _t=I.length+1;me=H(q-st,_t,st==0),R(q/_t)>x-fe&&F("overflow"),fe+=R(q/_t),q%=_t,I.splice(q++,0,fe)}return String.fromCodePoint.apply(String,I)},Se=function(O){var N=[],I=(O=$(O)).length,G=128,q=0,fe=72,me=!0,Fe=!1,ut=void 0;try{for(var Oe,st=O[Symbol.iterator]();!(me=(Oe=st.next()).done);me=!0){var it=Oe.value;it<128&&N.push(z(it))}}catch(qe){Fe=!0,ut=qe}finally{try{!me&&st.return&&st.return()}finally{if(Fe)throw ut}}var Nt=N.length,lt=Nt;for(Nt&&N.push("-");lt=G&&UnR((x-q)/sn)&&F("overflow"),q+=(Lt-G)*sn,G=Lt;var Ft=!0,zr=!1,rr=void 0;try{for(var ui,ft=O[Symbol.iterator]();!(Ft=(ui=ft.next()).done);Ft=!0){var dt=ui.value;if(dtx&&F("overflow"),dt==G){for(var _e=q,D=36;;D+=36){var re=D<=fe?1:D>=fe+26?26:D-fe;if(_e>6|192).toString(16).toUpperCase()+"%"+(63&N|128).toString(16).toUpperCase():"%"+(N>>12|224).toString(16).toUpperCase()+"%"+(N>>6&63|128).toString(16).toUpperCase()+"%"+(63&N|128).toString(16).toUpperCase()}function se(O){for(var N="",I=0,G=O.length;I=194&&q<224){if(G-I>=6){var fe=parseInt(O.substr(I+4,2),16);N+=String.fromCharCode((31&q)<<6|63&fe)}else N+=O.substr(I,6);I+=6}else if(q>=224){if(G-I>=9){var me=parseInt(O.substr(I+4,2),16),Fe=parseInt(O.substr(I+7,2),16);N+=String.fromCharCode((15&q)<<12|(63&me)<<6|63&Fe)}else N+=O.substr(I,9);I+=9}else N+=O.substr(I,3),I+=3}return N}function we(O,N){function I(G){var q=se(G);return q.match(N.UNRESERVED)?q:G}return O.scheme&&(O.scheme=String(O.scheme).replace(N.PCT_ENCODED,I).toLowerCase().replace(N.NOT_SCHEME,"")),O.userinfo!==void 0&&(O.userinfo=String(O.userinfo).replace(N.PCT_ENCODED,I).replace(N.NOT_USERINFO,J).replace(N.PCT_ENCODED,g)),O.host!==void 0&&(O.host=String(O.host).replace(N.PCT_ENCODED,I).toLowerCase().replace(N.NOT_HOST,J).replace(N.PCT_ENCODED,g)),O.path!==void 0&&(O.path=String(O.path).replace(N.PCT_ENCODED,I).replace(O.scheme?N.NOT_PATH:N.NOT_PATH_NOSCHEME,J).replace(N.PCT_ENCODED,g)),O.query!==void 0&&(O.query=String(O.query).replace(N.PCT_ENCODED,I).replace(N.NOT_QUERY,J).replace(N.PCT_ENCODED,g)),O.fragment!==void 0&&(O.fragment=String(O.fragment).replace(N.PCT_ENCODED,I).replace(N.NOT_FRAGMENT,J).replace(N.PCT_ENCODED,g)),O}function P(O){return O.replace(/^0*(.*)/,"$1")||"0"}function V(O,N){var I=O.match(N.IPV4ADDRESS)||[],G=j(I,2)[1];return G?G.split(".").map(P).join("."):O}function ne(O,N){var I=O.match(N.IPV6ADDRESS)||[],G=j(I,3),q=G[1],fe=G[2];if(q){for(var me=q.toLowerCase().split("::").reverse(),Fe=j(me,2),ut=Fe[0],Oe=Fe[1],st=Oe?Oe.split(":").map(P):[],it=ut.split(":").map(P),Nt=N.IPV4ADDRESS.test(it[it.length-1]),lt=Nt?7:8,Lt=it.length-lt,gt=Array(lt),_t=0;_t1){var nr=gt.slice(0,pn.index),Un=gt.slice(pn.index+pn.length);Nn=nr.join(":")+"::"+Un.join(":")}else Nn=gt.join(":");return fe&&(Nn+="%"+fe),Nn}return O}var te=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ue="".match(/(){0}/)[1]===void 0;function le(O){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},G=N.iri!==!1?S:b;N.reference==="suffix"&&(O=(N.scheme?N.scheme+":":"")+"//"+O);var q=O.match(te);if(q){ue?(I.scheme=q[1],I.userinfo=q[3],I.host=q[4],I.port=parseInt(q[5],10),I.path=q[6]||"",I.query=q[7],I.fragment=q[8],isNaN(I.port)&&(I.port=q[5])):(I.scheme=q[1]||void 0,I.userinfo=O.indexOf("@")!==-1?q[3]:void 0,I.host=O.indexOf("//")!==-1?q[4]:void 0,I.port=parseInt(q[5],10),I.path=q[6]||"",I.query=O.indexOf("?")!==-1?q[7]:void 0,I.fragment=O.indexOf("#")!==-1?q[8]:void 0,isNaN(I.port)&&(I.port=O.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?q[4]:void 0)),I.host&&(I.host=ne(V(I.host,G),G)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",N.reference&&N.reference!=="suffix"&&N.reference!==I.reference&&(I.error=I.error||"URI is not a "+N.reference+" reference.");var fe=Be[(N.scheme||I.scheme||"").toLowerCase()];if(N.unicodeSupport||fe&&fe.unicodeSupport)we(I,G);else{if(I.host&&(N.domainHost||fe&&fe.domainHost))try{I.host=je(I.host.replace(G.PCT_ENCODED,se).toLowerCase())}catch(me){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+me}we(I,b)}fe&&fe.parse&&fe.parse(I,N)}else I.error=I.error||"URI can not be parsed.";return I}function ke(O,N){var I=N.iri!==!1?S:b,G=[];return O.userinfo!==void 0&&(G.push(O.userinfo),G.push("@")),O.host!==void 0&&G.push(ne(V(String(O.host),I),I).replace(I.IPV6ADDRESS,function(q,fe,me){return"["+fe+(me?"%25"+me:"")+"]"})),typeof O.port=="number"&&(G.push(":"),G.push(O.port.toString(10))),G.length?G.join(""):void 0}var Ne=/^\.\.?\//,Ue=/^\/\.(\/|$)/,et=/^\/\.\.(\/|$)/,We=/^\/?(?:.|\n)*?(?=\/|$)/;function Ee(O){for(var N=[];O.length;)if(O.match(Ne))O=O.replace(Ne,"");else if(O.match(Ue))O=O.replace(Ue,"/");else if(O.match(et))O=O.replace(et,"/"),N.pop();else if(O==="."||O==="..")O="";else{var I=O.match(We);if(!I)throw new Error("Unexpected dot segment condition");var G=I[0];O=O.slice(G.length),N.push(G)}return N.join("")}function Ze(O){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=N.iri?S:b,G=[],q=Be[(N.scheme||O.scheme||"").toLowerCase()];if(q&&q.serialize&&q.serialize(O,N),O.host&&!I.IPV6ADDRESS.test(O.host)){if(N.domainHost||q&&q.domainHost)try{O.host=N.iri?ze(O.host):je(O.host.replace(I.PCT_ENCODED,se).toLowerCase())}catch(Fe){O.error=O.error||"Host's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+Fe}}we(O,I),N.reference!=="suffix"&&O.scheme&&(G.push(O.scheme),G.push(":"));var fe=ke(O,N);if(fe!==void 0&&(N.reference!=="suffix"&&G.push("//"),G.push(fe),O.path&&O.path.charAt(0)!=="/"&&G.push("/")),O.path!==void 0){var me=O.path;N.absolutePath||q&&q.absolutePath||(me=Ee(me)),fe===void 0&&(me=me.replace(/^\/\//,"/%2F")),G.push(me)}return O.query!==void 0&&(G.push("?"),G.push(O.query)),O.fragment!==void 0&&(G.push("#"),G.push(O.fragment)),G.join("")}function ot(O,N){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},G=arguments[3],q={};return G||(O=le(Ze(O,I),I),N=le(Ze(N,I),I)),!(I=I||{}).tolerant&&N.scheme?(q.scheme=N.scheme,q.userinfo=N.userinfo,q.host=N.host,q.port=N.port,q.path=Ee(N.path||""),q.query=N.query):(N.userinfo!==void 0||N.host!==void 0||N.port!==void 0?(q.userinfo=N.userinfo,q.host=N.host,q.port=N.port,q.path=Ee(N.path||""),q.query=N.query):(N.path?(N.path.charAt(0)==="/"?q.path=Ee(N.path):(O.userinfo===void 0&&O.host===void 0&&O.port===void 0||O.path?O.path?q.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+N.path:q.path=N.path:q.path="/"+N.path,q.path=Ee(q.path)),q.query=N.query):(q.path=O.path,N.query!==void 0?q.query=N.query:q.query=O.query),q.userinfo=O.userinfo,q.host=O.host,q.port=O.port),q.scheme=O.scheme),q.fragment=N.fragment,q}function Me(O,N){return O&&O.toString().replace(N&&N.iri?S.PCT_ENCODED:b.PCT_ENCODED,se)}var Je={scheme:"http",domainHost:!0,parse:function(O,N){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O},serialize:function(O,N){return O.port!==(String(O.scheme).toLowerCase()!=="https"?80:443)&&O.port!==""||(O.port=void 0),O.path||(O.path="/"),O}},At={scheme:"https",domainHost:Je.domainHost,parse:Je.parse,serialize:Je.serialize},Qt={},Wt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",St="[0-9A-Fa-f]",Et=p(p("%[EFef][0-9A-Fa-f]%"+St+St+"%"+St+St)+"|"+p("%[89A-Fa-f][0-9A-Fa-f]%"+St+St)+"|"+p("%"+St+St)),Re=d("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Vt=new RegExp(Wt,"g"),rn=new RegExp(Et,"g"),Dr=new RegExp(d("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Re),"g"),_r=new RegExp(d("[^]",Wt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),li=_r;function bo(O){var N=se(O);return N.match(Vt)?N:O}var Xr={scheme:"mailto",parse:function(O,N){var I=O,G=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var q=!1,fe={},me=I.query.split("&"),Fe=0,ut=me.length;Fet.resolved)}const ic=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),Cc=e=>JSON.parse(JSON.stringify(e)),Th=(e,t)=>{e=Cc(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];ic(r)&&ic(o)?e[n]=Th(o,r):e[n]=r}return e},iw=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(l,u){const a=l.shift();return a?u[a]?l.length?r(l,u[a]):u[a]:{}:{}},o=r(n,t);return ic(o)?Cc(o):o},xT=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=xT(e.allOf,t);return Zi(n,t)}else if(typeof e.$ref<"u"){const n=iw(e.$ref,t);return Zi(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=Zi(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(l=>Zi(l,t));for(let l=o.length-1;l>=0&&!(typeof o[l]<"u");l--)l+1>n&&o.pop();return o.every(l=>typeof l>"u")?void 0:o}const r=Zi(e.items,t);if(typeof r>"u")return[];{const o=[];for(let l=0;l"u"?t=e.definitions||{}:ic(e.definitions)&&(t=Th(t,e.definitions)),Zi(Cc(e),t)}function bT(){const[e,t]=M.useState({configSchema:null,inputSchema:null,configDefaults:null,inputDefaults:null});return M.useEffect(()=>{async function n(){const[r,o]=await Promise.all([fetch("/config_schema").then(l=>l.json()).then(n0),fetch("/input_schema").then(l=>l.json()).then(n0)]);t({configSchema:r,inputSchema:o,configDefaults:r0(r),inputDefaults:r0(o)})}n()},[]),e}async function kT(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function ST(e){let t,n,r,o=!1;return function(u){t===void 0?(t=u,n=0,r=-1):t=TT(t,u);const a=t.length;let c=0;for(;n0){const c=o.decode(u.subarray(0,a)),d=a+(u[a+1]===32?2:1),p=o.decode(u.subarray(d));switch(c){case"data":r.data=r.data?r.data+` -`+p:p;break;case"event":r.event=p;break;case"id":e(r.id=p);break;case"retry":const h=parseInt(p,10);isNaN(h)||t(r.retry=h);break}}}}function TT(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o0(){return{data:"",event:"",id:"",retry:void 0}}var CT=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=bp);let b;function S(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",S);let j=OT,x=0;function w(){document.removeEventListener("visibilitychange",S),window.clearTimeout(x),b.abort()}n==null||n.addEventListener("abort",()=>{w(),h()});const k=d??window.fetch,E=o??AT;async function C(){var R;b=new AbortController;try{const z=await k(e,Object.assign(Object.assign({},p),{headers:y,signal:b.signal}));await E(z),await kT(z.body,ST(ET(F=>{F?y[i0]=F:delete y[i0]},F=>{j=F},l))),u==null||u(),w(),h()}catch(z){if(!b.signal.aborted)try{const F=(R=a==null?void 0:a(z))!==null&&R!==void 0?R:j;window.clearTimeout(x),x=window.setTimeout(C,F)}catch(F){w(),g(F)}}}C()})}function AT(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(bp)))throw new Error(`Expected content-type to be ${bp}, Actual: ${t}`)}function NT(){const[e,t]=M.useState(null),[n,r]=M.useState(null),o=M.useCallback(async(u,a)=>{const c=new AbortController;r(c),t({status:"inflight",messages:[]}),await jT("/stream",{signal:c.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:u,config:a}),onmessage(d){if(d.event==="data"){const{messages:p}=JSON.parse(d.data);t(h=>({status:"inflight",messages:[...(h==null?void 0:h.messages)??[],...p]}))}},onclose(){t(d=>({status:"done",messages:(d==null?void 0:d.messages)??[]})),r(null)},onerror(d){throw t(p=>({status:"error",messages:(p==null?void 0:p.messages)??[]})),r(null),d}})},[]),l=M.useCallback(()=>{n==null||n.abort(),r(null)},[n]);return{startStream:o,stopStream:n?l:void 0,stream:e}}function RT(e){const[t,n]=ow([],"configs"),[r,o]=M.useState("Default"),l=M.useCallback(async(c,d)=>{const p={key:c,config:d};n(h=>[...h.filter(g=>g.key!==p.key),p]),o(p.key)},[n]),u=M.useCallback(c=>{o(c)},[]),a=M.useMemo(()=>[...e?[{key:"Default",config:e,readOnly:!0}]:[],...t],[t,e]);return{configs:a,currentConfig:a.find(c=>c.key===r)||null,saveConfig:l,enterConfig:u}}function PT(){const[e,t]=M.useState(!1),{configSchema:n,configDefaults:r}=bT(),{chats:o,currentChat:l,createChat:u,updateChat:a,enterChat:c}=wT(),{configs:d,currentConfig:p,saveConfig:h,enterConfig:g}=RT(r),{startStream:y,stopStream:b,stream:S}=NT(),j=M.useCallback(async E=>{if(!p)return;const C=await u(E,[{type:"human",content:E}],p);return y({messages:C.messages},C.config.config)},[u,y,p]),x=M.useCallback(async E=>{if(!l)return;const C=[...l.messages,{type:"human",content:E}];await Promise.all([a(l.id,{messages:C}),y({messages:C},l.config.config)])},[l,y,a]),w=M.useCallback(async E=>{b==null||b(),c(E),e&&t(!1)},[c,b,e]);M.useEffect(()=>{(S==null?void 0:S.status)==="done"&&l&&a(l.id,{messages:[...l.messages,...S.messages.filter(E=>!l.messages.includes(E))]})},[S==null?void 0:S.status,a]);const k=l?W.jsx(gE,{chat:l,startStream:x,stopStream:b,stream:S}):W.jsx(yT,{startChat:j,configSchema:n,configDefaults:r,configs:d,currentConfig:p,saveConfig:h,enterConfig:g});return W.jsx(dT,{sidebarOpen:e,setSidebarOpen:t,sidebar:W.jsx(vE,{chats:o,currentChat:l,enterChat:w}),children:n?k:null})}yd.createRoot(document.getElementById("root")).render(W.jsx(PT,{})); diff --git a/backend/ui/assets/index-338f04a9.js b/backend/ui/assets/index-338f04a9.js deleted file mode 100644 index 7c260fca..00000000 --- a/backend/ui/assets/index-338f04a9.js +++ /dev/null @@ -1,149 +0,0 @@ -var mA=Object.defineProperty;var yA=(e,t,n)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bn=(e,t,n)=>(yA(e,typeof t!="symbol"?t+"":t,n),n),_A=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hm=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Wh=(e,t,n)=>(_A(e,t,"access private method"),n);function wA(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const u of i)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const u={};return i.integrity&&(u.integrity=i.integrity),i.referrerPolicy&&(u.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?u.credentials="include":i.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(i){if(i.ep)return;i.ep=!0;const u=n(i);fetch(i.href,u)}})();var Mu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ky(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ab={exports:{}},yv={},lb={exports:{}},Gt={};/** - * @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 ep=Symbol.for("react.element"),xA=Symbol.for("react.portal"),bA=Symbol.for("react.fragment"),SA=Symbol.for("react.strict_mode"),EA=Symbol.for("react.profiler"),kA=Symbol.for("react.provider"),TA=Symbol.for("react.context"),CA=Symbol.for("react.forward_ref"),AA=Symbol.for("react.suspense"),OA=Symbol.for("react.memo"),RA=Symbol.for("react.lazy"),D_=Symbol.iterator;function PA(e){return e===null||typeof e!="object"?null:(e=D_&&e[D_]||e["@@iterator"],typeof e=="function"?e:null)}var sb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cb=Object.assign,fb={};function jc(e,t,n){this.props=e,this.context=t,this.refs=fb,this.updater=n||sb}jc.prototype.isReactComponent={};jc.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")};jc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function db(){}db.prototype=jc.prototype;function Vy(e,t,n){this.props=e,this.context=t,this.refs=fb,this.updater=n||sb}var Yy=Vy.prototype=new db;Yy.constructor=Vy;cb(Yy,jc.prototype);Yy.isPureReactComponent=!0;var M_=Array.isArray,pb=Object.prototype.hasOwnProperty,Qy={current:null},hb={key:!0,ref:!0,__self:!0,__source:!0};function gb(e,t,n){var r,i={},u=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(u=""+t.key),t)pb.call(t,r)&&!hb.hasOwnProperty(r)&&(i[r]=t[r]);var f=arguments.length-2;if(f===1)i.children=n;else if(1>>1,re=le[B];if(0>>1;Bi(we,Le))yei(ze,we)?(le[B]=ze,le[ye]=Le,B=ye):(le[B]=we,le[pe]=Le,B=pe);else if(yei(ze,Le))le[B]=ze,le[ye]=Le,B=ye;else break e}}return me}function i(le,me){var Le=le.sortIndex-me.sortIndex;return Le!==0?Le:le.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],m=1,v=null,_=3,x=!1,A=!1,R=!1,N=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(le){for(var me=n(h);me!==null;){if(me.callback===null)r(h);else if(me.startTime<=le)r(h),me.sortIndex=me.expirationTime,t(d,me);else break;me=n(h)}}function P(le){if(R=!1,T(le),!A)if(n(d)!==null)A=!0,lt(L);else{var me=n(h);me!==null&&Je(P,me.startTime-le)}}function L(le,me){A=!1,R&&(R=!1,k(Z),Z=-1),x=!0;var Le=_;try{for(T(me),v=n(d);v!==null&&(!(v.expirationTime>me)||le&&!ae());){var B=v.callback;if(typeof B=="function"){v.callback=null,_=v.priorityLevel;var re=B(v.expirationTime<=me);me=e.unstable_now(),typeof re=="function"?v.callback=re:v===n(d)&&r(d),T(me)}else r(d);v=n(d)}if(v!==null)var xe=!0;else{var pe=n(h);pe!==null&&Je(P,pe.startTime-me),xe=!1}return xe}finally{v=null,_=Le,x=!1}}var U=!1,G=null,Z=-1,Ee=5,K=-1;function ae(){return!(e.unstable_now()-Kle||125B?(le.sortIndex=Le,t(h,le),n(d)===null&&le===n(h)&&(R?(k(Z),Z=-1):R=!0,Je(P,Le-B))):(le.sortIndex=re,t(d,le),A||x||(A=!0,lt(L))),le},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(le){var me=_;return function(){var Le=_;_=me;try{return le.apply(this,arguments)}finally{_=Le}}}})(_b);yb.exports=_b;var BA=yb.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 wb=M,Yi=BA;function ke(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"),j0=Object.prototype.hasOwnProperty,HA=/^[: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]*$/,z_={},U_={};function WA(e){return j0.call(U_,e)?!0:j0.call(z_,e)?!1:HA.test(e)?U_[e]=!0:(z_[e]=!0,!1)}function GA(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 qA(e,t,n,r){if(t===null||typeof t>"u"||GA(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 di(e,t,n,r,i,u,l){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=u,this.removeEmptyString=l}var Nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nr[e]=new di(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nr[t]=new di(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nr[e]=new di(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nr[e]=new di(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){Nr[e]=new di(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nr[e]=new di(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nr[e]=new di(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nr[e]=new di(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nr[e]=new di(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xy=/[\-:]([a-z])/g;function Jy(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(Xy,Jy);Nr[t]=new di(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(Xy,Jy);Nr[t]=new di(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(Xy,Jy);Nr[t]=new di(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nr[e]=new di(e,1,!1,e.toLowerCase(),null,!1,!1)});Nr.xlinkHref=new di("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nr[e]=new di(e,1,!1,e.toLowerCase(),null,!0,!0)});function e1(e,t,n,r){var i=Nr.hasOwnProperty(t)?Nr[t]:null;(i!==null?i.type!==0:r||!(2f||i[l]!==u[f]){var d=` -`+i[l].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=l&&0<=f);break}}}finally{qm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_d(e):""}function KA(e){switch(e.tag){case 5:return _d(e.type);case 16:return _d("Lazy");case 13:return _d("Suspense");case 19:return _d("SuspenseList");case 0:case 2:case 15:return e=Km(e.type,!1),e;case 11:return e=Km(e.type.render,!1),e;case 1:return e=Km(e.type,!0),e;default:return""}}function D0(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 sc:return"Fragment";case lc:return"Portal";case L0:return"Profiler";case t1:return"StrictMode";case N0:return"Suspense";case $0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Sb:return(e.displayName||"Context")+".Consumer";case bb:return(e._context.displayName||"Context")+".Provider";case n1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case r1:return t=e.displayName||null,t!==null?t:D0(e.type)||"Memo";case ka:t=e._payload,e=e._init;try{return D0(e(t))}catch{}}return null}function VA(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 D0(t);case 8:return t===t1?"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 Ua(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function YA(e){var t=kb(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,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,u.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kh(e){e._valueTracker||(e._valueTracker=YA(e))}function Tb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=kb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ig(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 M0(e,t){var n=t.checked;return Wn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function H_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ua(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 Cb(e,t){t=t.checked,t!=null&&e1(e,"checked",t,!1)}function F0(e,t){Cb(e,t);var n=Ua(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")?z0(e,t.type,n):t.hasOwnProperty("defaultValue")&&z0(e,t.type,Ua(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function W_(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 z0(e,t,n){(t!=="number"||Ig(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wd=Array.isArray;function wc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Vh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $d(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ed={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},QA=["Webkit","ms","Moz","O"];Object.keys(Ed).forEach(function(e){QA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ed[t]=Ed[e]})});function Pb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ed.hasOwnProperty(e)&&Ed[e]?(""+t).trim():t+"px"}function Ib(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Pb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ZA=Wn({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 H0(e,t){if(t){if(ZA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ke(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ke(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ke(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ke(62))}}function W0(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 G0=null;function i1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q0=null,xc=null,bc=null;function K_(e){if(e=rp(e)){if(typeof q0!="function")throw Error(ke(280));var t=e.stateNode;t&&(t=Sv(t),q0(e.stateNode,e.type,t))}}function jb(e){xc?bc?bc.push(e):bc=[e]:xc=e}function Lb(){if(xc){var e=xc,t=bc;if(bc=xc=null,K_(e),t)for(e=0;e>>=0,e===0?32:31-(lO(e)/sO|0)|0}var Yh=64,Qh=4194304;function xd(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 $g(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,u=e.pingedLanes,l=n&268435455;if(l!==0){var f=l&~i;f!==0?r=xd(f):(u&=l,u!==0&&(r=xd(u)))}else l=n&~i,l!==0?r=xd(l):u!==0&&(r=xd(u));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,u=t&-t,i>=u||i===16&&(u&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 tp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ho(t),e[t]=n}function pO(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=Td),nw=String.fromCharCode(32),rw=!1;function eS(e,t){switch(e){case"keyup":return UO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cc=!1;function HO(e,t){switch(e){case"compositionend":return tS(t);case"keypress":return t.which!==32?null:(rw=!0,nw);case"textInput":return e=t.data,e===nw&&rw?null:e;default:return null}}function WO(e,t){if(cc)return e==="compositionend"||!d1&&eS(e,t)?(e=Xb(),xg=s1=Ra=null,cc=!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=aw(n)}}function oS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uS(){for(var e=window,t=Ig();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ig(e.document)}return t}function p1(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 JO(e){var t=uS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&oS(n.ownerDocument.documentElement,n)){if(r!==null&&p1(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,u=Math.min(r.start,i);r=r.end===void 0?u:Math.min(r.end,i),!e.extend&&u>r&&(i=r,r=u,u=i),i=lw(n,u);var l=lw(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,fc=null,X0=null,Ad=null,J0=!1;function sw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;J0||fc==null||fc!==Ig(r)||(r=fc,"selectionStart"in r&&p1(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}),Ad&&Bd(Ad,r)||(Ad=r,r=Fg(X0,"onSelect"),0hc||(e.current=oy[hc],oy[hc]=null,hc--)}function Cn(e,t){hc++,oy[hc]=e.current,e.current=t}var Ba={},Xr=Wa(Ba),Ti=Wa(!1),Kl=Ba;function Cc(e,t){var n=e.type.contextTypes;if(!n)return Ba;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},u;for(u in n)i[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ci(e){return e=e.childContextTypes,e!=null}function Ug(){In(Ti),In(Xr)}function vw(e,t,n){if(Xr.current!==Ba)throw Error(ke(168));Cn(Xr,t),Cn(Ti,n)}function gS(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(ke(108,VA(e)||"Unknown",i));return Wn({},n,r)}function Bg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ba,Kl=Xr.current,Cn(Xr,e),Cn(Ti,Ti.current),!0}function mw(e,t,n){var r=e.stateNode;if(!r)throw Error(ke(169));n?(e=gS(e,t,Kl),r.__reactInternalMemoizedMergedChildContext=e,In(Ti),In(Xr),Cn(Xr,e)):In(Ti),Cn(Ti,n)}var Du=null,Ev=!1,a0=!1;function vS(e){Du===null?Du=[e]:Du.push(e)}function f3(e){Ev=!0,vS(e)}function Ga(){if(!a0&&Du!==null){a0=!0;var e=0,t=hn;try{var n=Du;for(hn=1;e>=l,i-=l,Fu=1<<32-Ho(t)+i|n<Z?(Ee=G,G=null):Ee=G.sibling;var K=_(k,G,T[Z],P);if(K===null){G===null&&(G=Ee);break}e&&G&&K.alternate===null&&t(k,G),E=u(K,E,Z),U===null?L=K:U.sibling=K,U=K,G=Ee}if(Z===T.length)return n(k,G),Dn&&Ll(k,Z),L;if(G===null){for(;ZZ?(Ee=G,G=null):Ee=G.sibling;var ae=_(k,G,K.value,P);if(ae===null){G===null&&(G=Ee);break}e&&G&&ae.alternate===null&&t(k,G),E=u(ae,E,Z),U===null?L=ae:U.sibling=ae,U=ae,G=Ee}if(K.done)return n(k,G),Dn&&Ll(k,Z),L;if(G===null){for(;!K.done;Z++,K=T.next())K=v(k,K.value,P),K!==null&&(E=u(K,E,Z),U===null?L=K:U.sibling=K,U=K);return Dn&&Ll(k,Z),L}for(G=r(k,G);!K.done;Z++,K=T.next())K=x(G,k,Z,K.value,P),K!==null&&(e&&K.alternate!==null&&G.delete(K.key===null?Z:K.key),E=u(K,E,Z),U===null?L=K:U.sibling=K,U=K);return e&&G.forEach(function(ne){return t(k,ne)}),Dn&&Ll(k,Z),L}function N(k,E,T,P){if(typeof T=="object"&&T!==null&&T.type===sc&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case qh:e:{for(var L=T.key,U=E;U!==null;){if(U.key===L){if(L=T.type,L===sc){if(U.tag===7){n(k,U.sibling),E=i(U,T.props.children),E.return=k,k=E;break e}}else if(U.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===ka&&Ew(L)===U.type){n(k,U.sibling),E=i(U,T.props),E.ref=ld(k,U,T),E.return=k,k=E;break e}n(k,U);break}else t(k,U);U=U.sibling}T.type===sc?(E=Gl(T.props.children,k.mode,P,T.key),E.return=k,k=E):(P=Og(T.type,T.key,T.props,null,k.mode,P),P.ref=ld(k,E,T),P.return=k,k=P)}return l(k);case lc:e:{for(U=T.key;E!==null;){if(E.key===U)if(E.tag===4&&E.stateNode.containerInfo===T.containerInfo&&E.stateNode.implementation===T.implementation){n(k,E.sibling),E=i(E,T.children||[]),E.return=k,k=E;break e}else{n(k,E);break}else t(k,E);E=E.sibling}E=g0(T,k.mode,P),E.return=k,k=E}return l(k);case ka:return U=T._init,N(k,E,U(T._payload),P)}if(wd(T))return A(k,E,T,P);if(rd(T))return R(k,E,T,P);rg(k,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,E!==null&&E.tag===6?(n(k,E.sibling),E=i(E,T),E.return=k,k=E):(n(k,E),E=h0(T,k.mode,P),E.return=k,k=E),l(k)):n(k,E)}return N}var Oc=ES(!0),kS=ES(!1),ip={},hu=Wa(ip),qd=Wa(ip),Kd=Wa(ip);function Ul(e){if(e===ip)throw Error(ke(174));return e}function b1(e,t){switch(Cn(Kd,t),Cn(qd,e),Cn(hu,ip),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:B0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=B0(t,e)}In(hu),Cn(hu,t)}function Rc(){In(hu),In(qd),In(Kd)}function TS(e){Ul(Kd.current);var t=Ul(hu.current),n=B0(t,e.type);t!==n&&(Cn(qd,e),Cn(hu,n))}function S1(e){qd.current===e&&(In(hu),In(qd))}var Bn=Wa(0);function Vg(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 l0=[];function E1(){for(var e=0;en?n:4,e(!0);var r=s0.transition;s0.transition={};try{e(!1),t()}finally{hn=n,s0.transition=r}}function BS(){return vo().memoizedState}function g3(e,t,n){var r=Fa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},HS(e))WS(t,n);else if(n=wS(e,t,n,r),n!==null){var i=si();Wo(n,e,r,i),GS(n,t,r)}}function v3(e,t,n){var r=Fa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(HS(e))WS(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var l=t.lastRenderedState,f=u(l,n);if(i.hasEagerState=!0,i.eagerState=f,Go(f,l)){var d=t.interleaved;d===null?(i.next=i,w1(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=wS(e,t,i,r),n!==null&&(i=si(),Wo(n,e,r,i),GS(n,t,r))}}function HS(e){var t=e.alternate;return e===Hn||t!==null&&t===Hn}function WS(e,t){Od=Yg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function GS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,u1(e,n)}}var Qg={readContext:go,useCallback:Kr,useContext:Kr,useEffect:Kr,useImperativeHandle:Kr,useInsertionEffect:Kr,useLayoutEffect:Kr,useMemo:Kr,useReducer:Kr,useRef:Kr,useState:Kr,useDebugValue:Kr,useDeferredValue:Kr,useTransition:Kr,useMutableSource:Kr,useSyncExternalStore:Kr,useId:Kr,unstable_isNewReconciler:!1},m3={readContext:go,useCallback:function(e,t){return su().memoizedState=[e,t===void 0?null:t],e},useContext:go,useEffect:Tw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kg(4194308,4,DS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kg(4194308,4,e,t)},useInsertionEffect:function(e,t){return kg(4,2,e,t)},useMemo:function(e,t){var n=su();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=su();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=g3.bind(null,Hn,e),[r.memoizedState,e]},useRef:function(e){var t=su();return e={current:e},t.memoizedState=e},useState:kw,useDebugValue:O1,useDeferredValue:function(e){return su().memoizedState=e},useTransition:function(){var e=kw(!1),t=e[0];return e=h3.bind(null,e[1]),su().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Hn,i=su();if(Dn){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=t(),kr===null)throw Error(ke(349));Yl&30||OS(r,t,n)}i.memoizedState=n;var u={value:n,getSnapshot:t};return i.queue=u,Tw(PS.bind(null,r,u,e),[e]),r.flags|=2048,Qd(9,RS.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=su(),t=kr.identifierPrefix;if(Dn){var n=zu,r=Fu;n=(r&~(1<<32-Ho(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[cu]=t,e[Gd]=r,eE(e,t,!1,!1),t.stateNode=e;e:{switch(l=W0(n,r),n){case"dialog":Rn("cancel",e),Rn("close",e),i=r;break;case"iframe":case"object":case"embed":Rn("load",e),i=r;break;case"video":case"audio":for(i=0;iIc&&(t.flags|=128,r=!0,sd(u,!1),t.lanes=4194304)}else{if(!r)if(e=Vg(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sd(u,!0),u.tail===null&&u.tailMode==="hidden"&&!l.alternate&&!Dn)return Vr(t),null}else 2*ar()-u.renderingStartTime>Ic&&n!==1073741824&&(t.flags|=128,r=!0,sd(u,!1),t.lanes=4194304);u.isBackwards?(l.sibling=t.child,t.child=l):(n=u.last,n!==null?n.sibling=l:t.child=l,u.last=l)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ar(),t.sibling=null,n=Bn.current,Cn(Bn,r?n&1|2:n&1),t):(Vr(t),null);case 22:case 23:return N1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wi&1073741824&&(Vr(t),t.subtreeFlags&6&&(t.flags|=8192)):Vr(t),null;case 24:return null;case 25:return null}throw Error(ke(156,t.tag))}function k3(e,t){switch(g1(t),t.tag){case 1:return Ci(t.type)&&Ug(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rc(),In(Ti),In(Xr),E1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return S1(t),null;case 13:if(In(Bn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ke(340));Ac()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return In(Bn),null;case 4:return Rc(),null;case 10:return _1(t.type._context),null;case 22:case 23:return N1(),null;case 24:return null;default:return null}}var og=!1,Yr=!1,T3=typeof WeakSet=="function"?WeakSet:Set,We=null;function yc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){er(e,t,r)}else n.current=null}function my(e,t,n){try{n()}catch(r){er(e,t,r)}}var Nw=!1;function C3(e,t){if(ey=Dg,e=uS(),p1(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,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var l=0,f=-1,d=-1,h=0,m=0,v=e,_=null;t:for(;;){for(var x;v!==n||i!==0&&v.nodeType!==3||(f=l+i),v!==u||r!==0&&v.nodeType!==3||(d=l+r),v.nodeType===3&&(l+=v.nodeValue.length),(x=v.firstChild)!==null;)_=v,v=x;for(;;){if(v===e)break t;if(_===n&&++h===i&&(f=l),_===u&&++m===r&&(d=l),(x=v.nextSibling)!==null)break;v=_,_=v.parentNode}v=x}n=f===-1||d===-1?null:{start:f,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(ty={focusedElem:e,selectionRange:n},Dg=!1,We=t;We!==null;)if(t=We,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,We=e;else for(;We!==null;){t=We;try{var A=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var R=A.memoizedProps,N=A.memoizedState,k=t.stateNode,E=k.getSnapshotBeforeUpdate(t.elementType===t.type?R:zo(t.type,R),N);k.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(P){er(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,We=e;break}We=t.return}return A=Nw,Nw=!1,A}function Rd(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 u=i.destroy;i.destroy=void 0,u!==void 0&&my(t,n,u)}i=i.next}while(i!==r)}}function Cv(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 yy(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 rE(e){var t=e.alternate;t!==null&&(e.alternate=null,rE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cu],delete t[Gd],delete t[iy],delete t[s3],delete t[c3])),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 iE(e){return e.tag===5||e.tag===3||e.tag===4}function $w(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||iE(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 _y(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=zg));else if(r!==4&&(e=e.child,e!==null))for(_y(e,t,n),e=e.sibling;e!==null;)_y(e,t,n),e=e.sibling}function wy(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(wy(e,t,n),e=e.sibling;e!==null;)wy(e,t,n),e=e.sibling}var jr=null,Uo=!1;function xa(e,t,n){for(n=n.child;n!==null;)oE(e,t,n),n=n.sibling}function oE(e,t,n){if(pu&&typeof pu.onCommitFiberUnmount=="function")try{pu.onCommitFiberUnmount(_v,n)}catch{}switch(n.tag){case 5:Yr||yc(n,t);case 6:var r=jr,i=Uo;jr=null,xa(e,t,n),jr=r,Uo=i,jr!==null&&(Uo?(e=jr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jr.removeChild(n.stateNode));break;case 18:jr!==null&&(Uo?(e=jr,n=n.stateNode,e.nodeType===8?u0(e.parentNode,n):e.nodeType===1&&u0(e,n),zd(e)):u0(jr,n.stateNode));break;case 4:r=jr,i=Uo,jr=n.stateNode.containerInfo,Uo=!0,xa(e,t,n),jr=r,Uo=i;break;case 0:case 11:case 14:case 15:if(!Yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var u=i,l=u.destroy;u=u.tag,l!==void 0&&(u&2||u&4)&&my(n,t,l),i=i.next}while(i!==r)}xa(e,t,n);break;case 1:if(!Yr&&(yc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(f){er(n,t,f)}xa(e,t,n);break;case 21:xa(e,t,n);break;case 22:n.mode&1?(Yr=(r=Yr)||n.memoizedState!==null,xa(e,t,n),Yr=r):xa(e,t,n);break;default:xa(e,t,n)}}function Dw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new T3),t.forEach(function(r){var i=$3.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Mo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~u}if(r=i,r=ar()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O3(r/1960))-r,10e?16:e,Pa===null)var r=!1;else{if(e=Pa,Pa=null,Jg=0,en&6)throw Error(ke(331));var i=en;for(en|=4,We=e.current;We!==null;){var u=We,l=u.child;if(We.flags&16){var f=u.deletions;if(f!==null){for(var d=0;dar()-j1?Wl(e,0):I1|=n),Ai(e,t)}function pE(e,t){t===0&&(e.mode&1?(t=Qh,Qh<<=1,!(Qh&130023424)&&(Qh=4194304)):t=1);var n=si();e=qu(e,t),e!==null&&(tp(e,t,n),Ai(e,n))}function N3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pE(e,n)}function $3(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(ke(314))}r!==null&&r.delete(t),pE(e,n)}var hE;hE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ti.current)ki=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ki=!1,S3(e,t,n);ki=!!(e.flags&131072)}else ki=!1,Dn&&t.flags&1048576&&mS(t,Wg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tg(e,t),e=t.pendingProps;var i=Cc(t,Xr.current);Ec(t,n),i=T1(null,t,r,e,i,n);var u=C1();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,Ci(r)?(u=!0,Bg(t)):u=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,x1(t),i.updater=kv,t.stateNode=i,i._reactInternals=t,cy(t,r,e,n),t=py(null,t,r,!0,u,n)):(t.tag=0,Dn&&u&&h1(t),li(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tg(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M3(r),e=zo(r,e),i){case 0:t=dy(null,t,r,e,n);break e;case 1:t=Iw(null,t,r,e,n);break e;case 11:t=Rw(null,t,r,e,n);break e;case 14:t=Pw(null,t,r,zo(r.type,e),n);break e}throw Error(ke(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zo(r,i),dy(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zo(r,i),Iw(e,t,r,i,n);case 3:e:{if(ZS(t),e===null)throw Error(ke(387));r=t.pendingProps,u=t.memoizedState,i=u.element,xS(e,t),Kg(t,r,null,n);var l=t.memoizedState;if(r=l.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){i=Pc(Error(ke(423)),t),t=jw(e,t,r,n,i);break e}else if(r!==i){i=Pc(Error(ke(424)),t),t=jw(e,t,r,n,i);break e}else for(Ki=$a(t.stateNode.containerInfo.firstChild),Vi=t,Dn=!0,Bo=null,n=kS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ac(),r===i){t=Ku(e,t,n);break e}li(e,t,r,n)}t=t.child}return t;case 5:return TS(t),e===null&&ay(t),r=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,l=i.children,ny(r,i)?l=null:u!==null&&ny(r,u)&&(t.flags|=32),QS(e,t),li(e,t,l,n),t.child;case 6:return e===null&&ay(t),null;case 13:return XS(e,t,n);case 4:return b1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oc(t,null,r,n):li(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zo(r,i),Rw(e,t,r,i,n);case 7:return li(e,t,t.pendingProps,n),t.child;case 8:return li(e,t,t.pendingProps.children,n),t.child;case 12:return li(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,u=t.memoizedProps,l=i.value,Cn(Gg,r._currentValue),r._currentValue=l,u!==null)if(Go(u.value,l)){if(u.children===i.children&&!Ti.current){t=Ku(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var f=u.dependencies;if(f!==null){l=u.child;for(var d=f.firstContext;d!==null;){if(d.context===r){if(u.tag===1){d=Uu(-1,n&-n),d.tag=2;var h=u.updateQueue;if(h!==null){h=h.shared;var m=h.pending;m===null?d.next=d:(d.next=m.next,m.next=d),h.pending=d}}u.lanes|=n,d=u.alternate,d!==null&&(d.lanes|=n),ly(u.return,n,t),f.lanes|=n;break}d=d.next}}else if(u.tag===10)l=u.type===t.type?null:u.child;else if(u.tag===18){if(l=u.return,l===null)throw Error(ke(341));l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),ly(l,n,t),l=u.sibling}else l=u.child;if(l!==null)l.return=u;else for(l=u;l!==null;){if(l===t){l=null;break}if(u=l.sibling,u!==null){u.return=l.return,l=u;break}l=l.return}u=l}li(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ec(t,n),i=go(i),r=r(i),t.flags|=1,li(e,t,r,n),t.child;case 14:return r=t.type,i=zo(r,t.pendingProps),i=zo(r.type,i),Pw(e,t,r,i,n);case 15:return VS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:zo(r,i),Tg(e,t),t.tag=1,Ci(r)?(e=!0,Bg(t)):e=!1,Ec(t,n),SS(t,r,i),cy(t,r,i,n),py(null,t,r,!0,e,n);case 19:return JS(e,t,n);case 22:return YS(e,t,n)}throw Error(ke(156,t.tag))};function gE(e,t){return Ub(e,t)}function D3(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 po(e,t,n,r){return new D3(e,t,n,r)}function D1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M3(e){if(typeof e=="function")return D1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===n1)return 11;if(e===r1)return 14}return 2}function za(e,t){var n=e.alternate;return n===null?(n=po(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 Og(e,t,n,r,i,u){var l=2;if(r=e,typeof e=="function")D1(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case sc:return Gl(n.children,i,u,t);case t1:l=8,i|=8;break;case L0:return e=po(12,n,t,i|2),e.elementType=L0,e.lanes=u,e;case N0:return e=po(13,n,t,i),e.elementType=N0,e.lanes=u,e;case $0:return e=po(19,n,t,i),e.elementType=$0,e.lanes=u,e;case Eb:return Ov(n,i,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bb:l=10;break e;case Sb:l=9;break e;case n1:l=11;break e;case r1:l=14;break e;case ka:l=16,r=null;break e}throw Error(ke(130,e==null?e:typeof e,""))}return t=po(l,n,t,i),t.elementType=e,t.type=r,t.lanes=u,t}function Gl(e,t,n,r){return e=po(7,e,r,t),e.lanes=n,e}function Ov(e,t,n,r){return e=po(22,e,r,t),e.elementType=Eb,e.lanes=n,e.stateNode={isHidden:!1},e}function h0(e,t,n){return e=po(6,e,null,t),e.lanes=n,e}function g0(e,t,n){return t=po(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function F3(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=Ym(0),this.expirationTimes=Ym(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ym(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function M1(e,t,n,r,i,u,l,f,d){return e=new F3(e,t,n,f,d),t===1?(t=1,u===!0&&(t|=8)):t=0,u=po(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},x1(u),e}function z3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_E)}catch(e){console.error(e)}}_E(),mb.exports=Qi;var wE=mb.exports,Gw=wE;I0.createRoot=Gw.createRoot,I0.hydrateRoot=Gw.hydrateRoot;function G3({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const q3=M.forwardRef(G3),K3=q3;function V3({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const Y3=M.forwardRef(V3),qw=Y3;function Q3({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const Z3=M.forwardRef(Q3),X3=Z3;function J3({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const eR=M.forwardRef(J3),Kw=eR;function tR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const nR=M.forwardRef(tR),rR=nR;function iR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const oR=M.forwardRef(iR),uR=oR;function aR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const lR=M.forwardRef(aR),sR=lR;function cR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const fR=M.forwardRef(cR),xE=fR;function dR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const pR=M.forwardRef(dR),hR=pR;function gR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const vR=M.forwardRef(gR),mR=vR;function yR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const _R=M.forwardRef(yR),wR=_R;async function Vw(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function xR(e,t){const[n,r]=M.useState(null);return M.useEffect(()=>{async function i(){e&&r(await Vw(e))}return i(),()=>{r(null)}},[e]),M.useEffect(()=>{async function i(){e&&r(await Vw(e))}(t==null?void 0:t.status)!=="inflight"&&i()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function bR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const SR=M.forwardRef(bR),ER=SR;function kR({title:e,titleId:t,...n},r){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?M.createElement("title",{id:t},e):null,M.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const TR=M.forwardRef(kR),CR=TR;function bE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tf(u)))==null?void 0:l.classGroupId}const Yw=/^\[(.+)\]$/;function RR(e){if(Yw.test(e)){const t=Yw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function PR(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jR(Object.entries(e.classGroups),n).forEach(([u,l])=>{ky(l,r,u,t)}),r}function ky(e,t,n,r){e.forEach(i=>{if(typeof i=="string"){const u=i===""?t:Qw(t,i);u.classGroupId=n;return}if(typeof i=="function"){if(IR(i)){ky(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([u,l])=>{ky(l,Qw(t,u),n,r)})})}function Qw(e,t){let n=e;return t.split(B1).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function IR(e){return e.isThemeGetter}function jR(e,t){return t?e.map(([n,r])=>{const i=r.map(u=>typeof u=="string"?t+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([l,f])=>[t+l,f])):u);return[n,i]}):e}function LR(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function i(u,l){n.set(u,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(u){let l=n.get(u);if(l!==void 0)return l;if((l=r.get(u))!==void 0)return i(u,l),l},set(u,l){n.has(u)?n.set(u,l):i(u,l)}}}const EE="!";function NR(e){const t=e.separator,n=t.length===1,r=t[0],i=t.length;return function(l){const f=[];let d=0,h=0,m;for(let R=0;Rh?m-h:void 0;return{modifiers:f,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:A}}}function $R(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function DR(e){return{cache:LR(e.cacheSize),splitModifiers:NR(e),...OR(e)}}const MR=/\s+/;function FR(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,u=new Set;return e.trim().split(MR).map(l=>{const{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(l);let v=r(m?h.substring(0,m):h),_=!!m;if(!v){if(!m)return{isTailwindClass:!1,originalClassName:l};if(v=r(h),!v)return{isTailwindClass:!1,originalClassName:l};_=!1}const x=$R(f).join(":");return{isTailwindClass:!0,modifierId:d?x+EE:x,classGroupId:v,originalClassName:l,hasPostfixModifier:_}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:f,classGroupId:d,hasPostfixModifier:h}=l,m=f+d;return u.has(m)?!1:(u.add(m),i(d,h).forEach(v=>u.add(f+v)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function zR(){let e=0,t,n,r="";for(;ev(m),e());return n=DR(h),r=n.cache.get,i=n.cache.set,u=f,f(d)}function f(d){const h=r(d);if(h)return h;const m=FR(d,n);return i(d,m),m}return function(){return u(zR.apply(null,arguments))}}function On(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const TE=/^\[(?:([a-z-]+):)?(.+)\]$/i,BR=/^\d+\/\d+$/,HR=new Set(["px","full","screen"]),WR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qR=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Fo(e){return Bl(e)||HR.has(e)||BR.test(e)}function ba(e){return $c(e,"length",tP)}function Bl(e){return!!e&&!Number.isNaN(Number(e))}function lg(e){return $c(e,"number",Bl)}function fd(e){return!!e&&Number.isInteger(Number(e))}function VR(e){return e.endsWith("%")&&Bl(e.slice(0,-1))}function Pt(e){return TE.test(e)}function Sa(e){return WR.test(e)}const YR=new Set(["length","size","percentage"]);function QR(e){return $c(e,YR,CE)}function ZR(e){return $c(e,"position",CE)}const XR=new Set(["image","url"]);function JR(e){return $c(e,XR,rP)}function eP(e){return $c(e,"",nP)}function dd(){return!0}function $c(e,t,n){const r=TE.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function tP(e){return GR.test(e)}function CE(){return!1}function nP(e){return qR.test(e)}function rP(e){return KR.test(e)}function iP(){const e=On("colors"),t=On("spacing"),n=On("blur"),r=On("brightness"),i=On("borderColor"),u=On("borderRadius"),l=On("borderSpacing"),f=On("borderWidth"),d=On("contrast"),h=On("grayscale"),m=On("hueRotate"),v=On("invert"),_=On("gap"),x=On("gradientColorStops"),A=On("gradientColorStopPositions"),R=On("inset"),N=On("margin"),k=On("opacity"),E=On("padding"),T=On("saturate"),P=On("scale"),L=On("sepia"),U=On("skew"),G=On("space"),Z=On("translate"),Ee=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto",Pt,t],ne=()=>[Pt,t],Ie=()=>["",Fo,ba],Re=()=>["auto",Bl,Pt],Fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],lt=()=>["solid","dashed","dotted","double","none"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],le=()=>["start","end","center","between","around","evenly","stretch"],me=()=>["","0",Pt],Le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Bl,lg],re=()=>[Bl,Pt];return{cacheSize:500,separator:":",theme:{colors:[dd],spacing:[Fo,ba],blur:["none","",Sa,Pt],brightness:B(),borderColor:[e],borderRadius:["none","","full",Sa,Pt],borderSpacing:ne(),borderWidth:Ie(),contrast:B(),grayscale:me(),hueRotate:re(),invert:me(),gap:ne(),gradientColorStops:[e],gradientColorStopPositions:[VR,ba],inset:ae(),margin:ae(),opacity:B(),padding:ne(),saturate:B(),scale:B(),sepia:me(),skew:re(),space:ne(),translate:ne()},classGroups:{aspect:[{aspect:["auto","square","video",Pt]}],container:["container"],columns:[{columns:[Sa]}],"break-after":[{"break-after":Le()}],"break-before":[{"break-before":Le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Fe(),Pt]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:Ee()}],"overscroll-x":[{"overscroll-x":Ee()}],"overscroll-y":[{"overscroll-y":Ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fd,Pt]}],basis:[{basis:ae()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pt]}],grow:[{grow:me()}],shrink:[{shrink:me()}],order:[{order:["first","last","none",fd,Pt]}],"grid-cols":[{"grid-cols":[dd]}],"col-start-end":[{col:["auto",{span:["full",fd,Pt]},Pt]}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":[dd]}],"row-start-end":[{row:["auto",{span:[fd,Pt]},Pt]}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pt]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...le()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...le(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...le(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Pt,t]}],"min-w":[{"min-w":["min","max","fit",Pt,Fo]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Sa]},Sa,Pt]}],h:[{h:[Pt,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Fo,Pt]}],"max-h":[{"max-h":[Pt,t,"min","max","fit"]}],"font-size":[{text:["base",Sa,ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lg]}],"font-family":[{font:[dd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Pt]}],"line-clamp":[{"line-clamp":["none",Bl,lg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fo,Pt]}],"list-image":[{"list-image":["none",Pt]}],"list-style-type":[{list:["none","disc","decimal",Pt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...lt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fo,ba]}],"underline-offset":[{"underline-offset":["auto",Fo,Pt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:ne()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Fe(),ZR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},JR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...lt(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:lt()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...lt()]}],"outline-offset":[{"outline-offset":[Fo,Pt]}],"outline-w":[{outline:[Fo,ba]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Fo,ba]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Sa,eP]}],"shadow-color":[{shadow:[dd]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":Je()}],"bg-blend":[{"bg-blend":Je()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Sa,Pt]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[v]}],saturate:[{saturate:[T]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pt]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",Pt]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[fd,Pt]}],"translate-x":[{"translate-x":[Z]}],"translate-y":[{"translate-y":[Z]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pt]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ne()}],"scroll-mx":[{"scroll-mx":ne()}],"scroll-my":[{"scroll-my":ne()}],"scroll-ms":[{"scroll-ms":ne()}],"scroll-me":[{"scroll-me":ne()}],"scroll-mt":[{"scroll-mt":ne()}],"scroll-mr":[{"scroll-mr":ne()}],"scroll-mb":[{"scroll-mb":ne()}],"scroll-ml":[{"scroll-ml":ne()}],"scroll-p":[{"scroll-p":ne()}],"scroll-px":[{"scroll-px":ne()}],"scroll-py":[{"scroll-py":ne()}],"scroll-ps":[{"scroll-ps":ne()}],"scroll-pe":[{"scroll-pe":ne()}],"scroll-pt":[{"scroll-pt":ne()}],"scroll-pr":[{"scroll-pr":ne()}],"scroll-pb":[{"scroll-pb":ne()}],"scroll-pl":[{"scroll-pl":ne()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fo,ba,lg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const oP=UR(iP);function Qr(...e){return oP(AR(e))}function AE(e){const[t,n]=M.useState(!1),r=e.disabled||t;return Y.jsxs("form",{className:Qr("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async i=>{if(i.preventDefault(),r)return;const u=i.target,l=u.message.value;l&&(n(!0),await e.onSubmit(l),n(!1),u.message.value="")},children:[Y.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[Y.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:Y.jsx(ER,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),Y.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),Y.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[Y.jsx(CR,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function OE(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function H1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ts=H1();function RE(e){ts=e}const PE=/[&<>"']/,uP=new RegExp(PE.source,"g"),IE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,aP=new RegExp(IE.source,"g"),lP={"&":"&","<":"<",">":">",'"':""","'":"'"},Zw=e=>lP[e];function Gi(e,t){if(t){if(PE.test(e))return e.replace(uP,Zw)}else if(IE.test(e))return e.replace(aP,Zw);return e}const sP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function cP(e){return e.replace(sP,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const fP=/(^|[^\[])\^/g;function an(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=typeof i=="object"&&"source"in i?i.source:i,i=i.replace(fP,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}function Xw(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const nv={exec:()=>null};function Jw(e,t){const n=e.replace(/\|/g,(u,l,f)=>{let d=!1,h=l;for(;--h>=0&&f[h]==="\\";)d=!d;return d?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const u=i.match(/^\s+/);if(u===null)return i;const[l]=u;return l.length>=r.length?i.slice(r.length):i}).join(` -`)}class rv{constructor(t){bn(this,"options");bn(this,"rules");bn(this,"lexer");this.options=t||ts}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:sg(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=pP(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=sg(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=sg(n[0].replace(/^ *>[ \t]?/gm,""),` -`),i=this.lexer.state.top;this.lexer.state.top=!0;const u=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:u,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const i=r.length>1,u={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let f="",d="",h=!1;for(;t;){let m=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;f=n[0],t=t.substring(f.length);let v=n[2].split(` -`,1)[0].replace(/^\t+/,k=>" ".repeat(3*k.length)),_=t.split(` -`,1)[0],x=0;this.options.pedantic?(x=2,d=v.trimStart()):(x=n[2].search(/[^ ]/),x=x>4?1:x,d=v.slice(x),x+=n[1].length);let A=!1;if(!v&&/^ *$/.test(_)&&(f+=_+` -`,t=t.substring(_.length+1),m=!0),!m){const k=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),E=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),T=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),P=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;t;){const L=t.split(` -`,1)[0];if(_=L,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),T.test(_)||P.test(_)||k.test(_)||E.test(t))break;if(_.search(/[^ ]/)>=x||!_.trim())d+=` -`+_.slice(x);else{if(A||v.search(/[^ ]/)>=4||T.test(v)||P.test(v)||E.test(v))break;d+=` -`+_}!A&&!_.trim()&&(A=!0),f+=L+` -`,t=t.substring(L.length+1),v=_.slice(x)}}u.loose||(h?u.loose=!0:/\n *\n *$/.test(f)&&(h=!0));let R=null,N;this.options.gfm&&(R=/^\[[ xX]\] /.exec(d),R&&(N=R[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),u.items.push({type:"list_item",raw:f,task:!!R,checked:N,loose:!1,text:d,tokens:[]}),u.raw+=f}u.items[u.items.length-1].raw=f.trimEnd(),u.items[u.items.length-1].text=d.trimEnd(),u.raw=u.raw.trimEnd();for(let m=0;mx.type==="space"),_=v.length>0&&v.some(x=>/\n.*\n/.test(x.raw));u.loose=_}if(u.loose)for(let m=0;m$/,"$1").replace(this.rules.inline._escapes,"$1"):"",u=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:u}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Jw(n[1]).map(i=>({text:i,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let i=r.align.length,u,l,f,d;for(u=0;u({text:h,tokens:[]}));for(i=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=sg(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=dP(n[2],"()");if(l>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let i=n[2],u="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);l&&(i=l[1],u=l[3])}else u=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),ex(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:u&&u.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const u=r[0].charAt(0);return{type:"text",raw:u,text:u}}return ex(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...i[0]].length-1;let f,d,h=l,m=0;const v=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(v.lastIndex=0,n=n.slice(-1*t.length+l);(i=v.exec(n))!=null;){if(f=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!f)continue;if(d=[...f].length,i[3]||i[4]){h+=d;continue}else if((i[5]||i[6])&&l%3&&!((l+d)%3)){m+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h+m);const _=[...i[0]][0].length,x=t.slice(0,l+i.index+_+d);if(Math.min(l,d)%2){const R=x.slice(1,-1);return{type:"em",raw:x,text:R,tokens:this.lexer.inlineTokens(R)}}const A=x.slice(2,-2);return{type:"strong",raw:x,text:A,tokens:this.lexer.inlineTokens(A)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),u=/^ /.test(r)&&/ $/.test(r);return i&&u&&(r=r.substring(1,r.length-1)),r=Gi(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=Gi(n[1]),i="mailto:"+r):(r=Gi(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=Gi(n[0]),i="mailto:"+r;else{let u;do u=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(u!==n[0]);r=Gi(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Gi(n[0]),{type:"text",raw:n[0],text:r}}}}const rt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:nv,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};rt._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;rt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;rt.def=an(rt.def).replace("label",rt._label).replace("title",rt._title).getRegex();rt.bullet=/(?:[*+-]|\d{1,9}[.)])/;rt.listItemStart=an(/^( *)(bull) */).replace("bull",rt.bullet).getRegex();rt.list=an(rt.list).replace(/bull/g,rt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+rt.def.source+")").getRegex();rt._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";rt._comment=/|$)/;rt.html=an(rt.html,"i").replace("comment",rt._comment).replace("tag",rt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();rt.lheading=an(rt.lheading).replace(/bull/g,rt.bullet).getRegex();rt.paragraph=an(rt._paragraph).replace("hr",rt.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rt._tag).getRegex();rt.blockquote=an(rt.blockquote).replace("paragraph",rt.paragraph).getRegex();rt.normal={...rt};rt.gfm={...rt.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};rt.gfm.table=an(rt.gfm.table).replace("hr",rt.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rt._tag).getRegex();rt.gfm.paragraph=an(rt._paragraph).replace("hr",rt.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",rt._tag).getRegex();rt.pedantic={...rt.normal,html:an(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:nv,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:an(rt.normal._paragraph).replace("hr",rt.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",rt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const je={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:nv,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:nv,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";je.punctuation=an(je.punctuation,"u").replace(/punctuation/g,je._punctuation).getRegex();je.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;je.anyPunctuation=/\\[punct]/g;je._escapes=/\\([punct])/g;je._comment=an(rt._comment).replace("(?:-->|$)","-->").getRegex();je.emStrong.lDelim=an(je.emStrong.lDelim,"u").replace(/punct/g,je._punctuation).getRegex();je.emStrong.rDelimAst=an(je.emStrong.rDelimAst,"gu").replace(/punct/g,je._punctuation).getRegex();je.emStrong.rDelimUnd=an(je.emStrong.rDelimUnd,"gu").replace(/punct/g,je._punctuation).getRegex();je.anyPunctuation=an(je.anyPunctuation,"gu").replace(/punct/g,je._punctuation).getRegex();je._escapes=an(je._escapes,"gu").replace(/punct/g,je._punctuation).getRegex();je._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;je._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;je.autolink=an(je.autolink).replace("scheme",je._scheme).replace("email",je._email).getRegex();je._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;je.tag=an(je.tag).replace("comment",je._comment).replace("attribute",je._attribute).getRegex();je._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;je._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;je._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;je.link=an(je.link).replace("label",je._label).replace("href",je._href).replace("title",je._title).getRegex();je.reflink=an(je.reflink).replace("label",je._label).replace("ref",rt._label).getRegex();je.nolink=an(je.nolink).replace("ref",rt._label).getRegex();je.reflinkSearch=an(je.reflinkSearch,"g").replace("reflink",je.reflink).replace("nolink",je.nolink).getRegex();je.normal={...je};je.pedantic={...je.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:an(/^!?\[(label)\]\((.*?)\)/).replace("label",je._label).getRegex(),reflink:an(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",je._label).getRegex()};je.gfm={...je.normal,escape:an(je.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\d+" ".repeat(h.length));let r,i,u,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(f=>(r=f.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` -`+r.raw,i.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` -`+r.raw,i.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(u=t,this.options.extensions&&this.options.extensions.startBlock){let f=1/0;const d=t.slice(1);let h;this.options.extensions.startBlock.forEach(m=>{h=m.call({lexer:this},d),typeof h=="number"&&h>=0&&(f=Math.min(f,h))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(this.state.top&&(r=this.tokenizer.paragraph(u))){i=n[n.length-1],l&&i.type==="paragraph"?(i.raw+=` -`+r.raw,i.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),l=u.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=` -`+r.raw,i.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,u,l=t,f,d,h;if(this.tokens.links){const m=Object.keys(this.tokens.links);if(m.length>0)for(;(f=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)m.includes(f[0].slice(f[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(f=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(f=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,f.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(d||(h=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(m=>(r=m.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,h)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(u=t,this.options.extensions&&this.options.extensions.startInline){let m=1/0;const v=t.slice(1);let _;this.options.extensions.startInline.forEach(x=>{_=x.call({lexer:this},v),typeof _=="number"&&_>=0&&(m=Math.min(m,_))}),m<1/0&&m>=0&&(u=t.substring(0,m+1))}if(r=this.tokenizer.inlineText(u)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(h=r.raw.slice(-1)),d=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}}class iv{constructor(t){bn(this,"options");this.options=t||ts}code(t,n,r){var u;const i=(u=(n||"").match(/^\S*/))==null?void 0:u[0];return t=t.replace(/\n$/,"")+` -`,i?'
    '+(r?t:Gi(t,!0))+`
    -`:"
    "+(r?t:Gi(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
    -`}list(t,n,r){const i=n?"ol":"ul",u=n&&r!==1?' start="'+r+'"':"";return"<"+i+u+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const i=Xw(t);if(i===null)return r;t=i;let u='
    ",u}image(t,n,r){const i=Xw(t);if(i===null)return r;t=i;let u=`${r}0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=N+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=N+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:N+" "}):R+=N+" "}R+=this.parse(_.tokens,h),m+=this.renderer.listitem(R,A,!!x)}r+=this.renderer.list(m,f,d);continue}case"html":{const l=u;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=u;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=u,f=l.tokens?this.parseInline(l.tokens):l.text;for(;i+1{r=r.concat(this.walkTokens(f[d],n))}):f.tokens&&(r=r.concat(this.walkTokens(f.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(u=>{if(!u.name)throw new Error("extension name required");if("renderer"in u){const l=n.renderers[u.name];l?n.renderers[u.name]=function(...f){let d=u.renderer.apply(this,f);return d===!1&&(d=l.apply(this,f)),d}:n.renderers[u.name]=u.renderer}if("tokenizer"in u){if(!u.level||u.level!=="block"&&u.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[u.level];l?l.unshift(u.tokenizer):n[u.level]=[u.tokenizer],u.start&&(u.level==="block"?n.startBlock?n.startBlock.push(u.start):n.startBlock=[u.start]:u.level==="inline"&&(n.startInline?n.startInline.push(u.start):n.startInline=[u.start]))}"childTokens"in u&&u.childTokens&&(n.childTokens[u.name]=u.childTokens)}),i.extensions=n),r.renderer){const u=this.defaults.renderer||new iv(this.defaults);for(const l in r.renderer){const f=r.renderer[l],d=l,h=u[d];u[d]=(...m)=>{let v=f.apply(u,m);return v===!1&&(v=h.apply(u,m)),v||""}}i.renderer=u}if(r.tokenizer){const u=this.defaults.tokenizer||new rv(this.defaults);for(const l in r.tokenizer){const f=r.tokenizer[l],d=l,h=u[d];u[d]=(...m)=>{let v=f.apply(u,m);return v===!1&&(v=h.apply(u,m)),v}}i.tokenizer=u}if(r.hooks){const u=this.defaults.hooks||new jd;for(const l in r.hooks){const f=r.hooks[l],d=l,h=u[d];jd.passThroughHooks.has(l)?u[d]=m=>{if(this.defaults.async)return Promise.resolve(f.call(u,m)).then(_=>h.call(u,_));const v=f.call(u,m);return h.call(u,v)}:u[d]=(...m)=>{let v=f.apply(u,m);return v===!1&&(v=h.apply(u,m)),v}}i.hooks=u}if(r.walkTokens){const u=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(f){let d=[];return d.push(l.call(this,f)),u&&(d=d.concat(u.call(this,f))),d}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}Jd=new WeakSet,Ty=function(t,n){return(r,i)=>{const u={...i},l={...this.defaults,...u};this.defaults.async===!0&&u.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const f=Wh(this,mv,jE).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(d=>t(d,l)).then(d=>l.walkTokens?Promise.all(this.walkTokens(d,l.walkTokens)).then(()=>d):d).then(d=>n(d,l)).then(d=>l.hooks?l.hooks.postprocess(d):d).catch(f);try{l.hooks&&(r=l.hooks.preprocess(r));const d=t(r,l);l.walkTokens&&this.walkTokens(d,l.walkTokens);let h=n(d,l);return l.hooks&&(h=l.hooks.postprocess(h)),h}catch(d){return f(d)}}},mv=new WeakSet,jE=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const i="

    An error occurred:

    "+Gi(r.message+"",!0)+"
    ";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}};const Xl=new hP;function un(e,t){return Xl.parse(e,t)}un.options=un.setOptions=function(e){return Xl.setOptions(e),un.defaults=Xl.defaults,RE(un.defaults),un};un.getDefaults=H1;un.defaults=ts;un.use=function(...e){return Xl.use(...e),un.defaults=Xl.defaults,RE(un.defaults),un};un.walkTokens=function(e,t){return Xl.walkTokens(e,t)};un.parseInline=Xl.parseInline;un.Parser=du;un.parser=du.parse;un.Renderer=iv;un.TextRenderer=W1;un.Lexer=fu;un.lexer=fu.lex;un.Tokenizer=rv;un.Hooks=jd;un.parse=un;un.options;un.setOptions;un.use;un.walkTokens;un.parseInline;du.parse;fu.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:LE,setPrototypeOf:tx,isFrozen:gP,getPrototypeOf:vP,getOwnPropertyDescriptor:NE}=Object;let{freeze:ci,seal:qo,create:$E}=Object,{apply:Cy,construct:Ay}=typeof Reflect<"u"&&Reflect;ci||(ci=function(t){return t});qo||(qo=function(t){return t});Cy||(Cy=function(t,n,r){return t.apply(n,r)});Ay||(Ay=function(t,n){return new t(...n)});const cg=mo(Array.prototype.forEach),nx=mo(Array.prototype.pop),pd=mo(Array.prototype.push),Rg=mo(String.prototype.toLowerCase),v0=mo(String.prototype.toString),mP=mo(String.prototype.match),hd=mo(String.prototype.replace),yP=mo(String.prototype.indexOf),_P=mo(String.prototype.trim),Hi=mo(RegExp.prototype.test),gd=wP(TypeError);function mo(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:Rg;tx&&tx(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const u=n(i);u!==i&&(gP(t)||(t[r]=u),i=u)}e[i]=!0}return e}function uc(e){const t=$E(null);for(const[n,r]of LE(e))NE(e,n)!==void 0&&(t[n]=r);return t}function fg(e,t){for(;e!==null;){const r=NE(e,t);if(r){if(r.get)return mo(r.get);if(typeof r.value=="function")return mo(r.value)}e=vP(e)}function n(r){return console.warn("fallback value for",r),null}return n}const rx=ci(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),m0=ci(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),y0=ci(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xP=ci(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_0=ci(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bP=ci(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ix=ci(["#text"]),ox=ci(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),w0=ci(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ux=ci(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),dg=ci(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),SP=qo(/\{\{[\w\W]*|[\w\W]*\}\}/gm),EP=qo(/<%[\w\W]*|[\w\W]*%>/gm),kP=qo(/\${[\w\W]*}/gm),TP=qo(/^data-[\-\w.\u00B7-\uFFFF]/),CP=qo(/^aria-[\-\w]+$/),DE=qo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),AP=qo(/^(?:\w+script|data):/i),OP=qo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ME=qo(/^html$/i);var ax=Object.freeze({__proto__:null,MUSTACHE_EXPR:SP,ERB_EXPR:EP,TMPLIT_EXPR:kP,DATA_ATTR:TP,ARIA_ATTR:CP,IS_ALLOWED_URI:DE,IS_SCRIPT_OR_DATA:AP,ATTR_WHITESPACE:OP,DOCTYPE_NAME:ME});const RP=function(){return typeof window>"u"?null:window},PP=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const u="dompurify"+(r?"#"+r:"");try{return t.createPolicy(u,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}};function FE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:RP();const t=Ue=>FE(Ue);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:u,HTMLTemplateElement:l,Node:f,Element:d,NodeFilter:h,NamedNodeMap:m=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:v,DOMParser:_,trustedTypes:x}=e,A=d.prototype,R=fg(A,"cloneNode"),N=fg(A,"nextSibling"),k=fg(A,"childNodes"),E=fg(A,"parentNode");if(typeof l=="function"){const Ue=n.createElement("template");Ue.content&&Ue.content.ownerDocument&&(n=Ue.content.ownerDocument)}let T,P="";const{implementation:L,createNodeIterator:U,createDocumentFragment:G,getElementsByTagName:Z}=n,{importNode:Ee}=r;let K={};t.isSupported=typeof LE=="function"&&typeof E=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ae,ERB_EXPR:ne,TMPLIT_EXPR:Ie,DATA_ATTR:Re,ARIA_ATTR:Fe,IS_SCRIPT_OR_DATA:lt,ATTR_WHITESPACE:Je}=ax;let{IS_ALLOWED_URI:le}=ax,me=null;const Le=It({},[...rx,...m0,...y0,..._0,...ix]);let B=null;const re=It({},[...ox,...w0,...ux,...dg]);let xe=Object.seal($E(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,we=null,ye=!0,ze=!0,Qe=!1,tt=!0,_t=!1,it=!1,Ne=!1,wt=!1,gt=!1,et=!1,Et=!1,kt=!0,_n=!1;const gn="user-content-";let Ut=!0,jt=!1,Ze={},vn=null;const Te=It({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ge=null;const Vt=It({},["audio","video","img","source","image","track"]);let nn=null;const ln=It({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fr="http://www.w3.org/1998/Math/MathML",Gn="http://www.w3.org/2000/svg",qn="http://www.w3.org/1999/xhtml";let dr=qn,Tr=!1,$=null;const z=It({},[fr,Gn,qn],v0);let q=null;const ue=["application/xhtml+xml","text/html"],ie="text/html";let Ae=null,$e=null;const ft=n.createElement("form"),Bt=function(Q){return Q instanceof RegExp||Q instanceof Function},nt=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!($e&&$e===Q)){if((!Q||typeof Q!="object")&&(Q={}),Q=uc(Q),q=ue.indexOf(Q.PARSER_MEDIA_TYPE)===-1?q=ie:q=Q.PARSER_MEDIA_TYPE,Ae=q==="application/xhtml+xml"?v0:Rg,me="ALLOWED_TAGS"in Q?It({},Q.ALLOWED_TAGS,Ae):Le,B="ALLOWED_ATTR"in Q?It({},Q.ALLOWED_ATTR,Ae):re,$="ALLOWED_NAMESPACES"in Q?It({},Q.ALLOWED_NAMESPACES,v0):z,nn="ADD_URI_SAFE_ATTR"in Q?It(uc(ln),Q.ADD_URI_SAFE_ATTR,Ae):ln,Ge="ADD_DATA_URI_TAGS"in Q?It(uc(Vt),Q.ADD_DATA_URI_TAGS,Ae):Vt,vn="FORBID_CONTENTS"in Q?It({},Q.FORBID_CONTENTS,Ae):Te,pe="FORBID_TAGS"in Q?It({},Q.FORBID_TAGS,Ae):{},we="FORBID_ATTR"in Q?It({},Q.FORBID_ATTR,Ae):{},Ze="USE_PROFILES"in Q?Q.USE_PROFILES:!1,ye=Q.ALLOW_ARIA_ATTR!==!1,ze=Q.ALLOW_DATA_ATTR!==!1,Qe=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,tt=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=Q.SAFE_FOR_TEMPLATES||!1,it=Q.WHOLE_DOCUMENT||!1,gt=Q.RETURN_DOM||!1,et=Q.RETURN_DOM_FRAGMENT||!1,Et=Q.RETURN_TRUSTED_TYPE||!1,wt=Q.FORCE_BODY||!1,kt=Q.SANITIZE_DOM!==!1,_n=Q.SANITIZE_NAMED_PROPS||!1,Ut=Q.KEEP_CONTENT!==!1,jt=Q.IN_PLACE||!1,le=Q.ALLOWED_URI_REGEXP||DE,dr=Q.NAMESPACE||qn,xe=Q.CUSTOM_ELEMENT_HANDLING||{},Q.CUSTOM_ELEMENT_HANDLING&&Bt(Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&Bt(Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(xe.allowCustomizedBuiltInElements=Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(ze=!1),et&&(gt=!0),Ze&&(me=It({},[...ix]),B=[],Ze.html===!0&&(It(me,rx),It(B,ox)),Ze.svg===!0&&(It(me,m0),It(B,w0),It(B,dg)),Ze.svgFilters===!0&&(It(me,y0),It(B,w0),It(B,dg)),Ze.mathMl===!0&&(It(me,_0),It(B,ux),It(B,dg))),Q.ADD_TAGS&&(me===Le&&(me=uc(me)),It(me,Q.ADD_TAGS,Ae)),Q.ADD_ATTR&&(B===re&&(B=uc(B)),It(B,Q.ADD_ATTR,Ae)),Q.ADD_URI_SAFE_ATTR&&It(nn,Q.ADD_URI_SAFE_ATTR,Ae),Q.FORBID_CONTENTS&&(vn===Te&&(vn=uc(vn)),It(vn,Q.FORBID_CONTENTS,Ae)),Ut&&(me["#text"]=!0),it&&It(me,["html","head","body"]),me.table&&(It(me,["tbody"]),delete pe.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw gd('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gd('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=Q.TRUSTED_TYPES_POLICY,P=T.createHTML("")}else T===void 0&&(T=PP(x,i)),T!==null&&typeof P=="string"&&(P=T.createHTML(""));ci&&ci(Q),$e=Q}},qt=It({},["mi","mo","mn","ms","mtext"]),Ht=It({},["foreignobject","desc","title","annotation-xml"]),En=It({},["title","style","font","a","script"]),$t=It({},m0);It($t,y0),It($t,xP);const An=It({},_0);It(An,bP);const rn=function(Q){let be=E(Q);(!be||!be.tagName)&&(be={namespaceURI:dr,tagName:"template"});const Me=Rg(Q.tagName),Xt=Rg(be.tagName);return $[Q.namespaceURI]?Q.namespaceURI===Gn?be.namespaceURI===qn?Me==="svg":be.namespaceURI===fr?Me==="svg"&&(Xt==="annotation-xml"||qt[Xt]):!!$t[Me]:Q.namespaceURI===fr?be.namespaceURI===qn?Me==="math":be.namespaceURI===Gn?Me==="math"&&Ht[Xt]:!!An[Me]:Q.namespaceURI===qn?be.namespaceURI===Gn&&!Ht[Xt]||be.namespaceURI===fr&&!qt[Xt]?!1:!An[Me]&&(En[Me]||!$t[Me]):!!(q==="application/xhtml+xml"&&$[Q.namespaceURI]):!1},sn=function(Q){pd(t.removed,{element:Q});try{Q.parentNode.removeChild(Q)}catch{Q.remove()}},lr=function(Q,be){try{pd(t.removed,{attribute:be.getAttributeNode(Q),from:be})}catch{pd(t.removed,{attribute:null,from:be})}if(be.removeAttribute(Q),Q==="is"&&!B[Q])if(gt||et)try{sn(be)}catch{}else try{be.setAttribute(Q,"")}catch{}},$r=function(Q){let be=null,Me=null;if(wt)Q=""+Q;else{const Kn=mP(Q,/^[\r\n\t ]+/);Me=Kn&&Kn[0]}q==="application/xhtml+xml"&&dr===qn&&(Q=''+Q+"");const Xt=T?T.createHTML(Q):Q;if(dr===qn)try{be=new _().parseFromString(Xt,q)}catch{}if(!be||!be.documentElement){be=L.createDocument(dr,"template",null);try{be.documentElement.innerHTML=Tr?P:Xt}catch{}}const xt=be.body||be.documentElement;return Q&&Me&&xt.insertBefore(n.createTextNode(Me),xt.childNodes[0]||null),dr===qn?Z.call(be,it?"html":"body")[0]:it?be.documentElement:xt},Dr=function(Q){return U.call(Q.ownerDocument||Q,Q,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null)},Jr=function(Q){return Q instanceof v&&(typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||!(Q.attributes instanceof m)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function")},pr=function(Q){return typeof f=="function"&&Q instanceof f},jn=function(Q,be,Me){K[Q]&&cg(K[Q],Xt=>{Xt.call(t,be,Me,$e)})},Ji=function(Q){let be=null;if(jn("beforeSanitizeElements",Q,null),Jr(Q))return sn(Q),!0;const Me=Ae(Q.nodeName);if(jn("uponSanitizeElement",Q,{tagName:Me,allowedTags:me}),Q.hasChildNodes()&&!pr(Q.firstElementChild)&&Hi(/<[/\w]/g,Q.innerHTML)&&Hi(/<[/\w]/g,Q.textContent))return sn(Q),!0;if(!me[Me]||pe[Me]){if(!pe[Me]&&vu(Me)&&(xe.tagNameCheck instanceof RegExp&&Hi(xe.tagNameCheck,Me)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(Me)))return!1;if(Ut&&!vn[Me]){const Xt=E(Q)||Q.parentNode,xt=k(Q)||Q.childNodes;if(xt&&Xt){const Kn=xt.length;for(let wn=Kn-1;wn>=0;--wn)Xt.insertBefore(R(xt[wn],!0),N(Q))}}return sn(Q),!0}return Q instanceof d&&!rn(Q)||(Me==="noscript"||Me==="noembed"||Me==="noframes")&&Hi(/<\/no(script|embed|frames)/i,Q.innerHTML)?(sn(Q),!0):(_t&&Q.nodeType===3&&(be=Q.textContent,cg([ae,ne,Ie],Xt=>{be=hd(be,Xt," ")}),Q.textContent!==be&&(pd(t.removed,{element:Q.cloneNode()}),Q.textContent=be)),jn("afterSanitizeElements",Q,null),!1)},pi=function(Q,be,Me){if(kt&&(be==="id"||be==="name")&&(Me in n||Me in ft))return!1;if(!(ze&&!we[be]&&Hi(Re,be))){if(!(ye&&Hi(Fe,be))){if(!B[be]||we[be]){if(!(vu(Q)&&(xe.tagNameCheck instanceof RegExp&&Hi(xe.tagNameCheck,Q)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(Q))&&(xe.attributeNameCheck instanceof RegExp&&Hi(xe.attributeNameCheck,be)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(be))||be==="is"&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&Hi(xe.tagNameCheck,Me)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(Me))))return!1}else if(!nn[be]){if(!Hi(le,hd(Me,Je,""))){if(!((be==="src"||be==="xlink:href"||be==="href")&&Q!=="script"&&yP(Me,"data:")===0&&Ge[Q])){if(!(Qe&&!Hi(lt,hd(Me,Je,"")))){if(Me)return!1}}}}}}return!0},vu=function(Q){return Q.indexOf("-")>0},Yt=function(Q){jn("beforeSanitizeAttributes",Q,null);const{attributes:be}=Q;if(!be)return;const Me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};let Xt=be.length;for(;Xt--;){const xt=be[Xt],{name:Kn,namespaceURI:wn,value:eo}=xt,hi=Ae(Kn);let cn=Kn==="value"?eo:_P(eo);if(Me.attrName=hi,Me.attrValue=cn,Me.keepAttr=!0,Me.forceKeepAttr=void 0,jn("uponSanitizeAttribute",Q,Me),cn=Me.attrValue,Me.forceKeepAttr||(lr(Kn,Q),!Me.keepAttr))continue;if(!tt&&Hi(/\/>/i,cn)){lr(Kn,Q);continue}_t&&cg([ae,ne,Ie],Ka=>{cn=hd(cn,Ka," ")});const qa=Ae(Q.nodeName);if(pi(qa,hi,cn)){if(_n&&(hi==="id"||hi==="name")&&(lr(Kn,Q),cn=gn+cn),T&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!wn)switch(x.getAttributeType(qa,hi)){case"TrustedHTML":{cn=T.createHTML(cn);break}case"TrustedScriptURL":{cn=T.createScriptURL(cn);break}}try{wn?Q.setAttributeNS(wn,Kn,cn):Q.setAttribute(Kn,cn),nx(t.removed)}catch{}}}jn("afterSanitizeAttributes",Q,null)},Zt=function Ue(Q){let be=null;const Me=Dr(Q);for(jn("beforeSanitizeShadowDOM",Q,null);be=Me.nextNode();)jn("uponSanitizeShadowNode",be,null),!Ji(be)&&(be.content instanceof u&&Ue(be.content),Yt(be));jn("afterSanitizeShadowDOM",Q,null)};return t.sanitize=function(Ue){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},be=null,Me=null,Xt=null,xt=null;if(Tr=!Ue,Tr&&(Ue=""),typeof Ue!="string"&&!pr(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw gd("dirty is not a string, aborting")}else throw gd("toString is not a function");if(!t.isSupported)return Ue;if(Ne||nt(Q),t.removed=[],typeof Ue=="string"&&(jt=!1),jt){if(Ue.nodeName){const eo=Ae(Ue.nodeName);if(!me[eo]||pe[eo])throw gd("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof f)be=$r(""),Me=be.ownerDocument.importNode(Ue,!0),Me.nodeType===1&&Me.nodeName==="BODY"||Me.nodeName==="HTML"?be=Me:be.appendChild(Me);else{if(!gt&&!_t&&!it&&Ue.indexOf("<")===-1)return T&&Et?T.createHTML(Ue):Ue;if(be=$r(Ue),!be)return gt?null:Et?P:""}be&&wt&&sn(be.firstChild);const Kn=Dr(jt?Ue:be);for(;Xt=Kn.nextNode();)Ji(Xt)||(Xt.content instanceof u&&Zt(Xt.content),Yt(Xt));if(jt)return Ue;if(gt){if(et)for(xt=G.call(be.ownerDocument);be.firstChild;)xt.appendChild(be.firstChild);else xt=be;return(B.shadowroot||B.shadowrootmode)&&(xt=Ee.call(r,xt,!0)),xt}let wn=it?be.outerHTML:be.innerHTML;return it&&me["!doctype"]&&be.ownerDocument&&be.ownerDocument.doctype&&be.ownerDocument.doctype.name&&Hi(ME,be.ownerDocument.doctype.name)&&(wn=" -`+wn),_t&&cg([ae,ne,Ie],eo=>{wn=hd(wn,eo," ")}),T&&Et?T.createHTML(wn):wn},t.setConfig=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(Ue),Ne=!0},t.clearConfig=function(){$e=null,Ne=!1},t.isValidAttribute=function(Ue,Q,be){$e||nt({});const Me=Ae(Ue),Xt=Ae(Q);return pi(Me,Xt,be)},t.addHook=function(Ue,Q){typeof Q=="function"&&(K[Ue]=K[Ue]||[],pd(K[Ue],Q))},t.removeHook=function(Ue){if(K[Ue])return nx(K[Ue])},t.removeHooks=function(Ue){K[Ue]&&(K[Ue]=[])},t.removeAllHooks=function(){K={}},t}var IP=FE();function jP(e){const[t,n]=M.useState(null),r=async i=>{n({score:i,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:i}),headers:{"Content-Type":"application/json"}}),n({score:i,inflight:!1})};return Y.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[Y.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?Y.jsx(Kw,{className:"h-5 w-5","aria-hidden":"true"}):Y.jsx(qw,{className:"h-5 w-5","aria-hidden":"true"}):Y.jsx(uR,{className:"h-5 w-5","aria-hidden":"true"})}),Y.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?Y.jsx(Kw,{className:"h-5 w-5","aria-hidden":"true"}):Y.jsx(qw,{className:"h-5 w-5","aria-hidden":"true"}):Y.jsx(rR,{className:"h-5 w-5","aria-hidden":"true"})})]})}function LP(e){try{return JSON.parse(e)}catch{return{}}}function lx(e){return Y.jsxs(Y.Fragment,{children:[e.call&&Y.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&Y.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&Y.jsx("span",{className:Qr("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:Y.jsx(X3,{className:Qr("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&Y.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:Y.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:Y.jsx("table",{className:"divide-y divide-gray-300",children:Y.jsx("tbody",{children:Object.entries(LP(e.args)).map(([t,n],r)=>Y.jsxs("tr",{children:[Y.jsx("td",{className:Qr(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:Y.jsx("div",{className:"font-medium text-gray-500",children:t})}),Y.jsx("td",{className:Qr(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:OE(n)})]},r))})})})})]})}function NP(e){var r;const[t,n]=M.useState(!1);return Y.jsxs("div",{className:"flex flex-col mb-8",children:[Y.jsxs("div",{className:"leading-6 flex flex-row",children:[Y.jsx("div",{className:Qr("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),Y.jsxs("div",{className:"flex-1",children:[e.type==="function"&&Y.jsx(lx,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&Y.jsx(lx,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?Y.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:IP.sanitize(un(e.content)).trim()}}):Y.jsx("div",{className:"text-gray-900 prose",children:OE(e.content)}):!1]})]}),e.runId&&Y.jsx("div",{className:"mt-2 pl-[100px]",children:Y.jsx(jP,{runId:e.runId})})]})}function $P(e){var n,r,i;const t=xR(e.chat.thread_id,e.stream);return M.useEffect(()=>{var u;scrollTo({top:document.body.scrollHeight,behavior:(u=e.stream)!=null&&u.messages?"smooth":void 0})},[t]),Y.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((u,l)=>{var f,d;return M.createElement(NP,{...u,key:l,runId:l===t.length-1&&((f=e.stream)==null?void 0:f.status)==="done"?(d=e.stream)==null?void 0:d.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&Y.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&Y.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),Y.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:Y.jsx(AE,{onSubmit:e.startStream,disabled:((i=e.stream)==null?void 0:i.status)==="inflight"})})]})}function DP(e){var t;return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{onClick:()=>e.enterChat(null),className:Qr(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[Y.jsx("span",{className:Qr(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:Y.jsx(xE,{className:"h-4 w-4"})}),Y.jsx("span",{className:"truncate",children:"New Chat"})]}),Y.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),Y.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return Y.jsx("li",{children:Y.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:Qr(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[Y.jsx("span",{className:Qr(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),Y.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??Y.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var MP=Object.defineProperty,FP=(e,t,n)=>t in e?MP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x0=(e,t,n)=>(FP(e,typeof t!="symbol"?t+"":t,n),n);let zP=class{constructor(){x0(this,"current",this.detect()),x0(this,"handoffState","pending"),x0(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Bu=new zP,yo=(e,t)=>{Bu.isServer?M.useEffect(e,t):M.useLayoutEffect(e,t)};function Hu(e){let t=M.useRef(e);return yo(()=>{t.current=e},[e]),t}function Lv(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ns(){let e=[],t={addEventListener(n,r,i,u){return n.addEventListener(r,i,u),t.add(()=>n.removeEventListener(r,i,u))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Lv(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let u=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:u})})},group(n){let r=ns();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function G1(){let[e]=M.useState(ns);return M.useEffect(()=>()=>e.dispose(),[e]),e}let Mn=function(e){let t=Hu(e);return zt.useCallback((...n)=>t.current(...n),[t])};function UP(){let e=typeof document>"u";return"useSyncExternalStore"in Ld?(t=>t.useSyncExternalStore)(Ld)(()=>()=>{},()=>!1,()=>!e):!1}function Dc(){let e=UP(),[t,n]=M.useState(Bu.isHandoffComplete);return t&&Bu.isHandoffComplete===!1&&n(!1),M.useEffect(()=>{t!==!0&&n(!0)},[t]),M.useEffect(()=>Bu.handoff(),[]),e?!1:t}var sx;let Mc=(sx=zt.useId)!=null?sx:function(){let e=Dc(),[t,n]=zt.useState(e?()=>Bu.nextId():null);return yo(()=>{t===null&&n(Bu.nextId())},[t]),t!=null?""+t:void 0};function Zr(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zr),r}function zE(e){return Bu.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Oy=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Dl=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Dl||{}),UE=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(UE||{}),BP=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(BP||{});function HP(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Oy)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var BE=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(BE||{});function WP(e,t=0){var n;return e===((n=zE(e))==null?void 0:n.body)?!1:Zr(t,{0(){return e.matches(Oy)},1(){let r=e;for(;r!==null;){if(r.matches(Oy))return!0;r=r.parentElement}return!1}})}var GP=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(GP||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ql(e){e==null||e.focus({preventScroll:!0})}let qP=["textarea","input"].join(",");function KP(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,qP))!=null?n:!1}function VP(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),u=t(r);if(i===null||u===null)return 0;let l=i.compareDocumentPosition(u);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Pg(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let u=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?VP(e):e:HP(e);i.length>0&&l.length>1&&(l=l.filter(x=>!i.includes(x))),r=r??u.activeElement;let f=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=t&32?{preventScroll:!0}:{},m=0,v=l.length,_;do{if(m>=v||m+v<=0)return 0;let x=d+m;if(t&16)x=(x+v)%v;else{if(x<0)return 3;if(x>=v)return 1}_=l[x],_==null||_.focus(h),m+=f}while(_!==u.activeElement);return t&6&&KP(_)&&_.select(),2}function pg(e,t,n){let r=Hu(t);M.useEffect(()=>{function i(u){r.current(u)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function HE(e,t,n){let r=Hu(t);M.useEffect(()=>{function i(u){r.current(u)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function YP(e,t,n=!0){let r=M.useRef(!1);M.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(l,f){if(!r.current||l.defaultPrevented)return;let d=f(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let h=function m(v){return typeof v=="function"?m(v()):Array.isArray(v)||v instanceof Set?v:[v]}(e);for(let m of h){if(m===null)continue;let v=m instanceof HTMLElement?m:m.current;if(v!=null&&v.contains(d)||l.composed&&l.composedPath().includes(v))return}return!WP(d,BE.Loose)&&d.tabIndex!==-1&&l.preventDefault(),t(l,d)}let u=M.useRef(null);pg("pointerdown",l=>{var f,d;r.current&&(u.current=((d=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:d[0])||l.target)},!0),pg("mousedown",l=>{var f,d;r.current&&(u.current=((d=(f=l.composedPath)==null?void 0:f.call(l))==null?void 0:d[0])||l.target)},!0),pg("click",l=>{u.current&&(i(l,()=>u.current),u.current=null)},!0),pg("touchend",l=>i(l,()=>l.target instanceof HTMLElement?l.target:null),!0),HE("blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let WE=Symbol();function QP(e,t=!0){return Object.assign(e,{[WE]:t})}function Ko(...e){let t=M.useRef(e);M.useEffect(()=>{t.current=e},[e]);let n=Mn(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[WE]))?void 0:n}function ov(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var uv=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(uv||{}),Ia=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ia||{});function _o({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:u=!0,name:l}){let f=GE(t,e);if(u)return hg(f,n,r,l);let d=i??0;if(d&2){let{static:h=!1,...m}=f;if(h)return hg(m,n,r,l)}if(d&1){let{unmount:h=!0,...m}=f;return Zr(h?0:1,{0(){return null},1(){return hg({...m,hidden:!0,style:{display:"none"}},n,r,l)}})}return hg(f,n,r,l)}function hg(e,t={},n,r){let{as:i=n,children:u,refName:l="ref",...f}=b0(e,["unmount","static"]),d=e.ref!==void 0?{[l]:e.ref}:{},h=typeof u=="function"?u(t):u;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(t));let m={};if(t){let v=!1,_=[];for(let[x,A]of Object.entries(t))typeof A=="boolean"&&(v=!0),A===!0&&_.push(x);v&&(m["data-headlessui-state"]=_.join(" "))}if(i===M.Fragment&&Object.keys(cx(f)).length>0){if(!M.isValidElement(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(A=>` - ${A}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(A=>` - ${A}`).join(` -`)].join(` -`));let v=h.props,_=typeof(v==null?void 0:v.className)=="function"?(...A)=>ov(v==null?void 0:v.className(...A),f.className):ov(v==null?void 0:v.className,f.className),x=_?{className:_}:{};return M.cloneElement(h,Object.assign({},GE(h.props,cx(b0(f,["ref"]))),m,d,ZP(h.ref,d.ref),x))}return M.createElement(i,Object.assign({},b0(f,["ref"]),i!==M.Fragment&&d,i!==M.Fragment&&m),h)}function ZP(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function GE(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...u){let l=n[r];for(let f of l){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;f(i,...u)}}});return t}function Xi(e){var t;return Object.assign(M.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function cx(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function b0(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function XP(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&JP(n)?!1:r}function JP(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let eI="div";var av=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(av||{});function tI(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return _o({ourProps:i,theirProps:r,slot:{},defaultTag:eI,name:"Hidden"})}let Ry=Xi(tI),q1=M.createContext(null);q1.displayName="OpenClosedContext";var qi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qi||{});function K1(){return M.useContext(q1)}function nI({value:e,children:t}){return zt.createElement(q1.Provider,{value:e},t)}var qE=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qE||{});function V1(e,t){let n=M.useRef([]),r=Mn(e);M.useEffect(()=>{let i=[...n.current];for(let[u,l]of t.entries())if(n.current[u]!==l){let f=r(t,i);return n.current=t,f}},[r,...t])}function rI(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function op(...e){return M.useMemo(()=>zE(...e),[...e])}var Sd=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Sd||{});function iI(){let e=M.useRef(0);return HE("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function up(){let e=M.useRef(!1);return yo(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function KE(e,t,n,r){let i=Hu(n);M.useEffect(()=>{e=e??window;function u(l){i.current(l)}return e.addEventListener(t,u,r),()=>e.removeEventListener(t,u,r)},[e,t,r])}function oI(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function VE(e){let t=Mn(e),n=M.useRef(!1);M.useEffect(()=>(n.current=!1,()=>{n.current=!0,Lv(()=>{n.current&&t()})}),[t])}function YE(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let uI="div";var QE=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(QE||{});function aI(e,t){let n=M.useRef(null),r=Ko(n,t),{initialFocus:i,containers:u,features:l=30,...f}=e;Dc()||(l=1);let d=op(n);cI({ownerDocument:d},!!(l&16));let h=fI({ownerDocument:d,container:n,initialFocus:i},!!(l&2));dI({ownerDocument:d,container:n,containers:u,previousActiveElement:h},!!(l&8));let m=iI(),v=Mn(R=>{let N=n.current;N&&(k=>k())(()=>{Zr(m.current,{[Sd.Forwards]:()=>{Pg(N,Dl.First,{skipElements:[R.relatedTarget]})},[Sd.Backwards]:()=>{Pg(N,Dl.Last,{skipElements:[R.relatedTarget]})}})})}),_=G1(),x=M.useRef(!1),A={ref:r,onKeyDown(R){R.key=="Tab"&&(x.current=!0,_.requestAnimationFrame(()=>{x.current=!1}))},onBlur(R){let N=YE(u);n.current instanceof HTMLElement&&N.add(n.current);let k=R.relatedTarget;k instanceof HTMLElement&&k.dataset.headlessuiFocusGuard!=="true"&&(ZE(N,k)||(x.current?Pg(n.current,Zr(m.current,{[Sd.Forwards]:()=>Dl.Next,[Sd.Backwards]:()=>Dl.Previous})|Dl.WrapAround,{relativeTo:R.target}):R.target instanceof HTMLElement&&ql(R.target)))}};return zt.createElement(zt.Fragment,null,!!(l&4)&&zt.createElement(Ry,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:av.Focusable}),_o({ourProps:A,theirProps:f,defaultTag:uI,name:"FocusTrap"}),!!(l&4)&&zt.createElement(Ry,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:av.Focusable}))}let lI=Xi(aI),vd=Object.assign(lI,{features:QE}),Oa=[];oI(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Oa[0]!==t.target&&(Oa.unshift(t.target),Oa=Oa.filter(n=>n!=null&&n.isConnected),Oa.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function sI(e=!0){let t=M.useRef(Oa.slice());return V1(([n],[r])=>{r===!0&&n===!1&&Lv(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Oa.slice())},[e,Oa,t]),Mn(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function cI({ownerDocument:e},t){let n=sI(t);V1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ql(n())},[t]),VE(()=>{t&&ql(n())})}function fI({ownerDocument:e,container:t,initialFocus:n},r){let i=M.useRef(null),u=up();return V1(()=>{if(!r)return;let l=t.current;l&&Lv(()=>{if(!u.current)return;let f=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===f){i.current=f;return}}else if(l.contains(f)){i.current=f;return}n!=null&&n.current?ql(n.current):Pg(l,Dl.First)===UE.Error&&console.warn("There are no focusable elements inside the "),i.current=e==null?void 0:e.activeElement})},[r]),i}function dI({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let u=up();KE(e==null?void 0:e.defaultView,"focus",l=>{if(!i||!u.current)return;let f=YE(n);t.current instanceof HTMLElement&&f.add(t.current);let d=r.current;if(!d)return;let h=l.target;h&&h instanceof HTMLElement?ZE(f,h)?(r.current=h,ql(h)):(l.preventDefault(),l.stopPropagation(),ql(d)):ql(r.current)},!0)}function ZE(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let XE=M.createContext(!1);function pI(){return M.useContext(XE)}function Py(e){return zt.createElement(XE.Provider,{value:e.force},e.children)}function hI(e){let t=pI(),n=M.useContext(JE),r=op(e),[i,u]=M.useState(()=>{if(!t&&n!==null||Bu.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let f=r.createElement("div");return f.setAttribute("id","headlessui-portal-root"),r.body.appendChild(f)});return M.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),M.useEffect(()=>{t||n!==null&&u(n.current)},[n,u,t]),i}let gI=M.Fragment;function vI(e,t){let n=e,r=M.useRef(null),i=Ko(QP(m=>{r.current=m}),t),u=op(r),l=hI(r),[f]=M.useState(()=>{var m;return Bu.isServer?null:(m=u==null?void 0:u.createElement("div"))!=null?m:null}),d=M.useContext(Iy),h=Dc();return yo(()=>{!l||!f||l.contains(f)||(f.setAttribute("data-headlessui-portal",""),l.appendChild(f))},[l,f]),yo(()=>{if(f&&d)return d.register(f)},[d,f]),VE(()=>{var m;!l||!f||(f instanceof Node&&l.contains(f)&&l.removeChild(f),l.childNodes.length<=0&&((m=l.parentElement)==null||m.removeChild(l)))}),h?!l||!f?null:wE.createPortal(_o({ourProps:{ref:i},theirProps:n,defaultTag:gI,name:"Portal"}),f):null}let mI=M.Fragment,JE=M.createContext(null);function yI(e,t){let{target:n,...r}=e,i={ref:Ko(t)};return zt.createElement(JE.Provider,{value:n},_o({ourProps:i,theirProps:r,defaultTag:mI,name:"Popover.Group"}))}let Iy=M.createContext(null);function _I(){let e=M.useContext(Iy),t=M.useRef([]),n=Mn(u=>(t.current.push(u),e&&e.register(u),()=>r(u))),r=Mn(u=>{let l=t.current.indexOf(u);l!==-1&&t.current.splice(l,1),e&&e.unregister(u)}),i=M.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,M.useMemo(()=>function({children:u}){return zt.createElement(Iy.Provider,{value:i},u)},[i])]}let wI=Xi(vI),xI=Xi(yI),jy=Object.assign(wI,{Group:xI}),e2=M.createContext(null);function t2(){let e=M.useContext(e2);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,t2),t}return e}function bI(){let[e,t]=M.useState([]);return[e.length>0?e.join(" "):void 0,M.useMemo(()=>function(n){let r=Mn(u=>(t(l=>[...l,u]),()=>t(l=>{let f=l.slice(),d=f.indexOf(u);return d!==-1&&f.splice(d,1),f}))),i=M.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return zt.createElement(e2.Provider,{value:i},n.children)},[t])]}let SI="p";function EI(e,t){let n=Mc(),{id:r=`headlessui-description-${n}`,...i}=e,u=t2(),l=Ko(t);yo(()=>u.register(r),[r,u.register]);let f={ref:l,...u.props,id:r};return _o({ourProps:f,theirProps:i,slot:u.slot||{},defaultTag:SI,name:u.name||"Description"})}let kI=Xi(EI),TI=Object.assign(kI,{}),Y1=M.createContext(()=>{});Y1.displayName="StackContext";var Ly=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Ly||{});function CI(){return M.useContext(Y1)}function AI({children:e,onUpdate:t,type:n,element:r,enabled:i}){let u=CI(),l=Mn((...f)=>{t==null||t(...f),u(...f)});return yo(()=>{let f=i===void 0||i===!0;return f&&l(0,n,r),()=>{f&&l(1,n,r)}},[l,n,r,i]),zt.createElement(Y1.Provider,{value:l},e)}function OI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const RI=typeof Object.is=="function"?Object.is:OI,{useState:PI,useEffect:II,useLayoutEffect:jI,useDebugValue:LI}=Ld;function NI(e,t,n){const r=t(),[{inst:i},u]=PI({inst:{value:r,getSnapshot:t}});return jI(()=>{i.value=r,i.getSnapshot=t,S0(i)&&u({inst:i})},[e,r,t]),II(()=>(S0(i)&&u({inst:i}),e(()=>{S0(i)&&u({inst:i})})),[e]),LI(r),r}function S0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!RI(n,r)}catch{return!0}}function $I(e,t,n){return t()}const DI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MI=!DI,FI=MI?$I:NI,zI="useSyncExternalStore"in Ld?(e=>e.useSyncExternalStore)(Ld):FI;function UI(e){return zI(e.subscribe,e.getSnapshot,e.getSnapshot)}function BI(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...u){let l=t[i].call(n,...u);l&&(n=l,r.forEach(f=>f()))}}}function HI(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,u=e-i;n.style(r,"paddingRight",`${u}px`)}}}function WI(){if(!rI())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function i(u){return r.containers.flatMap(l=>l()).some(l=>l.contains(u))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=ns();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let u=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let f=l.target.closest("a");if(!f)return;let{hash:d}=new URL(f.href),h=t.querySelector(d);h&&!i(h)&&(u=h)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!i(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),u&&u.isConnected&&(u.scrollIntoView({block:"nearest"}),u=null)})})}}}function GI(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function qI(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Hl=BI(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ns(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:qI(n)},i=[WI(),HI(),GI()];i.forEach(({before:u})=>u==null?void 0:u(r)),i.forEach(({after:u})=>u==null?void 0:u(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Hl.subscribe(()=>{let e=Hl.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&Hl.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Hl.dispatch("TEARDOWN",n)}});function KI(e,t,n){let r=UI(Hl),i=e?r.get(e):void 0,u=i?i.count>0:!1;return yo(()=>{if(!(!e||!t))return Hl.dispatch("PUSH",e,n),()=>Hl.dispatch("POP",e,n)},[t,e]),u}let E0=new Map,md=new Map;function fx(e,t=!0){yo(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function i(){var l;if(!r)return;let f=(l=md.get(r))!=null?l:1;if(f===1?md.delete(r):md.set(r,f-1),f!==1)return;let d=E0.get(r);d&&(d["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",d["aria-hidden"]),r.inert=d.inert,E0.delete(r))}let u=(n=md.get(r))!=null?n:0;return md.set(r,u+1),u!==0||(E0.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),i},[e,t])}function VI({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let i=M.useRef((r=n==null?void 0:n.current)!=null?r:null),u=op(i),l=Mn(()=>{var f;let d=[];for(let h of e)h!==null&&(h instanceof HTMLElement?d.push(h):"current"in h&&h.current instanceof HTMLElement&&d.push(h.current));if(t!=null&&t.current)for(let h of t.current)d.push(h);for(let h of(f=u==null?void 0:u.querySelectorAll("html > *, body > *"))!=null?f:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(i.current)||d.some(m=>h.contains(m))||d.push(h));return d});return{resolveContainers:l,contains:Mn(f=>l().some(d=>d.contains(f))),mainTreeNodeRef:i,MainTreeNode:M.useMemo(()=>function(){return n!=null?null:zt.createElement(Ry,{features:av.Hidden,ref:i})},[i,n])}}var YI=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(YI||{}),QI=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(QI||{});let ZI={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},lv=M.createContext(null);lv.displayName="DialogContext";function ap(e){let t=M.useContext(lv);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ap),n}return t}function XI(e,t,n=()=>[document.body]){KI(e,t,r=>{var i;return{containers:[...(i=r.containers)!=null?i:[],n]}})}function JI(e,t){return Zr(t.type,ZI,e,t)}let ej="div",tj=uv.RenderStrategy|uv.Static;function nj(e,t){var n;let r=Mc(),{id:i=`headlessui-dialog-${r}`,open:u,onClose:l,initialFocus:f,__demoMode:d=!1,...h}=e,[m,v]=M.useState(0),_=K1();u===void 0&&_!==null&&(u=(_&qi.Open)===qi.Open);let x=M.useRef(null),A=Ko(x,t),R=op(x),N=e.hasOwnProperty("open")||_!==null,k=e.hasOwnProperty("onClose");if(!N&&!k)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!N)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!k)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let E=u?0:1,[T,P]=M.useReducer(JI,{titleId:null,descriptionId:null,panelRef:M.createRef()}),L=Mn(()=>l(!1)),U=Mn(tt=>P({type:0,id:tt})),G=Dc()?d?!1:E===0:!1,Z=m>1,Ee=M.useContext(lv)!==null,[K,ae]=_I(),{resolveContainers:ne,mainTreeNodeRef:Ie,MainTreeNode:Re}=VI({portals:K,defaultContainers:[(n=T.panelRef.current)!=null?n:x.current]}),Fe=Z?"parent":"leaf",lt=_!==null?(_&qi.Closing)===qi.Closing:!1,Je=(()=>Ee||lt?!1:G)(),le=M.useCallback(()=>{var tt,_t;return(_t=Array.from((tt=R==null?void 0:R.querySelectorAll("body > *"))!=null?tt:[]).find(it=>it.id==="headlessui-portal-root"?!1:it.contains(Ie.current)&&it instanceof HTMLElement))!=null?_t:null},[Ie]);fx(le,Je);let me=(()=>Z?!0:G)(),Le=M.useCallback(()=>{var tt,_t;return(_t=Array.from((tt=R==null?void 0:R.querySelectorAll("[data-headlessui-portal]"))!=null?tt:[]).find(it=>it.contains(Ie.current)&&it instanceof HTMLElement))!=null?_t:null},[Ie]);fx(Le,me);let B=(()=>!(!G||Z))();YP(ne,L,B);let re=(()=>!(Z||E!==0))();KE(R==null?void 0:R.defaultView,"keydown",tt=>{re&&(tt.defaultPrevented||tt.key===qE.Escape&&(tt.preventDefault(),tt.stopPropagation(),L()))});let xe=(()=>!(lt||E!==0||Ee))();XI(R,xe,ne),M.useEffect(()=>{if(E!==0||!x.current)return;let tt=new ResizeObserver(_t=>{for(let it of _t){let Ne=it.target.getBoundingClientRect();Ne.x===0&&Ne.y===0&&Ne.width===0&&Ne.height===0&&L()}});return tt.observe(x.current),()=>tt.disconnect()},[E,x,L]);let[pe,we]=bI(),ye=M.useMemo(()=>[{dialogState:E,close:L,setTitleId:U},T],[E,T,L,U]),ze=M.useMemo(()=>({open:E===0}),[E]),Qe={ref:A,id:i,role:"dialog","aria-modal":E===0?!0:void 0,"aria-labelledby":T.titleId,"aria-describedby":pe};return zt.createElement(AI,{type:"Dialog",enabled:E===0,element:x,onUpdate:Mn((tt,_t)=>{_t==="Dialog"&&Zr(tt,{[Ly.Add]:()=>v(it=>it+1),[Ly.Remove]:()=>v(it=>it-1)})})},zt.createElement(Py,{force:!0},zt.createElement(jy,null,zt.createElement(lv.Provider,{value:ye},zt.createElement(jy.Group,{target:x},zt.createElement(Py,{force:!1},zt.createElement(we,{slot:ze,name:"Dialog.Description"},zt.createElement(vd,{initialFocus:f,containers:ne,features:G?Zr(Fe,{parent:vd.features.RestoreFocus,leaf:vd.features.All&~vd.features.FocusLock}):vd.features.None},zt.createElement(ae,null,_o({ourProps:Qe,theirProps:h,slot:ze,defaultTag:ej,features:tj,visible:E===0,name:"Dialog"}))))))))),zt.createElement(Re,null))}let rj="div";function ij(e,t){let n=Mc(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:u,close:l}]=ap("Dialog.Overlay"),f=Ko(t),d=Mn(m=>{if(m.target===m.currentTarget){if(XP(m.currentTarget))return m.preventDefault();m.preventDefault(),m.stopPropagation(),l()}}),h=M.useMemo(()=>({open:u===0}),[u]);return _o({ourProps:{ref:f,id:r,"aria-hidden":!0,onClick:d},theirProps:i,slot:h,defaultTag:rj,name:"Dialog.Overlay"})}let oj="div";function uj(e,t){let n=Mc(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:u},l]=ap("Dialog.Backdrop"),f=Ko(t);M.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let d=M.useMemo(()=>({open:u===0}),[u]);return zt.createElement(Py,{force:!0},zt.createElement(jy,null,_o({ourProps:{ref:f,id:r,"aria-hidden":!0},theirProps:i,slot:d,defaultTag:oj,name:"Dialog.Backdrop"})))}let aj="div";function lj(e,t){let n=Mc(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:u},l]=ap("Dialog.Panel"),f=Ko(t,l.panelRef),d=M.useMemo(()=>({open:u===0}),[u]),h=Mn(m=>{m.stopPropagation()});return _o({ourProps:{ref:f,id:r,onClick:h},theirProps:i,slot:d,defaultTag:aj,name:"Dialog.Panel"})}let sj="h2";function cj(e,t){let n=Mc(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:u,setTitleId:l}]=ap("Dialog.Title"),f=Ko(t);M.useEffect(()=>(l(r),()=>l(null)),[r,l]);let d=M.useMemo(()=>({open:u===0}),[u]);return _o({ourProps:{ref:f,id:r},theirProps:i,slot:d,defaultTag:sj,name:"Dialog.Title"})}let fj=Xi(nj),dj=Xi(uj),pj=Xi(lj),hj=Xi(ij),gj=Xi(cj),dx=Object.assign(fj,{Backdrop:dj,Panel:pj,Overlay:hj,Title:gj,Description:TI});function vj(e=0){let[t,n]=M.useState(e),r=up(),i=M.useCallback(d=>{r.current&&n(h=>h|d)},[t,r]),u=M.useCallback(d=>!!(t&d),[t]),l=M.useCallback(d=>{r.current&&n(h=>h&~d)},[n,r]),f=M.useCallback(d=>{r.current&&n(h=>h^d)},[n]);return{flags:t,addFlag:i,hasFlag:u,removeFlag:l,toggleFlag:f}}function mj(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function k0(e,...t){e&&t.length>0&&e.classList.add(...t)}function T0(e,...t){e&&t.length>0&&e.classList.remove(...t)}function yj(e,t){let n=ns();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[u,l]=[r,i].map(d=>{let[h=0]=d.split(",").filter(Boolean).map(m=>m.includes("ms")?parseFloat(m):parseFloat(m)*1e3).sort((m,v)=>v-m);return h}),f=u+l;if(f!==0){n.group(h=>{h.setTimeout(()=>{t(),h.dispose()},f),h.addEventListener(e,"transitionrun",m=>{m.target===m.currentTarget&&h.dispose()})});let d=n.addEventListener(e,"transitionend",h=>{h.target===h.currentTarget&&(t(),d())})}else t();return n.add(()=>t()),n.dispose}function _j(e,t,n,r){let i=n?"enter":"leave",u=ns(),l=r!==void 0?mj(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let f=Zr(i,{enter:()=>t.enter,leave:()=>t.leave}),d=Zr(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),h=Zr(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return T0(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),k0(e,...t.base,...f,...h),u.nextFrame(()=>{T0(e,...t.base,...f,...h),k0(e,...t.base,...f,...d),yj(e,()=>(T0(e,...t.base,...f),k0(e,...t.base,...t.entered),l()))}),u.dispose}function wj({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:u}){let l=up(),f=G1(),d=Hu(n);yo(()=>{e&&(d.current="enter")},[e]),yo(()=>{let h=ns();f.add(h.dispose);let m=t.current;if(m&&d.current!=="idle"&&l.current)return h.dispose(),i.current(d.current),h.add(_j(m,r.current,d.current==="enter",()=>{h.dispose(),u.current(d.current)})),h.dispose},[n])}function Ea(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Nv=M.createContext(null);Nv.displayName="TransitionContext";var xj=(e=>(e.Visible="visible",e.Hidden="hidden",e))(xj||{});function bj(){let e=M.useContext(Nv);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function Sj(){let e=M.useContext($v);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let $v=M.createContext(null);$v.displayName="NestingContext";function Dv(e){return"children"in e?Dv(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function n2(e,t){let n=Hu(e),r=M.useRef([]),i=up(),u=G1(),l=Mn((x,A=Ia.Hidden)=>{let R=r.current.findIndex(({el:N})=>N===x);R!==-1&&(Zr(A,{[Ia.Unmount](){r.current.splice(R,1)},[Ia.Hidden](){r.current[R].state="hidden"}}),u.microTask(()=>{var N;!Dv(r)&&i.current&&((N=n.current)==null||N.call(n))}))}),f=Mn(x=>{let A=r.current.find(({el:R})=>R===x);return A?A.state!=="visible"&&(A.state="visible"):r.current.push({el:x,state:"visible"}),()=>l(x,Ia.Unmount)}),d=M.useRef([]),h=M.useRef(Promise.resolve()),m=M.useRef({enter:[],leave:[],idle:[]}),v=Mn((x,A,R)=>{d.current.splice(0),t&&(t.chains.current[A]=t.chains.current[A].filter(([N])=>N!==x)),t==null||t.chains.current[A].push([x,new Promise(N=>{d.current.push(N)})]),t==null||t.chains.current[A].push([x,new Promise(N=>{Promise.all(m.current[A].map(([k,E])=>E)).then(()=>N())})]),A==="enter"?h.current=h.current.then(()=>t==null?void 0:t.wait.current).then(()=>R(A)):R(A)}),_=Mn((x,A,R)=>{Promise.all(m.current[A].splice(0).map(([N,k])=>k)).then(()=>{var N;(N=d.current.shift())==null||N()}).then(()=>R(A))});return M.useMemo(()=>({children:r,register:f,unregister:l,onStart:v,onStop:_,wait:h,chains:m}),[f,l,r,v,_,m,h])}function Ej(){}let kj=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function px(e){var t;let n={};for(let r of kj)n[r]=(t=e[r])!=null?t:Ej;return n}function Tj(e){let t=M.useRef(px(e));return M.useEffect(()=>{t.current=px(e)},[e]),t}let Cj="div",r2=uv.RenderStrategy;function Aj(e,t){var n,r;let{beforeEnter:i,afterEnter:u,beforeLeave:l,afterLeave:f,enter:d,enterFrom:h,enterTo:m,entered:v,leave:_,leaveFrom:x,leaveTo:A,...R}=e,N=M.useRef(null),k=Ko(N,t),E=(n=R.unmount)==null||n?Ia.Unmount:Ia.Hidden,{show:T,appear:P,initial:L}=bj(),[U,G]=M.useState(T?"visible":"hidden"),Z=Sj(),{register:Ee,unregister:K}=Z;M.useEffect(()=>Ee(N),[Ee,N]),M.useEffect(()=>{if(E===Ia.Hidden&&N.current){if(T&&U!=="visible"){G("visible");return}return Zr(U,{hidden:()=>K(N),visible:()=>Ee(N)})}},[U,N,Ee,K,T,E]);let ae=Hu({base:Ea(R.className),enter:Ea(d),enterFrom:Ea(h),enterTo:Ea(m),entered:Ea(v),leave:Ea(_),leaveFrom:Ea(x),leaveTo:Ea(A)}),ne=Tj({beforeEnter:i,afterEnter:u,beforeLeave:l,afterLeave:f}),Ie=Dc();M.useEffect(()=>{if(Ie&&U==="visible"&&N.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[N,U,Ie]);let Re=L&&!P,Fe=P&&T&&L,lt=(()=>!Ie||Re?"idle":T?"enter":"leave")(),Je=vj(0),le=Mn(xe=>Zr(xe,{enter:()=>{Je.addFlag(qi.Opening),ne.current.beforeEnter()},leave:()=>{Je.addFlag(qi.Closing),ne.current.beforeLeave()},idle:()=>{}})),me=Mn(xe=>Zr(xe,{enter:()=>{Je.removeFlag(qi.Opening),ne.current.afterEnter()},leave:()=>{Je.removeFlag(qi.Closing),ne.current.afterLeave()},idle:()=>{}})),Le=n2(()=>{G("hidden"),K(N)},Z);wj({immediate:Fe,container:N,classes:ae,direction:lt,onStart:Hu(xe=>{Le.onStart(N,xe,le)}),onStop:Hu(xe=>{Le.onStop(N,xe,me),xe==="leave"&&!Dv(Le)&&(G("hidden"),K(N))})});let B=R,re={ref:k};return Fe?B={...B,className:ov(R.className,...ae.current.enter,...ae.current.enterFrom)}:(B.className=ov(R.className,(r=N.current)==null?void 0:r.className),B.className===""&&delete B.className),zt.createElement($v.Provider,{value:Le},zt.createElement(nI,{value:Zr(U,{visible:qi.Open,hidden:qi.Closed})|Je.flags},_o({ourProps:re,theirProps:B,defaultTag:Cj,features:r2,visible:U==="visible",name:"Transition.Child"})))}function Oj(e,t){let{show:n,appear:r=!1,unmount:i=!0,...u}=e,l=M.useRef(null),f=Ko(l,t);Dc();let d=K1();if(n===void 0&&d!==null&&(n=(d&qi.Open)===qi.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[h,m]=M.useState(n?"visible":"hidden"),v=n2(()=>{m("hidden")}),[_,x]=M.useState(!0),A=M.useRef([n]);yo(()=>{_!==!1&&A.current[A.current.length-1]!==n&&(A.current.push(n),x(!1))},[A,n]);let R=M.useMemo(()=>({show:n,appear:r,initial:_}),[n,r,_]);M.useEffect(()=>{if(n)m("visible");else if(!Dv(v))m("hidden");else{let T=l.current;if(!T)return;let P=T.getBoundingClientRect();P.x===0&&P.y===0&&P.width===0&&P.height===0&&m("hidden")}},[n,v]);let N={unmount:i},k=Mn(()=>{var T;_&&x(!1),(T=e.beforeEnter)==null||T.call(e)}),E=Mn(()=>{var T;_&&x(!1),(T=e.beforeLeave)==null||T.call(e)});return zt.createElement($v.Provider,{value:v},zt.createElement(Nv.Provider,{value:R},_o({ourProps:{...N,as:M.Fragment,children:zt.createElement(i2,{ref:f,...N,...u,beforeEnter:k,beforeLeave:E})},theirProps:{},defaultTag:M.Fragment,features:r2,visible:h==="visible",name:"Transition"})))}function Rj(e,t){let n=M.useContext(Nv)!==null,r=K1()!==null;return zt.createElement(zt.Fragment,null,!n&&r?zt.createElement(Ny,{ref:t,...e}):zt.createElement(i2,{ref:t,...e}))}let Ny=Xi(Oj),i2=Xi(Aj),Pj=Xi(Rj),gg=Object.assign(Ny,{Child:Pj,Root:Ny});function Ij(e){return Y.jsxs(Y.Fragment,{children:[Y.jsx(gg.Root,{show:e.sidebarOpen,as:M.Fragment,children:Y.jsxs(dx,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[Y.jsx(gg.Child,{as:M.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Y.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),Y.jsx("div",{className:"fixed inset-0 flex",children:Y.jsx(gg.Child,{as:M.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:Y.jsxs(dx.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[Y.jsx(gg.Child,{as:M.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Y.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:Y.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[Y.jsx("span",{className:"sr-only",children:"Close sidebar"}),Y.jsx(wR,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),Y.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:Y.jsx("nav",{className:"flex flex-1 flex-col",children:Y.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:Y.jsx("li",{children:e.sidebar})})})})]})})})]})}),Y.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:Y.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:Y.jsx("nav",{className:"flex flex-1 flex-col",children:Y.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:Y.jsx("li",{children:e.sidebar})})})})}),Y.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[Y.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[Y.jsx("span",{className:"sr-only",children:"Open sidebar"}),Y.jsx(K3,{className:"h-6 w-6","aria-hidden":"true"})]}),Y.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?Y.jsxs(Y.Fragment,{children:["OpenGPTs: ",Y.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),Y.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),Y.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:Y.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function hx(e){var t;return Y.jsx("li",{children:Y.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:Qr(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[Y.jsx("span",{className:Qr(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),Y.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function jj(e){var t,n;return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{onClick:()=>e.enterConfig(null),className:Qr(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[Y.jsx("span",{className:Qr(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:Y.jsx(xE,{className:"h-4 w-4"})}),Y.jsx("span",{className:"truncate",children:"New Bot"})]}),Y.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),Y.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>Y.jsx(hx,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??Y.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),Y.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),Y.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>Y.jsx(hx,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??Y.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var o2={exports:{}},Lj="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Nj=Lj,$j=Nj;function u2(){}function a2(){}a2.resetWarningCache=u2;var Dj=function(){function e(r,i,u,l,f,d){if(d!==$j){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a2,resetWarningCache:u2};return n.PropTypes=n,n};o2.exports=Dj();var Mj=o2.exports;const Sn=Ky(Mj);function Fc(e,t,n,r){function i(u){return u instanceof n?u:new n(function(l){l(u)})}return new(n||(n=Promise))(function(u,l){function f(m){try{h(r.next(m))}catch(v){l(v)}}function d(m){try{h(r.throw(m))}catch(v){l(v)}}function h(m){m.done?u(m.value):i(m.value).then(f,d)}h((r=r.apply(e,t||[])).next())})}function zc(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,l;return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(h){return function(m){return d([h,m])}}function d(h){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,h[0]&&(n=0)),n;)try{if(r=1,i&&(u=h[0]&2?i.return:h[0]?i.throw||((u=i.return)&&u.call(i),0):i.next)&&!(u=u.call(i,h[1])).done)return u;switch(i=0,u&&(h=[h[0]&2,u.value]),h[0]){case 0:case 1:u=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,i=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!u||h[1]>u[0]&&h[1]0)&&!(i=r.next()).done;)u.push(i.value)}catch(f){l={error:f}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return u}function vx(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,u;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function zj(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=Fj.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var Uj=[".DS_Store","Thumbs.db"];function Bj(e){return Fc(this,void 0,void 0,function(){return zc(this,function(t){return sv(e)&&Hj(e.dataTransfer)?[2,Kj(e.dataTransfer,e.type)]:Wj(e)?[2,Gj(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,qj(e)]:[2,[]]})})}function Hj(e){return sv(e)}function Wj(e){return sv(e)&&sv(e.target)}function sv(e){return typeof e=="object"&&e!==null}function Gj(e){return $y(e.target.files).map(function(t){return lp(t)})}function qj(e){return Fc(this,void 0,void 0,function(){var t;return zc(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return lp(r)})]}})})}function Kj(e,t){return Fc(this,void 0,void 0,function(){var n,r;return zc(this,function(i){switch(i.label){case 0:return e.items?(n=$y(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Vj))]):[3,2];case 1:return r=i.sent(),[2,mx(l2(r))];case 2:return[2,mx($y(e.files).map(function(u){return lp(u)}))]}})})}function mx(e){return e.filter(function(t){return Uj.indexOf(t.name)===-1})}function $y(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,bx(n)];if(e.sizen)return[!1,bx(n)]}return[!0,null]}function Ml(e){return e!=null}function cL(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,u=e.multiple,l=e.maxFiles,f=e.validator;return!u&&t.length>1||u&&l>=1&&t.length>l?!1:t.every(function(d){var h=d2(d,n),m=Xd(h,1),v=m[0],_=p2(d,r,i),x=Xd(_,1),A=x[0],R=f?f(d):null;return v&&A&&!R})}function cv(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function vg(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ex(e){e.preventDefault()}function fL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function dL(e){return e.indexOf("Edge/")!==-1}function pL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return fL(e)||dL(e)}function lu(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RL(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,u;for(u=0;u=0)&&(n[i]=e[i]);return n}var Q1=M.forwardRef(function(e,t){var n=e.children,r=fv(e,_L),i=y2(r),u=i.open,l=fv(i,wL);return M.useImperativeHandle(t,function(){return{open:u}},[u]),zt.createElement(M.Fragment,null,n(Un(Un({},l),{},{open:u})))});Q1.displayName="Dropzone";var m2={disabled:!1,getFilesFromEvent:Bj,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Q1.defaultProps=m2;Q1.propTypes={children:Sn.func,accept:Sn.objectOf(Sn.arrayOf(Sn.string)),multiple:Sn.bool,preventDropOnDocument:Sn.bool,noClick:Sn.bool,noKeyboard:Sn.bool,noDrag:Sn.bool,noDragEventsBubbling:Sn.bool,minSize:Sn.number,maxSize:Sn.number,maxFiles:Sn.number,disabled:Sn.bool,getFilesFromEvent:Sn.func,onFileDialogCancel:Sn.func,onFileDialogOpen:Sn.func,useFsAccessApi:Sn.bool,autoFocus:Sn.bool,onDragEnter:Sn.func,onDragLeave:Sn.func,onDragOver:Sn.func,onDrop:Sn.func,onDropAccepted:Sn.func,onDropRejected:Sn.func,onError:Sn.func,validator:Sn.func};var zy={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function y2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Un(Un({},m2),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,u=t.maxSize,l=t.minSize,f=t.multiple,d=t.maxFiles,h=t.onDragEnter,m=t.onDragLeave,v=t.onDragOver,_=t.onDrop,x=t.onDropAccepted,A=t.onDropRejected,R=t.onFileDialogCancel,N=t.onFileDialogOpen,k=t.useFsAccessApi,E=t.autoFocus,T=t.preventDropOnDocument,P=t.noClick,L=t.noKeyboard,U=t.noDrag,G=t.noDragEventsBubbling,Z=t.onError,Ee=t.validator,K=M.useMemo(function(){return vL(n)},[n]),ae=M.useMemo(function(){return gL(n)},[n]),ne=M.useMemo(function(){return typeof N=="function"?N:Tx},[N]),Ie=M.useMemo(function(){return typeof R=="function"?R:Tx},[R]),Re=M.useRef(null),Fe=M.useRef(null),lt=M.useReducer(PL,zy),Je=C0(lt,2),le=Je[0],me=Je[1],Le=le.isFocused,B=le.isFileDialogActive,re=M.useRef(typeof window<"u"&&window.isSecureContext&&k&&hL()),xe=function(){!re.current&&B&&setTimeout(function(){if(Fe.current){var Ge=Fe.current.files;Ge.length||(me({type:"closeDialog"}),Ie())}},300)};M.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[Fe,B,Ie,re]);var pe=M.useRef([]),we=function(Ge){Re.current&&Re.current.contains(Ge.target)||(Ge.preventDefault(),pe.current=[])};M.useEffect(function(){return T&&(document.addEventListener("dragover",Ex,!1),document.addEventListener("drop",we,!1)),function(){T&&(document.removeEventListener("dragover",Ex),document.removeEventListener("drop",we))}},[Re,T]),M.useEffect(function(){return!r&&E&&Re.current&&Re.current.focus(),function(){}},[Re,E,r]);var ye=M.useCallback(function(Te){Z?Z(Te):console.error(Te)},[Z]),ze=M.useCallback(function(Te){Te.preventDefault(),Te.persist(),Ut(Te),pe.current=[].concat(SL(pe.current),[Te.target]),vg(Te)&&Promise.resolve(i(Te)).then(function(Ge){if(!(cv(Te)&&!G)){var Vt=Ge.length,nn=Vt>0&&cL({files:Ge,accept:K,minSize:l,maxSize:u,multiple:f,maxFiles:d,validator:Ee}),ln=Vt>0&&!nn;me({isDragAccept:nn,isDragReject:ln,isDragActive:!0,type:"setDraggedFiles"}),h&&h(Te)}}).catch(function(Ge){return ye(Ge)})},[i,h,ye,G,K,l,u,f,d,Ee]),Qe=M.useCallback(function(Te){Te.preventDefault(),Te.persist(),Ut(Te);var Ge=vg(Te);if(Ge&&Te.dataTransfer)try{Te.dataTransfer.dropEffect="copy"}catch{}return Ge&&v&&v(Te),!1},[v,G]),tt=M.useCallback(function(Te){Te.preventDefault(),Te.persist(),Ut(Te);var Ge=pe.current.filter(function(nn){return Re.current&&Re.current.contains(nn)}),Vt=Ge.indexOf(Te.target);Vt!==-1&&Ge.splice(Vt,1),pe.current=Ge,!(Ge.length>0)&&(me({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),vg(Te)&&m&&m(Te))},[Re,m,G]),_t=M.useCallback(function(Te,Ge){var Vt=[],nn=[];Te.forEach(function(ln){var fr=d2(ln,K),Gn=C0(fr,2),qn=Gn[0],dr=Gn[1],Tr=p2(ln,l,u),$=C0(Tr,2),z=$[0],q=$[1],ue=Ee?Ee(ln):null;if(qn&&z&&!ue)Vt.push(ln);else{var ie=[dr,q];ue&&(ie=ie.concat(ue)),nn.push({file:ln,errors:ie.filter(function(Ae){return Ae})})}}),(!f&&Vt.length>1||f&&d>=1&&Vt.length>d)&&(Vt.forEach(function(ln){nn.push({file:ln,errors:[sL]})}),Vt.splice(0)),me({acceptedFiles:Vt,fileRejections:nn,type:"setFiles"}),_&&_(Vt,nn,Ge),nn.length>0&&A&&A(nn,Ge),Vt.length>0&&x&&x(Vt,Ge)},[me,f,K,l,u,d,_,x,A,Ee]),it=M.useCallback(function(Te){Te.preventDefault(),Te.persist(),Ut(Te),pe.current=[],vg(Te)&&Promise.resolve(i(Te)).then(function(Ge){cv(Te)&&!G||_t(Ge,Te)}).catch(function(Ge){return ye(Ge)}),me({type:"reset"})},[i,_t,ye,G]),Ne=M.useCallback(function(){if(re.current){me({type:"openDialog"}),ne();var Te={multiple:f,types:ae};window.showOpenFilePicker(Te).then(function(Ge){return i(Ge)}).then(function(Ge){_t(Ge,null),me({type:"closeDialog"})}).catch(function(Ge){mL(Ge)?(Ie(Ge),me({type:"closeDialog"})):yL(Ge)?(re.current=!1,Fe.current?(Fe.current.value=null,Fe.current.click()):ye(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):ye(Ge)});return}Fe.current&&(me({type:"openDialog"}),ne(),Fe.current.value=null,Fe.current.click())},[me,ne,Ie,k,_t,ye,ae,f]),wt=M.useCallback(function(Te){!Re.current||!Re.current.isEqualNode(Te.target)||(Te.key===" "||Te.key==="Enter"||Te.keyCode===32||Te.keyCode===13)&&(Te.preventDefault(),Ne())},[Re,Ne]),gt=M.useCallback(function(){me({type:"focus"})},[]),et=M.useCallback(function(){me({type:"blur"})},[]),Et=M.useCallback(function(){P||(pL()?setTimeout(Ne,0):Ne())},[P,Ne]),kt=function(Ge){return r?null:Ge},_n=function(Ge){return L?null:kt(Ge)},gn=function(Ge){return U?null:kt(Ge)},Ut=function(Ge){G&&Ge.stopPropagation()},jt=M.useMemo(function(){return function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ge=Te.refKey,Vt=Ge===void 0?"ref":Ge,nn=Te.role,ln=Te.onKeyDown,fr=Te.onFocus,Gn=Te.onBlur,qn=Te.onClick,dr=Te.onDragEnter,Tr=Te.onDragOver,$=Te.onDragLeave,z=Te.onDrop,q=fv(Te,xL);return Un(Un(Fy({onKeyDown:_n(lu(ln,wt)),onFocus:_n(lu(fr,gt)),onBlur:_n(lu(Gn,et)),onClick:kt(lu(qn,Et)),onDragEnter:gn(lu(dr,ze)),onDragOver:gn(lu(Tr,Qe)),onDragLeave:gn(lu($,tt)),onDrop:gn(lu(z,it)),role:typeof nn=="string"&&nn!==""?nn:"presentation"},Vt,Re),!r&&!L?{tabIndex:0}:{}),q)}},[Re,wt,gt,et,Et,ze,Qe,tt,it,L,U,r]),Ze=M.useCallback(function(Te){Te.stopPropagation()},[]),vn=M.useMemo(function(){return function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ge=Te.refKey,Vt=Ge===void 0?"ref":Ge,nn=Te.onChange,ln=Te.onClick,fr=fv(Te,bL),Gn=Fy({accept:K,multiple:f,type:"file",style:{display:"none"},onChange:kt(lu(nn,it)),onClick:kt(lu(ln,Ze)),tabIndex:-1},Vt,Fe);return Un(Un({},Gn),fr)}},[Fe,n,f,it,r]);return Un(Un({},le),{},{isFocused:Le&&!r,getRootProps:jt,getInputProps:vn,rootRef:Re,inputRef:Fe,open:kt(Ne)})}function PL(e,t){switch(t.type){case"focus":return Un(Un({},e),{},{isFocused:!0});case"blur":return Un(Un({},e),{},{isFocused:!1});case"openDialog":return Un(Un({},zy),{},{isFileDialogActive:!0});case"closeDialog":return Un(Un({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Un(Un({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Un(Un({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Un({},zy);default:return e}}function Tx(){}var dv={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */dv.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",f="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",v=1,_=2,x=4,A=1,R=2,N=1,k=2,E=4,T=8,P=16,L=32,U=64,G=128,Z=256,Ee=512,K=30,ae="...",ne=800,Ie=16,Re=1,Fe=2,lt=3,Je=1/0,le=9007199254740991,me=17976931348623157e292,Le=0/0,B=4294967295,re=B-1,xe=B>>>1,pe=[["ary",G],["bind",N],["bindKey",k],["curry",T],["curryRight",P],["flip",Ee],["partial",L],["partialRight",U],["rearg",Z]],we="[object Arguments]",ye="[object Array]",ze="[object AsyncFunction]",Qe="[object Boolean]",tt="[object Date]",_t="[object DOMException]",it="[object Error]",Ne="[object Function]",wt="[object GeneratorFunction]",gt="[object Map]",et="[object Number]",Et="[object Null]",kt="[object Object]",_n="[object Promise]",gn="[object Proxy]",Ut="[object RegExp]",jt="[object Set]",Ze="[object String]",vn="[object Symbol]",Te="[object Undefined]",Ge="[object WeakMap]",Vt="[object WeakSet]",nn="[object ArrayBuffer]",ln="[object DataView]",fr="[object Float32Array]",Gn="[object Float64Array]",qn="[object Int8Array]",dr="[object Int16Array]",Tr="[object Int32Array]",$="[object Uint8Array]",z="[object Uint8ClampedArray]",q="[object Uint16Array]",ue="[object Uint32Array]",ie=/\b__p \+= '';/g,Ae=/\b(__p \+=) '' \+/g,$e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ft=/&(?:amp|lt|gt|quot|#39);/g,Bt=/[&<>"']/g,nt=RegExp(ft.source),qt=RegExp(Bt.source),Ht=/<%-([\s\S]+?)%>/g,En=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,An=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,sn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lr=/[\\^$.*+?()[\]{}|]/g,$r=RegExp(lr.source),Dr=/^\s+/,Jr=/\s/,pr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jn=/\{\n\/\* \[wrapped with (.+)\] \*/,Ji=/,? & /,pi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vu=/[()=,{}\[\]\/\s]/,Yt=/\\(\\)?/g,Zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ue=/\w*$/,Q=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,Me=/^\[object .+?Constructor\]$/,Xt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,Kn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wn=/($^)/,eo=/['\n\r\u2028\u2029\\]/g,hi="\\ud800-\\udfff",cn="\\u0300-\\u036f",qa="\\ufe20-\\ufe2f",Ka="\\u20d0-\\u20ff",Kc=cn+qa+Ka,Vc="\\u2700-\\u27bf",Yc="a-z\\xdf-\\xf6\\xf8-\\xff",fp="\\xac\\xb1\\xd7\\xf7",ei="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qv="\\u2000-\\u206f",gi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dp="A-Z\\xc0-\\xd6\\xd8-\\xde",Qc="\\ufe0e\\ufe0f",wo=fp+ei+qv+gi,Qu="['’]",Zc="["+hi+"]",kn="["+wo+"]",Oi="["+Kc+"]",rs="\\d+",Kv="["+Vc+"]",is="["+Yc+"]",pp="[^"+hi+wo+rs+Vc+Yc+dp+"]",os="\\ud83c[\\udffb-\\udfff]",us="(?:"+Oi+"|"+os+")",mu="[^"+hi+"]",Xc="(?:\\ud83c[\\udde6-\\uddff]){2}",as="[\\ud800-\\udbff][\\udc00-\\udfff]",yu="["+dp+"]",ls="\\u200d",ss="(?:"+is+"|"+pp+")",hp="(?:"+yu+"|"+pp+")",cs="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",fs="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Mr=us+"?",ds="["+Qc+"]?",Va="(?:"+ls+"(?:"+[mu,Xc,as].join("|")+")"+ds+Mr+")*",gp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mp=ds+Mr+Va,Vv="(?:"+[Kv,Xc,as].join("|")+")"+mp,Yv="(?:"+[mu+Oi+"?",Oi,Xc,as,Zc].join("|")+")",Qv=RegExp(Qu,"g"),Zu=RegExp(Oi,"g"),Ya=RegExp(os+"(?="+os+")|"+Yv+mp,"g"),yp=RegExp([yu+"?"+is+"+"+cs+"(?="+[kn,yu,"$"].join("|")+")",hp+"+"+fs+"(?="+[kn,yu+ss,"$"].join("|")+")",yu+"?"+ss+"+"+cs,yu+"+"+fs,vp,gp,rs,Vv].join("|"),"g"),Vo=RegExp("["+ls+hi+Kc+Qc+"]"),ps=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xu=-1,Dt={};Dt[fr]=Dt[Gn]=Dt[qn]=Dt[dr]=Dt[Tr]=Dt[$]=Dt[z]=Dt[q]=Dt[ue]=!0,Dt[we]=Dt[ye]=Dt[nn]=Dt[Qe]=Dt[ln]=Dt[tt]=Dt[it]=Dt[Ne]=Dt[gt]=Dt[et]=Dt[kt]=Dt[Ut]=Dt[jt]=Dt[Ze]=Dt[Ge]=!1;var mn={};mn[we]=mn[ye]=mn[nn]=mn[ln]=mn[Qe]=mn[tt]=mn[fr]=mn[Gn]=mn[qn]=mn[dr]=mn[Tr]=mn[gt]=mn[et]=mn[kt]=mn[Ut]=mn[jt]=mn[Ze]=mn[vn]=mn[$]=mn[z]=mn[q]=mn[ue]=!0,mn[it]=mn[Ne]=mn[Ge]=!1;var Yo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ee={"&":"&","<":"<",">":">",'"':""","'":"'"},ge={"&":"&","<":"<",">":">",""":'"',"'":"'"},he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Oe=parseFloat,mt=parseInt,Wt=typeof Mu=="object"&&Mu&&Mu.Object===Object&&Mu,tr=typeof self=="object"&&self&&self.Object===Object&&self,yn=Wt||tr||Function("return this")(),fn=t&&!t.nodeType&&t,xo=fn&&!0&&e&&!e.nodeType&&e,_p=xo&&xo.exports===fn,Fr=_p&&Wt.process,Cr=function(){try{var V=xo&&xo.require&&xo.require("util").types;return V||Fr&&Fr.binding&&Fr.binding("util")}catch{}}(),wp=Cr&&Cr.isArrayBuffer,_u=Cr&&Cr.isDate,Qa=Cr&&Cr.isMap,Za=Cr&&Cr.isRegExp,tn=Cr&&Cr.isSet,xp=Cr&&Cr.isTypedArray;function zr(V,oe,te){switch(te.length){case 0:return V.call(oe);case 1:return V.call(oe,te[0]);case 2:return V.call(oe,te[0],te[1]);case 3:return V.call(oe,te[0],te[1],te[2])}return V.apply(oe,te)}function hs(V,oe,te,De){for(var vt=-1,Mt=V==null?0:V.length;++vt-1}function Ju(V,oe,te){for(var De=-1,vt=V==null?0:V.length;++De-1;);return te}function na(V,oe){for(var te=V.length;te--&&ta(oe,V[te],0)>-1;);return te}function nf(V,oe){for(var te=V.length,De=0;te--;)V[te]===oe&&++De;return De}var ra=Jc(Yo),il=Jc(ee);function ol(V){return"\\"+he[V]}function _s(V,oe){return V==null?n:V[oe]}function ji(V){return Vo.test(V)}function tm(V){return ps.test(V)}function nm(V){for(var oe,te=[];!(oe=V.next()).done;)te.push(oe.value);return te}function rf(V){var oe=-1,te=Array(V.size);return V.forEach(function(De,vt){te[++oe]=[vt,De]}),te}function Tp(V,oe){return function(te){return V(oe(te))}}function Qo(V,oe){for(var te=-1,De=V.length,vt=0,Mt=[];++te-1}function Hp(o,s){var p=this.__data__,y=bl(p,o);return y<0?(++this.size,p.push([o,s])):p[y][1]=s,this}no.prototype.clear=pf,no.prototype.delete=zp,no.prototype.get=Up,no.prototype.has=Bp,no.prototype.set=Hp;function Nn(o){var s=-1,p=o==null?0:o.length;for(this.clear();++s=s?o:s)),o}function Hr(o,s,p,y,S,I){var D,H=s&v,X=s&_,fe=s&x;if(p&&(D=S?p(o,y,S,I):p(o)),D!==n)return D;if(!zn(o))return o;var de=St(o);if(de){if(D=ma(o),!H)return Yn(o,D)}else{var _e=br(o),Pe=_e==Ne||_e==wt;if(wa(o))return gh(o,H);if(_e==kt||_e==we||Pe&&!S){if(D=X||Pe?{}:Eh(o),!H)return X?Gr(o,Yp(D,o)):vm(o,vf(D,o))}else{if(!mn[_e])return S?o:{};D=kh(o,_e,H)}}I||(I=new _i);var Ye=I.get(o);if(Ye)return Ye;I.set(o,D),b_(o)?o.forEach(function(ht){D.add(Hr(ht,s,p,ht,o,I))}):w_(o)&&o.forEach(function(ht,Ft){D.set(Ft,Hr(ht,s,p,Ft,o,I))});var pt=fe?X?Gf:Wf:X?bi:Sr,Rt=de?n:pt(o);return vi(Rt||o,function(ht,Ft){Rt&&(Ft=ht,ht=o[Ft]),xl(D,Ft,Hr(ht,s,p,Ft,o,I))}),D}function mf(o){var s=Sr(o);return function(p){return Os(p,o,s)}}function Os(o,s,p){var y=p.length;if(o==null)return!y;for(o=dn(o);y--;){var S=p[y],I=s[S],D=o[S];if(D===n&&!(S in o)||!I(D))return!1}return!0}function Sl(o,s,p){if(typeof o!="function")throw new Br(l);return Pl(function(){o.apply(n,p)},s)}function io(o,s,p,y){var S=-1,I=Pi,D=!0,H=o.length,X=[],fe=s.length;if(!H)return X;p&&(s=xn(s,ti(p))),y?(I=Ju,D=!1):s.length>=i&&(I=rl,D=!1,s=new nu(s));e:for(;++SS?0:S+p),y=y===n||y>S?S:Ot(y),y<0&&(y+=S),y=p>y?0:E_(y);p0&&p(H)?s>1?Qt(H,s-1,p,y,S):Ii(S,H):y||(S[S.length]=H)}return S}var Rs=Bs(),xf=Bs(!0);function uo(o,s){return o&&Rs(o,s,Sr)}function Ni(o,s){return o&&xf(o,s,Sr)}function sr(o,s){return Ri(s,function(p){return ju(o[p])})}function Ro(o,s){s=ao(s,o);for(var p=0,y=s.length;o!=null&&ps}function Qp(o,s){return o!=null&&Nt.call(o,s)}function Zp(o,s){return o!=null&&s in dn(o)}function Xp(o,s,p){return o>=nr(s,p)&&o=120&&de.length>=120)?new nu(D&&de):n}de=o[0];var _e=-1,Pe=H[0];e:for(;++_e-1;)H!==o&&oa.call(H,X,1),oa.call(o,X,1);return o}function ah(o,s){for(var p=o?s.length:0,y=p-1;p--;){var S=s[p];if(p==y||S!==I){var I=S;No(S)?oa.call(o,S,1):jf(o,S)}}return o}function Of(o,s){return o+pl(lf()*(s-o+1))}function Rf(o,s,p,y){for(var S=-1,I=Vn(dl((s-o)/(p||1)),0),D=te(I);I--;)D[y?I:++S]=o,o+=p;return D}function Ds(o,s){var p="";if(!o||s<1||s>le)return p;do s%2&&(p+=o),s=pl(s/2),s&&(o+=o);while(s);return p}function Ct(o,s){return Xf(Oh(o,s,Si),o+"")}function fm(o){return gf(ic(o))}function dm(o,s){var p=ic(o);return Ys(p,Ar(s,0,p.length))}function Tl(o,s,p,y){if(!zn(o))return o;s=ao(s,o);for(var S=-1,I=s.length,D=I-1,H=o;H!=null&&++SS?0:S+s),p=p>S?S:p,p<0&&(p+=S),S=s>p?0:p-s>>>0,s>>>=0;for(var I=te(S);++y>>1,D=o[I];D!==null&&!zi(D)&&(p?D<=s:D=i){var fe=s?null:bt(o);if(fe)return xu(fe);D=!1,S=rl,X=new nu}else X=s?[]:H;e:for(;++y=y?o:Rr(o,s,p)}var hh=Ip||function(o){return yn.clearTimeout(o)};function gh(o,s){if(s)return o.slice();var p=o.length,y=sl?sl(p):new o.constructor(p);return o.copy(y),y}function da(o){var s=new o.constructor(o.byteLength);return new ia(s).set(new ia(o)),s}function Us(o,s){var p=s?da(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.byteLength)}function gm(o){var s=new o.constructor(o.source,Ue.exec(o));return s.lastIndex=o.lastIndex,s}function Nf(o){return aa?dn(aa.call(o)):{}}function $f(o,s){var p=s?da(o.buffer):o.buffer;return new o.constructor(p,o.byteOffset,o.length)}function vh(o,s){if(o!==s){var p=o!==n,y=o===null,S=o===o,I=zi(o),D=s!==n,H=s===null,X=s===s,fe=zi(s);if(!H&&!fe&&!I&&o>s||I&&D&&X&&!H&&!fe||y&&D&&X||!p&&X||!S)return 1;if(!y&&!I&&!fe&&o=H)return X;var fe=p[y];return X*(fe=="desc"?-1:1)}}return o.index-s.index}function mh(o,s,p,y){for(var S=-1,I=o.length,D=p.length,H=-1,X=s.length,fe=Vn(I-D,0),de=te(X+fe),_e=!y;++H1?p[S-1]:n,D=S>2?p[2]:n;for(I=o.length>3&&typeof I=="function"?(S--,I):n,D&&Pr(p[0],p[1],D)&&(I=S<3?n:I,S=1),s=dn(s);++y-1?S[I?s[D]:D]:n}}function Ff(o){return Lo(function(s){var p=s.length,y=p,S=ii.prototype.thru;for(o&&s.reverse();y--;){var I=s[y];if(typeof I!="function")throw new Br(l);if(S&&!D&&ga(I)=="wrapper")var D=new ii([],!0)}for(y=D?y:p;++y1&&Kt.reverse(),de&&XH))return!1;var fe=I.get(o),de=I.get(s);if(fe&&de)return fe==s&&de==o;var _e=-1,Pe=!0,Ye=p&R?new nu:n;for(I.set(o,s),I.set(s,o);++_e1?"& ":"")+s[y],s=s.join(p>2?", ":" "),o.replace(pr,`{ -/* [wrapped with `+s+`] */ -`)}function wm(o){return St(o)||jl(o)||!!(Pp&&o&&o[Pp])}function No(o,s){var p=typeof o;return s=s??le,!!s&&(p=="number"||p!="symbol"&&xt.test(o))&&o>-1&&o%1==0&&o0){if(++s>=ne)return arguments[0]}else s=0;return o.apply(n,arguments)}}function Ys(o,s){var p=-1,y=o.length,S=y-1;for(s=s===n?y:s;++p1?o[s-1]:n;return p=typeof p=="function"?(o.pop(),p):n,l_(o,p)});function s_(o){var s=C(o);return s.__chain__=!0,s}function uk(o,s){return s(o),o}function $h(o,s){return s(o)}var ak=Lo(function(o){var s=o.length,p=s?o[0]:0,y=this.__wrapped__,S=function(I){return As(I,o)};return s>1||this.__actions__.length||!(y instanceof Tt)||!No(p)?this.thru(S):(y=y.slice(p,+p+(s?1:0)),y.__actions__.push({func:$h,args:[S],thisArg:n}),new ii(y,this.__chain__).thru(function(I){return s&&!I.length&&I.push(n),I}))});function lk(){return s_(this)}function sk(){return new ii(this.value(),this.__chain__)}function ck(){this.__values__===n&&(this.__values__=S_(this.value()));var o=this.__index__>=this.__values__.length,s=o?n:this.__values__[this.__index__++];return{done:o,value:s}}function fk(){return this}function dk(o){for(var s,p=this;p instanceof la;){var y=jh(p);y.__index__=0,y.__values__=n,s?S.__wrapped__=y:s=y;var S=y;p=p.__wrapped__}return S.__wrapped__=o,s}function pk(){var o=this.__wrapped__;if(o instanceof Tt){var s=o;return this.__actions__.length&&(s=new Tt(this)),s=s.reverse(),s.__actions__.push({func:$h,args:[Fi],thisArg:n}),new ii(s,this.__chain__)}return this.thru(Fi)}function hk(){return dh(this.__wrapped__,this.__actions__)}var gk=Tn(function(o,s,p){Nt.call(o,p)?++o[p]:Oo(o,p,1)});function vk(o,s,p){var y=St(o)?bp:yf;return p&&Pr(o,s,p)&&(s=n),y(o,ut(s,3))}function mk(o,s){var p=St(o)?Ri:wf;return p(o,ut(s,3))}var yk=Mf(F),_k=Mf(W);function wk(o,s){return Qt(Dh(o,s),1)}function xk(o,s){return Qt(Dh(o,s),Je)}function bk(o,s,p){return p=p===n?1:Ot(p),Qt(Dh(o,s),p)}function c_(o,s){var p=St(o)?vi:Ve;return p(o,ut(s,3))}function f_(o,s){var p=St(o)?Xv:El;return p(o,ut(s,3))}var Sk=Tn(function(o,s,p){Nt.call(o,p)?o[p].push(s):Oo(o,p,[s])});function Ek(o,s,p,y){o=xi(o)?o:ic(o),p=p&&!y?Ot(p):0;var S=o.length;return p<0&&(p=Vn(S+p,0)),Bh(o)?p<=S&&o.indexOf(s,p)>-1:!!S&&ta(o,s,p)>-1}var kk=Ct(function(o,s,p){var y=-1,S=typeof s=="function",I=xi(o)?te(o.length):[];return Ve(o,function(D){I[++y]=S?zr(s,D,p):Ou(D,s,p)}),I}),Tk=Tn(function(o,s,p){Oo(o,p,s)});function Dh(o,s){var p=St(o)?xn:kf;return p(o,ut(s,3))}function Ck(o,s,p,y){return o==null?[]:(St(s)||(s=s==null?[]:[s]),p=y?n:p,St(p)||(p=p==null?[]:[p]),ih(o,s,p))}var Ak=Tn(function(o,s,p){o[p?0:1].push(s)},function(){return[[],[]]});function Ok(o,s,p){var y=St(o)?gs:ef,S=arguments.length<3;return y(o,ut(s,4),p,S,Ve)}function Rk(o,s,p){var y=St(o)?Sp:ef,S=arguments.length<3;return y(o,ut(s,4),p,S,El)}function Pk(o,s){var p=St(o)?Ri:wf;return p(o,zh(ut(s,3)))}function Ik(o){var s=St(o)?gf:fm;return s(o)}function jk(o,s,p){(p?Pr(o,s,p):s===n)?s=1:s=Ot(s);var y=St(o)?Cs:dm;return y(o,s)}function Lk(o){var s=St(o)?Vp:sh;return s(o)}function Nk(o){if(o==null)return 0;if(xi(o))return Bh(o)?Li(o):o.length;var s=br(o);return s==gt||s==jt?o.size:Ef(o).length}function $k(o,s,p){var y=St(o)?ea:hm;return p&&Pr(o,s,p)&&(s=n),y(o,ut(s,3))}var Dk=Ct(function(o,s){if(o==null)return[];var p=s.length;return p>1&&Pr(o,s[0],s[1])?s=[]:p>2&&Pr(s[0],s[1],s[2])&&(s=[s[0]]),ih(o,Qt(s,1),[])}),Mh=fl||function(){return yn.Date.now()};function Mk(o,s){if(typeof s!="function")throw new Br(l);return o=Ot(o),function(){if(--o<1)return s.apply(this,arguments)}}function d_(o,s,p){return s=p?n:s,s=o&&s==null?o.length:s,Qn(o,G,n,n,n,n,s)}function p_(o,s){var p;if(typeof s!="function")throw new Br(l);return o=Ot(o),function(){return--o>0&&(p=s.apply(this,arguments)),o<=1&&(s=n),p}}var Rm=Ct(function(o,s,p){var y=N;if(p.length){var S=Qo(p,va(Rm));y|=L}return Qn(o,y,s,p,S)}),h_=Ct(function(o,s,p){var y=N|k;if(p.length){var S=Qo(p,va(h_));y|=L}return Qn(s,y,o,p,S)});function g_(o,s,p){s=p?n:s;var y=Qn(o,T,n,n,n,n,n,s);return y.placeholder=g_.placeholder,y}function v_(o,s,p){s=p?n:s;var y=Qn(o,P,n,n,n,n,n,s);return y.placeholder=v_.placeholder,y}function m_(o,s,p){var y,S,I,D,H,X,fe=0,de=!1,_e=!1,Pe=!0;if(typeof o!="function")throw new Br(l);s=so(s)||0,zn(p)&&(de=!!p.leading,_e="maxWait"in p,I=_e?Vn(so(p.maxWait)||0,s):I,Pe="trailing"in p?!!p.trailing:Pe);function Ye(ur){var Do=y,Nu=S;return y=S=n,fe=ur,D=o.apply(Nu,Do),D}function pt(ur){return fe=ur,H=Pl(Ft,s),de?Ye(ur):D}function Rt(ur){var Do=ur-X,Nu=ur-fe,$_=s-Do;return _e?nr($_,I-Nu):$_}function ht(ur){var Do=ur-X,Nu=ur-fe;return X===n||Do>=s||Do<0||_e&&Nu>=I}function Ft(){var ur=Mh();if(ht(ur))return Kt(ur);H=Pl(Ft,Rt(ur))}function Kt(ur){return H=n,Pe&&y?Ye(ur):(y=S=n,D)}function Ui(){H!==n&&hh(H),fe=0,y=X=S=H=n}function ai(){return H===n?D:Kt(Mh())}function Bi(){var ur=Mh(),Do=ht(ur);if(y=arguments,S=this,X=ur,Do){if(H===n)return pt(X);if(_e)return hh(H),H=Pl(Ft,s),Ye(X)}return H===n&&(H=Pl(Ft,s)),D}return Bi.cancel=Ui,Bi.flush=ai,Bi}var Fk=Ct(function(o,s){return Sl(o,1,s)}),zk=Ct(function(o,s,p){return Sl(o,so(s)||0,p)});function Uk(o){return Qn(o,Ee)}function Fh(o,s){if(typeof o!="function"||s!=null&&typeof s!="function")throw new Br(l);var p=function(){var y=arguments,S=s?s.apply(this,y):y[0],I=p.cache;if(I.has(S))return I.get(S);var D=o.apply(this,y);return p.cache=I.set(S,D)||I,D};return p.cache=new(Fh.Cache||Nn),p}Fh.Cache=Nn;function zh(o){if(typeof o!="function")throw new Br(l);return function(){var s=arguments;switch(s.length){case 0:return!o.call(this);case 1:return!o.call(this,s[0]);case 2:return!o.call(this,s[0],s[1]);case 3:return!o.call(this,s[0],s[1],s[2])}return!o.apply(this,s)}}function Bk(o){return p_(2,o)}var Hk=ph(function(o,s){s=s.length==1&&St(s[0])?xn(s[0],ti(ut())):xn(Qt(s,1),ti(ut()));var p=s.length;return Ct(function(y){for(var S=-1,I=nr(y.length,p);++S=s}),jl=bf(function(){return arguments}())?bf:function(o){return Jn(o)&&Nt.call(o,"callee")&&!wr.call(o,"callee")},St=te.isArray,iT=wp?ti(wp):kl;function xi(o){return o!=null&&Uh(o.length)&&!ju(o)}function or(o){return Jn(o)&&xi(o)}function oT(o){return o===!0||o===!1||Jn(o)&&Or(o)==Qe}var wa=rm||Bm,uT=_u?ti(_u):Sf;function aT(o){return Jn(o)&&o.nodeType===1&&!nd(o)}function lT(o){if(o==null)return!0;if(xi(o)&&(St(o)||typeof o=="string"||typeof o.splice=="function"||wa(o)||rc(o)||jl(o)))return!o.length;var s=br(o);if(s==gt||s==jt)return!o.size;if(ya(o))return!Ef(o).length;for(var p in o)if(Nt.call(o,p))return!1;return!0}function sT(o,s){return fa(o,s)}function cT(o,s,p){p=typeof p=="function"?p:n;var y=p?p(o,s):n;return y===n?fa(o,s,n,p):!!y}function Im(o){if(!Jn(o))return!1;var s=Or(o);return s==it||s==_t||typeof o.message=="string"&&typeof o.name=="string"&&!nd(o)}function fT(o){return typeof o=="number"&&xs(o)}function ju(o){if(!zn(o))return!1;var s=Or(o);return s==Ne||s==wt||s==ze||s==gn}function __(o){return typeof o=="number"&&o==Ot(o)}function Uh(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=le}function zn(o){var s=typeof o;return o!=null&&(s=="object"||s=="function")}function Jn(o){return o!=null&&typeof o=="object"}var w_=Qa?ti(Qa):js;function dT(o,s){return o===s||Ls(o,s,Zn(s))}function pT(o,s,p){return p=typeof p=="function"?p:n,Ls(o,s,Zn(s),p)}function hT(o){return x_(o)&&o!=+o}function gT(o){if(Ch(o))throw new vt(u);return $i(o)}function vT(o){return o===null}function mT(o){return o==null}function x_(o){return typeof o=="number"||Jn(o)&&Or(o)==et}function nd(o){if(!Jn(o)||Or(o)!=kt)return!1;var s=ko(o);if(s===null)return!0;var p=Nt.call(s,"constructor")&&s.constructor;return typeof p=="function"&&p instanceof p&&Zo.call(p)==Rp}var jm=Za?ti(Za):Ru;function yT(o){return __(o)&&o>=-le&&o<=le}var b_=tn?ti(tn):eh;function Bh(o){return typeof o=="string"||!St(o)&&Jn(o)&&Or(o)==Ze}function zi(o){return typeof o=="symbol"||Jn(o)&&Or(o)==vn}var rc=xp?ti(xp):sm;function _T(o){return o===n}function wT(o){return Jn(o)&&br(o)==Ge}function xT(o){return Jn(o)&&Or(o)==Vt}var bT=Ws(Ns),ST=Ws(function(o,s){return o<=s});function S_(o){if(!o)return[];if(xi(o))return Bh(o)?Ur(o):Yn(o);if(cl&&o[cl])return nm(o[cl]());var s=br(o),p=s==gt?rf:s==jt?xu:ic;return p(o)}function Lu(o){if(!o)return o===0?o:0;if(o=so(o),o===Je||o===-Je){var s=o<0?-1:1;return s*me}return o===o?o:0}function Ot(o){var s=Lu(o),p=s%1;return s===s?p?s-p:s:0}function E_(o){return o?Ar(Ot(o),0,B):0}function so(o){if(typeof o=="number")return o;if(zi(o))return Le;if(zn(o)){var s=typeof o.valueOf=="function"?o.valueOf():o;o=zn(s)?s+"":s}if(typeof o!="string")return o===0?o:+o;o=kp(o);var p=be.test(o);return p||Xt.test(o)?mt(o.slice(2),p?2:8):Q.test(o)?Le:+o}function k_(o){return ot(o,bi(o))}function ET(o){return o?Ar(Ot(o),-le,le):o===0?o:0}function on(o){return o==null?"":Wr(o)}var kT=ui(function(o,s){if(ya(s)||xi(s)){ot(s,Sr(s),o);return}for(var p in s)Nt.call(s,p)&&xl(o,p,s[p])}),T_=ui(function(o,s){ot(s,bi(s),o)}),Hh=ui(function(o,s,p,y){ot(s,bi(s),o,y)}),TT=ui(function(o,s,p,y){ot(s,Sr(s),o,y)}),CT=Lo(As);function AT(o,s){var p=ri(o);return s==null?p:vf(p,s)}var OT=Ct(function(o,s){o=dn(o);var p=-1,y=s.length,S=y>2?s[2]:n;for(S&&Pr(s[0],s[1],S)&&(y=1);++p1),I}),ot(o,Gf(o),p),y&&(p=Hr(p,v|_|x,mm));for(var S=s.length;S--;)jf(p,s[S]);return p});function KT(o,s){return A_(o,zh(ut(s)))}var VT=Lo(function(o,s){return o==null?{}:oh(o,s)});function A_(o,s){if(o==null)return{};var p=xn(Gf(o),function(y){return[y]});return s=ut(s),uh(o,p,function(y,S){return s(y,S[0])})}function YT(o,s,p){s=ao(s,o);var y=-1,S=s.length;for(S||(S=1,o=n);++ys){var y=o;o=s,s=y}if(p||o%1||s%1){var S=lf();return nr(o+S*(s-o+Oe("1e-"+((S+"").length-1))),s)}return Of(o,s)}var uC=jo(function(o,s,p){return s=s.toLowerCase(),o+(p?P_(s):s)});function P_(o){return $m(on(o).toLowerCase())}function I_(o){return o=on(o),o&&o.replace(Kn,ra).replace(Zu,"")}function aC(o,s,p){o=on(o),s=Wr(s);var y=o.length;p=p===n?y:Ar(Ot(p),0,y);var S=p;return p-=s.length,p>=0&&o.slice(p,S)==s}function lC(o){return o=on(o),o&&qt.test(o)?o.replace(Bt,il):o}function sC(o){return o=on(o),o&&$r.test(o)?o.replace(lr,"\\$&"):o}var cC=jo(function(o,s,p){return o+(p?"-":"")+s.toLowerCase()}),fC=jo(function(o,s,p){return o+(p?" ":"")+s.toLowerCase()}),dC=Df("toLowerCase");function pC(o,s,p){o=on(o),s=Ot(s);var y=s?Li(o):0;if(!s||y>=s)return o;var S=(s-y)/2;return xr(pl(S),p)+o+xr(dl(S),p)}function hC(o,s,p){o=on(o),s=Ot(s);var y=s?Li(o):0;return s&&y>>0,p?(o=on(o),o&&(typeof s=="string"||s!=null&&!jm(s))&&(s=Wr(s),!s&&ji(o))?Po(Ur(o),0,p):o.split(s,p)):[]}var xC=jo(function(o,s,p){return o+(p?" ":"")+$m(s)});function bC(o,s,p){return o=on(o),p=p==null?0:Ar(Ot(p),0,o.length),s=Wr(s),o.slice(p,p+s.length)==s}function SC(o,s,p){var y=C.templateSettings;p&&Pr(o,s,p)&&(s=n),o=on(o),s=Hh({},s,y,Bf);var S=Hh({},s.imports,y.imports,Bf),I=Sr(S),D=ms(S,I),H,X,fe=0,de=s.interpolate||wn,_e="__p += '",Pe=ws((s.escape||wn).source+"|"+de.source+"|"+(de===$t?Zt:wn).source+"|"+(s.evaluate||wn).source+"|$","g"),Ye="//# sourceURL="+(Nt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xu+"]")+` -`;o.replace(Pe,function(ht,Ft,Kt,Ui,ai,Bi){return Kt||(Kt=Ui),_e+=o.slice(fe,Bi).replace(eo,ol),Ft&&(H=!0,_e+=`' + -__e(`+Ft+`) + -'`),ai&&(X=!0,_e+=`'; -`+ai+`; -__p += '`),Kt&&(_e+=`' + -((__t = (`+Kt+`)) == null ? '' : __t) + -'`),fe=Bi+ht.length,ht}),_e+=`'; -`;var pt=Nt.call(s,"variable")&&s.variable;if(!pt)_e=`with (obj) { -`+_e+` -} -`;else if(vu.test(pt))throw new vt(f);_e=(X?_e.replace(ie,""):_e).replace(Ae,"$1").replace($e,"$1;"),_e="function("+(pt||"obj")+`) { -`+(pt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(H?", __e = _.escape":"")+(X?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+_e+`return __p -}`;var Rt=L_(function(){return Mt(I,Ye+"return "+_e).apply(n,D)});if(Rt.source=_e,Im(Rt))throw Rt;return Rt}function EC(o){return on(o).toLowerCase()}function kC(o){return on(o).toUpperCase()}function TC(o,s,p){if(o=on(o),o&&(p||s===n))return kp(o);if(!o||!(s=Wr(s)))return o;var y=Ur(o),S=Ur(s),I=ys(y,S),D=na(y,S)+1;return Po(y,I,D).join("")}function CC(o,s,p){if(o=on(o),o&&(p||s===n))return o.slice(0,ni(o)+1);if(!o||!(s=Wr(s)))return o;var y=Ur(o),S=na(y,Ur(s))+1;return Po(y,0,S).join("")}function AC(o,s,p){if(o=on(o),o&&(p||s===n))return o.replace(Dr,"");if(!o||!(s=Wr(s)))return o;var y=Ur(o),S=ys(y,Ur(s));return Po(y,S).join("")}function OC(o,s){var p=K,y=ae;if(zn(s)){var S="separator"in s?s.separator:S;p="length"in s?Ot(s.length):p,y="omission"in s?Wr(s.omission):y}o=on(o);var I=o.length;if(ji(o)){var D=Ur(o);I=D.length}if(p>=I)return o;var H=p-Li(y);if(H<1)return y;var X=D?Po(D,0,H).join(""):o.slice(0,H);if(S===n)return X+y;if(D&&(H+=X.length-H),jm(S)){if(o.slice(H).search(S)){var fe,de=X;for(S.global||(S=ws(S.source,on(Ue.exec(S))+"g")),S.lastIndex=0;fe=S.exec(de);)var _e=fe.index;X=X.slice(0,_e===n?H:_e)}}else if(o.indexOf(Wr(S),H)!=H){var Pe=X.lastIndexOf(S);Pe>-1&&(X=X.slice(0,Pe))}return X+y}function RC(o){return o=on(o),o&&nt.test(o)?o.replace(ft,Lt):o}var PC=jo(function(o,s,p){return o+(p?" ":"")+s.toUpperCase()}),$m=Df("toUpperCase");function j_(o,s,p){return o=on(o),s=p?n:s,s===n?tm(o)?So(o):wu(o):o.match(s)||[]}var L_=Ct(function(o,s){try{return zr(o,n,s)}catch(p){return Im(p)?p:new vt(p)}}),IC=Lo(function(o,s){return vi(s,function(p){p=wi(p),Oo(o,p,Rm(o[p],o))}),o});function jC(o){var s=o==null?0:o.length,p=ut();return o=s?xn(o,function(y){if(typeof y[1]!="function")throw new Br(l);return[p(y[0]),y[1]]}):[],Ct(function(y){for(var S=-1;++Sle)return[];var p=B,y=nr(o,B);s=ut(s),o-=B;for(var S=Fn(y,s);++p0||s<0)?new Tt(p):(o<0?p=p.takeRight(-o):o&&(p=p.drop(o)),s!==n&&(s=Ot(s),p=s<0?p.dropRight(-s):p.take(s-o)),p)},Tt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Tt.prototype.toArray=function(){return this.take(B)},uo(Tt.prototype,function(o,s){var p=/^(?:filter|find|map|reject)|While$/.test(s),y=/^(?:head|last)$/.test(s),S=C[y?"take"+(s=="last"?"Right":""):s],I=y||/^find/.test(s);S&&(C.prototype[s]=function(){var D=this.__wrapped__,H=y?[1]:arguments,X=D instanceof Tt,fe=H[0],de=X||St(D),_e=function(Ft){var Kt=S.apply(C,Ii([Ft],H));return y&&Pe?Kt[0]:Kt};de&&p&&typeof fe=="function"&&fe.length!=1&&(X=de=!1);var Pe=this.__chain__,Ye=!!this.__actions__.length,pt=I&&!Pe,Rt=X&&!Ye;if(!I&&de){D=Rt?D:new Tt(this);var ht=o.apply(D,H);return ht.__actions__.push({func:$h,args:[_e],thisArg:n}),new ii(ht,Pe)}return pt&&Rt?o.apply(this,H):(ht=this.thru(_e),pt?y?ht.value()[0]:ht.value():ht)})}),vi(["pop","push","shift","sort","splice","unshift"],function(o){var s=to[o],p=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",y=/^(?:pop|shift)$/.test(o);C.prototype[o]=function(){var S=arguments;if(y&&!this.__chain__){var I=this.value();return s.apply(St(I)?I:[],S)}return this[p](function(D){return s.apply(St(D)?D:[],S)})}}),uo(Tt.prototype,function(o,s){var p=C[s];if(p){var y=p.name+"";Nt.call(Cu,y)||(Cu[y]=[]),Cu[y].push({name:s,func:p})}}),Cu[iu(n,k).name]=[{name:"wrapper",func:n}],Tt.prototype.clone=Dp,Tt.prototype.reverse=ff,Tt.prototype.value=Mp,C.prototype.at=ak,C.prototype.chain=lk,C.prototype.commit=sk,C.prototype.next=ck,C.prototype.plant=dk,C.prototype.reverse=pk,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=hk,C.prototype.first=C.prototype.head,cl&&(C.prototype[cl]=fk),C},_r=Su();xo?((xo.exports=_r)._=_r,fn._=_r):yn._=_r}).call(Mu)})(dv,dv.exports);var _2=dv.exports;const IL={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},jL={borderColor:"#2196f3"},LL={borderColor:"#00e676"},NL={borderColor:"#ff1744"};function $L(e){return Y.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function DL(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,i=e.files.map((l,f)=>Y.jsxs("li",{children:[l.name," - ",l.size," bytes",Y.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(d=>d.filter(h=>h!==l)),children:Y.jsx(mR,{className:"h-4 w-4"})})]},f)),u=M.useMemo(()=>({...IL,...e.state.isFocused?jL:{},...e.state.isDragAccept?LL:{},...e.state.isDragReject?NL:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return Y.jsxs("section",{className:"",children:[Y.jsxs("aside",{children:[Y.jsx($L,{id:"files",title:"Files"}),Y.jsx("div",{className:"prose",children:Y.jsx("ul",{children:i})})]}),Y.jsxs("div",{...t({style:u}),children:[Y.jsx("input",{...n()}),Y.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",Y.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",Y.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&Y.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:Y.jsx("ul",{children:r.map((l,f)=>Y.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},f))})})]})]})}function Z1(e){return Y.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function ML(e){return Y.jsxs("div",{children:[Y.jsx(Z1,{id:e.id,title:e.title}),Y.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Cx(e){var t;return Y.jsxs("div",{children:[Y.jsx(Z1,{id:e.id,title:e.title}),Y.jsxs("fieldset",{children:[Y.jsx("legend",{className:"sr-only",children:e.field.title}),Y.jsx("div",{className:"space-y-2",children:(t=_2.orderBy(e.field.enum))==null?void 0:t.map(n=>Y.jsxs("div",{className:"flex items-center",children:[Y.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),Y.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const FL={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function zL(e){var t,n,r;return Y.jsxs("fieldset",{children:[Y.jsx(Z1,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),Y.jsx("div",{className:"space-y-2",children:(r=_2.orderBy((n=e.field.items)==null?void 0:n.enum))==null?void 0:r.map(i=>{var u;return Y.jsxs("div",{className:"relative flex items-start",children:[Y.jsx("div",{className:"flex h-6 items-center",children:Y.jsx("input",{id:`${e.id}-${i}`,"aria-describedby":"comments-description",name:`${e.id}-${i}`,type:"checkbox",checked:e.value.includes(i),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,i]):e.setValue(e.value.filter(f=>f!==i))}})}),Y.jsxs("div",{className:"ml-3 text-sm leading-6",children:[Y.jsx("label",{htmlFor:`${e.id}-${i}`,className:"text-gray-900",children:i}),((u=e.descriptions)==null?void 0:u[i])&&Y.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:un(e.descriptions[i])}})]})]},i)})})]})}function UL(e){const t=window.location.href+"?shared_id="+e.assistantId;return Y.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[Y.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[Y.jsx(hR,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),Y.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function BL(e){var v,_,x,A,R,N,k;const[t,n]=M.useState(((v=e.config)==null?void 0:v.config)??e.configDefaults),[r,i]=M.useState([]),u=y2({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,f]=M.useState(((_=e.config)==null?void 0:_.public)??!1);M.useEffect(()=>{var E;n(((E=e.config)==null?void 0:E.config)??e.configDefaults)},[e.config,e.configDefaults]),M.useEffect(()=>{u.acceptedFiles.length>0&&(n(E=>{var T;return{configurable:{...E==null?void 0:E.configurable,tools:[...(((T=E==null?void 0:E.configurable)==null?void 0:T.tools)??[]).filter(P=>P!=="Retrieval"),"Retrieval"]}}}),i(E=>[...E.filter(T=>!u.acceptedFiles.includes(T)),...u.acceptedFiles]))},[u.acceptedFiles]);const[d,h]=M.useState(!1),m=!!e.config&&!d;return Y.jsxs(Y.Fragment,{children:[Y.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:Y.jsxs("span",{children:["Bot: ",((x=e.config)==null?void 0:x.name)??"New Bot"," ",Y.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((A=e.config)==null?void 0:A.public)&&Y.jsx(UL,{assistantId:(R=e.config)==null?void 0:R.assistant_id}),Y.jsxs("form",{className:Qr("flex flex-col gap-8"),onSubmit:async E=>{E.preventDefault(),E.stopPropagation();const P=E.target.key.value;P&&(h(!0),await e.saveConfig(P,t,u.acceptedFiles,l),h(!1))},children:[Y.jsxs("div",{className:Qr("flex flex-col gap-8",m&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((N=e.configSchema)==null?void 0:N.properties.configurable.properties)??{}).map(([E,T])=>{var L,U,G,Z,Ee;const P=T.title;if(((L=T.allOf)==null?void 0:L.length)===1&&(T=T.allOf[0]),E.split("/")[0].includes("==")){const[K,ae]=E.split("/")[0].split("==");if(((U=t==null?void 0:t.configurable)==null?void 0:U[K])!==ae)return null}if(T.type==="string"&&T.enum)return Y.jsx(Cx,{id:E,field:T,title:P,value:(G=t==null?void 0:t.configurable)==null?void 0:G[E],setValue:K=>n({...t,configurable:{...t.configurable,[E]:K}}),readonly:m},E);if(E==="type==agent/system_message")return Y.jsx(ML,{id:E,field:T,title:P,value:(Z=t==null?void 0:t.configurable)==null?void 0:Z[E],setValue:K=>n({...t,configurable:{...t.configurable,[E]:K}}),readonly:m},E);if(E==="type==agent/tools")return Y.jsx(zL,{id:E,field:T,title:P,value:(Ee=t==null?void 0:t.configurable)==null?void 0:Ee[E],setValue:K=>n({...t,configurable:{...t.configurable,[E]:K}}),readonly:m,descriptions:FL},E)}),!e.config&&((k=t==null?void 0:t.configurable)==null?void 0:k.type)==="agent"&&Y.jsx(DL,{state:u,files:r,setFiles:i}),Y.jsx(Cx,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:E=>f(E==="Yes"),readonly:m})]}),!e.config&&Y.jsxs("div",{className:"flex flex-row",children:[Y.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:Y.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),Y.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:d?"Saving...":"Save"})]})]})]})}function HL(e){var t;return Y.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[Y.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[Y.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:Y.jsx(jj,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),Y.jsx("main",{className:"flex-1",children:Y.jsx("div",{className:"px-4",children:Y.jsx(BL,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&Y.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:Y.jsx(AE,{onSubmit:e.startChat})})]})}function WL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n-1}var H$=B$,W$=Uv;function G$(e,t){var n=this.__data__,r=W$(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var q$=G$,K$=O$,V$=D$,Y$=z$,Q$=H$,Z$=q$;function Hc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tf))return!1;var h=u.get(e),m=u.get(t);if(h&&m)return h==t&&m==e;var v=-1,_=!0,x=n&z4?new $4:void 0;for(u.set(e,t),u.set(t,e);++v-1&&e%1==0&&e-1&&e%1==0&&e<=q5}var i_=K5,V5=sp,Y5=i_,Q5=cp,Z5="[object Arguments]",X5="[object Array]",J5="[object Boolean]",eM="[object Date]",tM="[object Error]",nM="[object Function]",rM="[object Map]",iM="[object Number]",oM="[object Object]",uM="[object RegExp]",aM="[object Set]",lM="[object String]",sM="[object WeakMap]",cM="[object ArrayBuffer]",fM="[object DataView]",dM="[object Float32Array]",pM="[object Float64Array]",hM="[object Int8Array]",gM="[object Int16Array]",vM="[object Int32Array]",mM="[object Uint8Array]",yM="[object Uint8ClampedArray]",_M="[object Uint16Array]",wM="[object Uint32Array]",Pn={};Pn[dM]=Pn[pM]=Pn[hM]=Pn[gM]=Pn[vM]=Pn[mM]=Pn[yM]=Pn[_M]=Pn[wM]=!0;Pn[Z5]=Pn[X5]=Pn[cM]=Pn[J5]=Pn[fM]=Pn[eM]=Pn[tM]=Pn[nM]=Pn[rM]=Pn[iM]=Pn[oM]=Pn[uM]=Pn[aM]=Pn[lM]=Pn[sM]=!1;function xM(e){return Q5(e)&&Y5(e.length)&&!!Pn[V5(e)]}var bM=xM;function SM(e){return function(t){return e(t)}}var N2=SM,gv={exports:{}};gv.exports;(function(e,t){var n=x2,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===r,l=u&&n.process,f=function(){try{var d=i&&i.require&&i.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}}();e.exports=f})(gv,gv.exports);var EM=gv.exports,kM=bM,TM=N2,Bx=EM,Hx=Bx&&Bx.isTypedArray,CM=Hx?TM(Hx):kM,$2=CM,AM=P5,OM=I2,RM=gu,PM=j2,IM=L2,jM=$2,LM=Object.prototype,NM=LM.hasOwnProperty;function $M(e,t){var n=RM(e),r=!n&&OM(e),i=!n&&!r&&PM(e),u=!n&&!r&&!i&&jM(e),l=n||r||i||u,f=l?AM(e.length,String):[],d=f.length;for(var h in e)(t||NM.call(e,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||u&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||IM(h,d)))&&f.push(h);return f}var DM=$M,MM=Object.prototype;function FM(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||MM;return e===n}var zM=FM;function UM(e,t){return function(n){return e(t(n))}}var BM=UM,HM=BM,WM=HM(Object.keys,Object),GM=WM,qM=zM,KM=GM,VM=Object.prototype,YM=VM.hasOwnProperty;function QM(e){if(!qM(e))return KM(e);var t=[];for(var n in Object(e))YM.call(e,n)&&n!="constructor"&&t.push(n);return t}var ZM=QM,XM=S2,JM=i_;function eF(e){return e!=null&&JM(e.length)&&!XM(e)}var o_=eF,tF=DM,nF=ZM,rF=o_;function iF(e){return rF(e)?tF(e):nF(e)}var u_=iF,oF=_5,uF=O5,aF=u_;function lF(e){return oF(e,aF,uF)}var sF=lF,Wx=sF,cF=1,fF=Object.prototype,dF=fF.hasOwnProperty;function pF(e,t,n,r,i,u){var l=n&cF,f=Wx(e),d=f.length,h=Wx(t),m=h.length;if(d!=m&&!l)return!1;for(var v=d;v--;){var _=f[v];if(!(l?_ in t:dF.call(t,_)))return!1}var x=u.get(e),A=u.get(t);if(x&&A)return x==t&&A==e;var R=!0;u.set(e,t),u.set(t,e);for(var N=l;++vt||u&&l&&d&&!f&&!h||r&&l&&d||!n&&d||!i)return 1;if(!r&&!u&&!h&&e=f)return d;var h=n[r];return d*(h=="desc"?-1:1)}}return e.index-t.index}var Rz=Oz,P0=w2,Pz=r_,Iz=rz,jz=Sz,Lz=kz,Nz=N2,$z=Rz,Dz=B2,Mz=gu;function Fz(e,t,n){t.length?t=P0(t,function(u){return Mz(u)?function(l){return Pz(l,u.length===1?u[0]:u)}:u}):t=[Dz];var r=-1;t=P0(t,Nz(Iz));var i=jz(e,function(u,l,f){var d=P0(t,function(h){return h(u)});return{criteria:d,index:++r,value:u}});return Lz(i,function(u,l){return $z(u,l,n)})}var zz=Fz,Uz=zz,ib=gu;function Bz(e,t,n,r){return e==null?[]:(ib(t)||(t=t==null?[]:[t]),n=r?void 0:n,ib(n)||(n=n==null?[]:[n]),Uz(e,t,n))}var Hz=Bz;const H2=Ky(Hz);function Wz(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return H2(t,"updated_at","desc")}function Gz(){const[e,t]=M.useReducer(Wz,null),[n,r]=M.useState(null);M.useEffect(()=>{async function l(){const f=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(d=>d.json());t(f)}l()},[]);const i=M.useCallback(async(l,f,d=crypto.randomUUID())=>{const h=await fetch(`/threads/${d}`,{method:"PUT",body:JSON.stringify({assistant_id:f,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(m=>m.json());return t(h),r(h.thread_id),h},[]),u=M.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:i,enterChat:u}}const qz=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,u){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:u})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var u=Object.create(null);if(n.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var l in r)n.d(u,l,(function(f){return r[f]}).bind(null,l));return u},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(f){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(f)}var i=n(47),u=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=i||u||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),i=n(105);e.exports=function(u,l){var f=i(u,l);return r(f)?f:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}e.exports=function(r){var i=n(r);return r!=null&&(i=="object"||i=="function")}},function(e,t,n){var r=n(52),i=n(37),u=n(7);e.exports=function(l){return u(l)?r(l):i(l)}},function(e,t,n){var r=n(17),i=n(34);e.exports=function(u){return u!=null&&i(u.length)&&!r(u)}},function(e,t,n){var r=n(9),i=n(101),u=n(102),l=r?r.toStringTag:void 0;e.exports=function(f){return f==null?f===void 0?"[object Undefined]":"[object Null]":l&&l in Object(f)?i(f):u(f)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),i=n(31),u=n(133),l=n(61),f=n(134),d=n(8),h=n(48),m=h(r),v=h(i),_=h(u),x=h(l),A=h(f),R=d;(r&&R(new r(new ArrayBuffer(1)))!="[object DataView]"||i&&R(new i)!="[object Map]"||u&&R(u.resolve())!="[object Promise]"||l&&R(new l)!="[object Set]"||f&&R(new f)!="[object WeakMap]")&&(R=function(N){var k=d(N),E=k=="[object Object]"?N.constructor:void 0,T=E?h(E):"";if(T)switch(T){case m:return"[object DataView]";case v:return"[object Map]";case _:return"[object Promise]";case x:return"[object Set]";case A:return"[object WeakMap]"}return k}),e.exports=R},function(e,t){function n(i){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(i)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function i(v){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(v)}var u=n(2),l=n(121),f=i(t)=="object"&&t&&!t.nodeType&&t,d=f&&i(r)=="object"&&r&&!r.nodeType&&r,h=d&&d.exports===f?u.Buffer:void 0,m=(h?h.isBuffer:void 0)||l;r.exports=m}).call(this,n(14)(e))},function(e,t){var n,r,i=e.exports={};function u(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function f(N){if(n===setTimeout)return setTimeout(N,0);if((n===u||!n)&&setTimeout)return n=setTimeout,setTimeout(N,0);try{return n(N,0)}catch{try{return n.call(null,N,0)}catch{return n.call(this,N,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:u}catch{n=u}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var d,h=[],m=!1,v=-1;function _(){m&&d&&(m=!1,d.length?h=d.concat(h):v=-1,h.length&&x())}function x(){if(!m){var N=f(_);m=!0;for(var k=h.length;k;){for(d=h,h=[];++v1)for(var E=1;EN){var k=R;R=N,N=k}return R+""+N+""+(i.isUndefined(A)?"\0":A)}function h(v,_,x,A){var R=""+_,N=""+x;if(!v&&R>N){var k=R;R=N,N=k}var E={v:R,w:N};return A&&(E.name=A),E}function m(v,_){return d(v,_.v,_.w,_.name)}u.prototype._nodeCount=0,u.prototype._edgeCount=0,u.prototype.isDirected=function(){return this._isDirected},u.prototype.isMultigraph=function(){return this._isMultigraph},u.prototype.isCompound=function(){return this._isCompound},u.prototype.setGraph=function(v){return this._label=v,this},u.prototype.graph=function(){return this._label},u.prototype.setDefaultNodeLabel=function(v){return i.isFunction(v)||(v=i.constant(v)),this._defaultNodeLabelFn=v,this},u.prototype.nodeCount=function(){return this._nodeCount},u.prototype.nodes=function(){return i.keys(this._nodes)},u.prototype.sources=function(){var v=this;return i.filter(this.nodes(),function(_){return i.isEmpty(v._in[_])})},u.prototype.sinks=function(){var v=this;return i.filter(this.nodes(),function(_){return i.isEmpty(v._out[_])})},u.prototype.setNodes=function(v,_){var x=arguments,A=this;return i.each(v,function(R){x.length>1?A.setNode(R,_):A.setNode(R)}),this},u.prototype.setNode=function(v,_){return i.has(this._nodes,v)?(arguments.length>1&&(this._nodes[v]=_),this):(this._nodes[v]=arguments.length>1?_:this._defaultNodeLabelFn(v),this._isCompound&&(this._parent[v]="\0",this._children[v]={},this._children["\0"][v]=!0),this._in[v]={},this._preds[v]={},this._out[v]={},this._sucs[v]={},++this._nodeCount,this)},u.prototype.node=function(v){return this._nodes[v]},u.prototype.hasNode=function(v){return i.has(this._nodes,v)},u.prototype.removeNode=function(v){var _=this;if(i.has(this._nodes,v)){var x=function(A){_.removeEdge(_._edgeObjs[A])};delete this._nodes[v],this._isCompound&&(this._removeFromParentsChildList(v),delete this._parent[v],i.each(this.children(v),function(A){_.setParent(A)}),delete this._children[v]),i.each(i.keys(this._in[v]),x),delete this._in[v],delete this._preds[v],i.each(i.keys(this._out[v]),x),delete this._out[v],delete this._sucs[v],--this._nodeCount}return this},u.prototype.setParent=function(v,_){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(_))_="\0";else{for(var x=_+="";!i.isUndefined(x);x=this.parent(x))if(x===v)throw new Error("Setting "+_+" as parent of "+v+" would create a cycle");this.setNode(_)}return this.setNode(v),this._removeFromParentsChildList(v),this._parent[v]=_,this._children[_][v]=!0,this},u.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]},u.prototype.parent=function(v){if(this._isCompound){var _=this._parent[v];if(_!=="\0")return _}},u.prototype.children=function(v){if(i.isUndefined(v)&&(v="\0"),this._isCompound){var _=this._children[v];if(_)return i.keys(_)}else{if(v==="\0")return this.nodes();if(this.hasNode(v))return[]}},u.prototype.predecessors=function(v){var _=this._preds[v];if(_)return i.keys(_)},u.prototype.successors=function(v){var _=this._sucs[v];if(_)return i.keys(_)},u.prototype.neighbors=function(v){var _=this.predecessors(v);if(_)return i.union(_,this.successors(v))},u.prototype.isLeaf=function(v){return(this.isDirected()?this.successors(v):this.neighbors(v)).length===0},u.prototype.filterNodes=function(v){var _=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});_.setGraph(this.graph());var x=this;i.each(this._nodes,function(R,N){v(N)&&_.setNode(N,R)}),i.each(this._edgeObjs,function(R){_.hasNode(R.v)&&_.hasNode(R.w)&&_.setEdge(R,x.edge(R))});var A={};return this._isCompound&&i.each(_.nodes(),function(R){_.setParent(R,function N(k){var E=x.parent(k);return E===void 0||_.hasNode(E)?(A[k]=E,E):E in A?A[E]:N(E)}(R))}),_},u.prototype.setDefaultEdgeLabel=function(v){return i.isFunction(v)||(v=i.constant(v)),this._defaultEdgeLabelFn=v,this},u.prototype.edgeCount=function(){return this._edgeCount},u.prototype.edges=function(){return i.values(this._edgeObjs)},u.prototype.setPath=function(v,_){var x=this,A=arguments;return i.reduce(v,function(R,N){return A.length>1?x.setEdge(R,N,_):x.setEdge(R,N),N}),this},u.prototype.setEdge=function(){var v,_,x,A,R=!1,N=arguments[0];r(N)==="object"&&N!==null&&"v"in N?(v=N.v,_=N.w,x=N.name,arguments.length===2&&(A=arguments[1],R=!0)):(v=N,_=arguments[1],x=arguments[3],arguments.length>2&&(A=arguments[2],R=!0)),v=""+v,_=""+_,i.isUndefined(x)||(x=""+x);var k=d(this._isDirected,v,_,x);if(i.has(this._edgeLabels,k))return R&&(this._edgeLabels[k]=A),this;if(!i.isUndefined(x)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(v),this.setNode(_),this._edgeLabels[k]=R?A:this._defaultEdgeLabelFn(v,_,x);var E=h(this._isDirected,v,_,x);return v=E.v,_=E.w,Object.freeze(E),this._edgeObjs[k]=E,l(this._preds[_],v),l(this._sucs[v],_),this._in[_][k]=E,this._out[v][k]=E,this._edgeCount++,this},u.prototype.edge=function(v,_,x){var A=arguments.length===1?m(this._isDirected,arguments[0]):d(this._isDirected,v,_,x);return this._edgeLabels[A]},u.prototype.hasEdge=function(v,_,x){var A=arguments.length===1?m(this._isDirected,arguments[0]):d(this._isDirected,v,_,x);return i.has(this._edgeLabels,A)},u.prototype.removeEdge=function(v,_,x){var A=arguments.length===1?m(this._isDirected,arguments[0]):d(this._isDirected,v,_,x),R=this._edgeObjs[A];return R&&(v=R.v,_=R.w,delete this._edgeLabels[A],delete this._edgeObjs[A],f(this._preds[_],v),f(this._sucs[v],_),delete this._in[_][A],delete this._out[v][A],this._edgeCount--),this},u.prototype.inEdges=function(v,_){var x=this._in[v];if(x){var A=i.values(x);return _?i.filter(A,function(R){return R.v===_}):A}},u.prototype.outEdges=function(v,_){var x=this._out[v];if(x){var A=i.values(x);return _?i.filter(A,function(R){return R.w===_}):A}},u.prototype.nodeEdges=function(v,_){var x=this.inEdges(v,_);if(x)return x.concat(this.outEdges(v,_))}},function(e,t,n){var r=n(15),i=n(95),u=n(96),l=n(97),f=n(98),d=n(99);function h(m){var v=this.__data__=new r(m);this.size=v.size}h.prototype.clear=i,h.prototype.delete=u,h.prototype.get=l,h.prototype.has=f,h.prototype.set=d,e.exports=h},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),i=n(113),u=n(115),l=n(116),f=n(117);function d(h){var m=-1,v=h==null?0:h.length;for(this.clear();++m-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function i(m){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(m)}var u=n(47),l=i(t)=="object"&&t&&!t.nodeType&&t,f=l&&i(r)=="object"&&r&&!r.nodeType&&r,d=f&&f.exports===l&&u.process,h=function(){try{var m=f&&f.require&&f.require("util").types;return m||d&&d.binding&&d.binding("util")}catch{}}();r.exports=h}).call(this,n(14)(e))},function(e,t,n){var r=n(23),i=n(123),u=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return i(l);var f=[];for(var d in Object(l))u.call(l,d)&&d!="constructor"&&f.push(d);return f}},function(e,t,n){var r=n(56),i=n(57),u=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,f=l?function(d){return d==null?[]:(d=Object(d),r(l(d),function(h){return u.call(d,h)}))}:i;e.exports=f},function(e,t){e.exports=function(n,r){for(var i=-1,u=r.length,l=n.length;++i-1&&i%1==0&&ix))return!1;var R=v.get(l);if(R&&v.get(f))return R==f;var N=-1,k=!0,E=2&d?new r:void 0;for(v.set(l,f),v.set(f,l);++N0&&(A=k.removeMin(),(R=N[A]).distance!==Number.POSITIVE_INFINITY);)x(A).forEach(E);return N}(l,String(f),d||u,h||function(m){return l.outEdges(m)})};var u=r.constant(1)},function(e,t,n){var r=n(1);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(u){return u.key})},i.prototype.has=function(u){return r.has(this._keyIndices,u)},i.prototype.priority=function(u){var l=this._keyIndices[u];if(l!==void 0)return this._arr[l].priority},i.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(u,l){var f=this._keyIndices;if(u=String(u),!r.has(f,u)){var d=this._arr,h=d.length;return f[u]=h,d.push({key:u,priority:l}),this._decrease(h),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},i.prototype.decrease=function(u,l){var f=this._keyIndices[u];if(l>this._arr[f].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[f].priority+" New: "+l);this._arr[f].priority=l,this._decrease(f)},i.prototype._heapify=function(u){var l=this._arr,f=2*u,d=f+1,h=u;f>1].priority0&&R(k,ne))}catch(Ie){P.call(new U(ne),Ie)}}}function P(K){var ae=this;ae.triggered||(ae.triggered=!0,ae.def&&(ae=ae.def),ae.msg=K,ae.state=2,ae.chain.length>0&&R(k,ae))}function L(K,ae,ne,Ie){for(var Re=0;Re-1?pe=we:(xe=i.isUndefined(B)?void 0:K(B),i.isUndefined(xe)?pe=we:((pe=xe).path=h(l.join(xe.path,we.path)),pe.query=function(ye,ze){var Qe={};function tt(_t){i.forOwn(_t,function(it,Ne){Qe[Ne]=it})}return tt(d.parse(ye||"")),tt(d.parse(ze||"")),Object.keys(Qe).length===0?void 0:d.stringify(Qe)}(xe.query,we.query))),pe.fragment=void 0,(A.indexOf(pe.reference)===-1&&pe.path.indexOf("../")===0?"../":"")+m.serialize(pe)}function k(B){return x.indexOf(L(B))>-1}function E(B){return i.isUndefined(B.error)&&B.type!=="invalid"}function T(B,re){var xe=B;return re.forEach(function(pe){if(!(pe in xe))throw Error("JSON Pointer points to missing location: "+me(re));xe=xe[pe]}),xe}function P(B){return Object.keys(B).filter(function(re){return re!=="$ref"})}function L(B){var re;switch(B.uriDetails.reference){case"absolute":case"uri":re="remote";break;case"same-document":re="local";break;default:re=B.uriDetails.reference}return re}function U(B,re){var xe=_[B],pe=Promise.resolve(),we=i.cloneDeep(re.loaderOptions||{});return i.isUndefined(xe)?(i.isUndefined(we.processContent)&&(we.processContent=function(ye,ze){ze(void 0,JSON.parse(ye.text))}),pe=(pe=f.load(decodeURI(B),we)).then(function(ye){return _[B]={value:ye},ye}).catch(function(ye){throw _[B]={error:ye},ye})):pe=pe.then(function(){if(i.isError(xe.error))throw xe.error;return xe.value}),pe=pe.then(function(ye){return i.cloneDeep(ye)})}function G(B,re){var xe=!0;try{if(!i.isPlainObject(B))throw new Error("obj is not an Object");if(!i.isString(B.$ref))throw new Error("obj.$ref is not a String")}catch(pe){if(re)throw pe;xe=!1}return xe}function Z(B){return B.indexOf("://")!==-1||l.isAbsolute(B)?B:l.resolve(r.cwd(),B)}function Ee(B,re){B.error=re.message,B.missing=!0}function K(B){return m.parse(B)}function ae(B,re,xe){T(B,re.slice(0,re.length-1))[re[re.length-1]]=xe}function ne(B,re){var xe,pe;if(B=i.isUndefined(B)?{}:i.cloneDeep(B),!i.isObject(B))throw new TypeError("options must be an Object");if(!i.isUndefined(B.resolveCirculars)&&!i.isBoolean(B.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(i.isUndefined(B.filter)||i.isArray(B.filter)||i.isFunction(B.filter)||i.isString(B.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!i.isUndefined(B.includeInvalid)&&!i.isBoolean(B.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!i.isUndefined(B.location)&&!i.isString(B.location))throw new TypeError("options.location must be a String");if(!i.isUndefined(B.refPreProcessor)&&!i.isFunction(B.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!i.isUndefined(B.refPostProcessor)&&!i.isFunction(B.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!i.isUndefined(B.subDocPath)&&!i.isArray(B.subDocPath)&&!Je(B.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(i.isUndefined(B.resolveCirculars)&&(B.resolveCirculars=!1),B.filter=function(we){var ye,ze;return i.isArray(we.filter)||i.isString(we.filter)?(ze=i.isString(we.filter)?[we.filter]:we.filter,ye=function(Qe){return ze.indexOf(Qe.type)>-1||ze.indexOf(L(Qe))>-1}):i.isFunction(we.filter)?ye=we.filter:i.isUndefined(we.filter)&&(ye=function(){return!0}),function(Qe,tt){return(Qe.type!=="invalid"||we.includeInvalid===!0)&&ye(Qe,tt)}}(B),i.isUndefined(B.location)&&(B.location=Z("./root.json")),(xe=B.location.split("#")).length>1&&(B.subDocPath="#"+xe[1]),pe=decodeURI(B.location)===B.location,B.location=N(B.location,void 0),pe&&(B.location=decodeURI(B.location)),B.subDocPath=function(we){var ye;return i.isArray(we.subDocPath)?ye=we.subDocPath:i.isString(we.subDocPath)?ye=le(we.subDocPath):i.isUndefined(we.subDocPath)&&(ye=[]),ye}(B),!i.isUndefined(re))try{T(re,B.subDocPath)}catch(we){throw we.message=we.message.replace("JSON Pointer","options.subDocPath"),we}return B}function Ie(B){if(!i.isArray(B))throw new TypeError("path must be an array");return B.map(function(re){return i.isString(re)||(re=JSON.stringify(re)),re.replace(/~1/g,"/").replace(/~0/g,"~")})}function Re(B){if(!i.isArray(B))throw new TypeError("path must be an array");return B.map(function(re){return i.isString(re)||(re=JSON.stringify(re)),re.replace(/~/g,"~0").replace(/\//g,"~1")})}function Fe(B,re){var xe={};if(!i.isArray(B)&&!i.isObject(B))throw new TypeError("obj must be an Array or an Object");return function pe(we,ye,ze,Qe){var tt=!0;function _t(it,Ne){ze.push(Ne),pe(we,it,ze,Qe),ze.pop()}i.isFunction(Qe)&&(tt=Qe(we,ye,ze)),we.indexOf(ye)===-1&&(we.push(ye),tt!==!1&&(i.isArray(ye)?ye.forEach(function(it,Ne){_t(it,Ne.toString())}):i.isObject(ye)&&i.forOwn(ye,function(it,Ne){_t(it,Ne)})),we.pop())}(function(pe,we){var ye,ze=[];return we.length>0&&(ye=pe,we.slice(0,we.length-1).forEach(function(Qe){Qe in ye&&(ye=ye[Qe],ze.push(ye))})),ze}(B,(re=ne(re,B)).subDocPath),T(B,re.subDocPath),i.cloneDeep(re.subDocPath),function(pe,we,ye){var ze,Qe,tt=!0;return G(we)&&(i.isUndefined(re.refPreProcessor)||(we=re.refPreProcessor(i.cloneDeep(we),ye)),ze=lt(we),i.isUndefined(re.refPostProcessor)||(ze=re.refPostProcessor(ze,ye)),re.filter(ze,ye)&&(Qe=me(ye),xe[Qe]=ze),P(we).length>0&&(tt=!1)),tt}),xe}function lt(B){var re,xe,pe,we={def:B};try{if(G(B,!0),re=B.$ref,pe=R[re],i.isUndefined(pe)&&(pe=R[re]=K(re)),we.uri=re,we.uriDetails=pe,i.isUndefined(pe.error)){we.type=L(we);try{["#","/"].indexOf(re[0])>-1?Je(re,!0):re.indexOf("#")>-1&&Je(pe.fragment,!0)}catch(ye){we.error=ye.message,we.type="invalid"}}else we.error=we.uriDetails.error,we.type="invalid";(xe=P(B)).length>0&&(we.warning="Extra JSON Reference properties will be ignored: "+xe.join(", "))}catch(ye){we.error=ye.message,we.type="invalid"}return we}function Je(B,re){var xe,pe=!0;try{if(!i.isString(B))throw new Error("ptr is not a String");if(B!==""){if(xe=B.charAt(0),["#","/"].indexOf(xe)===-1)throw new Error("ptr must start with a / or #/");if(xe==="#"&&B!=="#"&&B.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(B.match(v))throw new Error("ptr has invalid token(s)")}}catch(we){if(re===!0)throw we;pe=!1}return pe}function le(B){try{Je(B,!0)}catch(xe){throw new Error("ptr must be a JSON Pointer: "+xe.message)}var re=B.split("/");return re.shift(),Ie(re)}function me(B,re){if(!i.isArray(B))throw new Error("path must be an Array");return(re!==!1?"#":"")+(B.length>0?"/":"")+Re(B).join("/")}function Le(B,re){var xe=Promise.resolve();return xe=xe.then(function(){if(!i.isArray(B)&&!i.isObject(B))throw new TypeError("obj must be an Array or an Object");re=ne(re,B),B=i.cloneDeep(B)}).then(function(){var pe={deps:{},docs:{},refs:{}};return function we(ye,ze,Qe){var tt,_t,it=Promise.resolve(),Ne=me(ze.subDocPath),wt=Z(ze.location),gt=l.dirname(ze.location),et=wt+Ne;return i.isUndefined(Qe.docs[wt])&&(Qe.docs[wt]=ye),i.isUndefined(Qe.deps[et])&&(Qe.deps[et]={},tt=Fe(ye,ze),i.forOwn(tt,function(Et,kt){var _n,gn,Ut=Z(ze.location)+kt,jt=Et.refdId=decodeURI(Z(k(Et)?N(gt,Et.uri):ze.location)+"#"+(Et.uri.indexOf("#")>-1?Et.uri.split("#")[1]:""));Qe.refs[Ut]=Et,E(Et)&&(Et.fqURI=jt,Qe.deps[et][kt===Ne?"#":kt.replace(Ne+"/","#/")]=jt,Ut.indexOf(jt+"/")!==0&&Ut!==jt?((_t=i.cloneDeep(ze)).subDocPath=i.isUndefined(Et.uriDetails.fragment)?[]:le(decodeURI(Et.uriDetails.fragment)),k(Et)?(delete _t.filter,_t.location=jt.split("#")[0],it=it.then((_n=Qe,gn=_t,function(){var Ze=Z(gn.location),vn=_n.docs[Ze];return i.isUndefined(vn)?U(Ze,gn).catch(function(Te){return _n.docs[Ze]=Te,Te}):Promise.resolve().then(function(){return vn})}))):it=it.then(function(){return ye}),it=it.then(function(Ze,vn,Te){return function(Ge){if(i.isError(Ge))Ee(Te,Ge);else try{return we(Ge,vn,Ze).catch(function(Vt){Ee(Te,Vt)})}catch(Vt){Ee(Te,Vt)}}}(Qe,_t,Et))):Et.circular=!0)})),it}(B,re,pe).then(function(){return pe})}).then(function(pe){var we={},ye=[],ze=[],Qe=new u.Graph,tt=Z(re.location),_t=tt+me(re.subDocPath),it=l.dirname(tt);return Object.keys(pe.deps).forEach(function(Ne){Qe.setNode(Ne)}),i.forOwn(pe.deps,function(Ne,wt){i.forOwn(Ne,function(gt){Qe.setEdge(wt,gt)})}),(ye=u.alg.findCycles(Qe)).forEach(function(Ne){Ne.forEach(function(wt){ze.indexOf(wt)===-1&&ze.push(wt)})}),i.forOwn(pe.deps,function(Ne,wt){i.forOwn(Ne,function(gt,et){var Et,kt=!1,_n=wt+et.slice(1),gn=pe.refs[wt+et.slice(1)],Ut=k(gn);ze.indexOf(gt)>-1&&ye.forEach(function(jt){kt||(Et=jt.indexOf(gt))>-1&&jt.forEach(function(Ze){kt||_n.indexOf(Ze+"/")===0&&(Ut&&Et!==jt.length-1&>[gt.length-1]==="#"||(kt=!0))})}),kt&&(gn.circular=!0)})}),i.forOwn(Object.keys(pe.deps).reverse(),function(Ne){var wt=pe.deps[Ne],gt=Ne.split("#"),et=pe.docs[gt[0]],Et=le(gt[1]);i.forOwn(wt,function(kt,_n){var gn=kt.split("#"),Ut=pe.docs[gn[0]],jt=Et.concat(le(_n)),Ze=pe.refs[gt[0]+me(jt)];if(i.isUndefined(Ze.error)&&i.isUndefined(Ze.missing))if(!re.resolveCirculars&&Ze.circular)Ze.value=i.cloneDeep(Ze.def);else{try{Ze.value=T(Ut,le(gn[1]))}catch(vn){return void Ee(Ze,vn)}gt[1]===""&&_n==="#"?pe.docs[gt[0]]=Ze.value:ae(et,jt,Ze.value)}})}),Object.keys(pe.refs).forEach(function(Ne){var wt,gt,et=pe.refs[Ne];et.type!=="invalid"&&(et.fqURI[et.fqURI.length-1]==="#"&&et.uri[et.uri.length-1]!=="#"&&(et.fqURI=et.fqURI.substr(0,et.fqURI.length-1)),wt=et.fqURI.split("/"),gt=et.uri.split("/"),i.times(gt.length-1,function(Et){var kt=gt[gt.length-Et-1],_n=gt[gt.length-Et],gn=wt.length-Et-1;kt!=="."&&kt!==".."&&_n!==".."&&(wt[gn]=kt)}),et.fqURI=wt.join("/"),et.fqURI.indexOf(tt)===0?et.fqURI=et.fqURI.replace(tt,""):et.fqURI.indexOf(it)===0&&(et.fqURI=et.fqURI.replace(it,"")),et.fqURI[0]==="/"&&(et.fqURI="."+et.fqURI)),Ne.indexOf(_t)===0&&function Et(kt,_n,gn){var Ut,jt=_n.split("#"),Ze=pe.refs[_n];we[jt[0]===re.location?"#"+jt[1]:me(re.subDocPath.concat(gn))]=Ze,!Ze.circular&&E(Ze)?(Ut=pe.deps[Ze.refdId],Ze.refdId.indexOf(kt)!==0&&Object.keys(Ut).forEach(function(vn){Et(Ze.refdId,Ze.refdId+vn.substr(1),gn.concat(le(vn)))})):!Ze.circular&&Ze.error&&(Ze.error=Ze.error.replace("options.subDocPath","JSON Pointer"),Ze.error.indexOf("#")>-1&&(Ze.error=Ze.error.replace(Ze.uri.substr(Ze.uri.indexOf("#")),Ze.uri)),Ze.error.indexOf("ENOENT:")!==0&&Ze.error.indexOf("Not Found")!==0||(Ze.error="JSON Pointer points to missing location: "+Ze.uri))}(_t,Ne,le(Ne.substr(_t.length)))}),i.forOwn(we,function(Ne,wt){delete Ne.refdId,Ne.circular&&Ne.type==="local"&&(Ne.value.$ref=Ne.fqURI,ae(pe.docs[tt],le(wt),Ne.value)),Ne.missing&&(Ne.error=Ne.error.split(": ")[0]+": "+Ne.def.$ref)}),{refs:we,resolved:pe.docs[tt]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){_={}},e.exports.decodePath=function(B){return Ie(B)},e.exports.encodePath=function(B){return Re(B)},e.exports.findRefs=function(B,re){return Fe(B,re)},e.exports.findRefsAt=function(B,re){return function(xe,pe){var we=Promise.resolve();return we=we.then(function(){if(!i.isString(xe))throw new TypeError("location must be a string");return i.isUndefined(pe)&&(pe={}),i.isObject(pe)&&(pe.location=xe),U((pe=ne(pe)).location,pe)}).then(function(ye){var ze=i.cloneDeep(_[pe.location]),Qe=i.cloneDeep(pe);return i.isUndefined(ze.refs)&&(delete Qe.filter,delete Qe.subDocPath,Qe.includeInvalid=!0,_[pe.location].refs=Fe(ye,Qe)),i.isUndefined(pe.filter)||(Qe.filter=pe.filter),{refs:Fe(ye,Qe),value:ye}})}(B,re)},e.exports.getRefDetails=function(B){return lt(B)},e.exports.isPtr=function(B,re){return Je(B,re)},e.exports.isRef=function(B,re){return function(xe,pe){return G(xe,pe)&<(xe).type!=="invalid"}(B,re)},e.exports.pathFromPtr=function(B){return le(B)},e.exports.pathToPtr=function(B,re){return me(B,re)},e.exports.resolveRefs=function(B,re){return Le(B,re)},e.exports.resolveRefsAt=function(B,re){return function(xe,pe){var we=Promise.resolve();return we=we.then(function(){if(!i.isString(xe))throw new TypeError("location must be a string");return i.isUndefined(pe)&&(pe={}),i.isObject(pe)&&(pe.location=xe),U((pe=ne(pe)).location,pe)}).then(function(ye){return Le(ye,pe).then(function(ze){return{refs:ze.refs,resolved:ze.resolved,value:ye}})})}(B,re)}}).call(this,n(13))},function(e,t,n){(function(r,i){var u;function l(f){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(f)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var f="Expected a function",d="__lodash_placeholder__",h=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],m="[object Arguments]",v="[object Array]",_="[object Boolean]",x="[object Date]",A="[object Error]",R="[object Function]",N="[object GeneratorFunction]",k="[object Map]",E="[object Number]",T="[object Object]",P="[object RegExp]",L="[object Set]",U="[object String]",G="[object Symbol]",Z="[object WeakMap]",Ee="[object ArrayBuffer]",K="[object DataView]",ae="[object Float32Array]",ne="[object Float64Array]",Ie="[object Int8Array]",Re="[object Int16Array]",Fe="[object Int32Array]",lt="[object Uint8Array]",Je="[object Uint16Array]",le="[object Uint32Array]",me=/\b__p \+= '';/g,Le=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,re=/&(?:amp|lt|gt|quot|#39);/g,xe=/[&<>"']/g,pe=RegExp(re.source),we=RegExp(xe.source),ye=/<%-([\s\S]+?)%>/g,ze=/<%([\s\S]+?)%>/g,Qe=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_t=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,wt=RegExp(Ne.source),gt=/^\s+|\s+$/g,et=/^\s+/,Et=/\s+$/,kt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_n=/\{\n\/\* \[wrapped with (.+)\] \*/,gn=/,? & /,Ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jt=/\\(\\)?/g,Ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vn=/\w*$/,Te=/^[-+]0x[0-9a-f]+$/i,Ge=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,nn=/^0o[0-7]+$/i,ln=/^(?:0|[1-9]\d*)$/,fr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gn=/($^)/,qn=/['\n\r\u2028\u2029\\]/g,dr="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Tr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$="[\\ud800-\\udfff]",z="["+Tr+"]",q="["+dr+"]",ue="\\d+",ie="[\\u2700-\\u27bf]",Ae="[a-z\\xdf-\\xf6\\xf8-\\xff]",$e="[^\\ud800-\\udfff"+Tr+ue+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ft="\\ud83c[\\udffb-\\udfff]",Bt="[^\\ud800-\\udfff]",nt="(?:\\ud83c[\\udde6-\\uddff]){2}",qt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ht="[A-Z\\xc0-\\xd6\\xd8-\\xde]",En="(?:"+Ae+"|"+$e+")",$t="(?:"+Ht+"|"+$e+")",An="(?:"+q+"|"+ft+")?",rn="[\\ufe0e\\ufe0f]?"+An+("(?:\\u200d(?:"+[Bt,nt,qt].join("|")+")[\\ufe0e\\ufe0f]?"+An+")*"),sn="(?:"+[ie,nt,qt].join("|")+")"+rn,lr="(?:"+[Bt+q+"?",q,nt,qt,$].join("|")+")",$r=RegExp("['’]","g"),Dr=RegExp(q,"g"),Jr=RegExp(ft+"(?="+ft+")|"+lr+rn,"g"),pr=RegExp([Ht+"?"+Ae+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[z,Ht,"$"].join("|")+")",$t+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[z,Ht+En,"$"].join("|")+")",Ht+"?"+En+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ue,sn].join("|"),"g"),jn=RegExp("[\\u200d\\ud800-\\udfff"+dr+"\\ufe0e\\ufe0f]"),Ji=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vu=-1,Yt={};Yt[ae]=Yt[ne]=Yt[Ie]=Yt[Re]=Yt[Fe]=Yt[lt]=Yt["[object Uint8ClampedArray]"]=Yt[Je]=Yt[le]=!0,Yt[m]=Yt[v]=Yt[Ee]=Yt[_]=Yt[K]=Yt[x]=Yt[A]=Yt[R]=Yt[k]=Yt[E]=Yt[T]=Yt[P]=Yt[L]=Yt[U]=Yt[Z]=!1;var Zt={};Zt[m]=Zt[v]=Zt[Ee]=Zt[K]=Zt[_]=Zt[x]=Zt[ae]=Zt[ne]=Zt[Ie]=Zt[Re]=Zt[Fe]=Zt[k]=Zt[E]=Zt[T]=Zt[P]=Zt[L]=Zt[U]=Zt[G]=Zt[lt]=Zt["[object Uint8ClampedArray]"]=Zt[Je]=Zt[le]=!0,Zt[A]=Zt[R]=Zt[Z]=!1;var Ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Q=parseFloat,be=parseInt,Me=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,Xt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,xt=Me||Xt||Function("return this")(),Kn=l(t)=="object"&&t&&!t.nodeType&&t,wn=Kn&&l(i)=="object"&&i&&!i.nodeType&&i,eo=wn&&wn.exports===Kn,hi=eo&&Me.process,cn=function(){try{var ee=wn&&wn.require&&wn.require("util").types;return ee||hi&&hi.binding&&hi.binding("util")}catch{}}(),qa=cn&&cn.isArrayBuffer,Ka=cn&&cn.isDate,Kc=cn&&cn.isMap,Vc=cn&&cn.isRegExp,Yc=cn&&cn.isSet,fp=cn&&cn.isTypedArray;function ei(ee,ge,he){switch(he.length){case 0:return ee.call(ge);case 1:return ee.call(ge,he[0]);case 2:return ee.call(ge,he[0],he[1]);case 3:return ee.call(ge,he[0],he[1],he[2])}return ee.apply(ge,he)}function qv(ee,ge,he,Oe){for(var mt=-1,Wt=ee==null?0:ee.length;++mt-1}function Zc(ee,ge,he){for(var Oe=-1,mt=ee==null?0:ee.length;++Oe-1;);return he}function vp(ee,ge){for(var he=ee.length;he--&&mu(ge,ee[he],0)>-1;);return he}function mp(ee,ge){for(var he=ee.length,Oe=0;he--;)ee[he]===ge&&++Oe;return Oe}var Vv=ss({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yv=ss({"&":"&","<":"<",">":">",'"':""","'":"'"});function Qv(ee){return"\\"+Ue[ee]}function Zu(ee){return jn.test(ee)}function Ya(ee){var ge=-1,he=Array(ee.size);return ee.forEach(function(Oe,mt){he[++ge]=[mt,Oe]}),he}function yp(ee,ge){return function(he){return ee(ge(he))}}function Vo(ee,ge){for(var he=-1,Oe=ee.length,mt=0,Wt=[];++he",""":'"',"'":"'"}),Yo=function ee(ge){var he,Oe=(ge=ge==null?xt:Yo.defaults(xt.Object(),ge,Yo.pick(xt,pi))).Array,mt=ge.Date,Wt=ge.Error,tr=ge.Function,yn=ge.Math,fn=ge.Object,xo=ge.RegExp,_p=ge.String,Fr=ge.TypeError,Cr=Oe.prototype,wp=tr.prototype,_u=fn.prototype,Qa=ge["__core-js_shared__"],Za=wp.toString,tn=_u.hasOwnProperty,xp=0,zr=(he=/[^.]+$/.exec(Qa&&Qa.keys&&Qa.keys.IE_PROTO||""))?"Symbol(src)_1."+he:"",hs=_u.toString,vi=Za.call(fn),Xv=xt._,bp=xo("^"+Za.call(tn).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=eo?ge.Buffer:void 0,Pi=ge.Symbol,Ju=ge.Uint8Array,xn=Ri?Ri.allocUnsafe:void 0,Ii=yp(fn.getPrototypeOf,fn),gs=fn.create,Sp=_u.propertyIsEnumerable,ea=Cr.splice,Ep=Pi?Pi.isConcatSpreadable:void 0,Xa=Pi?Pi.iterator:void 0,wu=Pi?Pi.toStringTag:void 0,Ja=function(){try{var a=oo(fn,"defineProperty");return a({},"",{}),a}catch{}}(),vs=ge.clearTimeout!==xt.clearTimeout&&ge.clearTimeout,ta=mt&&mt.now!==xt.Date.now&&mt.now,Jv=ge.setTimeout!==xt.setTimeout&&ge.setTimeout,el=yn.ceil,tl=yn.floor,nl=fn.getOwnPropertySymbols,Jc=Ri?Ri.isBuffer:void 0,ef=ge.isFinite,em=Cr.join,tf=yp(fn.keys,fn),Fn=yn.max,yr=yn.min,kp=mt.now,ti=ge.parseInt,ms=yn.random,rl=Cr.reverse,ys=oo(ge,"DataView"),na=oo(ge,"Map"),nf=oo(ge,"Promise"),ra=oo(ge,"Set"),il=oo(ge,"WeakMap"),ol=oo(fn,"create"),_s=il&&new il,ji={},tm=Ru(ys),nm=Ru(na),rf=Ru(nf),Tp=Ru(ra),Qo=Ru(il),xu=Pi?Pi.prototype:void 0,ul=xu?xu.valueOf:void 0,Cp=xu?xu.toString:void 0;function O(a){if($n(a)&&!ot(a)&&!(a instanceof Lt)){if(a instanceof ni)return a;if(tn.call(a,"__wrapped__"))return eh(a)}return new ni(a)}var Li=function(){function a(){}return function(c){if(!pn(c))return{};if(gs)return gs(c);a.prototype=c;var g=new a;return a.prototype=void 0,g}}();function Ur(){}function ni(a,c){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=void 0}function Lt(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function bu(a){var c=-1,g=a==null?0:a.length;for(this.clear();++c=c?a:c)),a}function mi(a,c,g,w,b,j){var F,W=1&c,J=2&c,ce=4&c;if(g&&(F=b?g(a,w,b,j):g(a)),F!==void 0)return F;if(!pn(a))return a;var se=ot(a);if(se){if(F=function(ve){var Ce=ve.length,ct=new ve.constructor(Ce);return Ce&&typeof ve[0]=="string"&&tn.call(ve,"index")&&(ct.index=ve.index,ct.input=ve.input),ct}(a),!W)return Nn(a,F)}else{var Se=Qt(a),Be=Se==R||Se==N;if(ui(a))return no(a,W);if(Se==T||Se==m||Be&&!b){if(F=J||Be?{}:xf(a),!W)return J?function(ve,Ce){return ro(ve,wf(ve),Ce)}(a,function(ve,Ce){return ve&&ro(Ce,Xn(Ce),ve)}(F,a)):function(ve,Ce){return ro(ve,_f(ve),Ce)}(a,ws(F,a))}else{if(!Zt[Se])return b?a:{};F=function(ve,Ce,ct){var He=ve.constructor;switch(Ce){case Ee:return pf(ve);case _:case x:return new He(+ve);case K:return function(dt,At){var Xe=At?pf(dt.buffer):dt.buffer;return new dt.constructor(Xe,dt.byteOffset,dt.byteLength)}(ve,ct);case ae:case ne:case Ie:case Re:case Fe:case lt:case"[object Uint8ClampedArray]":case Je:case le:return zp(ve,ct);case k:return new He;case E:case U:return new He(ve);case P:return function(dt){var At=new dt.constructor(dt.source,vn.exec(dt));return At.lastIndex=dt.lastIndex,At}(ve);case L:return new He;case G:return Ke=ve,ul?fn(ul.call(Ke)):{}}var Ke}(a,Se,W)}}j||(j=new _r);var qe=j.get(a);if(qe)return qe;j.set(a,F),Al(a)?a.forEach(function(ve){F.add(mi(ve,c,g,ve,a,j))}):Mf(a)&&a.forEach(function(ve,Ce){F.set(Ce,mi(ve,c,g,Ce,a,j))});var st=se?void 0:(ce?J?mf:Hr:J?Xn:Zn)(a);return gi(st||a,function(ve,Ce){st&&(ve=a[Ce=ve]),Mt(F,Ce,mi(ve,c,g,Ce,a,j))}),F}function Eu(a,c,g){var w=g.length;if(a==null)return!w;for(a=fn(a);w--;){var b=g[w],j=c[b],F=a[b];if(F===void 0&&!(b in a)||!j(F))return!1}return!0}function al(a,c,g){if(typeof a!="function")throw new Fr(f);return kl(function(){a.apply(void 0,g)},c)}function Zo(a,c,g,w){var b=-1,j=Qu,F=!0,W=a.length,J=[],ce=c.length;if(!W)return J;g&&(c=kn(c,Mr(g))),w?(j=Zc,F=!1):c.length>=200&&(j=Va,F=!1,c=new Su(c));e:for(;++b-1},bo.prototype.set=function(a,c){var g=this.__data__,w=Ln(g,a);return w<0?(++this.size,g.push([a,c])):g[w][1]=c,this},So.prototype.clear=function(){this.size=0,this.__data__={hash:new bu,map:new(na||bo),string:new bu}},So.prototype.delete=function(a){var c=El(this,a).delete(a);return this.size-=c?1:0,c},So.prototype.get=function(a){return El(this,a).get(a)},So.prototype.has=function(a){return El(this,a).has(a)},So.prototype.set=function(a,c){var g=El(this,a),w=g.size;return g.set(a,c),this.size+=g.size==w?0:1,this},Su.prototype.add=Su.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},Su.prototype.has=function(a){return this.__data__.has(a)},_r.prototype.clear=function(){this.__data__=new bo,this.size=0},_r.prototype.delete=function(a){var c=this.__data__,g=c.delete(a);return this.size=c.size,g},_r.prototype.get=function(a){return this.__data__.get(a)},_r.prototype.has=function(a){return this.__data__.has(a)},_r.prototype.set=function(a,c){var g=this.__data__;if(g instanceof bo){var w=g.__data__;if(!na||w.length<199)return w.push([a,c]),this.size=++g.size,this;g=this.__data__=new So(w)}return g.set(a,c),this.size=g.size,this};var Nt=Wp(gr),Ap=Wp(ia,!0);function Op(a,c){var g=!0;return Nt(a,function(w,b,j){return g=!!c(w,b,j)}),g}function ku(a,c,g){for(var w=-1,b=a.length;++w0&&g(W)?c>1?hr(W,c-1,g,w,b):Oi(b,W):w||(b[b.length]=W)}return b}var of=Gp(),ll=Gp(!0);function gr(a,c){return a&&of(a,c,Zn)}function ia(a,c){return a&&ll(a,c,Zn)}function sl(a,c){return wo(c,function(g){return Io(a[g])})}function ko(a,c){for(var g=0,w=(c=eu(c,a)).length;a!=null&&gc}function Pp(a,c){return a!=null&&tn.call(a,c)}function cl(a,c){return a!=null&&c in fn(a)}function To(a,c,g){for(var w=g?Zc:Qu,b=a[0].length,j=a.length,F=j,W=Oe(j),J=1/0,ce=[];F--;){var se=a[F];F&&c&&(se=kn(se,Mr(c))),J=yr(se.length,J),W[F]=!g&&(c||b>=120&&se.length>=120)?new Su(F&&se):void 0}se=a[0];var Se=-1,Be=W[0];e:for(;++Se=qe)return st;var ve=J[ce];return st*(ve=="desc"?-1:1)}}return F.index-W.index}(b,j,g)})}function lf(a,c,g){for(var w=-1,b=c.length,j={};++w-1;)W!==a&&ea.call(W,J,1),ea.call(a,J,1);return a}function bs(a,c){for(var g=a?c.length:0,w=g-1;g--;){var b=c[g];if(g==w||b!==j){var j=b;Ni(b)?ea.call(a,b,1):la(a,b)}}return a}function Tu(a,c){return a+tl(ms()*(c-a+1))}function gl(a,c){var g="";if(!a||c<1||c>9007199254740991)return g;do c%2&&(g+=a),(c=tl(c/2))&&(a+=a);while(c);return g}function yt(a,c){return Sf(Xp(a,c,qr),a+"")}function vl(a){return oe(ma(a))}function ml(a,c){var g=ma(a);return js(g,to(c,0,g.length))}function Jo(a,c,g,w){if(!pn(a))return a;for(var b=-1,j=(c=eu(c,a)).length,F=j-1,W=a;W!=null&&++bb?0:b+c),(g=g>b?b:g)<0&&(g+=b),b=c>g?0:g-c>>>0,c>>>=0;for(var j=Oe(b);++w>>1,F=a[j];F!==null&&!xr(F)&&(g?F<=c:F=200){var ce=c?null:xl(a);if(ce)return ps(ce);F=!1,b=Va,J=new Su}else J=c?[]:W;e:for(;++w=w?a:yi(a,c,g)}var Fp=vs||function(a){return xt.clearTimeout(a)};function no(a,c){if(c)return a.slice();var g=a.length,w=xn?xn(g):new a.constructor(g);return a.copy(w),w}function pf(a){var c=new a.constructor(a.byteLength);return new Ju(c).set(new Ju(a)),c}function zp(a,c){var g=c?pf(a.buffer):a.buffer;return new a.constructor(g,a.byteOffset,a.length)}function Up(a,c){if(a!==c){var g=a!==void 0,w=a===null,b=a==a,j=xr(a),F=c!==void 0,W=c===null,J=c==c,ce=xr(c);if(!W&&!ce&&!j&&a>c||j&&F&&J&&!W&&!ce||w&&F&&J||!g&&J||!b)return 1;if(!w&&!j&&!ce&&a1?g[b-1]:void 0,F=b>2?g[2]:void 0;for(j=a.length>3&&typeof j=="function"?(b--,j):void 0,F&&sr(g[0],g[1],F)&&(j=b<3?void 0:j,b=1),c=fn(c);++w-1?b[j?c[F]:F]:void 0}}function qp(a){return Ar(function(c){var g=c.length,w=g,b=ni.prototype.thru;for(a&&c.reverse();w--;){var j=c[w];if(typeof j!="function")throw new Fr(f);if(b&&!F&&Sl(j)=="wrapper")var F=new ni([],!0)}for(w=F?w:g;++w1&&He.reverse(),se&&JW))return!1;var ce=j.get(a);if(ce&&j.get(c))return ce==c;var se=-1,Se=!0,Be=2&g?new Su:void 0;for(j.set(a,c),j.set(c,a);++se-1&&a%1==0&&a1?"& ":"")+j[W],j=j.join(F>2?", ":" "),b.replace(kt,`{ -/* [wrapped with `+j+`] */ -`)}(w,function(b,j){return gi(h,function(F){var W="_."+F[0];j&F[1]&&!Qu(b,W)&&b.push(W)}),b.sort()}(function(b){var j=b.match(_n);return j?j[1].split(gn):[]}(w),g)))}function Jp(a){var c=0,g=0;return function(){var w=kp(),b=16-(w-g);if(g=w,b>0){if(++c>=800)return arguments[0]}else c=0;return a.apply(void 0,arguments)}}function js(a,c){var g=-1,w=a.length,b=w-1;for(c=c===void 0?w:c;++g1?a[c-1]:void 0;return g=typeof g=="function"?(a.pop(),g):void 0,Ds(a,g)});function sh(a){var c=O(a);return c.__chain__=!0,c}function Rr(a,c){return c(a)}var hm=Ar(function(a){var c=a.length,g=c?a[0]:0,w=this.__wrapped__,b=function(j){return Br(j,a)};return!(c>1||this.__actions__.length)&&w instanceof Lt&&Ni(g)?((w=w.slice(g,+g+(c?1:0))).__actions__.push({func:Rr,args:[b],thisArg:void 0}),new ni(w,this.__chain__).thru(function(j){return c&&!j.length&&j.push(void 0),j})):this.thru(b)}),Ms=Es(function(a,c,g){tn.call(a,g)?++a[g]:Eo(a,g,1)}),Pf=_i(nh),ch=_i(Ns);function If(a,c){return(ot(a)?gi:Nt)(a,Ve(c,3))}function Wr(a,c){return(ot(a)?dp:Ap)(a,Ve(c,3))}var ru=Es(function(a,c,g){tn.call(a,g)?a[g].push(c):Eo(a,g,[c])}),jf=yt(function(a,c,g){var w=-1,b=typeof c=="function",j=Gr(a)?Oe(a.length):[];return Nt(a,function(F){j[++w]=b?ei(c,F,g):Xo(F,c,g)}),j}),fh=Es(function(a,c,g){Eo(a,g,c)});function Pu(a,c){return(ot(a)?kn:jp)(a,Ve(c,3))}var dh=Es(function(a,c,g){a[g?0:1].push(c)},function(){return[[],[]]}),Lf=yt(function(a,c){if(a==null)return[];var g=c.length;return g>1&&sr(a,c[0],c[1])?c=[]:g>2&&sr(c[0],c[1],c[2])&&(c=[c[0]]),$p(a,hr(c,1),[])}),Cl=ta||function(){return xt.Date.now()};function Fs(a,c,g){return c=g?void 0:c,Ao(a,128,void 0,void 0,void 0,void 0,c=a&&c==null?a.length:c)}function zs(a,c){var g;if(typeof c!="function")throw new Fr(f);return a=bt(a),function(){return--a>0&&(g=c.apply(this,arguments)),a<=1&&(c=void 0),g}}var ao=yt(function(a,c,g){var w=1;if(g.length){var b=Vo(g,io(ao));w|=32}return Ao(a,w,c,g,b)}),ph=yt(function(a,c,g){var w=3;if(g.length){var b=Vo(g,io(ph));w|=32}return Ao(c,w,a,g,b)});function Po(a,c,g){var w,b,j,F,W,J,ce=0,se=!1,Se=!1,Be=!0;if(typeof a!="function")throw new Fr(f);function qe(Ke){var dt=w,At=b;return w=b=void 0,ce=Ke,F=a.apply(At,dt)}function st(Ke){return ce=Ke,W=kl(Ce,c),se?qe(Ke):F}function ve(Ke){var dt=Ke-J;return J===void 0||dt>=c||dt<0||Se&&Ke-ce>=j}function Ce(){var Ke=Cl();if(ve(Ke))return ct(Ke);W=kl(Ce,function(dt){var At=c-(dt-J);return Se?yr(At,j-(dt-ce)):At}(Ke))}function ct(Ke){return W=void 0,Be&&w?qe(Ke):(w=b=void 0,F)}function He(){var Ke=Cl(),dt=ve(Ke);if(w=arguments,b=this,J=Ke,dt){if(W===void 0)return st(J);if(Se)return Fp(W),W=kl(Ce,c),qe(J)}return W===void 0&&(W=kl(Ce,c)),F}return c=Qn(c)||0,pn(g)&&(se=!!g.leading,j=(Se="maxWait"in g)?Fn(Qn(g.maxWait)||0,c):j,Be="trailing"in g?!!g.trailing:Be),He.cancel=function(){W!==void 0&&Fp(W),ce=0,w=J=b=W=void 0},He.flush=function(){return W===void 0?F:ct(Cl())},He}var hh=yt(function(a,c){return al(a,1,c)}),gh=yt(function(a,c,g){return al(a,Qn(c)||0,g)});function da(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new Fr(f);var g=function w(){var b=arguments,j=c?c.apply(this,b):b[0],F=w.cache;if(F.has(j))return F.get(j);var W=a.apply(this,b);return w.cache=F.set(j,W)||F,W};return g.cache=new(da.Cache||So),g}function Us(a){if(typeof a!="function")throw new Fr(f);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}da.Cache=So;var gm=am(function(a,c){var g=(c=c.length==1&&ot(c[0])?kn(c[0],Mr(Ve())):kn(hr(c,1),Mr(Ve()))).length;return yt(function(w){for(var b=-1,j=yr(w.length,g);++b=c}),Yn=Ip(function(){return arguments}())?Ip:function(a){return $n(a)&&tn.call(a,"callee")&&!Sp.call(a,"callee")},ot=Oe.isArray,vm=qa?Mr(qa):function(a){return $n(a)&&wr(a)==Ee};function Gr(a){return a!=null&&jo(a.length)&&!Io(a)}function Tn(a){return $n(a)&&Gr(a)}var ui=Jc||wi,_h=Ka?Mr(Ka):function(a){return $n(a)&&wr(a)==x};function Bs(a){if(!$n(a))return!1;var c=wr(a);return c==A||c=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!iu(a)}function Io(a){if(!pn(a))return!1;var c=wr(a);return c==R||c==N||c=="[object AsyncFunction]"||c=="[object Proxy]"}function Df(a){return typeof a=="number"&&a==bt(a)}function jo(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function pn(a){var c=l(a);return a!=null&&(c=="object"||c=="function")}function $n(a){return a!=null&&l(a)=="object"}var Mf=Kc?Mr(Kc):function(a){return $n(a)&&Qt(a)==k};function Ff(a){return typeof a=="number"||$n(a)&&wr(a)==E}function iu(a){if(!$n(a)||wr(a)!=T)return!1;var c=Ii(a);if(c===null)return!0;var g=tn.call(c,"constructor")&&c.constructor;return typeof g=="function"&&g instanceof g&&Za.call(g)==vi}var Hs=Vc?Mr(Vc):function(a){return $n(a)&&wr(a)==P},Al=Yc?Mr(Yc):function(a){return $n(a)&&Qt(a)==L};function pa(a){return typeof a=="string"||!ot(a)&&$n(a)&&wr(a)==U}function xr(a){return l(a)=="symbol"||$n(a)&&wr(a)==G}var ha=fp?Mr(fp):function(a){return $n(a)&&jo(a.length)&&!!Yt[wr(a)]},wh=Cs(xs),Ws=Cs(function(a,c){return a<=c});function zf(a){if(!a)return[];if(Gr(a))return pa(a)?Dt(a):Nn(a);if(Xa&&a[Xa])return function(g){for(var w,b=[];!(w=g.next()).done;)b.push(w.value);return b}(a[Xa]());var c=Qt(a);return(c==k?Ya:c==L?ps:ma)(a)}function Mi(a){return a?(a=Qn(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function bt(a){var c=Mi(a),g=c%1;return c==c?g?c-g:c:0}function Uf(a){return a?to(bt(a),0,4294967295):0}function Qn(a){if(typeof a=="number")return a;if(xr(a))return NaN;if(pn(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=pn(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=a.replace(gt,"");var g=Ge.test(a);return g||nn.test(a)?be(a.slice(2),g?2:8):Te.test(a)?NaN:+a}function Bf(a){return ro(a,Xn(a))}function Jt(a){return a==null?"":C(a)}var mm=sa(function(a,c){if(Au(c)||Gr(c))ro(c,Zn(c),a);else for(var g in c)tn.call(c,g)&&Mt(a,g,c[g])}),Hf=sa(function(a,c){ro(c,Xn(c),a)}),Gs=sa(function(a,c,g,w){ro(c,Xn(c),a,w)}),ym=sa(function(a,c,g,w){ro(c,Zn(c),a,w)}),Lo=Ar(Br),Wf=yt(function(a,c){a=fn(a);var g=-1,w=c.length,b=w>2?c[2]:void 0;for(b&&sr(c[0],c[1],b)&&(w=1);++g1),j}),ro(a,mf(a),g),w&&(g=mi(g,7,Oo));for(var b=c.length;b--;)la(g,c[b]);return g}),br=Ar(function(a,c){return a==null?{}:function(g,w){return lf(g,w,function(b,j){return ga(g,j)})}(a,c)});function bh(a,c){if(a==null)return{};var g=kn(mf(a),function(w){return[w]});return c=Ve(c),lf(a,g,function(w,b){return c(w,b[0])})}var Sh=bl(Zn),qf=bl(Xn);function ma(a){return a==null?[]:ds(a,Zn(a))}var Eh=ca(function(a,c,g){return c=c.toLowerCase(),a+(g?kh(c):c)});function kh(a){return Yf(Jt(a).toLowerCase())}function Th(a){return(a=Jt(a))&&a.replace(fr,Vv).replace(Dr,"")}var wm=ca(function(a,c,g){return a+(g?"-":"")+c.toLowerCase()}),No=ca(function(a,c,g){return a+(g?" ":"")+c.toLowerCase()}),Pr=nu("toLowerCase"),Kf=ca(function(a,c,g){return a+(g?"_":"")+c.toLowerCase()}),xm=ca(function(a,c,g){return a+(g?" ":"")+Yf(c)}),Vf=ca(function(a,c,g){return a+(g?" ":"")+c.toUpperCase()}),Yf=nu("toUpperCase");function Ch(a,c,g){return a=Jt(a),(c=g?void 0:c)===void 0?function(w){return Ji.test(w)}(a)?function(w){return w.match(pr)||[]}(a):function(w){return w.match(Ut)||[]}(a):a.match(c)||[]}var ya=yt(function(a,c){try{return ei(a,void 0,c)}catch(g){return Bs(g)?g:new Wt(g)}}),Ah=Ar(function(a,c){return gi(c,function(g){g=$i(g),Eo(a,g,ao(a[g],a))}),a});function Vs(a){return function(){return a}}var bm=qp(),Sm=qp(!0);function qr(a){return a}function Qf(a){return pl(typeof a=="function"?a:mi(a,1))}var Oh=yt(function(a,c){return function(g){return Xo(g,a,c)}}),Rh=yt(function(a,c){return function(g){return Xo(a,g,c)}});function Zf(a,c,g){var w=Zn(c),b=sl(c,w);g!=null||pn(c)&&(b.length||!w.length)||(g=c,c=a,a=this,b=sl(c,Zn(c)));var j=!(pn(g)&&"chain"in g&&!g.chain),F=Io(a);return gi(b,function(W){var J=c[W];a[W]=J,F&&(a.prototype[W]=function(){var ce=this.__chain__;if(j||ce){var se=a(this.__wrapped__),Se=se.__actions__=Nn(this.__actions__);return Se.push({func:J,args:arguments,thisArg:a}),se.__chain__=ce,se}return J.apply(a,Oi([this.value()],arguments))})}),a}function Rl(){}var Ph=hf(kn),Pl=hf(Qc),Xf=hf(is);function Jf(a){return Ro(a)?ls($i(a)):function(c){return function(g){return ko(g,c)}}(a)}var Ih=gf(),Ys=gf(!0);function Qs(){return[]}function wi(){return!1}var Iu=Ts(function(a,c){return a+c},0),Em=wl("ceil"),jh=Ts(function(a,c){return a/c},1),km=wl("floor"),ed,Tm=Ts(function(a,c){return a*c},1),Cm=wl("round"),Am=Ts(function(a,c){return a-c},0);return O.after=function(a,c){if(typeof c!="function")throw new Fr(f);return a=bt(a),function(){if(--a<1)return c.apply(this,arguments)}},O.ary=Fs,O.assign=mm,O.assignIn=Hf,O.assignInWith=Gs,O.assignWith=ym,O.at=Lo,O.before=zs,O.bind=ao,O.bindAll=Ah,O.bindKey=ph,O.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return ot(a)?a:[a]},O.chain=sh,O.chunk=function(a,c,g){c=(g?sr(a,c,g):c===void 0)?1:Fn(bt(c),0);var w=a==null?0:a.length;if(!w||c<1)return[];for(var b=0,j=0,F=Oe(el(w/c));bce?0:ce+W),(J=J===void 0||J>ce?ce:bt(J))<0&&(J+=ce),J=W>J?0:Uf(J);W>>0)?(a=Jt(a))&&(typeof c=="string"||c!=null&&!Hs(c))&&!(c=C(c))&&Zu(a)?tu(Dt(a),0,g):a.split(c,g):[]},O.spread=function(a,c){if(typeof a!="function")throw new Fr(f);return c=c==null?0:Fn(bt(c),0),yt(function(g){var w=g[c],b=tu(g,0,c);return w&&Oi(b,w),ei(a,this,b)})},O.tail=function(a){var c=a==null?0:a.length;return c?yi(a,1,c):[]},O.take=function(a,c,g){return a&&a.length?yi(a,0,(c=g||c===void 0?1:bt(c))<0?0:c):[]},O.takeRight=function(a,c,g){var w=a==null?0:a.length;return w?yi(a,(c=w-(c=g||c===void 0?1:bt(c)))<0?0:c,w):[]},O.takeRightWhile=function(a,c){return a&&a.length?Tt(a,Ve(c,3),!1,!0):[]},O.takeWhile=function(a,c){return a&&a.length?Tt(a,Ve(c,3)):[]},O.tap=function(a,c){return c(a),a},O.throttle=function(a,c,g){var w=!0,b=!0;if(typeof a!="function")throw new Fr(f);return pn(g)&&(w="leading"in g?!!g.leading:w,b="trailing"in g?!!g.trailing:b),Po(a,c,{leading:w,maxWait:c,trailing:b})},O.thru=Rr,O.toArray=zf,O.toPairs=Sh,O.toPairsIn=qf,O.toPath=function(a){return ot(a)?kn(a,$i):xr(a)?[a]:Nn(Ls(Jt(a)))},O.toPlainObject=Bf,O.transform=function(a,c,g){var w=ot(a),b=w||ui(a)||ha(a);if(c=Ve(c,4),g==null){var j=a&&a.constructor;g=b?w?new j:[]:pn(a)&&Io(j)?Li(Ii(a)):{}}return(b?gi:gr)(a,function(F,W,J){return c(g,F,W,J)}),g},O.unary=function(a){return Fs(a,1)},O.union=Af,O.unionBy=ah,O.unionWith=Of,O.uniq=function(a){return a&&a.length?ri(a):[]},O.uniqBy=function(a,c){return a&&a.length?ri(a,Ve(c,2)):[]},O.uniqWith=function(a,c){return c=typeof c=="function"?c:void 0,a&&a.length?ri(a,void 0,c):[]},O.unset=function(a,c){return a==null||la(a,c)},O.unzip=Rf,O.unzipWith=Ds,O.update=function(a,c,g){return a==null?a:ii(a,c,df(g))},O.updateWith=function(a,c,g,w){return w=typeof w=="function"?w:void 0,a==null?a:ii(a,c,df(g),w)},O.values=ma,O.valuesIn=function(a){return a==null?[]:ds(a,Xn(a))},O.without=Ct,O.words=Ch,O.wrap=function(a,c){return Nf(df(c),a)},O.xor=fm,O.xorBy=dm,O.xorWith=Tl,O.zip=lh,O.zipObject=function(a,c){return Mp(a||[],c||[],Mt)},O.zipObjectDeep=function(a,c){return Mp(a||[],c||[],Jo)},O.zipWith=pm,O.entries=Sh,O.entriesIn=qf,O.extend=Hf,O.extendWith=Gs,Zf(O,O),O.add=Iu,O.attempt=ya,O.camelCase=Eh,O.capitalize=kh,O.ceil=Em,O.clamp=function(a,c,g){return g===void 0&&(g=c,c=void 0),g!==void 0&&(g=(g=Qn(g))==g?g:0),c!==void 0&&(c=(c=Qn(c))==c?c:0),to(Qn(a),c,g)},O.clone=function(a){return mi(a,4)},O.cloneDeep=function(a){return mi(a,5)},O.cloneDeepWith=function(a,c){return mi(a,5,c=typeof c=="function"?c:void 0)},O.cloneWith=function(a,c){return mi(a,4,c=typeof c=="function"?c:void 0)},O.conformsTo=function(a,c){return c==null||Eu(a,c,Zn(c))},O.deburr=Th,O.defaultTo=function(a,c){return a==null||a!=a?c:a},O.divide=jh,O.endsWith=function(a,c,g){a=Jt(a),c=C(c);var w=a.length,b=g=g===void 0?w:to(bt(g),0,w);return(g-=c.length)>=0&&a.slice(g,b)==c},O.eq=Di,O.escape=function(a){return(a=Jt(a))&&we.test(a)?a.replace(xe,Yv):a},O.escapeRegExp=function(a){return(a=Jt(a))&&wt.test(a)?a.replace(Ne,"\\$&"):a},O.every=function(a,c,g){var w=ot(a)?Qc:Op;return g&&sr(a,c,g)&&(c=void 0),w(a,Ve(c,3))},O.find=Pf,O.findIndex=nh,O.findKey=function(a,c){return os(a,Ve(c,3),gr)},O.findLast=ch,O.findLastIndex=Ns,O.findLastKey=function(a,c){return os(a,Ve(c,3),ia)},O.floor=km,O.forEach=If,O.forEachRight=Wr,O.forIn=function(a,c){return a==null?a:of(a,Ve(c,3),Xn)},O.forInRight=function(a,c){return a==null?a:ll(a,Ve(c,3),Xn)},O.forOwn=function(a,c){return a&&gr(a,Ve(c,3))},O.forOwnRight=function(a,c){return a&&ia(a,Ve(c,3))},O.get=Ol,O.gt=mh,O.gte=yh,O.has=function(a,c){return a!=null&&Rs(a,c,Pp)},O.hasIn=ga,O.head=Tf,O.identity=qr,O.includes=function(a,c,g,w){a=Gr(a)?a:ma(a),g=g&&!w?bt(g):0;var b=a.length;return g<0&&(g=Fn(b+g,0)),pa(a)?g<=b&&a.indexOf(c,g)>-1:!!b&&mu(a,c,g)>-1},O.indexOf=function(a,c,g){var w=a==null?0:a.length;if(!w)return-1;var b=g==null?0:bt(g);return b<0&&(b=Fn(w+b,0)),mu(a,c,b)},O.inRange=function(a,c,g){return c=Mi(c),g===void 0?(g=c,c=0):g=Mi(g),function(w,b,j){return w>=yr(b,j)&&w=-9007199254740991&&a<=9007199254740991},O.isSet=Al,O.isString=pa,O.isSymbol=xr,O.isTypedArray=ha,O.isUndefined=function(a){return a===void 0},O.isWeakMap=function(a){return $n(a)&&Qt(a)==Z},O.isWeakSet=function(a){return $n(a)&&wr(a)=="[object WeakSet]"},O.join=function(a,c){return a==null?"":em.call(a,c)},O.kebabCase=wm,O.last=oi,O.lastIndexOf=function(a,c,g){var w=a==null?0:a.length;if(!w)return-1;var b=w;return g!==void 0&&(b=(b=bt(g))<0?Fn(w+b,0):yr(b,w-1)),c==c?function(j,F,W){for(var J=W+1;J--;)if(j[J]===F)return J;return J}(a,c,b):us(a,as,b,!0)},O.lowerCase=No,O.lowerFirst=Pr,O.lt=wh,O.lte=Ws,O.max=function(a){return a&&a.length?ku(a,qr,oa):void 0},O.maxBy=function(a,c){return a&&a.length?ku(a,Ve(c,2),oa):void 0},O.mean=function(a){return yu(a,qr)},O.meanBy=function(a,c){return yu(a,Ve(c,2))},O.min=function(a){return a&&a.length?ku(a,qr,xs):void 0},O.minBy=function(a,c){return a&&a.length?ku(a,Ve(c,2),xs):void 0},O.stubArray=Qs,O.stubFalse=wi,O.stubObject=function(){return{}},O.stubString=function(){return""},O.stubTrue=function(){return!0},O.multiply=Tm,O.nth=function(a,c){return a&&a.length?Np(a,bt(c)):void 0},O.noConflict=function(){return xt._===this&&(xt._=Xv),this},O.noop=Rl,O.now=Cl,O.pad=function(a,c,g){a=Jt(a);var w=(c=bt(c))?Xu(a):0;if(!c||w>=c)return a;var b=(c-w)/2;return _l(tl(b),g)+a+_l(el(b),g)},O.padEnd=function(a,c,g){a=Jt(a);var w=(c=bt(c))?Xu(a):0;return c&&wc){var w=a;a=c,c=w}if(g||a%1||c%1){var b=ms();return yr(a+b*(c-a+Q("1e-"+((b+"").length-1))),c)}return Tu(a,c)},O.reduce=function(a,c,g){var w=ot(a)?rs:hp,b=arguments.length<3;return w(a,Ve(c,4),g,b,Nt)},O.reduceRight=function(a,c,g){var w=ot(a)?Kv:hp,b=arguments.length<3;return w(a,Ve(c,4),g,b,Ap)},O.repeat=function(a,c,g){return c=(g?sr(a,c,g):c===void 0)?1:bt(c),gl(Jt(a),c)},O.replace=function(){var a=arguments,c=Jt(a[0]);return a.length<3?c:c.replace(a[1],a[2])},O.result=function(a,c,g){var w=-1,b=(c=eu(c,a)).length;for(b||(b=1,a=void 0);++w9007199254740991)return[];var g=4294967295,w=yr(a,4294967295);a-=4294967295;for(var b=fs(w,c=Ve(c));++g=j)return a;var W=g-Xu(w);if(W<1)return w;var J=F?tu(F,0,W).join(""):a.slice(0,W);if(b===void 0)return J+w;if(F&&(W+=J.length-W),Hs(b)){if(a.slice(W).search(b)){var ce,se=J;for(b.global||(b=xo(b.source,Jt(vn.exec(b))+"g")),b.lastIndex=0;ce=b.exec(se);)var Se=ce.index;J=J.slice(0,Se===void 0?W:Se)}}else if(a.indexOf(C(b),W)!=W){var Be=J.lastIndexOf(b);Be>-1&&(J=J.slice(0,Be))}return J+w},O.unescape=function(a){return(a=Jt(a))&&pe.test(a)?a.replace(re,mn):a},O.uniqueId=function(a){var c=++xp;return Jt(a)+c},O.upperCase=Vf,O.upperFirst=Yf,O.each=If,O.eachRight=Wr,O.first=Tf,Zf(O,(ed={},gr(O,function(a,c){tn.call(O.prototype,c)||(ed[c]=a)}),ed),{chain:!1}),O.VERSION="4.17.15",gi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){O[a].placeholder=O}),gi(["drop","take"],function(a,c){Lt.prototype[a]=function(g){g=g===void 0?1:Fn(bt(g),0);var w=this.__filtered__&&!c?new Lt(this):this.clone();return w.__filtered__?w.__takeCount__=yr(g,w.__takeCount__):w.__views__.push({size:yr(g,4294967295),type:a+(w.__dir__<0?"Right":"")}),w},Lt.prototype[a+"Right"]=function(g){return this.reverse()[a](g).reverse()}}),gi(["filter","map","takeWhile"],function(a,c){var g=c+1,w=g==1||g==3;Lt.prototype[a]=function(b){var j=this.clone();return j.__iteratees__.push({iteratee:Ve(b,3),type:g}),j.__filtered__=j.__filtered__||w,j}}),gi(["head","last"],function(a,c){var g="take"+(c?"Right":"");Lt.prototype[a]=function(){return this[g](1).value()[0]}}),gi(["initial","tail"],function(a,c){var g="drop"+(c?"":"Right");Lt.prototype[a]=function(){return this.__filtered__?new Lt(this):this[g](1)}}),Lt.prototype.compact=function(){return this.filter(qr)},Lt.prototype.find=function(a){return this.filter(a).head()},Lt.prototype.findLast=function(a){return this.reverse().find(a)},Lt.prototype.invokeMap=yt(function(a,c){return typeof a=="function"?new Lt(this):this.map(function(g){return Xo(g,a,c)})}),Lt.prototype.reject=function(a){return this.filter(Us(Ve(a)))},Lt.prototype.slice=function(a,c){a=bt(a);var g=this;return g.__filtered__&&(a>0||c<0)?new Lt(g):(a<0?g=g.takeRight(-a):a&&(g=g.drop(a)),c!==void 0&&(g=(c=bt(c))<0?g.dropRight(-c):g.take(c-a)),g)},Lt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Lt.prototype.toArray=function(){return this.take(4294967295)},gr(Lt.prototype,function(a,c){var g=/^(?:filter|find|map|reject)|While$/.test(c),w=/^(?:head|last)$/.test(c),b=O[w?"take"+(c=="last"?"Right":""):c],j=w||/^find/.test(c);b&&(O.prototype[c]=function(){var F=this.__wrapped__,W=w?[1]:arguments,J=F instanceof Lt,ce=W[0],se=J||ot(F),Se=function(ct){var He=b.apply(O,Oi([ct],W));return w&&Be?He[0]:He};se&&g&&typeof ce=="function"&&ce.length!=1&&(J=se=!1);var Be=this.__chain__,qe=!!this.__actions__.length,st=j&&!Be,ve=J&&!qe;if(!j&&se){F=ve?F:new Lt(this);var Ce=a.apply(F,W);return Ce.__actions__.push({func:Rr,args:[Se],thisArg:void 0}),new ni(Ce,Be)}return st&&ve?a.apply(this,W):(Ce=this.thru(Se),st?w?Ce.value()[0]:Ce.value():Ce)})}),gi(["pop","push","shift","sort","splice","unshift"],function(a){var c=Cr[a],g=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",w=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var b=arguments;if(w&&!this.__chain__){var j=this.value();return c.apply(ot(j)?j:[],b)}return this[g](function(F){return c.apply(ot(F)?F:[],b)})}}),gr(Lt.prototype,function(a,c){var g=O[c];if(g){var w=g.name+"";tn.call(ji,w)||(ji[w]=[]),ji[w].push({name:c,func:g})}}),ji[ks(void 0,2).name]=[{name:"wrapper",func:void 0}],Lt.prototype.clone=function(){var a=new Lt(this.__wrapped__);return a.__actions__=Nn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Nn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Nn(this.__views__),a},Lt.prototype.reverse=function(){if(this.__filtered__){var a=new Lt(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},Lt.prototype.value=function(){var a=this.__wrapped__.value(),c=this.__dir__,g=ot(a),w=c<0,b=g?a.length:0,j=function(At,Xe,at){for(var rr=-1,Ir=at.length;++rr=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},O.prototype.plant=function(a){for(var c,g=this;g instanceof Ur;){var w=eh(g);w.__index__=0,w.__values__=void 0,c?b.__wrapped__=w:c=w;var b=w;g=g.__wrapped__}return b.__wrapped__=a,c},O.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof Lt){var c=a;return this.__actions__.length&&(c=new Lt(this)),(c=c.reverse()).__actions__.push({func:Rr,args:[Cf],thisArg:void 0}),new ni(c,this.__chain__)}return this.thru(Cf)},O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=function(){return Dp(this.__wrapped__,this.__actions__)},O.prototype.first=O.prototype.head,Xa&&(O.prototype[Xa]=function(){return this}),O}();l(n(46))=="object"&&n(46)?(xt._=Yo,(u=(function(){return Yo}).call(t,n,t,i))===void 0||(i.exports=u)):wn?((wn.exports=Yo)._=Yo,Kn._=Yo):xt._=Yo}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(i){return r(i,4)}},function(e,t,n){var r=n(29),i=n(33),u=n(49),l=n(118),f=n(124),d=n(127),h=n(128),m=n(129),v=n(130),_=n(59),x=n(131),A=n(10),R=n(135),N=n(136),k=n(141),E=n(0),T=n(12),P=n(142),L=n(5),U=n(144),G=n(6),Z={};Z["[object Arguments]"]=Z["[object Array]"]=Z["[object ArrayBuffer]"]=Z["[object DataView]"]=Z["[object Boolean]"]=Z["[object Date]"]=Z["[object Float32Array]"]=Z["[object Float64Array]"]=Z["[object Int8Array]"]=Z["[object Int16Array]"]=Z["[object Int32Array]"]=Z["[object Map]"]=Z["[object Number]"]=Z["[object Object]"]=Z["[object RegExp]"]=Z["[object Set]"]=Z["[object String]"]=Z["[object Symbol]"]=Z["[object Uint8Array]"]=Z["[object Uint8ClampedArray]"]=Z["[object Uint16Array]"]=Z["[object Uint32Array]"]=!0,Z["[object Error]"]=Z["[object Function]"]=Z["[object WeakMap]"]=!1,e.exports=function Ee(K,ae,ne,Ie,Re,Fe){var lt,Je=1&ae,le=2&ae,me=4&ae;if(ne&&(lt=Re?ne(K,Ie,Re,Fe):ne(K)),lt!==void 0)return lt;if(!L(K))return K;var Le=E(K);if(Le){if(lt=R(K),!Je)return h(K,lt)}else{var B=A(K),re=B=="[object Function]"||B=="[object GeneratorFunction]";if(T(K))return d(K,Je);if(B=="[object Object]"||B=="[object Arguments]"||re&&!Re){if(lt=le||re?{}:k(K),!Je)return le?v(K,f(lt,K)):m(K,l(lt,K))}else{if(!Z[B])return Re?K:{};lt=N(K,B,Je)}}Fe||(Fe=new r);var xe=Fe.get(K);if(xe)return xe;Fe.set(K,lt),U(K)?K.forEach(function(ye){lt.add(Ee(ye,ae,ne,ye,K,Fe))}):P(K)&&K.forEach(function(ye,ze){lt.set(ze,Ee(ye,ae,ne,ze,K,Fe))});var pe=me?le?x:_:le?keysIn:G,we=Le?void 0:pe(K);return i(we||K,function(ye,ze){we&&(ye=K[ze=ye]),u(lt,ze,Ee(ye,ae,ne,ze,K,Fe))}),lt}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),i=Array.prototype.splice;e.exports=function(u){var l=this.__data__,f=r(l,u);return!(f<0)&&(f==l.length-1?l.pop():i.call(l,f,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(i){var u=this.__data__,l=r(u,i);return l<0?void 0:u[l][1]}},function(e,t,n){var r=n(16);e.exports=function(i){return r(this.__data__,i)>-1}},function(e,t,n){var r=n(16);e.exports=function(i,u){var l=this.__data__,f=r(l,i);return f<0?(++this.size,l.push([i,u])):l[f][1]=u,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,i=r.delete(n);return this.size=r.size,i}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),i=n(31),u=n(32);e.exports=function(l,f){var d=this.__data__;if(d instanceof r){var h=d.__data__;if(!i||h.length<199)return h.push([l,f]),this.size=++d.size,this;d=this.__data__=new u(h)}return d.set(l,f),this.size=d.size,this}},function(e,t,n){var r=n(17),i=n(103),u=n(5),l=n(48),f=/^\[object .+?Constructor\]$/,d=Function.prototype,h=Object.prototype,m=d.toString,v=h.hasOwnProperty,_=RegExp("^"+m.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(x){return!(!u(x)||i(x))&&(r(x)?_:f).test(l(x))}},function(e,t,n){var r=n(9),i=Object.prototype,u=i.hasOwnProperty,l=i.toString,f=r?r.toStringTag:void 0;e.exports=function(d){var h=u.call(d,f),m=d[f];try{d[f]=void 0;var v=!0}catch{}var _=l.call(d);return v&&(h?d[f]=m:delete d[f]),_}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,i=n(104),u=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!u&&u in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),i=n(15),u=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(u||i),string:new r}}},function(e,t,n){var r=n(108),i=n(109),u=n(110),l=n(111),f=n(112);function d(h){var m=-1,v=h==null?0:h.length;for(this.clear();++m0&&d(x)?f>1?u(x,f-1,d,h,m):r(m,x):h||(m[m.length]=x)}return m}},function(e,t,n){var r=n(9),i=n(21),u=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(f){return u(f)||i(f)||!!(l&&f&&f[l])}},function(e,t,n){var r=n(25),i=n(195),u=n(197);e.exports=function(l,f){return u(i(l,f,r),l+"")}},function(e,t,n){var r=n(196),i=Math.max;e.exports=function(u,l,f){return l=i(l===void 0?u.length-1:l,0),function(){for(var d=arguments,h=-1,m=i(d.length-l,0),v=Array(m);++h0){if(++i>=800)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),i=n(201),u=n(206),l=n(69),f=n(207),d=n(42);e.exports=function(h,m,v){var _=-1,x=i,A=h.length,R=!0,N=[],k=N;if(v)R=!1,x=u;else if(A>=200){var E=m?null:f(h);if(E)return d(E);R=!1,x=l,k=new r}else k=m?[]:N;e:for(;++_-1}},function(e,t,n){var r=n(203),i=n(204),u=n(205);e.exports=function(l,f,d){return f==f?u(l,f,d):r(l,i,d)}},function(e,t){e.exports=function(n,r,i,u){for(var l=n.length,f=i+(u?1:-1);u?f--:++f1||l.length===1&&u.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(u,l,f){return function(d,h,m){var v={},_=d.nodes();return _.forEach(function(x){v[x]={},v[x][x]={distance:0},_.forEach(function(A){x!==A&&(v[x][A]={distance:Number.POSITIVE_INFINITY})}),m(x).forEach(function(A){var R=A.v===x?A.w:A.v,N=h(A);v[x][R]={distance:N,predecessor:x}})}),_.forEach(function(x){var A=v[x];_.forEach(function(R){var N=v[R];_.forEach(function(k){var E=N[x],T=A[k],P=N[k],L=E.distance+T.distance;L0;){if(d=v.removeMin(),r.has(m,d))h.setEdge(d,m[d]);else{if(x)throw new Error("Input graph is not connected: "+l);x=!0}l.nodeEdges(d).forEach(_)}return h}},function(e,t,n){(function(r){function i(f,d){for(var h=0,m=f.length-1;m>=0;m--){var v=f[m];v==="."?f.splice(m,1):v===".."?(f.splice(m,1),h++):h&&(f.splice(m,1),h--)}if(d)for(;h--;h)f.unshift("..");return f}function u(f,d){if(f.filter)return f.filter(d);for(var h=[],m=0;m=-1&&!d;h--){var m=h>=0?arguments[h]:r.cwd();if(typeof m!="string")throw new TypeError("Arguments to path.resolve must be strings");m&&(f=m+"/"+f,d=m.charAt(0)==="/")}return(d?"/":"")+(f=i(u(f.split("/"),function(v){return!!v}),!d).join("/"))||"."},t.normalize=function(f){var d=t.isAbsolute(f),h=l(f,-1)==="/";return(f=i(u(f.split("/"),function(m){return!!m}),!d).join("/"))||d||(f="."),f&&h&&(f+="/"),(d?"/":"")+f},t.isAbsolute=function(f){return f.charAt(0)==="/"},t.join=function(){var f=Array.prototype.slice.call(arguments,0);return t.normalize(u(f,function(d,h){if(typeof d!="string")throw new TypeError("Arguments to path.join must be strings");return d}).join("/"))},t.relative=function(f,d){function h(N){for(var k=0;k=0&&N[E]==="";E--);return k>E?[]:N.slice(k,E-k+1)}f=t.resolve(f).substr(1),d=t.resolve(d).substr(1);for(var m=h(f.split("/")),v=h(d.split("/")),_=Math.min(m.length,v.length),x=_,A=0;A<_;A++)if(m[A]!==v[A]){x=A;break}var R=[];for(A=x;A=1;--_)if((d=f.charCodeAt(_))===47){if(!v){m=_;break}}else v=!1;return m===-1?h?"/":".":h&&m===1?"/":f.slice(0,m)},t.basename=function(f,d){var h=function(m){typeof m!="string"&&(m+="");var v,_=0,x=-1,A=!0;for(v=m.length-1;v>=0;--v)if(m.charCodeAt(v)===47){if(!A){_=v+1;break}}else x===-1&&(A=!1,x=v+1);return x===-1?"":m.slice(_,x)}(f);return d&&h.substr(-1*d.length)===d&&(h=h.substr(0,h.length-d.length)),h},t.extname=function(f){typeof f!="string"&&(f+="");for(var d=-1,h=0,m=-1,v=!0,_=0,x=f.length-1;x>=0;--x){var A=f.charCodeAt(x);if(A!==47)m===-1&&(v=!1,m=x+1),A===46?d===-1?d=x:_!==1&&(_=1):d!==-1&&(_=-1);else if(!v){h=x+1;break}}return d===-1||m===-1||_===0||_===1&&d===m-1&&d===h+1?"":f.slice(d,m)};var l="ab".substr(-1)==="b"?function(f,d,h){return f.substr(d,h)}:function(f,d,h){return d<0&&(d=f.length+d),f.substr(d,h)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(l)}var i={file:n(225),http:n(81),https:n(81)},u=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?i.http:i.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,f){var d=Promise.resolve();return f===void 0&&(f={}),d=(d=d.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(f!==void 0){if(r(f)!=="object")throw new TypeError("options must be an object");if(f.processContent!==void 0&&typeof f.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(h,m){(function(v){var _=function(A){return A!==void 0&&(A=A.indexOf("://")===-1?"":A.split("://")[0]),A}(v),x=i[_];if(x===void 0){if(_!=="")throw new Error("Unsupported scheme: "+_);x=u}return x})(l).load(l,f||{},function(v,_){v?m(v):h(_)})})}).then(function(h){return f.processContent?new Promise(function(m,v){r(h)!=="object"&&(h={text:h}),h.location=l,f.processContent(h,function(_,x){_?v(_):m(x)})}):r(h)==="object"?h.text:h})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var i=arguments[arguments.length-1];if(typeof i!="function")throw r;i(r)}},function(e,t,n){function r(P){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L})(P)}var i;typeof window<"u"?i=window:typeof self<"u"?i=self:(console.warn("Using browser-only version of superagent in non-browser environment"),i=this);var u=n(227),l=n(228),f=n(82),d=n(229),h=n(231);function m(){}var v=t=e.exports=function(P,L){return typeof L=="function"?new t.Request("GET",P).end(L):arguments.length==1?new t.Request("GET",P):new t.Request(P,L)};t.Request=E,v.getXHR=function(){if(!(!i.XMLHttpRequest||i.location&&i.location.protocol=="file:"&&i.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var _="".trim?function(P){return P.trim()}:function(P){return P.replace(/(^\s*|\s*$)/g,"")};function x(P){if(!f(P))return P;var L=[];for(var U in P)A(L,U,P[U]);return L.join("&")}function A(P,L,U){if(U!=null)if(Array.isArray(U))U.forEach(function(Z){A(P,L,Z)});else if(f(U))for(var G in U)A(P,L+"["+G+"]",U[G]);else P.push(encodeURIComponent(L)+"="+encodeURIComponent(U));else U===null&&P.push(encodeURIComponent(L))}function R(P){for(var L,U,G={},Z=P.split("&"),Ee=0,K=Z.length;Ee=2&&P._responseTimeoutTimer&&clearTimeout(P._responseTimeoutTimer),ae==4){var ne;try{ne=L.status}catch{ne=0}if(!ne)return P.timedout||P._aborted?void 0:P.crossDomainError();P.emit("end")}};var G=function(ae,ne){ne.total>0&&(ne.percent=ne.loaded/ne.total*100),ne.direction=ae,P.emit("progress",ne)};if(this.hasListeners("progress"))try{L.onprogress=G.bind(null,"download"),L.upload&&(L.upload.onprogress=G.bind(null,"upload"))}catch{}try{this.username&&this.password?L.open(this.method,this.url,!0,this.username,this.password):L.open(this.method,this.url,!0)}catch(ae){return this.callback(ae)}if(this._withCredentials&&(L.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof U!="string"&&!this._isHost(U)){var Z=this._header["content-type"],Ee=this._serializer||v.serialize[Z?Z.split(";")[0]:""];!Ee&&N(Z)&&(Ee=v.serialize["application/json"]),Ee&&(U=Ee(U))}for(var K in this.header)this.header[K]!=null&&this.header.hasOwnProperty(K)&&L.setRequestHeader(K,this.header[K]);return this._responseType&&(L.responseType=this._responseType),this.emit("request",this),L.send(U!==void 0?U:null),this},v.agent=function(){return new h},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(P){h.prototype[P.toLowerCase()]=function(L,U){var G=new v.Request(P,L);return this._setDefaults(G),U&&G.end(U),G}}),h.prototype.del=h.prototype.delete,v.get=function(P,L,U){var G=v("GET",P);return typeof L=="function"&&(U=L,L=null),L&&G.query(L),U&&G.end(U),G},v.head=function(P,L,U){var G=v("HEAD",P);return typeof L=="function"&&(U=L,L=null),L&&G.query(L),U&&G.end(U),G},v.options=function(P,L,U){var G=v("OPTIONS",P);return typeof L=="function"&&(U=L,L=null),L&&G.send(L),U&&G.end(U),G},v.del=T,v.delete=T,v.patch=function(P,L,U){var G=v("PATCH",P);return typeof L=="function"&&(U=L,L=null),L&&G.send(L),U&&G.end(U),G},v.post=function(P,L,U){var G=v("POST",P);return typeof L=="function"&&(U=L,L=null),L&&G.send(L),U&&G.end(U),G},v.put=function(P,L,U){var G=v("PUT",P);return typeof L=="function"&&(U=L,L=null),L&&G.send(L),U&&G.end(U),G}},function(e,t,n){function r(i){if(i)return function(u){for(var l in r.prototype)u[l]=r.prototype[l];return u}(i)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(i,u){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(u),this},r.prototype.once=function(i,u){function l(){this.off(i,l),u.apply(this,arguments)}return l.fn=u,this.on(i,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(i,u){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,f=this._callbacks["$"+i];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var d=0;d=this._maxRetries)return!1;if(this._retryCallback)try{var h=this._retryCallback(f,d);if(h===!0)return!0;if(h===!1)return!1}catch(m){console.error(m)}return!!(d&&d.status&&d.status>=500&&d.status!=501||f&&(f.code&&~l.indexOf(f.code)||f.timeout&&f.code=="ECONNABORTED"||f.crossDomain))},u.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},u.prototype.then=function(f,d){if(!this._fullfilledPromise){var h=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(m,v){h.end(function(_,x){_?v(_):m(x)})})}return this._fullfilledPromise.then(f,d)},u.prototype.catch=function(f){return this.then(void 0,f)},u.prototype.use=function(f){return f(this),this},u.prototype.ok=function(f){if(typeof f!="function")throw Error("Callback required");return this._okCallback=f,this},u.prototype._isResponseOK=function(f){return!!f&&(this._okCallback?this._okCallback(f):f.status>=200&&f.status<300)},u.prototype.get=function(f){return this._header[f.toLowerCase()]},u.prototype.getHeader=u.prototype.get,u.prototype.set=function(f,d){if(i(f)){for(var h in f)this.set(h,f[h]);return this}return this._header[f.toLowerCase()]=d,this.header[f]=d,this},u.prototype.unset=function(f){return delete this._header[f.toLowerCase()],delete this.header[f],this},u.prototype.field=function(f,d){if(f==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(f)){for(var h in f)this.field(h,f[h]);return this}if(Array.isArray(d)){for(var m in d)this.field(f,d[m]);return this}if(d==null)throw new Error(".field(name, val) val can not be empty");return typeof d=="boolean"&&(d=""+d),this._getFormData().append(f,d),this},u.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},u.prototype._auth=function(f,d,h,m){switch(h.type){case"basic":this.set("Authorization","Basic "+m(f+":"+d));break;case"auto":this.username=f,this.password=d;break;case"bearer":this.set("Authorization","Bearer "+f)}return this},u.prototype.withCredentials=function(f){return f==null&&(f=!0),this._withCredentials=f,this},u.prototype.redirects=function(f){return this._maxRedirects=f,this},u.prototype.maxResponseSize=function(f){if(typeof f!="number")throw TypeError("Invalid argument");return this._maxResponseSize=f,this},u.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},u.prototype.send=function(f){var d=i(f),h=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),d&&!this._data)Array.isArray(f)?this._data=[]:this._isHost(f)||(this._data={});else if(f&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(d&&i(this._data))for(var m in f)this._data[m]=f[m];else typeof f=="string"?(h||this.type("form"),h=this._header["content-type"],this._data=h=="application/x-www-form-urlencoded"?this._data?this._data+"&"+f:f:(this._data||"")+f):this._data=f;return!d||this._isHost(f)||h||this.type("json"),this},u.prototype.sortQuery=function(f){return this._sort=f===void 0||f,this},u.prototype._finalizeQueryString=function(){var f=this._query.join("&");if(f&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+f),this._query.length=0,this._sort){var d=this.url.indexOf("?");if(d>=0){var h=this.url.substring(d+1).split("&");typeof this._sort=="function"?h.sort(this._sort):h.sort(),this.url=this.url.substring(0,d)+"?"+h.join("&")}}},u.prototype._appendQueryString=function(){console.trace("Unsupported")},u.prototype._timeoutError=function(f,d,h){if(!this._aborted){var m=new Error(f+d+"ms exceeded");m.timeout=d,m.code="ECONNABORTED",m.errno=h,this.timedout=!0,this.abort(),this.callback(m)}},u.prototype._setTimeouts=function(){var f=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){f._timeoutError("Timeout of ",f._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){f._timeoutError("Response timeout of ",f._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function i(u){if(u)return function(l){for(var f in i.prototype)l[f]=i.prototype[f];return l}(u)}e.exports=i,i.prototype.get=function(u){return this.header[u.toLowerCase()]},i.prototype._setHeaderProperties=function(u){var l=u["content-type"]||"";this.type=r.type(l);var f=r.params(l);for(var d in f)this[d]=f[d];this.links={};try{u.link&&(this.links=r.parseLinks(u.link))}catch{}},i.prototype._setStatusProperties=function(u){var l=u/100|0;this.status=this.statusCode=u,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=u==201,this.accepted=u==202,this.noContent=u==204,this.badRequest=u==400,this.unauthorized=u==401,this.notAcceptable=u==406,this.forbidden=u==403,this.notFound=u==404,this.unprocessableEntity=u==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(i,u){var l=u.split(/ *= */),f=l.shift(),d=l.shift();return f&&d&&(i[f]=d),i},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(i,u){var l=u.split(/ *; */),f=l[0].slice(1,-1);return i[l[1].split(/ *= */)[1].slice(1,-1)]=f,i},{})},t.cleanHeader=function(r,i){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,i&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(i){r[i.fn].apply(r,i.arguments)})},e.exports=n},function(e,t,n){(function(r){var i=r!==void 0&&r||typeof self<"u"&&self||window,u=Function.prototype.apply;function l(f,d){this._id=f,this._clearFn=d}t.setTimeout=function(){return new l(u.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new l(u.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(f){f&&f.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(f,d){clearTimeout(f._idleTimeoutId),f._idleTimeout=d},t.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},t._unrefActive=t.active=function(f){clearTimeout(f._idleTimeoutId);var d=f._idleTimeout;d>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},d))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,i){(function(u,l){if(!u.setImmediate){var f,d,h,m,v,_=1,x={},A=!1,R=u.document,N=Object.getPrototypeOf&&Object.getPrototypeOf(u);N=N&&N.setTimeout?N:u,{}.toString.call(u.process)==="[object process]"?f=function(T){i.nextTick(function(){E(T)})}:function(){if(u.postMessage&&!u.importScripts){var T=!0,P=u.onmessage;return u.onmessage=function(){T=!1},u.postMessage("","*"),u.onmessage=P,T}}()?(m="setImmediate$"+Math.random()+"$",v=function(T){T.source===u&&typeof T.data=="string"&&T.data.indexOf(m)===0&&E(+T.data.slice(m.length))},u.addEventListener?u.addEventListener("message",v,!1):u.attachEvent("onmessage",v),f=function(T){u.postMessage(m+T,"*")}):u.MessageChannel?((h=new MessageChannel).port1.onmessage=function(T){E(T.data)},f=function(T){h.port2.postMessage(T)}):R&&"onreadystatechange"in R.createElement("script")?(d=R.documentElement,f=function(T){var P=R.createElement("script");P.onreadystatechange=function(){E(T),P.onreadystatechange=null,d.removeChild(P),P=null},d.appendChild(P)}):f=function(T){setTimeout(E,0,T)},N.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var P=new Array(arguments.length-1),L=0;L"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(u,l){return Object.prototype.hasOwnProperty.call(u,l)}e.exports=function(u,l,f,d){l=l||"&",f=f||"=";var h={};if(typeof u!="string"||u.length===0)return h;var m=/\+/g;u=u.split(l);var v=1e3;d&&typeof d.maxKeys=="number"&&(v=d.maxKeys);var _=u.length;v>0&&_>v&&(_=v);for(var x=0;x<_;++x){var A,R,N,k,E=u[x].replace(m,"%20"),T=E.indexOf(f);T>=0?(A=E.substr(0,T),R=E.substr(T+1)):(A=E,R=""),N=decodeURIComponent(A),k=decodeURIComponent(R),r(h,N)?i(h[N])?h[N].push(k):h[N]=[h[N],k]:h[N]=k}return h};var i=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},function(e,t,n){function r(d){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(d)}var i=function(d){switch(r(d)){case"string":return d;case"boolean":return d?"true":"false";case"number":return isFinite(d)?d:"";default:return""}};e.exports=function(d,h,m,v){return h=h||"&",m=m||"=",d===null&&(d=void 0),r(d)==="object"?l(f(d),function(_){var x=encodeURIComponent(i(_))+m;return u(d[_])?l(d[_],function(A){return x+encodeURIComponent(i(A))}).join(h):x+encodeURIComponent(i(d[_]))}).join(h):v?encodeURIComponent(i(v))+m+encodeURIComponent(i(d)):""};var u=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"};function l(d,h){if(d.map)return d.map(h);for(var m=[],v=0;v1){z[0]=z[0].slice(0,-1);for(var ue=z.length-1,ie=1;ie= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=Math.floor,G=String.fromCharCode;function Z($){throw new RangeError(L[$])}function Ee($,z){var q=$.split("@"),ue="";q.length>1&&(ue=q[0]+"@",$=q[1]);var ie=function(Ae,$e){for(var ft=[],Bt=Ae.length;Bt--;)ft[Bt]=$e(Ae[Bt]);return ft}(($=$.replace(P,".")).split("."),z).join(".");return ue+ie}function K($){for(var z=[],q=0,ue=$.length;q=55296&&ie<=56319&&q>1,$+=U($/z);$>455;ue+=36)$=U($/35);return U(ue+36*$/($+38))},Ie=function($){var z,q=[],ue=$.length,ie=0,Ae=128,$e=72,ft=$.lastIndexOf("-");ft<0&&(ft=0);for(var Bt=0;Bt=128&&Z("not-basic"),q.push($.charCodeAt(Bt));for(var nt=ft>0?ft+1:0;nt=ue&&Z("invalid-input");var $t=(z=$.charCodeAt(nt++))-48<10?z-22:z-65<26?z-65:z-97<26?z-97:36;($t>=36||$t>U((k-ie)/Ht))&&Z("overflow"),ie+=$t*Ht;var An=En<=$e?1:En>=$e+26?26:En-$e;if($tU(k/rn)&&Z("overflow"),Ht*=rn}var sn=q.length+1;$e=ne(ie-qt,sn,qt==0),U(ie/sn)>k-Ae&&Z("overflow"),Ae+=U(ie/sn),ie%=sn,q.splice(ie++,0,Ae)}return String.fromCodePoint.apply(String,q)},Re=function($){var z=[],q=($=K($)).length,ue=128,ie=0,Ae=72,$e=!0,ft=!1,Bt=void 0;try{for(var nt,qt=$[Symbol.iterator]();!($e=(nt=qt.next()).done);$e=!0){var Ht=nt.value;Ht<128&&z.push(G(Ht))}}catch(xt){ft=!0,Bt=xt}finally{try{!$e&&qt.return&&qt.return()}finally{if(ft)throw Bt}}var En=z.length,$t=En;for(En&&z.push("-");$t=ue&&JrU((k-ie)/pr)&&Z("overflow"),ie+=(An-ue)*pr,ue=An;var jn=!0,Ji=!1,pi=void 0;try{for(var vu,Yt=$[Symbol.iterator]();!(jn=(vu=Yt.next()).done);jn=!0){var Zt=vu.value;if(Ztk&&Z("overflow"),Zt==ue){for(var Ue=ie,Q=36;;Q+=36){var be=Q<=Ae?1:Q>=Ae+26?26:Q-Ae;if(Ue>6|192).toString(16).toUpperCase()+"%"+(63&z|128).toString(16).toUpperCase():"%"+(z>>12|224).toString(16).toUpperCase()+"%"+(z>>6&63|128).toString(16).toUpperCase()+"%"+(63&z|128).toString(16).toUpperCase()}function me($){for(var z="",q=0,ue=$.length;q=194&&ie<224){if(ue-q>=6){var Ae=parseInt($.substr(q+4,2),16);z+=String.fromCharCode((31&ie)<<6|63&Ae)}else z+=$.substr(q,6);q+=6}else if(ie>=224){if(ue-q>=9){var $e=parseInt($.substr(q+4,2),16),ft=parseInt($.substr(q+7,2),16);z+=String.fromCharCode((15&ie)<<12|(63&$e)<<6|63&ft)}else z+=$.substr(q,9);q+=9}else z+=$.substr(q,3),q+=3}return z}function Le($,z){function q(ue){var ie=me(ue);return ie.match(z.UNRESERVED)?ie:ue}return $.scheme&&($.scheme=String($.scheme).replace(z.PCT_ENCODED,q).toLowerCase().replace(z.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(z.PCT_ENCODED,q).replace(z.NOT_USERINFO,le).replace(z.PCT_ENCODED,_)),$.host!==void 0&&($.host=String($.host).replace(z.PCT_ENCODED,q).toLowerCase().replace(z.NOT_HOST,le).replace(z.PCT_ENCODED,_)),$.path!==void 0&&($.path=String($.path).replace(z.PCT_ENCODED,q).replace($.scheme?z.NOT_PATH:z.NOT_PATH_NOSCHEME,le).replace(z.PCT_ENCODED,_)),$.query!==void 0&&($.query=String($.query).replace(z.PCT_ENCODED,q).replace(z.NOT_QUERY,le).replace(z.PCT_ENCODED,_)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(z.PCT_ENCODED,q).replace(z.NOT_FRAGMENT,le).replace(z.PCT_ENCODED,_)),$}function B($){return $.replace(/^0*(.*)/,"$1")||"0"}function re($,z){var q=$.match(z.IPV4ADDRESS)||[],ue=N(q,2)[1];return ue?ue.split(".").map(B).join("."):$}function xe($,z){var q=$.match(z.IPV6ADDRESS)||[],ue=N(q,3),ie=ue[1],Ae=ue[2];if(ie){for(var $e=ie.toLowerCase().split("::").reverse(),ft=N($e,2),Bt=ft[0],nt=ft[1],qt=nt?nt.split(":").map(B):[],Ht=Bt.split(":").map(B),En=z.IPV4ADDRESS.test(Ht[Ht.length-1]),$t=En?7:8,An=Ht.length-$t,rn=Array($t),sn=0;sn<$t;++sn)rn[sn]=qt[sn]||Ht[An+sn]||"";En&&(rn[$t-1]=re(rn[$t-1],z));var lr=rn.reduce(function(pr,jn,Ji){if(!jn||jn==="0"){var pi=pr[pr.length-1];pi&&pi.index+pi.length===Ji?pi.length++:pr.push({index:Ji,length:1})}return pr},[]).sort(function(pr,jn){return jn.length-pr.length})[0],$r=void 0;if(lr&&lr.length>1){var Dr=rn.slice(0,lr.index),Jr=rn.slice(lr.index+lr.length);$r=Dr.join(":")+"::"+Jr.join(":")}else $r=rn.join(":");return Ae&&($r+="%"+Ae),$r}return $}var pe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,we="".match(/(){0}/)[1]===void 0;function ye($){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q={},ue=z.iri!==!1?R:A;z.reference==="suffix"&&($=(z.scheme?z.scheme+":":"")+"//"+$);var ie=$.match(pe);if(ie){we?(q.scheme=ie[1],q.userinfo=ie[3],q.host=ie[4],q.port=parseInt(ie[5],10),q.path=ie[6]||"",q.query=ie[7],q.fragment=ie[8],isNaN(q.port)&&(q.port=ie[5])):(q.scheme=ie[1]||void 0,q.userinfo=$.indexOf("@")!==-1?ie[3]:void 0,q.host=$.indexOf("//")!==-1?ie[4]:void 0,q.port=parseInt(ie[5],10),q.path=ie[6]||"",q.query=$.indexOf("?")!==-1?ie[7]:void 0,q.fragment=$.indexOf("#")!==-1?ie[8]:void 0,isNaN(q.port)&&(q.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ie[4]:void 0)),q.host&&(q.host=xe(re(q.host,ue),ue)),q.scheme!==void 0||q.userinfo!==void 0||q.host!==void 0||q.port!==void 0||q.path||q.query!==void 0?q.scheme===void 0?q.reference="relative":q.fragment===void 0?q.reference="absolute":q.reference="uri":q.reference="same-document",z.reference&&z.reference!=="suffix"&&z.reference!==q.reference&&(q.error=q.error||"URI is not a "+z.reference+" reference.");var Ae=Je[(z.scheme||q.scheme||"").toLowerCase()];if(z.unicodeSupport||Ae&&Ae.unicodeSupport)Le(q,ue);else{if(q.host&&(z.domainHost||Ae&&Ae.domainHost))try{q.host=Fe(q.host.replace(ue.PCT_ENCODED,me).toLowerCase())}catch($e){q.error=q.error||"Host's domain name can not be converted to ASCII via punycode: "+$e}Le(q,A)}Ae&&Ae.parse&&Ae.parse(q,z)}else q.error=q.error||"URI can not be parsed.";return q}function ze($,z){var q=z.iri!==!1?R:A,ue=[];return $.userinfo!==void 0&&(ue.push($.userinfo),ue.push("@")),$.host!==void 0&&ue.push(xe(re(String($.host),q),q).replace(q.IPV6ADDRESS,function(ie,Ae,$e){return"["+Ae+($e?"%25"+$e:"")+"]"})),typeof $.port=="number"&&(ue.push(":"),ue.push($.port.toString(10))),ue.length?ue.join(""):void 0}var Qe=/^\.\.?\//,tt=/^\/\.(\/|$)/,_t=/^\/\.\.(\/|$)/,it=/^\/?(?:.|\n)*?(?=\/|$)/;function Ne($){for(var z=[];$.length;)if($.match(Qe))$=$.replace(Qe,"");else if($.match(tt))$=$.replace(tt,"/");else if($.match(_t))$=$.replace(_t,"/"),z.pop();else if($==="."||$==="..")$="";else{var q=$.match(it);if(!q)throw new Error("Unexpected dot segment condition");var ue=q[0];$=$.slice(ue.length),z.push(ue)}return z.join("")}function wt($){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=z.iri?R:A,ue=[],ie=Je[(z.scheme||$.scheme||"").toLowerCase()];if(ie&&ie.serialize&&ie.serialize($,z),$.host&&!q.IPV6ADDRESS.test($.host)){if(z.domainHost||ie&&ie.domainHost)try{$.host=z.iri?lt($.host):Fe($.host.replace(q.PCT_ENCODED,me).toLowerCase())}catch(ft){$.error=$.error||"Host's domain name can not be converted to "+(z.iri?"Unicode":"ASCII")+" via punycode: "+ft}}Le($,q),z.reference!=="suffix"&&$.scheme&&(ue.push($.scheme),ue.push(":"));var Ae=ze($,z);if(Ae!==void 0&&(z.reference!=="suffix"&&ue.push("//"),ue.push(Ae),$.path&&$.path.charAt(0)!=="/"&&ue.push("/")),$.path!==void 0){var $e=$.path;z.absolutePath||ie&&ie.absolutePath||($e=Ne($e)),Ae===void 0&&($e=$e.replace(/^\/\//,"/%2F")),ue.push($e)}return $.query!==void 0&&(ue.push("?"),ue.push($.query)),$.fragment!==void 0&&(ue.push("#"),ue.push($.fragment)),ue.join("")}function gt($,z){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ue=arguments[3],ie={};return ue||($=ye(wt($,q),q),z=ye(wt(z,q),q)),!(q=q||{}).tolerant&&z.scheme?(ie.scheme=z.scheme,ie.userinfo=z.userinfo,ie.host=z.host,ie.port=z.port,ie.path=Ne(z.path||""),ie.query=z.query):(z.userinfo!==void 0||z.host!==void 0||z.port!==void 0?(ie.userinfo=z.userinfo,ie.host=z.host,ie.port=z.port,ie.path=Ne(z.path||""),ie.query=z.query):(z.path?(z.path.charAt(0)==="/"?ie.path=Ne(z.path):($.userinfo===void 0&&$.host===void 0&&$.port===void 0||$.path?$.path?ie.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+z.path:ie.path=z.path:ie.path="/"+z.path,ie.path=Ne(ie.path)),ie.query=z.query):(ie.path=$.path,z.query!==void 0?ie.query=z.query:ie.query=$.query),ie.userinfo=$.userinfo,ie.host=$.host,ie.port=$.port),ie.scheme=$.scheme),ie.fragment=z.fragment,ie}function et($,z){return $&&$.toString().replace(z&&z.iri?R.PCT_ENCODED:A.PCT_ENCODED,me)}var Et={scheme:"http",domainHost:!0,parse:function($,z){return $.host||($.error=$.error||"HTTP URIs must have a host."),$},serialize:function($,z){return $.port!==(String($.scheme).toLowerCase()!=="https"?80:443)&&$.port!==""||($.port=void 0),$.path||($.path="/"),$}},kt={scheme:"https",domainHost:Et.domainHost,parse:Et.parse,serialize:Et.serialize},_n={},gn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ut="[0-9A-Fa-f]",jt=m(m("%[EFef][0-9A-Fa-f]%"+Ut+Ut+"%"+Ut+Ut)+"|"+m("%[89A-Fa-f][0-9A-Fa-f]%"+Ut+Ut)+"|"+m("%"+Ut+Ut)),Ze=h("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),vn=new RegExp(gn,"g"),Te=new RegExp(jt,"g"),Ge=new RegExp(h("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Ze),"g"),Vt=new RegExp(h("[^]",gn,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),nn=Vt;function ln($){var z=me($);return z.match(vn)?z:$}var fr={scheme:"mailto",parse:function($,z){var q=$,ue=q.to=q.path?q.path.split(","):[];if(q.path=void 0,q.query){for(var ie=!1,Ae={},$e=q.query.split("&"),ft=0,Bt=$e.length;ftt.resolved)}const vv=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),Gv=e=>JSON.parse(JSON.stringify(e)),a_=(e,t)=>{e=Gv(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],i=e[n];vv(r)&&vv(i)?e[n]=a_(i,r):e[n]=r}return e},W2=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(u,l){const f=u.shift();return f?l[f]?u.length?r(u,l[f]):l[f]:{}:{}},i=r(n,t);return vv(i)?Gv(i):i},Vz=function(e,t){const n=e.length;let r=-1,i={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=Vz(e.allOf,t);return ac(n,t)}else if(typeof e.$ref<"u"){const n=W2(e.$ref,t);return ac(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=ac(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const i=e.items.map(u=>ac(u,t));for(let u=i.length-1;u>=0&&!(typeof i[u]<"u");u--)u+1>n&&i.pop();return i.every(u=>typeof u>"u")?void 0:i}const r=ac(e.items,t);if(typeof r>"u")return[];{const i=[];for(let u=0;u"u"?t=e.definitions||{}:vv(e.definitions)&&(t=a_(t,e.definitions)),ac(Gv(e),t)}function Qz(){const[e,t]=M.useState({configSchema:null,configDefaults:null});return M.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(i=>i.json()).then(Kz);t({configSchema:r,configDefaults:Yz(r)})}n()},[]),e}async function Zz(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function Xz(e){let t,n,r,i=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=e8(t,l);const f=t.length;let d=0;for(;n0){const d=i.decode(l.subarray(0,f)),h=f+(l[f+1]===32?2:1),m=i.decode(l.subarray(h));switch(d){case"data":r.data=r.data?r.data+` -`+m:m;break;case"event":r.event=m;break;case"id":e(r.id=m);break;case"retry":const v=parseInt(m,10);isNaN(v)||t(r.retry=v);break}}}}function e8(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function ob(){return{data:"",event:"",id:"",retry:void 0}}var t8=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const x=Object.assign({},r);x.accept||(x.accept=qy);let A;function R(){A.abort(),document.hidden||L()}d||document.addEventListener("visibilitychange",R);let N=n8,k=0;function E(){document.removeEventListener("visibilitychange",R),window.clearTimeout(k),A.abort()}n==null||n.addEventListener("abort",()=>{E(),v()});const T=h??window.fetch,P=i??i8;async function L(){var U;A=new AbortController;try{const G=await T(e,Object.assign(Object.assign({},m),{headers:x,signal:A.signal}));await P(G),await Zz(G.body,Xz(Jz(Z=>{Z?x[ub]=Z:delete x[ub]},Z=>{N=Z},u))),l==null||l(),E(),v()}catch(G){if(!A.signal.aborted)try{const Z=(U=f==null?void 0:f(G))!==null&&U!==void 0?U:N;window.clearTimeout(k),k=window.setTimeout(L,Z)}catch(Z){E(),_(Z)}}}L()})}function i8(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(qy)))throw new Error(`Expected content-type to be ${qy}, Actual: ${t}`)}function o8(){const[e,t]=M.useState(null),[n,r]=M.useState(null),i=M.useCallback(async(l,f,d)=>{const h=new AbortController;r(h),t({status:"inflight",messages:l.messages,merge:!0}),await r8("/runs/stream",{signal:h.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:f,thread_id:d}),openWhenHidden:!0,onmessage(m){if(m.event==="data"){const{messages:v}=JSON.parse(m.data);t(_=>({status:"inflight",messages:v,run_id:_==null?void 0:_.run_id}))}else if(m.event==="metadata"){const{run_id:v}=JSON.parse(m.data);t(_=>({status:"inflight",messages:_==null?void 0:_.messages,run_id:v}))}else m.event==="error"&&t(v=>({status:"error",messages:v==null?void 0:v.messages,run_id:v==null?void 0:v.run_id}))},onclose(){t(m=>({status:(m==null?void 0:m.status)==="error"?m.status:"done",messages:m==null?void 0:m.messages,run_id:m==null?void 0:m.run_id,merge:m==null?void 0:m.merge})),r(null)},onerror(m){throw t(v=>({status:"error",messages:v==null?void 0:v.messages,run_id:v==null?void 0:v.run_id,merge:v==null?void 0:v.merge})),r(null),m}})},[]),u=M.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:i,stopStream:u,stream:e}}function u8(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return H2(t,"updated_at","desc")}function a8(){const[e,t]=M.useReducer(u8,null),[n,r]=M.useState(null);M.useEffect(()=>{async function l(){const d=new URLSearchParams(window.location.search).get("shared_id"),[h,m]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(v=>v.json()).then(v=>v.map(_=>({..._,mine:!0}))),fetch("/assistants/public/"+(d?`?shared_id=${d}`:""),{headers:{Accept:"application/json"}}).then(v=>v.json())]);t(h.concat(m)),m.find(v=>v.assistant_id===d)&&r(d)}l()},[]);const i=M.useCallback(async(l,f,d,h,m=crypto.randomUUID())=>{const v=d.reduce((x,A)=>(x.append("files",A),x),new FormData);v.append("config",JSON.stringify({configurable:{assistant_id:m}}));const[_]=await Promise.all([fetch(`/assistants/${m}`,{method:"PUT",body:JSON.stringify({name:l,config:f,public:h}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(x=>x.json()),d.length?fetch("/ingest",{method:"POST",body:v}):Promise.resolve()]);t({..._,mine:!0}),r(_.assistant_id)},[]),u=M.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:i,enterConfig:u}}function l8(){const[e,t]=M.useState(!1),{configSchema:n,configDefaults:r}=Qz(),{chats:i,currentChat:u,createChat:l,enterChat:f}=Gz(),{configs:d,currentConfig:h,saveConfig:m,enterConfig:v}=a8(),{startStream:_,stopStream:x,stream:A}=o8(),R=M.useCallback(async(P,L=u)=>{var G;!L||!((G=d==null?void 0:d.find(Z=>Z.assistant_id===L.assistant_id))!=null&&G.config)||await _({messages:[{content:P,additional_kwargs:{},type:"human",example:!1}]},L.assistant_id,L.thread_id)},[u,_,d]),N=M.useCallback(async P=>{if(!h)return;const L=await l(P,h.assistant_id);return R(P,L)},[l,R,h]),k=M.useCallback(async P=>{u&&(x==null||x(!0)),f(P),e&&t(!1)},[f,x,e,u]),E=u?Y.jsx($P,{chat:u,startStream:R,stopStream:x,stream:A}):Y.jsx(HL,{startChat:N,configSchema:n,configDefaults:r,configs:d,currentConfig:h,saveConfig:m,enterConfig:v}),T=d==null?void 0:d.find(P=>P.assistant_id===(u==null?void 0:u.assistant_id));return Y.jsx(Ij,{subtitle:T?Y.jsxs("span",{className:"inline-flex gap-1 items-center",children:[T.name,Y.jsx(sR,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{f(null),v(T.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:Y.jsx(DP,{chats:M.useMemo(()=>d===null||i===null?null:i.filter(P=>d.some(L=>L.assistant_id===P.assistant_id)),[i,d]),currentChat:u,enterChat:k}),children:n?E:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);I0.createRoot(document.getElementById("root")).render(Y.jsx(l8,{})); diff --git a/backend/ui/assets/index-5a265631.js b/backend/ui/assets/index-5a265631.js deleted file mode 100644 index fe5a4ae5..00000000 --- a/backend/ui/assets/index-5a265631.js +++ /dev/null @@ -1,123 +0,0 @@ -var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** - * @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 lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.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 w1=j,sr=TE;function ue(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"),lp=Object.prototype.hasOwnProperty,CE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(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 jE(e,t,n,r){if(t===null||typeof t>"u"||AE(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 zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(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){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` -`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(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 ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(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 fp(t);case 8:return t===Ah?"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 ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(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 dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(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 T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(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")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(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 hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={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},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({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 vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(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 nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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 uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(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=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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 ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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 Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();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=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(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 Vp(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 n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),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 r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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 qp(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=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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 Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;l&&(n(!0),await e.onSubmit(l),n(!1),i.message.value="")},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` -`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` -`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` -`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` -`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` -`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` -`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` -`+g}!b&&!g.trim()&&(b=!0),s+=C+` -`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` -`,o?'
    '+(r?t:ir(t,!0))+`
    -`:"
    "+(r?t:ir(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
    -`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" -`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` -`)].join(` -`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ -/* [wrapped with `+T+`] */ -`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` -`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs/stream",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:g==null?void 0:g.messages,run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:h==null?void 0:h.messages,run_id:h==null?void 0:h.run_id,merge:h==null?void 0:h.merge})),r(null)},onerror(h){throw t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id,merge:p==null?void 0:p.merge})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/assets/index-659277e1.js b/backend/ui/assets/index-659277e1.js deleted file mode 100644 index 43be4f42..00000000 --- a/backend/ui/assets/index-659277e1.js +++ /dev/null @@ -1,123 +0,0 @@ -var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** - * @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 lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.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 w1=j,sr=TE;function ue(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"),lp=Object.prototype.hasOwnProperty,CE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(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 jE(e,t,n,r){if(t===null||typeof t>"u"||AE(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 zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(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){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` -`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(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 ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(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 fp(t);case 8:return t===Ah?"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 ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(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 dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(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 T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(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")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(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 hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={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},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({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 vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(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 nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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 uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(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=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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 ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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 Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();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=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(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 Vp(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 n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),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 r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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 qp(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=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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 Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;n(!0),await e.onSubmit(l),n(!1),i.message.value=""},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` -`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` -`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` -`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` -`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` -`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` -`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` -`+g}!b&&!g.trim()&&(b=!0),s+=C+` -`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` -`,o?'
    '+(r?t:ir(t,!0))+`
    -`:"
    "+(r?t:ir(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
    -`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" -`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` -`)].join(` -`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ -/* [wrapped with `+T+`] */ -`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` -`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:g==null?void 0:g.messages,run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:h==null?void 0:h.messages,run_id:h==null?void 0:h.run_id,merge:h==null?void 0:h.merge})),r(null)},onerror(h){throw t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id,merge:p==null?void 0:p.merge})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/assets/index-86d2f9e8.css b/backend/ui/assets/index-86d2f9e8.css deleted file mode 100644 index bcf699ef..00000000 --- a/backend/ui/assets/index-86d2f9e8.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}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-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}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,: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: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-\[1px\]{top:-1px}.bottom-0{bottom:0}.left-0{left:0}.left-full{left:100%}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.top-\[1px\]{top:1px}.z-40{z-index:40}.z-50{z-index:50}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-ml-0{margin-left:-0px}.-ml-0\.5{margin-left:-.125rem}.-ml-px{margin-left:-1px}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.min-h-\[calc\(100\%-56px\)\]{min-height:calc(100% - 56px)}.w-16{width:4rem}.w-24{width:6rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-72{width:18rem}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;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))}.translate-x-0{--tw-translate-x: 0px;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))}.rotate-180{--tw-rotate: 180deg;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))}.transform{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))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-5{row-gap:1.25rem}.gap-y-7{row-gap:1.75rem}.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))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.self-stretch{align-self:stretch}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-l-0{border-left-width:0px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-r-gray-300{--tw-border-opacity: 1;border-right-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:#111827cc}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.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-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-\[76px\]{padding-bottom:76px}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-\[100px\]{padding-left:100px}.pr-6{padding-right:1.5rem}.pt-2{padding-top:.5rem}.pt-20{padding-top:5rem}.pt-5{padding-top:1.25rem}.text-\[0\.625rem\]{font-size:.625rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 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{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-500\/10{--tw-ring-color: rgb(107 114 128 / .1)}.ring-yellow-600\/20{--tw-ring-color: rgb(202 138 4 / .2)}.invert{--tw-invert: invert(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)}.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-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}html,body,#root{height:100%}body{background:#f5f5f5}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.focus-within\:z-10:focus-within{z-index:10}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.group:hover .group-hover\:border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.group:hover .group-hover\:text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.prose-a\:text-gray-500 :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width: 768px){.md\:flex-row{flex-direction:row}}@media (min-width: 1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{top:0;bottom:0}.lg\:left-72{left:18rem}.lg\:z-50{z-index:50}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:flex-col{flex-direction:column}.lg\:items-stretch{align-items:stretch}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pl-72{padding-left:18rem}} diff --git a/backend/ui/assets/index-fd5a17b9.js b/backend/ui/assets/index-fd5a17b9.js deleted file mode 100644 index 7897afd6..00000000 --- a/backend/ui/assets/index-fd5a17b9.js +++ /dev/null @@ -1,123 +0,0 @@ -var tE=Object.defineProperty;var nE=(e,t,n)=>t in e?tE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ot=(e,t,n)=>(nE(e,typeof t!="symbol"?t+"":t,n),n),rE=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var vd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var ss=(e,t,n)=>(rE(e,t,"access private method"),n);function oE(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Lc={},l1={exports:{}},at={};/** - * @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 lu=Symbol.for("react.element"),iE=Symbol.for("react.portal"),aE=Symbol.for("react.fragment"),lE=Symbol.for("react.strict_mode"),uE=Symbol.for("react.profiler"),sE=Symbol.for("react.provider"),cE=Symbol.for("react.context"),fE=Symbol.for("react.forward_ref"),dE=Symbol.for("react.suspense"),pE=Symbol.for("react.memo"),hE=Symbol.for("react.lazy"),Iv=Symbol.iterator;function gE(e){return e===null||typeof e!="object"?null:(e=Iv&&e[Iv]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s1=Object.assign,c1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}Ra.prototype.isReactComponent={};Ra.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")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ra.prototype;function bh(e,t,n){this.props=e,this.context=t,this.refs=c1,this.updater=n||u1}var Sh=bh.prototype=new f1;Sh.constructor=bh;s1(Sh,Ra.prototype);Sh.isPureReactComponent=!0;var Lv=Array.isArray,d1=Object.prototype.hasOwnProperty,Eh={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,G=X[N];if(0>>1;No(ie,_e))reo(Se,ie)?(X[N]=Se,X[re]=_e,N=re):(X[N]=ie,X[Z]=_e,N=Z);else if(reo(Se,_e))X[N]=Se,X[re]=_e,N=re;else break e}}return ne}function o(X,ne){var _e=X.sortIndex-ne.sortIndex;return _e!==0?_e:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var c=[],f=[],h=1,p=null,g=3,y=!1,b=!1,E=!1,O=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(X){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=X)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function k(X){if(E=!1,S(X),!b)if(n(c)!==null)b=!0,De(C);else{var ne=n(f);ne!==null&&Be(k,ne.startTime-X)}}function C(X,ne){b=!1,E&&(E=!1,_(U),U=-1),y=!0;var _e=g;try{for(S(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||X&&!K());){var N=p.callback;if(typeof N=="function"){p.callback=null,g=p.priorityLevel;var G=N(p.expirationTime<=ne);ne=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(c)&&r(c),S(ne)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var Z=n(f);Z!==null&&Be(k,Z.startTime-ne),oe=!1}return oe}finally{p=null,g=_e,y=!1}}var $=!1,L=null,U=-1,ce=5,z=-1;function K(){return!(e.unstable_now()-zX||125N?(X.sortIndex=_e,t(f,X),n(c)===null&&X===n(f)&&(E?(_(U),U=-1):E=!0,Be(k,_e-N))):(X.sortIndex=G,t(c,X),b||y||(b=!0,De(C))),X},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(X){var ne=g;return function(){var _e=g;g=ne;try{return X.apply(this,arguments)}finally{g=_e}}}})(y1);v1.exports=y1;var TE=v1.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 w1=j,sr=TE;function ue(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"),lp=Object.prototype.hasOwnProperty,CE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fv={},zv={};function OE(e){return lp.call(zv,e)?!0:lp.call(Fv,e)?!1:CE.test(e)?zv[e]=!0:(Fv[e]=!0,!1)}function AE(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 jE(e,t,n,r){if(t===null||typeof t>"u"||AE(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 zn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xn[e]=new zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xn[t]=new zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xn[e]=new zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xn[e]=new zn(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){xn[e]=new zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xn[e]=new zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xn[e]=new zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xn[e]=new zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xn[e]=new zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Ch(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(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(Th,Ch);xn[t]=new zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!1,!1)});xn.xlinkHref=new zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xn[e]=new zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oh(e,t,n,r){var o=xn.hasOwnProperty(t)?xn[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var c=` -`+o[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{_d=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tl(e):""}function PE(e){switch(e.tag){case 5:return Tl(e.type);case 16:return Tl("Lazy");case 13:return Tl("Suspense");case 19:return Tl("SuspenseList");case 0:case 2:case 15:return e=xd(e.type,!1),e;case 11:return e=xd(e.type.render,!1),e;case 1:return e=xd(e.type,!0),e;default:return""}}function fp(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 ua:return"Fragment";case la:return"Portal";case up:return"Profiler";case Ah:return"StrictMode";case sp:return"Suspense";case cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case x1:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:fp(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return fp(e(t))}catch{}}return null}function RE(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 fp(t);case 8:return t===Ah?"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 ui(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ps(e){e._valueTracker||(e._valueTracker=$E(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(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 dp(e,t){var n=t.checked;return Qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ui(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 T1(e,t){t=t.checked,t!=null&&Oh(e,"checked",t,!1)}function pp(e,t){T1(e,t);var n=ui(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")?hp(e,t.type,n):t.hasOwnProperty("defaultValue")&&hp(e,t.type,ui(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(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 hp(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cl=Array.isArray;function wa(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=hs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pl={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},NE=["Webkit","ms","Moz","O"];Object.keys(Pl).forEach(function(e){NE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pl[t]=Pl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pl.hasOwnProperty(e)&&Pl[e]?(""+t).trim():t+"px"}function P1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var DE=Qt({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 vp(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function yp(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 wp=null;function Rh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _p=null,_a=null,xa=null;function Vv(e){if(e=cu(e)){if(typeof _p!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=Bc(t),_p(e.stateNode,e.type,t))}}function R1(e){_a?xa?xa.push(e):xa=[e]:_a=e}function $1(){if(_a){var e=_a,t=xa;if(xa=_a=null,Vv(e),t)for(e=0;e>>=0,e===0?32:31-(VE(e)/qE|0)|0}var gs=64,ms=4194304;function Ol(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 nc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ol(s):(i&=l,i!==0&&(r=Ol(i)))}else l=n&~o,l!==0?r=Ol(l):i!==0&&(r=Ol(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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 uu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fr(t),e[t]=n}function XE(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=$l),t0=String.fromCharCode(32),n0=!1;function J1(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ew(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sa=!1;function Ck(e,t){switch(e){case"compositionend":return ew(t);case"keypress":return t.which!==32?null:(n0=!0,t0);case"textInput":return e=t.data,e===t0&&n0?null:e;default:return null}}function Ok(e,t){if(sa)return e==="compositionend"||!zh&&J1(e,t)?(e=X1(),Us=Lh=Xo=null,sa=!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 ow(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ow(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iw(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Uh(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 Lk(e){var t=iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ow(n.ownerDocument.documentElement,n)){if(r!==null&&Uh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=l0(n,i);var l=l0(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,ca=null,Tp=null,Dl=null,Cp=!1;function u0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cp||ca==null||ca!==Zs(r)||(r=ca,"selectionStart"in r&&Uh(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}),Dl&&Ql(Dl,r)||(Dl=r,r=ic(Tp,"onSelect"),0pa||(e.current=$p[pa],$p[pa]=null,pa--)}function Pt(e,t){pa++,$p[pa]=e.current,e.current=t}var si={},jn=fi(si),Kn=fi(!1),Ni=si;function Ta(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qn(e){return e=e.childContextTypes,e!=null}function lc(){Lt(Kn),Lt(jn)}function g0(e,t,n){if(jn.current!==si)throw Error(ue(168));Pt(jn,t),Pt(Kn,n)}function hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ue(108,RE(e)||"Unknown",o));return Qt({},n,r)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Ni=jn.current,Pt(jn,e),Pt(Kn,Kn.current),!0}function m0(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=hw(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Lt(Kn),Lt(jn),Pt(jn,e)):Lt(Kn),Pt(Kn,n)}var yo=null,Hc=!1,Dd=!1;function gw(e){yo===null?yo=[e]:yo.push(e)}function Qk(e){Hc=!0,gw(e)}function di(){if(!Dd&&yo!==null){Dd=!0;var e=0,t=Et;try{var n=yo;for(Et=1;e>=l,o-=l,wo=1<<32-Fr(t)+o|n<U?(ce=L,L=null):ce=L.sibling;var z=g(_,L,S[U],k);if(z===null){L===null&&(L=ce);break}e&&L&&z.alternate===null&&t(_,L),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z,L=ce}if(U===S.length)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;UU?(ce=L,L=null):ce=L.sibling;var K=g(_,L,z.value,k);if(K===null){L===null&&(L=ce);break}e&&L&&K.alternate===null&&t(_,L),w=i(K,w,U),$===null?C=K:$.sibling=K,$=K,L=ce}if(z.done)return n(_,L),zt&&xi(_,U),C;if(L===null){for(;!z.done;U++,z=S.next())z=p(_,z.value,k),z!==null&&(w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return zt&&xi(_,U),C}for(L=r(_,L);!z.done;U++,z=S.next())z=y(L,_,U,z.value,k),z!==null&&(e&&z.alternate!==null&&L.delete(z.key===null?U:z.key),w=i(z,w,U),$===null?C=z:$.sibling=z,$=z);return e&&L.forEach(function(W){return t(_,W)}),zt&&xi(_,U),C}function O(_,w,S,k){if(typeof S=="object"&&S!==null&&S.type===ua&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ds:e:{for(var C=S.key,$=w;$!==null;){if($.key===C){if(C=S.type,C===ua){if($.tag===7){n(_,$.sibling),w=o($,S.props.children),w.return=_,_=w;break e}}else if($.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Vo&&S0(C)===$.type){n(_,$.sibling),w=o($,S.props),w.ref=gl(_,$,S),w.return=_,_=w;break e}n(_,$);break}else t(_,$);$=$.sibling}S.type===ua?(w=Ri(S.props.children,_.mode,k,S.key),w.return=_,_=w):(k=Qs(S.type,S.key,S.props,null,_.mode,k),k.ref=gl(_,w,S),k.return=_,_=k)}return l(_);case la:e:{for($=S.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=o(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=Hd(S,_.mode,k),w.return=_,_=w}return l(_);case Vo:return $=S._init,O(_,w,$(S._payload),k)}if(Cl(S))return b(_,w,S,k);if(cl(S))return E(_,w,S,k);Ss(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=o(w,S),w.return=_,_=w):(n(_,w),w=Bd(S,_.mode,k),w.return=_,_=w),l(_)):n(_,w)}return O}var Oa=Sw(!0),Ew=Sw(!1),fu={},oo=fi(fu),Jl=fi(fu),eu=fi(fu);function Oi(e){if(e===fu)throw Error(ue(174));return e}function Yh(e,t){switch(Pt(eu,t),Pt(Jl,e),Pt(oo,fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mp(t,e)}Lt(oo),Pt(oo,t)}function Aa(){Lt(oo),Lt(Jl),Lt(eu)}function kw(e){Oi(eu.current);var t=Oi(oo.current),n=mp(t,e.type);t!==n&&(Pt(Jl,e),Pt(oo,n))}function Xh(e){Jl.current===e&&(Lt(oo),Lt(Jl))}var qt=fi(0);function hc(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 Id=[];function Zh(){for(var e=0;en?n:4,e(!0);var r=Ld.transition;Ld.transition={};try{e(!1),t()}finally{Et=n,Ld.transition=r}}function Uw(){return Cr().memoizedState}function Jk(e,t,n){var r=ai(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bw(e))Hw(t,n);else if(n=ww(e,t,n,r),n!==null){var o=Ln();zr(n,e,r,o),Ww(n,t,r)}}function e2(e,t,n){var r=ai(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bw(e))Hw(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Ur(s,l)){var c=t.interleaved;c===null?(o.next=o,Kh(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=ww(e,t,o,r),n!==null&&(o=Ln(),zr(n,e,r,o),Ww(n,t,r))}}function Bw(e){var t=e.alternate;return e===Kt||t!==null&&t===Kt}function Hw(e,t){Il=gc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ww(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nh(e,n)}}var mc={readContext:Tr,useCallback:kn,useContext:kn,useEffect:kn,useImperativeHandle:kn,useInsertionEffect:kn,useLayoutEffect:kn,useMemo:kn,useReducer:kn,useRef:kn,useState:kn,useDebugValue:kn,useDeferredValue:kn,useTransition:kn,useMutableSource:kn,useSyncExternalStore:kn,useId:kn,unstable_isNewReconciler:!1},t2={readContext:Tr,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:k0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,Iw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();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=Jk.bind(null,Kt,e),[r.memoizedState,e]},useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:E0,useDebugValue:rg,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=E0(!1),t=e[0];return e=Zk.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Kt,o=Jr();if(zt){if(n===void 0)throw Error(ue(407));n=n()}else{if(n=t(),mn===null)throw Error(ue(349));Ii&30||Ow(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,k0(jw.bind(null,r,i,e),[e]),r.flags|=2048,ru(9,Aw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=mn.identifierPrefix;if(zt){var n=_o,r=wo;n=(r&~(1<<32-Fr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[eo]=t,e[Zl]=r,Jw(e,t,!1,!1),t.stateNode=e;e:{switch(l=yp(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),o=r;break;case"iframe":case"object":case"embed":Dt("load",e),o=r;break;case"video":case"audio":for(o=0;oPa&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304)}else{if(!r)if(e=hc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ml(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!zt)return Tn(t),null}else 2*nn()-i.renderingStartTime>Pa&&n!==1073741824&&(t.flags|=128,r=!0,ml(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=nn(),t.sibling=null,n=qt.current,Pt(qt,r?n&1|2:n&1),t):(Tn(t),null);case 22:case 23:return sg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?or&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function s2(e,t){switch(Hh(t),t.tag){case 1:return Qn(t.type)&&lc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Aa(),Lt(Kn),Lt(jn),Zh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xh(t),null;case 13:if(Lt(qt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lt(qt),null;case 4:return Aa(),null;case 10:return qh(t.type._context),null;case 22:case 23:return sg(),null;case 24:return null;default:return null}}var ks=!1,Cn=!1,c2=typeof WeakSet=="function"?WeakSet:Set,we=null;function va(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Gp(e,t,n){try{n()}catch(r){en(e,t,r)}}var N0=!1;function f2(e,t){if(Op=rc,e=iw(),Uh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,f=0,h=0,p=e,g=null;t:for(;;){for(var y;p!==n||o!==0&&p.nodeType!==3||(s=l+o),p!==i||r!==0&&p.nodeType!==3||(c=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(y=p.firstChild)!==null;)g=p,p=y;for(;;){if(p===e)break t;if(g===n&&++f===o&&(s=l),g===i&&++h===r&&(c=l),(y=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=y}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ap={focusedElem:e,selectionRange:n},rc=!1,we=t;we!==null;)if(t=we,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,we=e;else for(;we!==null;){t=we;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var E=b.memoizedProps,O=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?E:Ir(t.type,E),O);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(k){en(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,we=e;break}we=t.return}return b=N0,N0=!1,b}function Ll(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gp(t,n,i)}o=o.next}while(o!==r)}}function Vc(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 Vp(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 n_(e){var t=e.alternate;t!==null&&(e.alternate=null,n_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[eo],delete t[Zl],delete t[Rp],delete t[qk],delete t[Kk])),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 r_(e){return e.tag===5||e.tag===3||e.tag===4}function D0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r_(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 qp(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=ac));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Kp(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(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}var wn=null,Lr=!1;function Bo(e,t,n){for(n=n.child;n!==null;)o_(e,t,n),n=n.sibling}function o_(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Cn||va(n,t);case 6:var r=wn,o=Lr;wn=null,Bo(e,t,n),wn=r,Lr=o,wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(Lr?(e=wn,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ql(e)):Nd(wn,n.stateNode));break;case 4:r=wn,o=Lr,wn=n.stateNode.containerInfo,Lr=!0,Bo(e,t,n),wn=r,Lr=o;break;case 0:case 11:case 14:case 15:if(!Cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Gp(n,t,l),o=o.next}while(o!==r)}Bo(e,t,n);break;case 1:if(!Cn&&(va(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:n.mode&1?(Cn=(r=Cn)||n.memoizedState!==null,Bo(e,t,n),Cn=r):Bo(e,t,n);break;default:Bo(e,t,n)}}function I0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c2),t.forEach(function(r){var o=_2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Nr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p2(r/1960))-r,10e?16:e,Zo===null)var r=!1;else{if(e=Zo,Zo=null,wc=0,dt&6)throw Error(ue(331));var o=dt;for(dt|=4,we=e.current;we!==null;){var i=we,l=i.child;if(we.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cnn()-lg?Pi(e,0):ag|=n),Yn(e,t)}function d_(e,t){t===0&&(e.mode&1?(t=ms,ms<<=1,!(ms&130023424)&&(ms=4194304)):t=1);var n=Ln();e=To(e,t),e!==null&&(uu(e,t,n),Yn(e,n))}function w2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d_(e,n)}function _2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}r!==null&&r.delete(t),d_(e,n)}var p_;p_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kn.current)qn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qn=!1,l2(e,t,n);qn=!!(e.flags&131072)}else qn=!1,zt&&t.flags&1048576&&mw(t,cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=Ta(t,jn.current);Sa(t,n),o=eg(null,t,r,e,o,n);var i=tg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(i=!0,uc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qh(t),o.updater=Wc,t.stateNode=o,o._reactInternals=t,Mp(t,r,e,n),t=Up(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&Bh(t),In(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b2(r),e=Ir(r,e),o){case 0:t=zp(null,t,r,e,n);break e;case 1:t=P0(null,t,r,e,n);break e;case 11:t=A0(null,t,r,e,n);break e;case 14:t=j0(null,t,r,Ir(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),zp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),P0(e,t,r,o,n);case 3:e:{if(Yw(t),e===null)throw Error(ue(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_w(e,t),pc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ja(Error(ue(423)),t),t=R0(e,t,r,n,o);break e}else if(r!==o){o=ja(Error(ue(424)),t),t=R0(e,t,r,n,o);break e}else for(lr=ri(t.stateNode.containerInfo.firstChild),ur=t,zt=!0,Mr=null,n=Ew(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===o){t=Co(e,t,n);break e}In(e,t,r,n)}t=t.child}return t;case 5:return kw(t),e===null&&Dp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,jp(r,o)?l=null:i!==null&&jp(r,i)&&(t.flags|=32),Qw(e,t),In(e,t,l,n),t.child;case 6:return e===null&&Dp(t),null;case 13:return Xw(e,t,n);case 4:return Yh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):In(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),A0(e,t,r,o,n);case 7:return In(e,t,t.pendingProps,n),t.child;case 8:return In(e,t,t.pendingProps.children,n),t.child;case 12:return In(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Pt(fc,r._currentValue),r._currentValue=l,i!==null)if(Ur(i.value,l)){if(i.children===o.children&&!Kn.current){t=Co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=xo(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ip(i.return,n,t),s.lanes|=n;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(ue(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ip(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}In(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),o=Tr(o),r=r(o),t.flags|=1,In(e,t,r,n),t.child;case 14:return r=t.type,o=Ir(r,t.pendingProps),o=Ir(r.type,o),j0(e,t,r,o,n);case 15:return qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ir(r,o),Vs(e,t),t.tag=1,Qn(r)?(e=!0,uc(t)):e=!1,Sa(t,n),bw(t,r,o),Mp(t,r,o,n),Up(null,t,r,!0,e,n);case 19:return Zw(e,t,n);case 22:return Kw(e,t,n)}throw Error(ue(156,t.tag))};function h_(e,t){return z1(e,t)}function x2(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 Er(e,t,n,r){return new x2(e,t,n,r)}function fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b2(e){if(typeof e=="function")return fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Ph)return 14}return 2}function li(e,t){var n=e.alternate;return n===null?(n=Er(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 Qs(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case ua:return Ri(n.children,o,i,t);case Ah:l=8,o|=8;break;case up:return e=Er(12,n,t,o|2),e.elementType=up,e.lanes=i,e;case sp:return e=Er(13,n,t,o),e.elementType=sp,e.lanes=i,e;case cp:return e=Er(19,n,t,o),e.elementType=cp,e.lanes=i,e;case S1:return Kc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x1:l=10;break e;case b1:l=9;break e;case jh:l=11;break e;case Ph:l=14;break e;case Vo:l=16,r=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ri(e,t,n,r){return e=Er(7,e,r,t),e.lanes=n,e}function Kc(e,t,n,r){return e=Er(22,e,r,t),e.elementType=S1,e.lanes=n,e.stateNode={isHidden:!1},e}function Bd(e,t,n){return e=Er(6,e,null,t),e.lanes=n,e}function Hd(e,t,n){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dg(e,t,n,r,o,i,l,s,c){return e=new S2(e,t,n,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qh(i),e}function E2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y_)}catch(e){console.error(e)}}y_(),m1.exports=cr;var w_=m1.exports,W0=w_;ap.createRoot=W0.createRoot,ap.hydrateRoot=W0.hydrateRoot;function A2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const j2=j.forwardRef(A2),P2=j2;function R2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}))}const $2=j.forwardRef(R2),G0=$2;function N2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"}))}const D2=j.forwardRef(N2),I2=D2;function L2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const M2=j.forwardRef(L2),V0=M2;function F2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"}))}const z2=j.forwardRef(F2),U2=z2;function B2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"}))}const H2=j.forwardRef(B2),W2=H2;function G2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}))}const V2=j.forwardRef(G2),q2=V2;function K2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Q2=j.forwardRef(K2),__=Q2;function Y2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const X2=j.forwardRef(Y2),Z2=X2;function J2({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const eT=j.forwardRef(J2),tT=eT;function nT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const rT=j.forwardRef(nT),oT=rT;async function q0(e){const{messages:t}=await fetch(`/threads/${e}/messages`,{headers:{Accept:"application/json"}}).then(n=>n.json());return t}function iT(e,t){const[n,r]=j.useState(null);return j.useEffect(()=>{async function o(){e&&r(await q0(e))}return o(),()=>{r(null)}},[e]),j.useEffect(()=>{async function o(){e&&r(await q0(e))}(t==null?void 0:t.status)!=="inflight"&&o()},[t==null?void 0:t.status]),t!=null&&t.merge?[...n??[],...t.messages??[]]:(t==null?void 0:t.messages)??n}function aT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.202 41.202 0 01-5.183.501.78.78 0 00-.528.224l-3.579 3.58A.75.75 0 016 17.25v-3.443a41.033 41.033 0 01-2.57-.33C1.993 13.244 1 11.986 1 10.573V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"}))}const lT=j.forwardRef(aT),uT=lT;function sT({title:e,titleId:t,...n},r){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?j.createElement("title",{id:t},e):null,j.createElement("path",{d:"M3.105 2.289a.75.75 0 00-.826.95l1.414 4.925A1.5 1.5 0 005.135 9.25h6.115a.75.75 0 010 1.5H5.135a1.5 1.5 0 00-1.442 1.086l-1.414 4.926a.75.75 0 00.826.95 28.896 28.896 0 0015.293-7.154.75.75 0 000-1.115A28.897 28.897 0 003.105 2.289z"}))}const cT=j.forwardRef(sT),fT=cT;function x_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ts(i)))==null?void 0:l.classGroupId}const K0=/^\[(.+)\]$/;function hT(e){if(K0.test(e)){const t=K0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function gT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vT(Object.entries(e.classGroups),n).forEach(([i,l])=>{Jp(l,r,i,t)}),r}function Jp(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Q0(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(mT(o)){Jp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Jp(l,Q0(t,i),n,r)})})}function Q0(e,t){let n=e;return t.split(mg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function mT(e){return e.isThemeGetter}function vT(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function yT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const S_="!";function wT(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let c=0,f=0,h;for(let E=0;Ef?h-f:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}}}function _T(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function xT(e){return{cache:yT(e.cacheSize),splitModifiers:wT(e),...pT(e)}}const bT=/\s+/;function ST(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bT).map(l=>{const{modifiers:s,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=n(l);let p=r(h?f.substring(0,h):f),g=!!h;if(!p){if(!h)return{isTailwindClass:!1,originalClassName:l};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:l};g=!1}const y=_T(s).join(":");return{isTailwindClass:!0,modifierId:c?y+S_:y,classGroupId:p,originalClassName:l,hasPostfixModifier:g}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:c,hasPostfixModifier:f}=l,h=s+c;return i.has(h)?!1:(i.add(h),o(c,f).forEach(p=>i.add(s+p)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function ET(){let e=0,t,n,r="";for(;ep(h),e());return n=xT(f),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=ST(c,n);return o(c,h),h}return function(){return i(ET.apply(null,arguments))}}function Nt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const k_=/^\[(?:([a-z-]+):)?(.+)\]$/i,TT=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dr(e){return Ai(e)||CT.has(e)||TT.test(e)}function Ho(e){return Da(e,"length",FT)}function Ai(e){return!!e&&!Number.isNaN(Number(e))}function Os(e){return Da(e,"number",Ai)}function yl(e){return!!e&&Number.isInteger(Number(e))}function RT(e){return e.endsWith("%")&&Ai(e.slice(0,-1))}function Je(e){return k_.test(e)}function Wo(e){return OT.test(e)}const $T=new Set(["length","size","percentage"]);function NT(e){return Da(e,$T,T_)}function DT(e){return Da(e,"position",T_)}const IT=new Set(["image","url"]);function LT(e){return Da(e,IT,UT)}function MT(e){return Da(e,"",zT)}function wl(){return!0}function Da(e,t,n){const r=k_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function FT(e){return AT.test(e)}function T_(){return!1}function zT(e){return jT.test(e)}function UT(e){return PT.test(e)}function BT(){const e=Nt("colors"),t=Nt("spacing"),n=Nt("blur"),r=Nt("brightness"),o=Nt("borderColor"),i=Nt("borderRadius"),l=Nt("borderSpacing"),s=Nt("borderWidth"),c=Nt("contrast"),f=Nt("grayscale"),h=Nt("hueRotate"),p=Nt("invert"),g=Nt("gap"),y=Nt("gradientColorStops"),b=Nt("gradientColorStopPositions"),E=Nt("inset"),O=Nt("margin"),_=Nt("opacity"),w=Nt("padding"),S=Nt("saturate"),k=Nt("scale"),C=Nt("sepia"),$=Nt("skew"),L=Nt("space"),U=Nt("translate"),ce=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",Je,t],W=()=>[Je,t],ge=()=>["",Dr,Ho],he=()=>["auto",Ai,Je],be=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],Be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Je],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Ai,Os],G=()=>[Ai,Je];return{cacheSize:500,separator:":",theme:{colors:[wl],spacing:[Dr,Ho],blur:["none","",Wo,Je],brightness:N(),borderColor:[e],borderRadius:["none","","full",Wo,Je],borderSpacing:W(),borderWidth:ge(),contrast:N(),grayscale:ne(),hueRotate:G(),invert:ne(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[RT,Ho],inset:K(),margin:K(),opacity:N(),padding:W(),saturate:N(),scale:N(),sepia:ne(),skew:G(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[Wo]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...be(),Je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yl,Je]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",yl,Je]}],"grid-cols":[{"grid-cols":[wl]}],"col-start-end":[{col:["auto",{span:["full",yl,Je]},Je]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[wl]}],"row-start-end":[{row:["auto",{span:[yl,Je]},Je]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Je,t]}],"min-w":[{"min-w":["min","max","fit",Je,Dr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wo]},Wo,Je]}],h:[{h:[Je,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Dr,Je]}],"max-h":[{"max-h":[Je,t,"min","max","fit"]}],"font-size":[{text:["base",Wo,Ho]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Os]}],"font-family":[{font:[wl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Je]}],"line-clamp":[{"line-clamp":["none",Ai,Os]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,Ho]}],"underline-offset":[{"underline-offset":["auto",Dr,Je]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...be(),DT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...De(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:De()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...De()]}],"outline-offset":[{"outline-offset":[Dr,Je]}],"outline-w":[{outline:[Dr,Ho]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Dr,Ho]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wo,MT]}],"shadow-color":[{shadow:[wl]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":Be()}],"bg-blend":[{"bg-blend":Be()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[yl,Je]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,Ho,Os]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const HT=kT(BT);function On(...e){return HT(dT(e))}function C_(e){const[t,n]=j.useState(!1),r=e.disabled||t;return M.jsxs("form",{className:On("mt-2 flex rounded-md shadow-sm",r&&"opacity-50 cursor-not-allowed"),onSubmit:async o=>{if(o.preventDefault(),r)return;const i=o.target,l=i.message.value;l&&(n(!0),await e.onSubmit(l),n(!1),i.message.value="")},children:[M.jsxs("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:[M.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:M.jsx(uT,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),M.jsx("input",{type:"text",name:"messsage",id:"message",autoFocus:!0,autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"Send a message",readOnly:r})]}),M.jsxs("button",{type:"submit",disabled:r,className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-r-md px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 bg-white",children:[M.jsx(fT,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),t?"Sending...":"Send"]})]})}function O_(e){return typeof e=="object"?JSON.stringify(e,null,2):e}function vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Bi=vg();function A_(e){Bi=e}const j_=/[&<>"']/,WT=new RegExp(j_.source,"g"),P_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,GT=new RegExp(P_.source,"g"),VT={"&":"&","<":"<",">":">",'"':""","'":"'"},Y0=e=>VT[e];function ir(e,t){if(t){if(j_.test(e))return e.replace(WT,Y0)}else if(P_.test(e))return e.replace(GT,Y0);return e}const qT=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KT(e){return e.replace(qT,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const QT=/(^|[^\[])\^/g;function xt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(QT,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function X0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Z0(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let c=!1,f=l;for(;--f>=0&&s[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(` -`)}class Sc{constructor(t){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=t||Bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:As(r,` -`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XT(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=As(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=As(n[0].replace(/^ *>[ \t]?/gm,""),` -`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",c="",f=!1;for(;t;){let h=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let p=n[2].split(` -`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=t.split(` -`,1)[0],y=0;this.options.pedantic?(y=2,c=p.trimStart()):(y=n[2].search(/[^ ]/),y=y>4?1:y,c=p.slice(y),y+=n[1].length);let b=!1;if(!p&&/^ *$/.test(g)&&(s+=g+` -`,t=t.substring(g.length+1),h=!0),!h){const _=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),S=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),k=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){const C=t.split(` -`,1)[0];if(g=C,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),S.test(g)||k.test(g)||_.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=y||!g.trim())c+=` -`+g.slice(y);else{if(b||p.search(/[^ ]/)>=4||S.test(p)||k.test(p)||w.test(p))break;c+=` -`+g}!b&&!g.trim()&&(b=!0),s+=C+` -`,t=t.substring(C.length+1),p=g.slice(y)}}i.loose||(f?i.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let E=null,O;this.options.gfm&&(E=/^\[[ xX]\] /.exec(c),E&&(O=E[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!E,checked:O,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let h=0;hy.type==="space"),g=p.length>0&&p.some(y=>/\n.*\n/.test(y.raw));i.loose=g}if(i.loose)for(let h=0;h$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Z0(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,c;for(i=0;i({text:f,tokens:[]}));for(o=r.header.length,l=0;l/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const l=As(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YT(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),J0(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return J0(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,c,f=l,h=0;const p=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+l);(o=p.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){f+=c;continue}else if((o[5]||o[6])&&l%3&&!((l+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);const g=[...o[0]][0].length,y=t.slice(0,l+o.index+g+c);if(Math.min(l,c)%2){const E=y.slice(1,-1);return{type:"em",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}const b=y.slice(2,-2);return{type:"strong",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=ir(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=ir(n[1]),o="mailto:"+r):(r=ir(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=ir(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=ir(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=ir(n[0]),{type:"text",raw:n[0],text:r}}}}const je={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};je._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;je.def=xt(je.def).replace("label",je._label).replace("title",je._title).getRegex();je.bullet=/(?:[*+-]|\d{1,9}[.)])/;je.listItemStart=xt(/^( *)(bull) */).replace("bull",je.bullet).getRegex();je.list=xt(je.list).replace(/bull/g,je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+je.def.source+")").getRegex();je._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";je._comment=/|$)/;je.html=xt(je.html,"i").replace("comment",je._comment).replace("tag",je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();je.lheading=xt(je.lheading).replace(/bull/g,je.bullet).getRegex();je.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.blockquote=xt(je.blockquote).replace("paragraph",je.paragraph).getRegex();je.normal={...je};je.gfm={...je.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};je.gfm.table=xt(je.gfm.table).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.gfm.paragraph=xt(je._paragraph).replace("hr",je.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",je._tag).getRegex();je.pedantic={...je.normal,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",je._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(je.normal._paragraph).replace("hr",je.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";me.punctuation=xt(me.punctuation,"u").replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;me.anyPunctuation=/\\[punct]/g;me._escapes=/\\([punct])/g;me._comment=xt(je._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=xt(me.emStrong.lDelim,"u").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=xt(me.emStrong.rDelimAst,"gu").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=xt(me.emStrong.rDelimUnd,"gu").replace(/punct/g,me._punctuation).getRegex();me.anyPunctuation=xt(me.anyPunctuation,"gu").replace(/punct/g,me._punctuation).getRegex();me._escapes=xt(me._escapes,"gu").replace(/punct/g,me._punctuation).getRegex();me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=xt(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=xt(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=xt(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=xt(me.reflink).replace("label",me._label).replace("ref",je._label).getRegex();me.nolink=xt(me.nolink).replace("ref",je._label).getRegex();me.reflinkSearch=xt(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal={...me};me.pedantic={...me.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()};me.gfm={...me.normal,escape:xt(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\c+" ".repeat(f.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` -`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=` -`+r.raw,o.text+=` -`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=` -`+r.raw,o.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,c,f;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(f=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,f)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(y=>{g=y.call({lexer:this},p),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(i=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(f=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class Ec{constructor(t){Ot(this,"options");this.options=t||Bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+` -`,o?'
    '+(r?t:ir(t,!0))+`
    -`:"
    "+(r?t:ir(t,!0))+`
    -`}blockquote(t){return`
    -${t}
    -`}html(t,n){return t}heading(t,n,r){return`${t} -`}hr(){return`
    -`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`> -`+t+" -`}listitem(t,n,r){return`
  • ${t}
  • -`}checkbox(t){return"'}paragraph(t){return`

    ${t}

    -`}table(t,n){return n&&(n=`${n}`),` - -`+t+` -`+n+`
    -`}tablerow(t){return` -${t} -`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return"
    "}del(t){return`${t}`}link(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i='
    ",i}image(t,n,r){const o=X0(t);if(o===null)return r;t=o;let i=`${r}0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=O+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=O+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:O+" "}):E+=O+" "}E+=this.parse(g.tokens,f),h+=this.renderer.listitem(E,b,!!y)}r+=this.renderer.list(h,s,c);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1{r=r.concat(this.walkTokens(s[c],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=l.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Ec(this.defaults);for(const l in r.renderer){const s=r.renderer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Sc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],c=l,f=i[c];i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zl;for(const l in r.hooks){const s=r.hooks[l],c=l,f=i[c];zl.passThroughHooks.has(l)?i[c]=h=>{if(this.defaults.async)return Promise.resolve(s.call(i,h)).then(g=>f.call(i,g));const p=s.call(i,h);return f.call(i,p)}:i[c]=(...h)=>{let p=s.apply(i,h);return p===!1&&(p=f.apply(i,h)),p}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(l.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}au=new WeakSet,eh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=ss(this,Ic,R_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(c=>t(c,l)).then(c=>l.walkTokens?Promise.all(this.walkTokens(c,l.walkTokens)).then(()=>c):c).then(c=>n(c,l)).then(c=>l.hooks?l.hooks.postprocess(c):c).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const c=t(r,l);l.walkTokens&&this.walkTokens(c,l.walkTokens);let f=n(c,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(c){return s(c)}}},Ic=new WeakSet,R_=function(t,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){const o="

    An error occurred:

    "+ir(r.message+"",!0)+"
    ";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const Fi=new ZT;function _t(e,t){return Fi.parse(e,t)}_t.options=_t.setOptions=function(e){return Fi.setOptions(e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.getDefaults=vg;_t.defaults=Bi;_t.use=function(...e){return Fi.use(...e),_t.defaults=Fi.defaults,A_(_t.defaults),_t};_t.walkTokens=function(e,t){return Fi.walkTokens(e,t)};_t.parseInline=Fi.parseInline;_t.Parser=no;_t.parser=no.parse;_t.Renderer=Ec;_t.TextRenderer=yg;_t.Lexer=to;_t.lexer=to.lex;_t.Tokenizer=Sc;_t.Hooks=zl;_t.parse=_t;_t.options;_t.setOptions;_t.use;_t.walkTokens;_t.parseInline;no.parse;to.lex;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:$_,setPrototypeOf:ey,isFrozen:JT,getPrototypeOf:eC,getOwnPropertyDescriptor:N_}=Object;let{freeze:Mn,seal:Br,create:D_}=Object,{apply:th,construct:nh}=typeof Reflect<"u"&&Reflect;Mn||(Mn=function(t){return t});Br||(Br=function(t){return t});th||(th=function(t,n,r){return t.apply(n,r)});nh||(nh=function(t,n){return new t(...n)});const js=Or(Array.prototype.forEach),ty=Or(Array.prototype.pop),_l=Or(Array.prototype.push),Ys=Or(String.prototype.toLowerCase),Wd=Or(String.prototype.toString),tC=Or(String.prototype.match),xl=Or(String.prototype.replace),nC=Or(String.prototype.indexOf),rC=Or(String.prototype.trim),rr=Or(RegExp.prototype.test),bl=oC(TypeError);function Or(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Ys;ey&&ey(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(JT(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ia(e){const t=D_(null);for(const[n,r]of $_(e))N_(e,n)!==void 0&&(t[n]=r);return t}function Ps(e,t){for(;e!==null;){const r=N_(e,t);if(r){if(r.get)return Or(r.get);if(typeof r.value=="function")return Or(r.value)}e=eC(e)}function n(r){return console.warn("fallback value for",r),null}return n}const ny=Mn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gd=Mn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Vd=Mn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iC=Mn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qd=Mn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),aC=Mn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ry=Mn(["#text"]),oy=Mn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Kd=Mn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iy=Mn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=Mn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lC=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uC=Br(/<%[\w\W]*|[\w\W]*%>/gm),sC=Br(/\${[\w\W]*}/gm),cC=Br(/^data-[\-\w.\u00B7-\uFFFF]/),fC=Br(/^aria-[\-\w]+$/),I_=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dC=Br(/^(?:\w+script|data):/i),pC=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L_=Br(/^html$/i);var ay=Object.freeze({__proto__:null,MUSTACHE_EXPR:lC,ERB_EXPR:uC,TMPLIT_EXPR:sC,DATA_ATTR:cC,ARIA_ATTR:fC,IS_ALLOWED_URI:I_,IS_SCRIPT_OR_DATA:dC,ATTR_WHITESPACE:pC,DOCTYPE_NAME:L_});const hC=function(){return typeof window>"u"?null:window},gC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function M_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hC();const t=ke=>M_(ke);if(t.version="3.0.6",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:y}=e,b=c.prototype,E=Ps(b,"cloneNode"),O=Ps(b,"nextSibling"),_=Ps(b,"childNodes"),w=Ps(b,"parentNode");if(typeof l=="function"){const ke=n.createElement("template");ke.content&&ke.content.ownerDocument&&(n=ke.content.ownerDocument)}let S,k="";const{implementation:C,createNodeIterator:$,createDocumentFragment:L,getElementsByTagName:U}=n,{importNode:ce}=r;let z={};t.isSupported=typeof $_=="function"&&typeof w=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:W,TMPLIT_EXPR:ge,DATA_ATTR:he,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:Be}=ay;let{IS_ALLOWED_URI:X}=ay,ne=null;const _e=et({},[...ny,...Gd,...Vd,...qd,...ry]);let N=null;const G=et({},[...oy,...Kd,...iy,...Rs]);let oe=Object.seal(D_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,ie=null,re=!0,Se=!0,Pe=!1,Fe=!0,Ke=!1,He=!1,xe=!1,Xe=!1,rt=!1,Ie=!1,Ze=!1,gt=!0,Mt=!1;const jt="user-content-";let yt=!0,kt=!1,$e={},Bt=null;const se=et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Oe=null;const pt=et({},["audio","video","img","source","image","track"]);let Rt=null;const Yt=et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Rn=pn,Xn=!1,A=null;const R=et({},[Pn,dn,pn],Wd);let I=null;const q=["application/xhtml+xml","text/html"],V="text/html";let de=null,ve=null;const Ge=n.createElement("form"),st=function(F){return F instanceof RegExp||F instanceof Function},Re=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ve&&ve===F)){if((!F||typeof F!="object")&&(F={}),F=ia(F),I=q.indexOf(F.PARSER_MEDIA_TYPE)===-1?I=V:I=F.PARSER_MEDIA_TYPE,de=I==="application/xhtml+xml"?Wd:Ys,ne="ALLOWED_TAGS"in F?et({},F.ALLOWED_TAGS,de):_e,N="ALLOWED_ATTR"in F?et({},F.ALLOWED_ATTR,de):G,A="ALLOWED_NAMESPACES"in F?et({},F.ALLOWED_NAMESPACES,Wd):R,Rt="ADD_URI_SAFE_ATTR"in F?et(ia(Yt),F.ADD_URI_SAFE_ATTR,de):Yt,Oe="ADD_DATA_URI_TAGS"in F?et(ia(pt),F.ADD_DATA_URI_TAGS,de):pt,Bt="FORBID_CONTENTS"in F?et({},F.FORBID_CONTENTS,de):se,Z="FORBID_TAGS"in F?et({},F.FORBID_TAGS,de):{},ie="FORBID_ATTR"in F?et({},F.FORBID_ATTR,de):{},$e="USE_PROFILES"in F?F.USE_PROFILES:!1,re=F.ALLOW_ARIA_ATTR!==!1,Se=F.ALLOW_DATA_ATTR!==!1,Pe=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=F.SAFE_FOR_TEMPLATES||!1,He=F.WHOLE_DOCUMENT||!1,rt=F.RETURN_DOM||!1,Ie=F.RETURN_DOM_FRAGMENT||!1,Ze=F.RETURN_TRUSTED_TYPE||!1,Xe=F.FORCE_BODY||!1,gt=F.SANITIZE_DOM!==!1,Mt=F.SANITIZE_NAMED_PROPS||!1,yt=F.KEEP_CONTENT!==!1,kt=F.IN_PLACE||!1,X=F.ALLOWED_URI_REGEXP||I_,Rn=F.NAMESPACE||pn,oe=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&st(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ie&&(rt=!0),$e&&(ne=et({},[...ry]),N=[],$e.html===!0&&(et(ne,ny),et(N,oy)),$e.svg===!0&&(et(ne,Gd),et(N,Kd),et(N,Rs)),$e.svgFilters===!0&&(et(ne,Vd),et(N,Kd),et(N,Rs)),$e.mathMl===!0&&(et(ne,qd),et(N,iy),et(N,Rs))),F.ADD_TAGS&&(ne===_e&&(ne=ia(ne)),et(ne,F.ADD_TAGS,de)),F.ADD_ATTR&&(N===G&&(N=ia(N)),et(N,F.ADD_ATTR,de)),F.ADD_URI_SAFE_ATTR&&et(Rt,F.ADD_URI_SAFE_ATTR,de),F.FORBID_CONTENTS&&(Bt===se&&(Bt=ia(Bt)),et(Bt,F.FORBID_CONTENTS,de)),yt&&(ne["#text"]=!0),He&&et(ne,["html","head","body"]),ne.table&&(et(ne,["tbody"]),delete Z.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=F.TRUSTED_TYPES_POLICY,k=S.createHTML("")}else S===void 0&&(S=gC(y,o)),S!==null&&typeof k=="string"&&(k=S.createHTML(""));Mn&&Mn(F),ve=F}},ct=et({},["mi","mo","mn","ms","mtext"]),lt=et({},["foreignobject","desc","title","annotation-xml"]),Ft=et({},["title","style","font","a","script"]),ut=et({},Gd);et(ut,Vd),et(ut,iC);const Ht=et({},qd);et(Ht,aC);const bt=function(F){let ae=w(F);(!ae||!ae.tagName)&&(ae={namespaceURI:Rn,tagName:"template"});const ye=Ys(F.tagName),vt=Ys(ae.tagName);return A[F.namespaceURI]?F.namespaceURI===dn?ae.namespaceURI===pn?ye==="svg":ae.namespaceURI===Pn?ye==="svg"&&(vt==="annotation-xml"||ct[vt]):!!ut[ye]:F.namespaceURI===Pn?ae.namespaceURI===pn?ye==="math":ae.namespaceURI===dn?ye==="math"&<[vt]:!!Ht[ye]:F.namespaceURI===pn?ae.namespaceURI===dn&&!lt[vt]||ae.namespaceURI===Pn&&!ct[vt]?!1:!Ht[ye]&&(Ft[ye]||!ut[ye]):!!(I==="application/xhtml+xml"&&A[F.namespaceURI]):!1},Tt=function(F){_l(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},bn=function(F,ae){try{_l(t.removed,{attribute:ae.getAttributeNode(F),from:ae})}catch{_l(t.removed,{attribute:null,from:ae})}if(ae.removeAttribute(F),F==="is"&&!N[F])if(rt||Ie)try{Tt(ae)}catch{}else try{ae.setAttribute(F,"")}catch{}},Un=function(F){let ae=null,ye=null;if(Xe)F=""+F;else{const rn=tC(F,/^[\r\n\t ]+/);ye=rn&&rn[0]}I==="application/xhtml+xml"&&Rn===pn&&(F=''+F+"");const vt=S?S.createHTML(F):F;if(Rn===pn)try{ae=new g().parseFromString(vt,I)}catch{}if(!ae||!ae.documentElement){ae=C.createDocument(Rn,"template",null);try{ae.documentElement.innerHTML=Xn?k:vt}catch{}}const Qe=ae.body||ae.documentElement;return F&&ye&&Qe.insertBefore(n.createTextNode(ye),Qe.childNodes[0]||null),Rn===pn?U.call(ae,He?"html":"body")[0]:He?ae.documentElement:Qe},pr=function(F){return $.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Zn=function(F){return F instanceof p&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},vn=function(F){return typeof s=="function"&&F instanceof s},Xt=function(F,ae,ye){z[F]&&js(z[F],vt=>{vt.call(t,ae,ye,ve)})},Wr=function(F){let ae=null;if(Xt("beforeSanitizeElements",F,null),Zn(F))return Tt(F),!0;const ye=de(F.nodeName);if(Xt("uponSanitizeElement",F,{tagName:ye,allowedTags:ne}),F.hasChildNodes()&&!vn(F.firstElementChild)&&rr(/<[/\w]/g,F.innerHTML)&&rr(/<[/\w]/g,F.textContent))return Tt(F),!0;if(!ne[ye]||Z[ye]){if(!Z[ye]&&pi(ye)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye)))return!1;if(yt&&!Bt[ye]){const vt=w(F)||F.parentNode,Qe=_(F)||F.childNodes;if(Qe&&vt){const rn=Qe.length;for(let Zt=rn-1;Zt>=0;--Zt)vt.insertBefore(E(Qe[Zt],!0),O(F))}}return Tt(F),!0}return F instanceof c&&!bt(F)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&rr(/<\/no(script|embed|frames)/i,F.innerHTML)?(Tt(F),!0):(Ke&&F.nodeType===3&&(ae=F.textContent,js([K,W,ge],vt=>{ae=xl(ae,vt," ")}),F.textContent!==ae&&(_l(t.removed,{element:F.cloneNode()}),F.textContent=ae)),Xt("afterSanitizeElements",F,null),!1)},hr=function(F,ae,ye){if(gt&&(ae==="id"||ae==="name")&&(ye in n||ye in Ge))return!1;if(!(Se&&!ie[ae]&&rr(he,ae))){if(!(re&&rr(be,ae))){if(!N[ae]||ie[ae]){if(!(pi(F)&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,F)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(F))&&(oe.attributeNameCheck instanceof RegExp&&rr(oe.attributeNameCheck,ae)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ae))||ae==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&rr(oe.tagNameCheck,ye)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ye))))return!1}else if(!Rt[ae]){if(!rr(X,xl(ye,Be,""))){if(!((ae==="src"||ae==="xlink:href"||ae==="href")&&F!=="script"&&nC(ye,"data:")===0&&Oe[F])){if(!(Pe&&!rr(De,xl(ye,Be,"")))){if(ye)return!1}}}}}}return!0},pi=function(F){return F.indexOf("-")>0},ht=function(F){Xt("beforeSanitizeAttributes",F,null);const{attributes:ae}=F;if(!ae)return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N};let vt=ae.length;for(;vt--;){const Qe=ae[vt],{name:rn,namespaceURI:Zt,value:Gr}=Qe,ao=de(rn);let Ct=rn==="value"?Gr:rC(Gr);if(ye.attrName=ao,ye.attrValue=Ct,ye.keepAttr=!0,ye.forceKeepAttr=void 0,Xt("uponSanitizeAttribute",F,ye),Ct=ye.attrValue,ye.forceKeepAttr||(bn(rn,F),!ye.keepAttr))continue;if(!Fe&&rr(/\/>/i,Ct)){bn(rn,F);continue}Ke&&js([K,W,ge],qa=>{Ct=xl(Ct,qa," ")});const Va=de(F.nodeName);if(hr(Va,ao,Ct)){if(Mt&&(ao==="id"||ao==="name")&&(bn(rn,F),Ct=jt+Ct),S&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Zt)switch(y.getAttributeType(Va,ao)){case"TrustedHTML":{Ct=S.createHTML(Ct);break}case"TrustedScriptURL":{Ct=S.createScriptURL(Ct);break}}try{Zt?F.setAttributeNS(Zt,rn,Ct):F.setAttribute(rn,Ct),ty(t.removed)}catch{}}}Xt("afterSanitizeAttributes",F,null)},mt=function ke(F){let ae=null;const ye=pr(F);for(Xt("beforeSanitizeShadowDOM",F,null);ae=ye.nextNode();)Xt("uponSanitizeShadowNode",ae,null),!Wr(ae)&&(ae.content instanceof i&&ke(ae.content),ht(ae));Xt("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ke){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=null,ye=null,vt=null,Qe=null;if(Xn=!ke,Xn&&(ke=""),typeof ke!="string"&&!vn(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw bl("dirty is not a string, aborting")}else throw bl("toString is not a function");if(!t.isSupported)return ke;if(xe||Re(F),t.removed=[],typeof ke=="string"&&(kt=!1),kt){if(ke.nodeName){const Gr=de(ke.nodeName);if(!ne[Gr]||Z[Gr])throw bl("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof s)ae=Un(""),ye=ae.ownerDocument.importNode(ke,!0),ye.nodeType===1&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?ae=ye:ae.appendChild(ye);else{if(!rt&&!Ke&&!He&&ke.indexOf("<")===-1)return S&&Ze?S.createHTML(ke):ke;if(ae=Un(ke),!ae)return rt?null:Ze?k:""}ae&&Xe&&Tt(ae.firstChild);const rn=pr(kt?ke:ae);for(;vt=rn.nextNode();)Wr(vt)||(vt.content instanceof i&&mt(vt.content),ht(vt));if(kt)return ke;if(rt){if(Ie)for(Qe=L.call(ae.ownerDocument);ae.firstChild;)Qe.appendChild(ae.firstChild);else Qe=ae;return(N.shadowroot||N.shadowrootmode)&&(Qe=ce.call(r,Qe,!0)),Qe}let Zt=He?ae.outerHTML:ae.innerHTML;return He&&ne["!doctype"]&&ae.ownerDocument&&ae.ownerDocument.doctype&&ae.ownerDocument.doctype.name&&rr(L_,ae.ownerDocument.doctype.name)&&(Zt=" -`+Zt),Ke&&js([K,W,ge],Gr=>{Zt=xl(Zt,Gr," ")}),S&&Ze?S.createHTML(Zt):Zt},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(ke),xe=!0},t.clearConfig=function(){ve=null,xe=!1},t.isValidAttribute=function(ke,F,ae){ve||Re({});const ye=de(ke),vt=de(F);return hr(ye,vt,ae)},t.addHook=function(ke,F){typeof F=="function"&&(z[ke]=z[ke]||[],_l(z[ke],F))},t.removeHook=function(ke){if(z[ke])return ty(z[ke])},t.removeHooks=function(ke){z[ke]&&(z[ke]=[])},t.removeAllHooks=function(){z={}},t}var mC=M_();function vC(e){const[t,n]=j.useState(null),r=async o=>{n({score:o,inflight:!0}),await fetch("/runs/feedback",{method:"POST",body:JSON.stringify({run_id:e.runId,key:"user_score",score:o}),headers:{"Content-Type":"application/json"}}),n({score:o,inflight:!1})};return M.jsxs("div",{className:"flex mt-2 gap-2 flex-row",children:[M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(1),children:(t==null?void 0:t.score)===1?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(W2,{className:"h-5 w-5","aria-hidden":"true"})}),M.jsx("button",{type:"button",className:"rounded-full p-1 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>r(0),children:(t==null?void 0:t.score)===0?t!=null&&t.inflight?M.jsx(V0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(G0,{className:"h-5 w-5","aria-hidden":"true"}):M.jsx(U2,{className:"h-5 w-5","aria-hidden":"true"})})]})}function yC(e){try{return JSON.parse(e)}catch{return{}}}function ly(e){return M.jsxs(M.Fragment,{children:[e.call&&M.jsx("span",{className:"text-gray-900 whitespace-pre-wrap break-words mr-2",children:"Use"}),e.name&&M.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 relative -top-[1px] mr-2",children:e.name}),!e.call&&M.jsx("span",{className:On("inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10 cursor-pointer relative top-1",e.open&&"mb-2"),onClick:t=>{var n;t.preventDefault(),t.stopPropagation(),(n=e.setOpen)==null||n.call(e,!e.open)},children:M.jsx(I2,{className:On("h-5 w-5 transition",e.open?"rotate-180":"")})}),e.args&&M.jsx("div",{className:"text-gray-900 mt-2 whitespace-pre-wrap break-words",children:M.jsx("div",{className:"ring-1 ring-gray-300 rounded",children:M.jsx("table",{className:"divide-y divide-gray-300",children:M.jsx("tbody",{children:Object.entries(yC(e.args)).map(([t,n],r)=>M.jsxs("tr",{children:[M.jsx("td",{className:On(r===0?"":"border-t border-transparent","py-1 px-3 table-cell text-sm border-r border-r-gray-300"),children:M.jsx("div",{className:"font-medium text-gray-500",children:t})}),M.jsx("td",{className:On(r===0?"":"border-t border-gray-200","py-1 px-3 table-cell"),children:O_(n)})]},r))})})})})]})}function wC(e){var r;const[t,n]=j.useState(!1);return M.jsxs("div",{className:"flex flex-col mb-8",children:[M.jsxs("div",{className:"leading-6 flex flex-row",children:[M.jsx("div",{className:On("font-medium text-sm text-gray-400 uppercase mr-2 mt-1 w-24 flex flex-col",e.type==="function"&&"mt-2"),children:e.type}),M.jsxs("div",{className:"flex-1",children:[e.type==="function"&&M.jsx(ly,{call:!1,name:e.name,open:t,setOpen:n}),((r=e.additional_kwargs)==null?void 0:r.function_call)&&M.jsx(ly,{call:!0,name:e.additional_kwargs.function_call.name,args:e.additional_kwargs.function_call.arguments}),e.type!=="function"||t?typeof e.content=="string"?M.jsx("div",{className:"text-gray-900 prose",dangerouslySetInnerHTML:{__html:mC.sanitize(_t(e.content)).trim()}}):M.jsx("div",{className:"text-gray-900 prose",children:O_(e.content)}):!1]})]}),e.runId&&M.jsx("div",{className:"mt-2 pl-[100px]",children:M.jsx(vC,{runId:e.runId})})]})}function _C(e){var n,r,o;const t=iT(e.chat.thread_id,e.stream);return j.useEffect(()=>{scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},[t]),M.jsxs("div",{className:"flex-1 flex flex-col items-stretch pb-[76px] pt-2",children:[t==null?void 0:t.map((i,l)=>{var s,c;return j.createElement(wC,{...i,key:l,runId:l===t.length-1&&((s=e.stream)==null?void 0:s.status)==="done"?(c=e.stream)==null?void 0:c.run_id:void 0})}),(((n=e.stream)==null?void 0:n.status)==="inflight"||t===null)&&M.jsx("div",{className:"leading-6 mb-2 animate-pulse font-black text-gray-400 text-lg",children:"..."}),((r=e.stream)==null?void 0:r.status)==="error"&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"An error has occurred. Please try again."}),M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startStream,disabled:((o=e.stream)==null?void 0:o.status)==="inflight"})})]})}function xC(e){var t;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterChat(null),className:On(e.currentChat===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentChat===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Chat"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your chats"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.chats)==null?void 0:t.map(n=>{var r;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterChat(n.thread_id),className:On(n===e.currentChat?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(n===e.currentChat?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((r=n.name)==null?void 0:r[0])??" "}),M.jsx("span",{className:"truncate",children:n.name})]})},n.thread_id)}))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var bC=Object.defineProperty,SC=(e,t,n)=>t in e?bC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qd=(e,t,n)=>(SC(e,typeof t!="symbol"?t+"":t,n),n);let EC=class{constructor(){Qd(this,"current",this.detect()),Qd(this,"handoffState","pending"),Qd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},bo=new EC,Ar=(e,t)=>{bo.isServer?j.useEffect(e,t):j.useLayoutEffect(e,t)};function So(e){let t=j.useRef(e);return Ar(()=>{t.current=e},[e]),t}function Jc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Hi(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Jc(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Hi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function wg(){let[e]=j.useState(Hi);return j.useEffect(()=>()=>e.dispose(),[e]),e}let Ut=function(e){let t=So(e);return ot.useCallback((...n)=>t.current(...n),[t])};function kC(){let e=typeof document>"u";return"useSyncExternalStore"in Ul?(t=>t.useSyncExternalStore)(Ul)(()=>()=>{},()=>!1,()=>!e):!1}function Ia(){let e=kC(),[t,n]=j.useState(bo.isHandoffComplete);return t&&bo.isHandoffComplete===!1&&n(!1),j.useEffect(()=>{t!==!0&&n(!0)},[t]),j.useEffect(()=>bo.handoff(),[]),e?!1:t}var uy;let La=(uy=ot.useId)!=null?uy:function(){let e=Ia(),[t,n]=ot.useState(e?()=>bo.nextId():null);return Ar(()=>{t===null&&n(bo.nextId())},[t]),t!=null?""+t:void 0};function An(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}function F_(e){return bo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let rh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ei=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ei||{}),z_=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(z_||{}),TC=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(TC||{});function CC(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var U_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(U_||{});function OC(e,t=0){var n;return e===((n=F_(e))==null?void 0:n.body)?!1:An(t,{0(){return e.matches(rh)},1(){let r=e;for(;r!==null;){if(r.matches(rh))return!0;r=r.parentElement}return!1}})}var AC=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(AC||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $i(e){e==null||e.focus({preventScroll:!0})}let jC=["textarea","input"].join(",");function PC(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,jC))!=null?n:!1}function RC(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xs(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?RC(e):e:CC(e);o.length>0&&l.length>1&&(l=l.filter(y=>!o.includes(y))),r=r??i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},h=0,p=l.length,g;do{if(h>=p||h+p<=0)return 0;let y=c+h;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}g=l[y],g==null||g.focus(f),h+=s}while(g!==i.activeElement);return t&6&&PC(g)&&g.select(),2}function $s(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function B_(e,t,n){let r=So(t);j.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function $C(e,t,n=!0){let r=j.useRef(!1);j.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(l,s){if(!r.current||l.defaultPrevented)return;let c=s(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let h of f){if(h===null)continue;let p=h instanceof HTMLElement?h:h.current;if(p!=null&&p.contains(c)||l.composed&&l.composedPath().includes(p))return}return!OC(c,U_.Loose)&&c.tabIndex!==-1&&l.preventDefault(),t(l,c)}let i=j.useRef(null);$s("pointerdown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("mousedown",l=>{var s,c;r.current&&(i.current=((c=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:c[0])||l.target)},!0),$s("click",l=>{i.current&&(o(l,()=>i.current),i.current=null)},!0),$s("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),B_("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let H_=Symbol();function NC(e,t=!0){return Object.assign(e,{[H_]:t})}function Hr(...e){let t=j.useRef(e);j.useEffect(()=>{t.current=e},[e]);let n=Ut(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[H_]))?void 0:n}function kc(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Tc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Tc||{}),Jo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Jo||{});function jr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l}){let s=W_(t,e);if(i)return Ns(s,n,r,l);let c=o??0;if(c&2){let{static:f=!1,...h}=s;if(f)return Ns(h,n,r,l)}if(c&1){let{unmount:f=!0,...h}=s;return An(f?0:1,{0(){return null},1(){return Ns({...h,hidden:!0,style:{display:"none"}},n,r,l)}})}return Ns(s,n,r,l)}function Ns(e,t={},n,r){let{as:o=n,children:i,refName:l="ref",...s}=Yd(e,["unmount","static"]),c=e.ref!==void 0?{[l]:e.ref}:{},f=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t));let h={};if(t){let p=!1,g=[];for(let[y,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&g.push(y);p&&(h["data-headlessui-state"]=g.join(" "))}if(o===j.Fragment&&Object.keys(sy(s)).length>0){if(!j.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(b=>` - ${b}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` -`)].join(` -`));let p=f.props,g=typeof(p==null?void 0:p.className)=="function"?(...b)=>kc(p==null?void 0:p.className(...b),s.className):kc(p==null?void 0:p.className,s.className),y=g?{className:g}:{};return j.cloneElement(f,Object.assign({},W_(f.props,sy(Yd(s,["ref"]))),h,c,DC(f.ref,c.ref),y))}return j.createElement(o,Object.assign({},Yd(s,["ref"]),o!==j.Fragment&&c,o!==j.Fragment&&h),f)}function DC(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function W_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function dr(e){var t;return Object.assign(j.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function sy(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function IC(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&LC(n)?!1:r}function LC(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let MC="div";var Cc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cc||{});function FC(e,t){let{features:n=1,...r}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return jr({ourProps:o,theirProps:r,slot:{},defaultTag:MC,name:"Hidden"})}let oh=dr(FC),_g=j.createContext(null);_g.displayName="OpenClosedContext";var ar=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ar||{});function xg(){return j.useContext(_g)}function zC({value:e,children:t}){return ot.createElement(_g.Provider,{value:e},t)}var G_=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(G_||{});function bg(e,t){let n=j.useRef([]),r=Ut(e);j.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let s=r(t,o);return n.current=t,s}},[r,...t])}function UC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function du(...e){return j.useMemo(()=>F_(...e),[...e])}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function BC(){let e=j.useRef(0);return B_("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function pu(){let e=j.useRef(!1);return Ar(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function V_(e,t,n,r){let o=So(n);j.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function HC(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function q_(e){let t=Ut(e),n=j.useRef(!1);j.useEffect(()=>(n.current=!1,()=>{n.current=!0,Jc(()=>{n.current&&t()})}),[t])}function K_(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let WC="div";var Q_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Q_||{});function GC(e,t){let n=j.useRef(null),r=Hr(n,t),{initialFocus:o,containers:i,features:l=30,...s}=e;Ia()||(l=1);let c=du(n);KC({ownerDocument:c},!!(l&16));let f=QC({ownerDocument:c,container:n,initialFocus:o},!!(l&2));YC({ownerDocument:c,container:n,containers:i,previousActiveElement:f},!!(l&8));let h=BC(),p=Ut(E=>{let O=n.current;O&&(_=>_())(()=>{An(h.current,{[jl.Forwards]:()=>{Xs(O,Ei.First,{skipElements:[E.relatedTarget]})},[jl.Backwards]:()=>{Xs(O,Ei.Last,{skipElements:[E.relatedTarget]})}})})}),g=wg(),y=j.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(y.current=!0,g.requestAnimationFrame(()=>{y.current=!1}))},onBlur(E){let O=K_(i);n.current instanceof HTMLElement&&O.add(n.current);let _=E.relatedTarget;_ instanceof HTMLElement&&_.dataset.headlessuiFocusGuard!=="true"&&(Y_(O,_)||(y.current?Xs(n.current,An(h.current,{[jl.Forwards]:()=>Ei.Next,[jl.Backwards]:()=>Ei.Previous})|Ei.WrapAround,{relativeTo:E.target}):E.target instanceof HTMLElement&&$i(E.target)))}};return ot.createElement(ot.Fragment,null,!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}),jr({ourProps:b,theirProps:s,defaultTag:WC,name:"FocusTrap"}),!!(l&4)&&ot.createElement(oh,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Cc.Focusable}))}let VC=dr(GC),Sl=Object.assign(VC,{features:Q_}),Yo=[];HC(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Yo[0]!==t.target&&(Yo.unshift(t.target),Yo=Yo.filter(n=>n!=null&&n.isConnected),Yo.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function qC(e=!0){let t=j.useRef(Yo.slice());return bg(([n],[r])=>{r===!0&&n===!1&&Jc(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Yo.slice())},[e,Yo,t]),Ut(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function KC({ownerDocument:e},t){let n=qC(t);bg(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&$i(n())},[t]),q_(()=>{t&&$i(n())})}function QC({ownerDocument:e,container:t,initialFocus:n},r){let o=j.useRef(null),i=pu();return bg(()=>{if(!r)return;let l=t.current;l&&Jc(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}n!=null&&n.current?$i(n.current):Xs(l,Ei.First)===z_.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[r]),o}function YC({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pu();V_(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=K_(n);t.current instanceof HTMLElement&&s.add(t.current);let c=r.current;if(!c)return;let f=l.target;f&&f instanceof HTMLElement?Y_(s,f)?(r.current=f,$i(f)):(l.preventDefault(),l.stopPropagation(),$i(c)):$i(r.current)},!0)}function Y_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let X_=j.createContext(!1);function XC(){return j.useContext(X_)}function ih(e){return ot.createElement(X_.Provider,{value:e.force},e.children)}function ZC(e){let t=XC(),n=j.useContext(Z_),r=du(e),[o,i]=j.useState(()=>{if(!t&&n!==null||bo.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return j.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),j.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let JC=j.Fragment;function eO(e,t){let n=e,r=j.useRef(null),o=Hr(NC(h=>{r.current=h}),t),i=du(r),l=ZC(r),[s]=j.useState(()=>{var h;return bo.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),c=j.useContext(ah),f=Ia();return Ar(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Ar(()=>{if(s&&c)return c.register(s)},[c,s]),q_(()=>{var h;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))}),f?!l||!s?null:w_.createPortal(jr({ourProps:{ref:o},theirProps:n,defaultTag:JC,name:"Portal"}),s):null}let tO=j.Fragment,Z_=j.createContext(null);function nO(e,t){let{target:n,...r}=e,o={ref:Hr(t)};return ot.createElement(Z_.Provider,{value:n},jr({ourProps:o,theirProps:r,defaultTag:tO,name:"Popover.Group"}))}let ah=j.createContext(null);function rO(){let e=j.useContext(ah),t=j.useRef([]),n=Ut(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Ut(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=j.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,j.useMemo(()=>function({children:i}){return ot.createElement(ah.Provider,{value:o},i)},[o])]}let oO=dr(eO),iO=dr(nO),lh=Object.assign(oO,{Group:iO}),J_=j.createContext(null);function ex(){let e=j.useContext(J_);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,ex),t}return e}function aO(){let[e,t]=j.useState([]);return[e.length>0?e.join(" "):void 0,j.useMemo(()=>function(n){let r=Ut(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),c=s.indexOf(i);return c!==-1&&s.splice(c,1),s}))),o=j.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return ot.createElement(J_.Provider,{value:o},n.children)},[t])]}let lO="p";function uO(e,t){let n=La(),{id:r=`headlessui-description-${n}`,...o}=e,i=ex(),l=Hr(t);Ar(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return jr({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:lO,name:i.name||"Description"})}let sO=dr(uO),cO=Object.assign(sO,{}),Sg=j.createContext(()=>{});Sg.displayName="StackContext";var uh=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uh||{});function fO(){return j.useContext(Sg)}function dO({children:e,onUpdate:t,type:n,element:r,enabled:o}){let i=fO(),l=Ut((...s)=>{t==null||t(...s),i(...s)});return Ar(()=>{let s=o===void 0||o===!0;return s&&l(0,n,r),()=>{s&&l(1,n,r)}},[l,n,r,o]),ot.createElement(Sg.Provider,{value:l},e)}function pO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const hO=typeof Object.is=="function"?Object.is:pO,{useState:gO,useEffect:mO,useLayoutEffect:vO,useDebugValue:yO}=Ul;function wO(e,t,n){const r=t(),[{inst:o},i]=gO({inst:{value:r,getSnapshot:t}});return vO(()=>{o.value=r,o.getSnapshot=t,Xd(o)&&i({inst:o})},[e,r,t]),mO(()=>(Xd(o)&&i({inst:o}),e(()=>{Xd(o)&&i({inst:o})})),[e]),yO(r),r}function Xd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!hO(n,r)}catch{return!0}}function _O(e,t,n){return t()}const xO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=!xO,SO=bO?_O:wO,EO="useSyncExternalStore"in Ul?(e=>e.useSyncExternalStore)(Ul):SO;function kO(e){return EO(e.subscribe,e.getSnapshot,e.getSnapshot)}function TO(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function CO(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function OO(){if(!UC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function o(i){return r.containers.flatMap(l=>l()).some(l=>l.contains(i))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let l=Hi();l.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>l.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let i=null;n.addEventListener(t,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:c}=new URL(s.href),f=t.querySelector(c);f&&!o(f)&&(i=f)}catch{}},!0),n.addEventListener(t,"touchmove",l=>{l.target instanceof HTMLElement&&!o(l.target)&&l.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}}function AO(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jO(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ji=TO(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Hi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:jO(n)},o=[OO(),CO(),AO()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ji.subscribe(()=>{let e=ji.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&ji.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ji.dispatch("TEARDOWN",n)}});function PO(e,t,n){let r=kO(ji),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Ar(()=>{if(!(!e||!t))return ji.dispatch("PUSH",e,n),()=>ji.dispatch("POP",e,n)},[t,e]),i}let Zd=new Map,El=new Map;function cy(e,t=!0){Ar(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=El.get(r))!=null?l:1;if(s===1?El.delete(r):El.set(r,s-1),s!==1)return;let c=Zd.get(r);c&&(c["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",c["aria-hidden"]),r.inert=c.inert,Zd.delete(r))}let i=(n=El.get(r))!=null?n:0;return El.set(r,i+1),i!==0||(Zd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,t])}function RO({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=j.useRef((r=n==null?void 0:n.current)!=null?r:null),i=du(o),l=Ut(()=>{var s;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(o.current)||c.some(h=>f.contains(h))||c.push(f));return c});return{resolveContainers:l,contains:Ut(s=>l().some(c=>c.contains(s))),mainTreeNodeRef:o,MainTreeNode:j.useMemo(()=>function(){return n!=null?null:ot.createElement(oh,{features:Cc.Hidden,ref:o})},[o,n])}}var $O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($O||{}),NO=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(NO||{});let DO={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Oc=j.createContext(null);Oc.displayName="DialogContext";function hu(e){let t=j.useContext(Oc);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hu),n}return t}function IO(e,t,n=()=>[document.body]){PO(e,t,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],n]}})}function LO(e,t){return An(t.type,DO,e,t)}let MO="div",FO=Tc.RenderStrategy|Tc.Static;function zO(e,t){var n;let r=La(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:s,__demoMode:c=!1,...f}=e,[h,p]=j.useState(0),g=xg();i===void 0&&g!==null&&(i=(g&ar.Open)===ar.Open);let y=j.useRef(null),b=Hr(y,t),E=du(y),O=e.hasOwnProperty("open")||g!==null,_=e.hasOwnProperty("onClose");if(!O&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!O)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let w=i?0:1,[S,k]=j.useReducer(LO,{titleId:null,descriptionId:null,panelRef:j.createRef()}),C=Ut(()=>l(!1)),$=Ut(Fe=>k({type:0,id:Fe})),L=Ia()?c?!1:w===0:!1,U=h>1,ce=j.useContext(Oc)!==null,[z,K]=rO(),{resolveContainers:W,mainTreeNodeRef:ge,MainTreeNode:he}=RO({portals:z,defaultContainers:[(n=S.panelRef.current)!=null?n:y.current]}),be=U?"parent":"leaf",De=g!==null?(g&ar.Closing)===ar.Closing:!1,Be=(()=>ce||De?!1:L)(),X=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("body > *"))!=null?Fe:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(X,Be);let ne=(()=>U?!0:L)(),_e=j.useCallback(()=>{var Fe,Ke;return(Ke=Array.from((Fe=E==null?void 0:E.querySelectorAll("[data-headlessui-portal]"))!=null?Fe:[]).find(He=>He.contains(ge.current)&&He instanceof HTMLElement))!=null?Ke:null},[ge]);cy(_e,ne);let N=(()=>!(!L||U))();$C(W,C,N);let G=(()=>!(U||w!==0))();V_(E==null?void 0:E.defaultView,"keydown",Fe=>{G&&(Fe.defaultPrevented||Fe.key===G_.Escape&&(Fe.preventDefault(),Fe.stopPropagation(),C()))});let oe=(()=>!(De||w!==0||ce))();IO(E,oe,W),j.useEffect(()=>{if(w!==0||!y.current)return;let Fe=new ResizeObserver(Ke=>{for(let He of Ke){let xe=He.target.getBoundingClientRect();xe.x===0&&xe.y===0&&xe.width===0&&xe.height===0&&C()}});return Fe.observe(y.current),()=>Fe.disconnect()},[w,y,C]);let[Z,ie]=aO(),re=j.useMemo(()=>[{dialogState:w,close:C,setTitleId:$},S],[w,S,C,$]),Se=j.useMemo(()=>({open:w===0}),[w]),Pe={ref:b,id:o,role:"dialog","aria-modal":w===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":Z};return ot.createElement(dO,{type:"Dialog",enabled:w===0,element:y,onUpdate:Ut((Fe,Ke)=>{Ke==="Dialog"&&An(Fe,{[uh.Add]:()=>p(He=>He+1),[uh.Remove]:()=>p(He=>He-1)})})},ot.createElement(ih,{force:!0},ot.createElement(lh,null,ot.createElement(Oc.Provider,{value:re},ot.createElement(lh.Group,{target:y},ot.createElement(ih,{force:!1},ot.createElement(ie,{slot:Se,name:"Dialog.Description"},ot.createElement(Sl,{initialFocus:s,containers:W,features:L?An(be,{parent:Sl.features.RestoreFocus,leaf:Sl.features.All&~Sl.features.FocusLock}):Sl.features.None},ot.createElement(K,null,jr({ourProps:Pe,theirProps:f,slot:Se,defaultTag:MO,features:FO,visible:w===0,name:"Dialog"}))))))))),ot.createElement(he,null))}let UO="div";function BO(e,t){let n=La(),{id:r=`headlessui-dialog-overlay-${n}`,...o}=e,[{dialogState:i,close:l}]=hu("Dialog.Overlay"),s=Hr(t),c=Ut(h=>{if(h.target===h.currentTarget){if(IC(h.currentTarget))return h.preventDefault();h.preventDefault(),h.stopPropagation(),l()}}),f=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:c},theirProps:o,slot:f,defaultTag:UO,name:"Dialog.Overlay"})}let HO="div";function WO(e,t){let n=La(),{id:r=`headlessui-dialog-backdrop-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Backdrop"),s=Hr(t);j.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[l.panelRef]);let c=j.useMemo(()=>({open:i===0}),[i]);return ot.createElement(ih,{force:!0},ot.createElement(lh,null,jr({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:c,defaultTag:HO,name:"Dialog.Backdrop"})))}let GO="div";function VO(e,t){let n=La(),{id:r=`headlessui-dialog-panel-${n}`,...o}=e,[{dialogState:i},l]=hu("Dialog.Panel"),s=Hr(t,l.panelRef),c=j.useMemo(()=>({open:i===0}),[i]),f=Ut(h=>{h.stopPropagation()});return jr({ourProps:{ref:s,id:r,onClick:f},theirProps:o,slot:c,defaultTag:GO,name:"Dialog.Panel"})}let qO="h2";function KO(e,t){let n=La(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=hu("Dialog.Title"),s=Hr(t);j.useEffect(()=>(l(r),()=>l(null)),[r,l]);let c=j.useMemo(()=>({open:i===0}),[i]);return jr({ourProps:{ref:s,id:r},theirProps:o,slot:c,defaultTag:qO,name:"Dialog.Title"})}let QO=dr(zO),YO=dr(WO),XO=dr(VO),ZO=dr(BO),JO=dr(KO),fy=Object.assign(QO,{Backdrop:YO,Panel:XO,Overlay:ZO,Title:JO,Description:cO});function eA(e=0){let[t,n]=j.useState(e),r=pu(),o=j.useCallback(c=>{r.current&&n(f=>f|c)},[t,r]),i=j.useCallback(c=>!!(t&c),[t]),l=j.useCallback(c=>{r.current&&n(f=>f&~c)},[n,r]),s=j.useCallback(c=>{r.current&&n(f=>f^c)},[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}function tA(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Jd(e,...t){e&&t.length>0&&e.classList.add(...t)}function ep(e,...t){e&&t.length>0&&e.classList.remove(...t)}function nA(e,t){let n=Hi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,p)=>p-h);return f}),s=i+l;if(s!==0){n.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&f.dispose()})});let c=n.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return n.add(()=>t()),n.dispose}function rA(e,t,n,r){let o=n?"enter":"leave",i=Hi(),l=r!==void 0?tA(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=An(o,{enter:()=>t.enter,leave:()=>t.leave}),c=An(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=An(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ep(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Jd(e,...t.base,...s,...f),i.nextFrame(()=>{ep(e,...t.base,...s,...f),Jd(e,...t.base,...s,...c),nA(e,()=>(ep(e,...t.base,...s),Jd(e,...t.base,...t.entered),l()))}),i.dispose}function oA({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let l=pu(),s=wg(),c=So(n);Ar(()=>{e&&(c.current="enter")},[e]),Ar(()=>{let f=Hi();s.add(f.dispose);let h=t.current;if(h&&c.current!=="idle"&&l.current)return f.dispose(),o.current(c.current),f.add(rA(h,r.current,c.current==="enter",()=>{f.dispose(),i.current(c.current)})),f.dispose},[n])}function Go(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let ef=j.createContext(null);ef.displayName="TransitionContext";var iA=(e=>(e.Visible="visible",e.Hidden="hidden",e))(iA||{});function aA(){let e=j.useContext(ef);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function lA(){let e=j.useContext(tf);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let tf=j.createContext(null);tf.displayName="NestingContext";function nf(e){return"children"in e?nf(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function tx(e,t){let n=So(e),r=j.useRef([]),o=pu(),i=wg(),l=Ut((y,b=Jo.Hidden)=>{let E=r.current.findIndex(({el:O})=>O===y);E!==-1&&(An(b,{[Jo.Unmount](){r.current.splice(E,1)},[Jo.Hidden](){r.current[E].state="hidden"}}),i.microTask(()=>{var O;!nf(r)&&o.current&&((O=n.current)==null||O.call(n))}))}),s=Ut(y=>{let b=r.current.find(({el:E})=>E===y);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:y,state:"visible"}),()=>l(y,Jo.Unmount)}),c=j.useRef([]),f=j.useRef(Promise.resolve()),h=j.useRef({enter:[],leave:[],idle:[]}),p=Ut((y,b,E)=>{c.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([O])=>O!==y)),t==null||t.chains.current[b].push([y,new Promise(O=>{c.current.push(O)})]),t==null||t.chains.current[b].push([y,new Promise(O=>{Promise.all(h.current[b].map(([_,w])=>w)).then(()=>O())})]),b==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>E(b)):E(b)}),g=Ut((y,b,E)=>{Promise.all(h.current[b].splice(0).map(([O,_])=>_)).then(()=>{var O;(O=c.current.shift())==null||O()}).then(()=>E(b))});return j.useMemo(()=>({children:r,register:s,unregister:l,onStart:p,onStop:g,wait:f,chains:h}),[s,l,r,p,g,h,f])}function uA(){}let sA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function dy(e){var t;let n={};for(let r of sA)n[r]=(t=e[r])!=null?t:uA;return n}function cA(e){let t=j.useRef(dy(e));return j.useEffect(()=>{t.current=dy(e)},[e]),t}let fA="div",nx=Tc.RenderStrategy;function dA(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:c,enterFrom:f,enterTo:h,entered:p,leave:g,leaveFrom:y,leaveTo:b,...E}=e,O=j.useRef(null),_=Hr(O,t),w=(n=E.unmount)==null||n?Jo.Unmount:Jo.Hidden,{show:S,appear:k,initial:C}=aA(),[$,L]=j.useState(S?"visible":"hidden"),U=lA(),{register:ce,unregister:z}=U;j.useEffect(()=>ce(O),[ce,O]),j.useEffect(()=>{if(w===Jo.Hidden&&O.current){if(S&&$!=="visible"){L("visible");return}return An($,{hidden:()=>z(O),visible:()=>ce(O)})}},[$,O,ce,z,S,w]);let K=So({base:Go(E.className),enter:Go(c),enterFrom:Go(f),enterTo:Go(h),entered:Go(p),leave:Go(g),leaveFrom:Go(y),leaveTo:Go(b)}),W=cA({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),ge=Ia();j.useEffect(()=>{if(ge&&$==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,$,ge]);let he=C&&!k,be=k&&S&&C,De=(()=>!ge||he?"idle":S?"enter":"leave")(),Be=eA(0),X=Ut(oe=>An(oe,{enter:()=>{Be.addFlag(ar.Opening),W.current.beforeEnter()},leave:()=>{Be.addFlag(ar.Closing),W.current.beforeLeave()},idle:()=>{}})),ne=Ut(oe=>An(oe,{enter:()=>{Be.removeFlag(ar.Opening),W.current.afterEnter()},leave:()=>{Be.removeFlag(ar.Closing),W.current.afterLeave()},idle:()=>{}})),_e=tx(()=>{L("hidden"),z(O)},U);oA({immediate:be,container:O,classes:K,direction:De,onStart:So(oe=>{_e.onStart(O,oe,X)}),onStop:So(oe=>{_e.onStop(O,oe,ne),oe==="leave"&&!nf(_e)&&(L("hidden"),z(O))})});let N=E,G={ref:_};return be?N={...N,className:kc(E.className,...K.current.enter,...K.current.enterFrom)}:(N.className=kc(E.className,(r=O.current)==null?void 0:r.className),N.className===""&&delete N.className),ot.createElement(tf.Provider,{value:_e},ot.createElement(zC,{value:An($,{visible:ar.Open,hidden:ar.Closed})|Be.flags},jr({ourProps:G,theirProps:N,defaultTag:fA,features:nx,visible:$==="visible",name:"Transition.Child"})))}function pA(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=j.useRef(null),s=Hr(l,t);Ia();let c=xg();if(n===void 0&&c!==null&&(n=(c&ar.Open)===ar.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[f,h]=j.useState(n?"visible":"hidden"),p=tx(()=>{h("hidden")}),[g,y]=j.useState(!0),b=j.useRef([n]);Ar(()=>{g!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),y(!1))},[b,n]);let E=j.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);j.useEffect(()=>{if(n)h("visible");else if(!nf(p))h("hidden");else{let S=l.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&h("hidden")}},[n,p]);let O={unmount:o},_=Ut(()=>{var S;g&&y(!1),(S=e.beforeEnter)==null||S.call(e)}),w=Ut(()=>{var S;g&&y(!1),(S=e.beforeLeave)==null||S.call(e)});return ot.createElement(tf.Provider,{value:p},ot.createElement(ef.Provider,{value:E},jr({ourProps:{...O,as:j.Fragment,children:ot.createElement(rx,{ref:s,...O,...i,beforeEnter:_,beforeLeave:w})},theirProps:{},defaultTag:j.Fragment,features:nx,visible:f==="visible",name:"Transition"})))}function hA(e,t){let n=j.useContext(ef)!==null,r=xg()!==null;return ot.createElement(ot.Fragment,null,!n&&r?ot.createElement(sh,{ref:t,...e}):ot.createElement(rx,{ref:t,...e}))}let sh=dr(pA),rx=dr(dA),gA=dr(hA),Ds=Object.assign(sh,{Child:gA,Root:sh});function mA(e){return M.jsxs(M.Fragment,{children:[M.jsx(Ds.Root,{show:e.sidebarOpen,as:j.Fragment,children:M.jsxs(fy,{as:"div",className:"relative z-50 lg:hidden",onClose:e.setSidebarOpen,children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"fixed inset-0 bg-gray-900/80"})}),M.jsx("div",{className:"fixed inset-0 flex",children:M.jsx(Ds.Child,{as:j.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:M.jsxs(fy.Panel,{className:"relative mr-16 flex w-full max-w-xs flex-1",children:[M.jsx(Ds.Child,{as:j.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5",children:M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5",onClick:()=>e.setSidebarOpen(!1),children:[M.jsx("span",{className:"sr-only",children:"Close sidebar"}),M.jsx(oT,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})]})})})]})}),M.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:M.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6 py-4",children:M.jsx("nav",{className:"flex flex-1 flex-col",children:M.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:M.jsx("li",{children:e.sidebar})})})})}),M.jsxs("div",{className:"fixed left-0 right-0 top-0 z-40 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6",children:[M.jsxs("button",{type:"button",className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:()=>e.setSidebarOpen(!0),children:[M.jsx("span",{className:"sr-only",children:"Open sidebar"}),M.jsx(P2,{className:"h-6 w-6","aria-hidden":"true"})]}),M.jsx("div",{className:"flex-1 text-sm font-semibold leading-6 text-gray-900 lg:pl-72",children:e.subtitle?M.jsxs(M.Fragment,{children:["OpenGPTs: ",M.jsx("span",{className:"font-normal",children:e.subtitle})]}):"OpenGPTs"}),M.jsx("div",{className:"inline-flex items-center rounded-md bg-pink-100 px-2 py-1 text-xs font-medium text-pink-700",children:"Research Preview: this is unauthenticated and all data can be found. Do not use with sensitive data"})]}),M.jsx("main",{className:"pt-20 lg:pl-72 flex flex-col min-h-[calc(100%-56px)]",children:M.jsx("div",{className:"px-4 sm:px-6 lg:px-8 flex-1",children:e.children})})]})}function py(e){var t;return M.jsx("li",{children:M.jsxs("div",{onClick:()=>e.enterConfig(e.config.assistant_id),className:On(e.config===e.currentConfig?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.config===e.currentConfig?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:((t=e.config.name)==null?void 0:t[0])??" "}),M.jsx("span",{className:"truncate",children:e.config.name})]})},e.config.assistant_id)}function vA(e){var t,n;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{onClick:()=>e.enterConfig(null),className:On(e.currentConfig===null?"bg-gray-50 text-indigo-600":"text-gray-700 hover:text-indigo-600 hover:bg-gray-50","group flex gap-x-3 rounded-md -mx-2 p-2 text-sm leading-6 font-semibold cursor-pointer"),children:[M.jsx("span",{className:On(e.currentConfig===null?"text-indigo-600 border-indigo-600":"text-gray-400 border-gray-200 group-hover:border-indigo-600 group-hover:text-indigo-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border text-[0.625rem] font-medium bg-white"),children:M.jsx(__,{className:"h-4 w-4"})}),M.jsx("span",{className:"truncate",children:"New Bot"})]}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Your Saved Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((t=e.configs)==null?void 0:t.filter(r=>r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})}),M.jsx("div",{className:"text-xs font-semibold leading-6 text-gray-400 mt-4",children:"Public Bots"}),M.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-1",children:((n=e.configs)==null?void 0:n.filter(r=>!r.mine).map(r=>M.jsx(py,{config:r,currentConfig:e.currentConfig,enterConfig:e.enterConfig},r.assistant_id)))??M.jsx("li",{className:"leading-6 p-2 animate-pulse font-black text-gray-400 text-lg",children:"..."})})]})}var ox={exports:{}},yA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wA=yA,_A=wA;function ix(){}function ax(){}ax.resetWarningCache=ix;var xA=function(){function e(r,o,i,l,s,c){if(c!==_A){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ax,resetWarningCache:ix};return n.PropTypes=n,n};ox.exports=xA();var bA=ox.exports;const At=xh(bA);function Ma(e,t,n,r){function o(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function c(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?i(h.value):o(h.value).then(s,c)}f((r=r.apply(e,t||[])).next())})}function Fa(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return c([f,h])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){l={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function gy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function EA(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=SA.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var kA=[".DS_Store","Thumbs.db"];function TA(e){return Ma(this,void 0,void 0,function(){return Fa(this,function(t){return Ac(e)&&CA(e.dataTransfer)?[2,PA(e.dataTransfer,e.type)]:OA(e)?[2,AA(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jA(e)]:[2,[]]})})}function CA(e){return Ac(e)}function OA(e){return Ac(e)&&Ac(e.target)}function Ac(e){return typeof e=="object"&&e!==null}function AA(e){return ch(e.target.files).map(function(t){return gu(t)})}function jA(e){return Ma(this,void 0,void 0,function(){var t;return Fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return gu(r)})]}})})}function PA(e,t){return Ma(this,void 0,void 0,function(){var n,r;return Fa(this,function(o){switch(o.label){case 0:return e.items?(n=ch(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(RA))]):[3,2];case 1:return r=o.sent(),[2,my(lx(r))];case 2:return[2,my(ch(e.files).map(function(i){return gu(i)}))]}})})}function my(e){return e.filter(function(t){return kA.indexOf(t.name)===-1})}function ch(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,xy(n)];if(e.sizen)return[!1,xy(n)]}return[!0,null]}function ki(e){return e!=null}function KA(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=fx(c,n),h=iu(f,1),p=h[0],g=dx(c,r,o),y=iu(g,1),b=y[0],E=s?s(c):null;return p&&b&&!E})}function jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Is(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sy(e){e.preventDefault()}function QA(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function YA(e){return e.indexOf("Edge/")!==-1}function XA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QA(e)||YA(e)}function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hj(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eg=j.forwardRef(function(e,t){var n=e.children,r=Pc(e,rj),o=vx(r),i=o.open,l=Pc(o,oj);return j.useImperativeHandle(t,function(){return{open:i}},[i]),ot.createElement(j.Fragment,null,n(Vt(Vt({},l),{},{open:i})))});Eg.displayName="Dropzone";var mx={disabled:!1,getFilesFromEvent:TA,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Eg.defaultProps=mx;Eg.propTypes={children:At.func,accept:At.objectOf(At.arrayOf(At.string)),multiple:At.bool,preventDropOnDocument:At.bool,noClick:At.bool,noKeyboard:At.bool,noDrag:At.bool,noDragEventsBubbling:At.bool,minSize:At.number,maxSize:At.number,maxFiles:At.number,disabled:At.bool,getFilesFromEvent:At.func,onFileDialogCancel:At.func,onFileDialogOpen:At.func,useFsAccessApi:At.bool,autoFocus:At.bool,onDragEnter:At.func,onDragLeave:At.func,onDragOver:At.func,onDrop:At.func,onDropAccepted:At.func,onDropRejected:At.func,onError:At.func,validator:At.func};var hh={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Vt(Vt({},mx),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,s=t.multiple,c=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,g=t.onDrop,y=t.onDropAccepted,b=t.onDropRejected,E=t.onFileDialogCancel,O=t.onFileDialogOpen,_=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,k=t.noClick,C=t.noKeyboard,$=t.noDrag,L=t.noDragEventsBubbling,U=t.onError,ce=t.validator,z=j.useMemo(function(){return ej(n)},[n]),K=j.useMemo(function(){return JA(n)},[n]),W=j.useMemo(function(){return typeof O=="function"?O:ky},[O]),ge=j.useMemo(function(){return typeof E=="function"?E:ky},[E]),he=j.useRef(null),be=j.useRef(null),De=j.useReducer(gj,hh),Be=tp(De,2),X=Be[0],ne=Be[1],_e=X.isFocused,N=X.isFileDialogActive,G=j.useRef(typeof window<"u"&&window.isSecureContext&&_&&ZA()),oe=function(){!G.current&&N&&setTimeout(function(){if(be.current){var Oe=be.current.files;Oe.length||(ne({type:"closeDialog"}),ge())}},300)};j.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[be,N,ge,G]);var Z=j.useRef([]),ie=function(Oe){he.current&&he.current.contains(Oe.target)||(Oe.preventDefault(),Z.current=[])};j.useEffect(function(){return S&&(document.addEventListener("dragover",Sy,!1),document.addEventListener("drop",ie,!1)),function(){S&&(document.removeEventListener("dragover",Sy),document.removeEventListener("drop",ie))}},[he,S]),j.useEffect(function(){return!r&&w&&he.current&&he.current.focus(),function(){}},[he,w,r]);var re=j.useCallback(function(se){U?U(se):console.error(se)},[U]),Se=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[].concat(lj(Z.current),[se.target]),Is(se)&&Promise.resolve(o(se)).then(function(Oe){if(!(jc(se)&&!L)){var pt=Oe.length,Rt=pt>0&&KA({files:Oe,accept:z,minSize:l,maxSize:i,multiple:s,maxFiles:c,validator:ce}),Yt=pt>0&&!Rt;ne({isDragAccept:Rt,isDragReject:Yt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(se)}}).catch(function(Oe){return re(Oe)})},[o,f,re,L,z,l,i,s,c,ce]),Pe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Is(se);if(Oe&&se.dataTransfer)try{se.dataTransfer.dropEffect="copy"}catch{}return Oe&&p&&p(se),!1},[p,L]),Fe=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se);var Oe=Z.current.filter(function(Rt){return he.current&&he.current.contains(Rt)}),pt=Oe.indexOf(se.target);pt!==-1&&Oe.splice(pt,1),Z.current=Oe,!(Oe.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Is(se)&&h&&h(se))},[he,h,L]),Ke=j.useCallback(function(se,Oe){var pt=[],Rt=[];se.forEach(function(Yt){var Pn=fx(Yt,z),dn=tp(Pn,2),pn=dn[0],Rn=dn[1],Xn=dx(Yt,l,i),A=tp(Xn,2),R=A[0],I=A[1],q=ce?ce(Yt):null;if(pn&&R&&!q)pt.push(Yt);else{var V=[Rn,I];q&&(V=V.concat(q)),Rt.push({file:Yt,errors:V.filter(function(de){return de})})}}),(!s&&pt.length>1||s&&c>=1&&pt.length>c)&&(pt.forEach(function(Yt){Rt.push({file:Yt,errors:[qA]})}),pt.splice(0)),ne({acceptedFiles:pt,fileRejections:Rt,type:"setFiles"}),g&&g(pt,Rt,Oe),Rt.length>0&&b&&b(Rt,Oe),pt.length>0&&y&&y(pt,Oe)},[ne,s,z,l,i,c,g,y,b,ce]),He=j.useCallback(function(se){se.preventDefault(),se.persist(),yt(se),Z.current=[],Is(se)&&Promise.resolve(o(se)).then(function(Oe){jc(se)&&!L||Ke(Oe,se)}).catch(function(Oe){return re(Oe)}),ne({type:"reset"})},[o,Ke,re,L]),xe=j.useCallback(function(){if(G.current){ne({type:"openDialog"}),W();var se={multiple:s,types:K};window.showOpenFilePicker(se).then(function(Oe){return o(Oe)}).then(function(Oe){Ke(Oe,null),ne({type:"closeDialog"})}).catch(function(Oe){tj(Oe)?(ge(Oe),ne({type:"closeDialog"})):nj(Oe)?(G.current=!1,be.current?(be.current.value=null,be.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):re(Oe)});return}be.current&&(ne({type:"openDialog"}),W(),be.current.value=null,be.current.click())},[ne,W,ge,_,Ke,re,K,s]),Xe=j.useCallback(function(se){!he.current||!he.current.isEqualNode(se.target)||(se.key===" "||se.key==="Enter"||se.keyCode===32||se.keyCode===13)&&(se.preventDefault(),xe())},[he,xe]),rt=j.useCallback(function(){ne({type:"focus"})},[]),Ie=j.useCallback(function(){ne({type:"blur"})},[]),Ze=j.useCallback(function(){k||(XA()?setTimeout(xe,0):xe())},[k,xe]),gt=function(Oe){return r?null:Oe},Mt=function(Oe){return C?null:gt(Oe)},jt=function(Oe){return $?null:gt(Oe)},yt=function(Oe){L&&Oe.stopPropagation()},kt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.role,Yt=se.onKeyDown,Pn=se.onFocus,dn=se.onBlur,pn=se.onClick,Rn=se.onDragEnter,Xn=se.onDragOver,A=se.onDragLeave,R=se.onDrop,I=Pc(se,ij);return Vt(Vt(ph({onKeyDown:Mt(Zr(Yt,Xe)),onFocus:Mt(Zr(Pn,rt)),onBlur:Mt(Zr(dn,Ie)),onClick:gt(Zr(pn,Ze)),onDragEnter:jt(Zr(Rn,Se)),onDragOver:jt(Zr(Xn,Pe)),onDragLeave:jt(Zr(A,Fe)),onDrop:jt(Zr(R,He)),role:typeof Rt=="string"&&Rt!==""?Rt:"presentation"},pt,he),!r&&!C?{tabIndex:0}:{}),I)}},[he,Xe,rt,Ie,Ze,Se,Pe,Fe,He,C,$,r]),$e=j.useCallback(function(se){se.stopPropagation()},[]),Bt=j.useMemo(function(){return function(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Oe=se.refKey,pt=Oe===void 0?"ref":Oe,Rt=se.onChange,Yt=se.onClick,Pn=Pc(se,aj),dn=ph({accept:z,multiple:s,type:"file",style:{display:"none"},onChange:gt(Zr(Rt,He)),onClick:gt(Zr(Yt,$e)),tabIndex:-1},pt,be);return Vt(Vt({},dn),Pn)}},[be,n,s,He,r]);return Vt(Vt({},X),{},{isFocused:_e&&!r,getRootProps:kt,getInputProps:Bt,rootRef:he,inputRef:be,open:gt(xe)})}function gj(e,t){switch(t.type){case"focus":return Vt(Vt({},e),{},{isFocused:!0});case"blur":return Vt(Vt({},e),{},{isFocused:!1});case"openDialog":return Vt(Vt({},hh),{},{isFileDialogActive:!0});case"closeDialog":return Vt(Vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Vt(Vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Vt(Vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Vt({},hh);default:return e}}function ky(){}const mj={flex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",borderWidth:2,borderRadius:2,borderColor:"#eeeeee",borderStyle:"dashed",backgroundColor:"#fafafa",color:"#bdbdbd",outline:"none",transition:"border .24s ease-in-out"},vj={borderColor:"#2196f3"},yj={borderColor:"#00e676"},wj={borderColor:"#ff1744"};function _j(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function xj(e){const{getRootProps:t,getInputProps:n,fileRejections:r}=e.state,o=e.files.map((l,s)=>M.jsxs("li",{children:[l.name," - ",l.size," bytes",M.jsx("span",{className:"not-prose ml-2 inline-flex items-center rounded-full px-1 py-1 text-xs font-medium cursor-pointer bg-gray-50 text-gray-600 relative top-[1px]",onClick:()=>e.setFiles(c=>c.filter(f=>f!==l)),children:M.jsx(tT,{className:"h-4 w-4"})})]},s)),i=j.useMemo(()=>({...mj,...e.state.isFocused?vj:{},...e.state.isDragAccept?yj:{},...e.state.isDragReject?wj:{}}),[e.state.isFocused,e.state.isDragAccept,e.state.isDragReject]);return M.jsxs("section",{className:"",children:[M.jsxs("aside",{children:[M.jsx(_j,{id:"files",title:"Files"}),M.jsx("div",{className:"prose",children:M.jsx("ul",{children:o})})]}),M.jsxs("div",{...t({style:i}),children:[M.jsx("input",{...n()}),M.jsxs("p",{children:["Drag n' drop some files here, or click to select files.",M.jsx("br",{}),"Accepted files: .txt, .csv, .html, .docx, .pdf.",M.jsx("br",{}),"No file should exceed 10 MB."]}),r.length>0&&M.jsx("div",{className:"flex items-center rounded-md bg-yellow-50 mt-4 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20 prose",children:M.jsx("ul",{children:r.map((l,s)=>M.jsxs("li",{className:"break-all",children:[l.file.name," - ",l.errors[0].message]},s))})})]})]})}function kg(e){return M.jsx("label",{htmlFor:e.id,className:"block font-medium leading-6 text-gray-400 mb-2",children:e.title})}function bj(e){return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsx("textarea",{rows:4,name:e.id,id:e.id,className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",value:e.value,readOnly:e.readonly,disabled:e.readonly,onChange:t=>e.setValue(t.target.value)})]})}function Ty(e){var t;return M.jsxs("div",{children:[M.jsx(kg,{id:e.id,title:e.title}),M.jsxs("fieldset",{children:[M.jsx("legend",{className:"sr-only",children:e.field.title}),M.jsx("div",{className:"space-y-2",children:(t=e.field.enum)==null?void 0:t.map(n=>M.jsxs("div",{className:"flex items-center",children:[M.jsx("input",{id:`${e.id}-${n}`,name:e.id,type:"radio",checked:n===e.value,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:()=>e.setValue(n)}),M.jsx("label",{htmlFor:`${e.id}-${n}`,className:"ml-3 block leading-6 text-gray-900",children:n})]},n))})]})]})}const Sj={Retrieval:"Look up information in uploaded files.","DDG Search":"Search the web with [DuckDuckGo](https://pypi.org/project/duckduckgo-search/).","Search (Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. Includes sources in the response.","Search (short answer, Tavily)":"Uses the [Tavily](https://app.tavily.com/) search engine. This returns only the answer, no supporting evidence.","You.com Search":"Uses [You.com](https://you.com/) search, optimized responses for LLMs.","SEC Filings (Kay.ai)":"Searches through SEC filings using [Kay.ai](https://www.kay.ai/).","Press Releases (Kay.ai)":"Searches through press releases using [Kay.ai](https://www.kay.ai/).",Arxiv:"Searches [Arxiv](https://arxiv.org/).",PubMed:"Searches [PubMed](https://pubmed.ncbi.nlm.nih.gov/).",Wikipedia:"Searches [Wikipedia](https://pypi.org/project/wikipedia/)."};function Ej(e){var t,n,r;return M.jsxs("fieldset",{children:[M.jsx(kg,{id:e.id,title:e.title??((t=e.field.items)==null?void 0:t.title)}),M.jsx("div",{className:"space-y-2",children:(r=(n=e.field.items)==null?void 0:n.enum)==null?void 0:r.map(o=>{var i;return M.jsxs("div",{className:"relative flex items-start",children:[M.jsx("div",{className:"flex h-6 items-center",children:M.jsx("input",{id:`${e.id}-${o}`,"aria-describedby":"comments-description",name:`${e.id}-${o}`,type:"checkbox",checked:e.value.includes(o),className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",disabled:e.readonly,onChange:l=>{l.target.checked?e.setValue([...e.value,o]):e.setValue(e.value.filter(s=>s!==o))}})}),M.jsxs("div",{className:"ml-3 text-sm leading-6",children:[M.jsx("label",{htmlFor:`${e.id}-${o}`,className:"text-gray-900",children:o}),((i=e.descriptions)==null?void 0:i[o])&&M.jsx("div",{className:"text-gray-500 prose prose-sm prose-a:text-gray-500",dangerouslySetInnerHTML:{__html:_t(e.descriptions[o])}})]})]},o)})})]})}function kj(e){const t=window.location.href+"?shared_id="+e.assistantId;return M.jsxs("div",{className:"flex rounded-md shadow-sm mb-4",children:[M.jsxs("button",{type:"submit",className:"relative -ml-px inline-flex items-center gap-x-1.5 rounded-l-md px-3 py-2 text-sm font-semibold text-gray-900 border border-gray-300 hover:bg-gray-50 bg-white",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await navigator.clipboard.writeText(t),window.alert("Copied to clipboard!")},children:[M.jsx(Z2,{className:"-ml-0.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Copy Public Link"]}),M.jsx("a",{className:"rounded-none rounded-r-md py-1.5 px-2 text-gray-900 border border-l-0 border-gray-300 text-sm leading-6 line-clamp-1 flex-1 underline",href:t,children:t})]})}function Tj(e){var p,g,y,b,E,O;const[t,n]=j.useState(((p=e.config)==null?void 0:p.config)??e.configDefaults),[r,o]=j.useState([]),i=vx({multiple:!0,accept:{"text/*":[".txt",".csv",".htm",".html"],"application/pdf":[".pdf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/msword":[".doc"]},maxSize:1e7}),[l,s]=j.useState(((g=e.config)==null?void 0:g.public)??!1);j.useEffect(()=>{var _;n(((_=e.config)==null?void 0:_.config)??e.configDefaults)},[e.config,e.configDefaults]),j.useEffect(()=>{i.acceptedFiles.length>0&&(n(_=>{var w;return{configurable:{..._==null?void 0:_.configurable,tools:[...(((w=_==null?void 0:_.configurable)==null?void 0:w.tools)??[]).filter(S=>S!=="Retrieval"),"Retrieval"]}}}),o(_=>[..._.filter(w=>!i.acceptedFiles.includes(w)),...i.acceptedFiles]))},[i.acceptedFiles]);const[c,f]=j.useState(!1),h=!!e.config&&!c;return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex gap-2 items-center justify-between font-semibold text-lg leading-6 text-gray-600 mb-4",children:M.jsxs("span",{children:["Bot: ",((y=e.config)==null?void 0:y.name)??"New Bot"," ",M.jsx("span",{className:"font-normal",children:e.config?"(read-only)":""})]})}),((b=e.config)==null?void 0:b.public)&&M.jsx(kj,{assistantId:(E=e.config)==null?void 0:E.assistant_id}),M.jsxs("form",{className:On("flex flex-col gap-8"),onSubmit:async _=>{_.preventDefault(),_.stopPropagation();const S=_.target.key.value;S&&(f(!0),await e.saveConfig(S,t,i.acceptedFiles,l),f(!1))},children:[M.jsxs("div",{className:On("flex flex-col gap-8",h&&"opacity-50 cursor-not-allowed"),children:[Object.entries(((O=e.configSchema)==null?void 0:O.properties.configurable.properties)??{}).map(([_,w])=>{var k,C,$,L;const S=w.title;if(((k=w.allOf)==null?void 0:k.length)===1&&(w=w.allOf[0]),_==="agent_type")return M.jsx(Ty,{id:_,field:w,title:S,value:(C=t==null?void 0:t.configurable)==null?void 0:C[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="system_message")return M.jsx(bj,{id:_,field:w,title:S,value:($=t==null?void 0:t.configurable)==null?void 0:$[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h},_);if(_==="tools")return M.jsx(Ej,{id:_,field:w,title:S,value:(L=t==null?void 0:t.configurable)==null?void 0:L[_],setValue:U=>n({...t,configurable:{...t.configurable,[_]:U}}),readonly:h,descriptions:Sj},_)}),!e.config&&M.jsx(xj,{state:i,files:r,setFiles:o}),M.jsx(Ty,{id:"public",field:{type:"string",title:"public",description:"",enum:["Yes","No"]},title:"Create a public link?",value:l?"Yes":"No",setValue:_=>s(_==="Yes"),readonly:h})]}),!e.config&&M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"relative flex flex-grow items-stretch focus-within:z-10",children:M.jsx("input",{type:"text",name:"key",id:"key",autoComplete:"off",className:"block w-full rounded-none rounded-l-md border-0 py-1.5 pl-4 text-gray-900 ring-1 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 ring-inset ring-gray-300",placeholder:"Name your bot"})}),M.jsx("button",{type:"submit",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-r-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600",children:c?"Saving...":"Save"})]})]})]})}function Cj(e){var t;return M.jsxs("div",{className:"flex flex-col items-stretch pb-[76px]",children:[M.jsxs("div",{className:"flex-1 flex flex-col md:flex-row lg:items-stretch self-stretch",children:[M.jsx("div",{className:"w-72 border-r border-gray-200 pr-6",children:M.jsx(vA,{configs:e.configs,currentConfig:e.currentConfig,enterConfig:e.enterConfig})}),M.jsx("main",{className:"flex-1",children:M.jsx("div",{className:"px-4",children:M.jsx(Tj,{config:e.currentConfig,configSchema:e.configSchema,configDefaults:e.configDefaults,saveConfig:e.saveConfig},(t=e.currentConfig)==null?void 0:t.assistant_id)})})]}),e.currentConfig&&M.jsx("div",{className:"fixed left-0 lg:left-72 bottom-0 right-0 p-4",children:M.jsx(C_,{onSubmit:e.startChat})})]})}function Oj(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var CP=TP,OP=lf;function AP(e,t){var n=this.__data__,r=OP(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var jP=AP,PP=pP,RP=xP,$P=EP,NP=CP,DP=jP;function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,y=n&E$?new _$:void 0;for(i.set(e,t),i.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=jN}var Rg=PN,RN=mu,$N=Rg,NN=vu,DN="[object Arguments]",IN="[object Array]",LN="[object Boolean]",MN="[object Date]",FN="[object Error]",zN="[object Function]",UN="[object Map]",BN="[object Number]",HN="[object Object]",WN="[object RegExp]",GN="[object Set]",VN="[object String]",qN="[object WeakMap]",KN="[object ArrayBuffer]",QN="[object DataView]",YN="[object Float32Array]",XN="[object Float64Array]",ZN="[object Int8Array]",JN="[object Int16Array]",e4="[object Int32Array]",t4="[object Uint8Array]",n4="[object Uint8ClampedArray]",r4="[object Uint16Array]",o4="[object Uint32Array]",It={};It[YN]=It[XN]=It[ZN]=It[JN]=It[e4]=It[t4]=It[n4]=It[r4]=It[o4]=!0;It[DN]=It[IN]=It[KN]=It[LN]=It[QN]=It[MN]=It[FN]=It[zN]=It[UN]=It[BN]=It[HN]=It[WN]=It[GN]=It[VN]=It[qN]=!1;function i4(e){return NN(e)&&$N(e.length)&&!!It[RN(e)]}var a4=i4;function l4(e){return function(t){return e(t)}}var $x=l4,Nc={exports:{}};Nc.exports;(function(e,t){var n=wx,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,l=i&&n.process,s=function(){try{var c=o&&o.require&&o.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=s})(Nc,Nc.exports);var u4=Nc.exports,s4=a4,c4=$x,Uy=u4,By=Uy&&Uy.isTypedArray,f4=By?c4(By):s4,Nx=f4,d4=gN,p4=jx,h4=io,g4=Px,m4=Rx,v4=Nx,y4=Object.prototype,w4=y4.hasOwnProperty;function _4(e,t){var n=h4(e),r=!n&&p4(e),o=!n&&!r&&g4(e),i=!n&&!r&&!o&&v4(e),l=n||r||o||i,s=l?d4(e.length,String):[],c=s.length;for(var f in e)(t||w4.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m4(f,c)))&&s.push(f);return s}var x4=_4,b4=Object.prototype;function S4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||b4;return e===n}var E4=S4;function k4(e,t){return function(n){return e(t(n))}}var T4=k4,C4=T4,O4=C4(Object.keys,Object),A4=O4,j4=E4,P4=A4,R4=Object.prototype,$4=R4.hasOwnProperty;function N4(e){if(!j4(e))return P4(e);var t=[];for(var n in Object(e))$4.call(e,n)&&n!="constructor"&&t.push(n);return t}var D4=N4,I4=xx,L4=Rg;function M4(e){return e!=null&&L4(e.length)&&!I4(e)}var $g=M4,F4=x4,z4=D4,U4=$g;function B4(e){return U4(e)?F4(e):z4(e)}var Ng=B4,H4=rN,W4=pN,G4=Ng;function V4(e){return H4(e,G4,W4)}var q4=V4,Hy=q4,K4=1,Q4=Object.prototype,Y4=Q4.hasOwnProperty;function X4(e,t,n,r,o,i){var l=n&K4,s=Hy(e),c=s.length,f=Hy(t),h=f.length;if(c!=h&&!l)return!1;for(var p=c;p--;){var g=s[p];if(!(l?g in t:Y4.call(t,g)))return!1}var y=i.get(e),b=i.get(t);if(y&&b)return y==t&&b==e;var E=!0;i.set(e,t),i.set(t,e);for(var O=l;++pt||i&&l&&c&&!s&&!f||r&&l&&c||!n&&c||!o)return 1;if(!r&&!i&&!f&&e=s)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var hL=pL,ip=yx,gL=Pg,mL=UI,vL=lL,yL=sL,wL=$x,_L=hL,xL=zx,bL=io;function SL(e,t,n){t.length?t=ip(t,function(i){return bL(i)?function(l){return gL(l,i.length===1?i[0]:i)}:i}):t=[xL];var r=-1;t=ip(t,wL(mL));var o=vL(e,function(i,l,s){var c=ip(t,function(f){return f(i)});return{criteria:c,index:++r,value:i}});return yL(o,function(i,l){return _L(i,l,n)})}var EL=SL,kL=EL,r1=io;function TL(e,t,n,r){return e==null?[]:(r1(t)||(t=t==null?[]:[t]),n=r?void 0:n,r1(n)||(n=n==null?[]:[n]),kL(e,t,n))}var CL=TL;const Ux=xh(CL);function OL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.thread_id!==n.thread_id),n]}return Ux(t,"updated_at","desc")}function AL(){const[e,t]=j.useReducer(OL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const s=await fetch("/threads/",{headers:{Accept:"application/json"}}).then(c=>c.json());t(s)}l()},[]);const o=j.useCallback(async(l,s,c=crypto.randomUUID())=>{const f=await fetch(`/threads/${c}`,{method:"PUT",body:JSON.stringify({assistant_id:s,name:l}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(h=>h.json());return t(f),r(f.thread_id),f},[]),i=j.useCallback(l=>{r(l)},[]);return{chats:e,currentChat:(e==null?void 0:e.find(l=>l.thread_id===n))||null,createChat:o,enterChat:i}}const jL=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(r,o,i){n.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:i})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,o){if(1&o&&(r=n(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)n.d(i,l,(function(s){return r[s]}).bind(null,l));return i},n.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(o,"a",o),o},n.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},n.p="",n(n.s=84)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r;try{r={clone:n(88),constant:n(64),each:n(146),filter:n(152),has:n(175),isArray:n(0),isEmpty:n(177),isFunction:n(17),isUndefined:n(178),keys:n(6),map:n(179),reduce:n(181),size:n(184),transform:n(190),union:n(191),values:n(210)}}catch{}r||(r=window._),e.exports=r},function(e,t,n){function r(s){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}var o=n(47),i=(typeof self>"u"?"undefined":r(self))=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")();e.exports=l},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){return r!=null&&n(r)=="object"}},function(e,t,n){var r=n(100),o=n(105);e.exports=function(i,l){var s=o(i,l);return r(s)?s:void 0}},function(e,t){function n(r){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}e.exports=function(r){var o=n(r);return r!=null&&(o=="object"||o=="function")}},function(e,t,n){var r=n(52),o=n(37),i=n(7);e.exports=function(l){return i(l)?r(l):o(l)}},function(e,t,n){var r=n(17),o=n(34);e.exports=function(i){return i!=null&&o(i.length)&&!r(i)}},function(e,t,n){var r=n(9),o=n(101),i=n(102),l=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":l&&l in Object(s)?o(s):i(s)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(132),o=n(31),i=n(133),l=n(61),s=n(134),c=n(8),f=n(48),h=f(r),p=f(o),g=f(i),y=f(l),b=f(s),E=c;(r&&E(new r(new ArrayBuffer(1)))!="[object DataView]"||o&&E(new o)!="[object Map]"||i&&E(i.resolve())!="[object Promise]"||l&&E(new l)!="[object Set]"||s&&E(new s)!="[object WeakMap]")&&(E=function(O){var _=c(O),w=_=="[object Object]"?O.constructor:void 0,S=w?f(w):"";if(S)switch(S){case h:return"[object DataView]";case p:return"[object Map]";case g:return"[object Promise]";case y:return"[object Set]";case b:return"[object WeakMap]"}return _}),e.exports=E},function(e,t){function n(o){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{(typeof window>"u"?"undefined":n(window))==="object"&&(r=window)}e.exports=r},function(e,t,n){(function(r){function o(p){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g})(p)}var i=n(2),l=n(121),s=o(t)=="object"&&t&&!t.nodeType&&t,c=s&&o(r)=="object"&&r&&!r.nodeType&&r,f=c&&c.exports===s?i.Buffer:void 0,h=(f?f.isBuffer:void 0)||l;r.exports=h}).call(this,n(14)(e))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function s(O){if(n===setTimeout)return setTimeout(O,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:i}catch{n=i}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var c,f=[],h=!1,p=-1;function g(){h&&c&&(h=!1,c.length?f=c.concat(f):p=-1,f.length&&y())}function y(){if(!h){var O=s(g);h=!0;for(var _=f.length;_;){for(c=f,f=[];++p<_;)c&&c[p].run();p=-1,_=f.length}c=null,h=!1,function(w){if(r===clearTimeout)return clearTimeout(w);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(w);try{r(w)}catch{try{return r.call(null,w)}catch{return r.call(this,w)}}}(O)}}function b(O,_){this.fun=O,this.array=_}function E(){}o.nextTick=function(O){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;wO){var _=E;E=O,O=_}return E+""+O+""+(o.isUndefined(b)?"\0":b)}function f(p,g,y,b){var E=""+g,O=""+y;if(!p&&E>O){var _=E;E=O,O=_}var w={v:E,w:O};return b&&(w.name=b),w}function h(p,g){return c(p,g.v,g.w,g.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(p){return this._label=p,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultNodeLabelFn=p,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return o.keys(this._nodes)},i.prototype.sources=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._in[g])})},i.prototype.sinks=function(){var p=this;return o.filter(this.nodes(),function(g){return o.isEmpty(p._out[g])})},i.prototype.setNodes=function(p,g){var y=arguments,b=this;return o.each(p,function(E){y.length>1?b.setNode(E,g):b.setNode(E)}),this},i.prototype.setNode=function(p,g){return o.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=g),this):(this._nodes[p]=arguments.length>1?g:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]="\0",this._children[p]={},this._children["\0"][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},i.prototype.node=function(p){return this._nodes[p]},i.prototype.hasNode=function(p){return o.has(this._nodes,p)},i.prototype.removeNode=function(p){var g=this;if(o.has(this._nodes,p)){var y=function(b){g.removeEdge(g._edgeObjs[b])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],o.each(this.children(p),function(b){g.setParent(b)}),delete this._children[p]),o.each(o.keys(this._in[p]),y),delete this._in[p],delete this._preds[p],o.each(o.keys(this._out[p]),y),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},i.prototype.setParent=function(p,g){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(o.isUndefined(g))g="\0";else{for(var y=g+="";!o.isUndefined(y);y=this.parent(y))if(y===p)throw new Error("Setting "+g+" as parent of "+p+" would create a cycle");this.setNode(g)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=g,this._children[g][p]=!0,this},i.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},i.prototype.parent=function(p){if(this._isCompound){var g=this._parent[p];if(g!=="\0")return g}},i.prototype.children=function(p){if(o.isUndefined(p)&&(p="\0"),this._isCompound){var g=this._children[p];if(g)return o.keys(g)}else{if(p==="\0")return this.nodes();if(this.hasNode(p))return[]}},i.prototype.predecessors=function(p){var g=this._preds[p];if(g)return o.keys(g)},i.prototype.successors=function(p){var g=this._sucs[p];if(g)return o.keys(g)},i.prototype.neighbors=function(p){var g=this.predecessors(p);if(g)return o.union(g,this.successors(p))},i.prototype.isLeaf=function(p){return(this.isDirected()?this.successors(p):this.neighbors(p)).length===0},i.prototype.filterNodes=function(p){var g=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});g.setGraph(this.graph());var y=this;o.each(this._nodes,function(E,O){p(O)&&g.setNode(O,E)}),o.each(this._edgeObjs,function(E){g.hasNode(E.v)&&g.hasNode(E.w)&&g.setEdge(E,y.edge(E))});var b={};return this._isCompound&&o.each(g.nodes(),function(E){g.setParent(E,function O(_){var w=y.parent(_);return w===void 0||g.hasNode(w)?(b[_]=w,w):w in b?b[w]:O(w)}(E))}),g},i.prototype.setDefaultEdgeLabel=function(p){return o.isFunction(p)||(p=o.constant(p)),this._defaultEdgeLabelFn=p,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return o.values(this._edgeObjs)},i.prototype.setPath=function(p,g){var y=this,b=arguments;return o.reduce(p,function(E,O){return b.length>1?y.setEdge(E,O,g):y.setEdge(E,O),O}),this},i.prototype.setEdge=function(){var p,g,y,b,E=!1,O=arguments[0];r(O)==="object"&&O!==null&&"v"in O?(p=O.v,g=O.w,y=O.name,arguments.length===2&&(b=arguments[1],E=!0)):(p=O,g=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],E=!0)),p=""+p,g=""+g,o.isUndefined(y)||(y=""+y);var _=c(this._isDirected,p,g,y);if(o.has(this._edgeLabels,_))return E&&(this._edgeLabels[_]=b),this;if(!o.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(g),this._edgeLabels[_]=E?b:this._defaultEdgeLabelFn(p,g,y);var w=f(this._isDirected,p,g,y);return p=w.v,g=w.w,Object.freeze(w),this._edgeObjs[_]=w,l(this._preds[g],p),l(this._sucs[p],g),this._in[g][_]=w,this._out[p][_]=w,this._edgeCount++,this},i.prototype.edge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return this._edgeLabels[b]},i.prototype.hasEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y);return o.has(this._edgeLabels,b)},i.prototype.removeEdge=function(p,g,y){var b=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,g,y),E=this._edgeObjs[b];return E&&(p=E.v,g=E.w,delete this._edgeLabels[b],delete this._edgeObjs[b],s(this._preds[g],p),s(this._sucs[p],g),delete this._in[g][b],delete this._out[p][b],this._edgeCount--),this},i.prototype.inEdges=function(p,g){var y=this._in[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.v===g}):b}},i.prototype.outEdges=function(p,g){var y=this._out[p];if(y){var b=o.values(y);return g?o.filter(b,function(E){return E.w===g}):b}},i.prototype.nodeEdges=function(p,g){var y=this.inEdges(p,g);if(y)return y.concat(this.outEdges(p,g))}},function(e,t,n){var r=n(15),o=n(95),i=n(96),l=n(97),s=n(98),c=n(99);function f(h){var p=this.__data__=new r(h);this.size=p.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=l,f.prototype.has=s,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){var r=n(4)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(106),o=n(113),i=n(115),l=n(116),s=n(117);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h-1&&n%1==0&&n<=9007199254740991}},function(e,t){e.exports=function(n){return function(r){return n(r)}}},function(e,t,n){(function(r){function o(h){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}var i=n(47),l=o(t)=="object"&&t&&!t.nodeType&&t,s=l&&o(r)=="object"&&r&&!r.nodeType&&r,c=s&&s.exports===l&&i.process,f=function(){try{var h=s&&s.require&&s.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();r.exports=f}).call(this,n(14)(e))},function(e,t,n){var r=n(23),o=n(123),i=Object.prototype.hasOwnProperty;e.exports=function(l){if(!r(l))return o(l);var s=[];for(var c in Object(l))i.call(l,c)&&c!="constructor"&&s.push(c);return s}},function(e,t,n){var r=n(56),o=n(57),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,s=l?function(c){return c==null?[]:(c=Object(c),r(l(c),function(f){return i.call(c,f)}))}:o;e.exports=s},function(e,t){e.exports=function(n,r){for(var o=-1,i=r.length,l=n.length;++o-1&&o%1==0&&oy))return!1;var E=p.get(l);if(E&&p.get(s))return E==s;var O=-1,_=!0,w=2&c?new r:void 0;for(p.set(l,s),p.set(s,l);++O0&&(b=_.removeMin(),(E=O[b]).distance!==Number.POSITIVE_INFINITY);)y(b).forEach(w);return O}(l,String(s),c||i,f||function(h){return l.outEdges(h)})};var i=r.constant(1)},function(e,t,n){var r=n(1);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(i){return i.key})},o.prototype.has=function(i){return r.has(this._keyIndices,i)},o.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},o.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(i,l){var s=this._keyIndices;if(i=String(i),!r.has(s,i)){var c=this._arr,f=c.length;return s[i]=f,c.push({key:i,priority:l}),this._decrease(f),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},o.prototype.decrease=function(i,l){var s=this._keyIndices[i];if(l>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[s].priority+" New: "+l);this._arr[s].priority=l,this._decrease(s)},o.prototype._heapify=function(i){var l=this._arr,s=2*i,c=s+1,f=i;s>1].priority0&&E(_,W))}catch(ge){k.call(new $(W),ge)}}}function k(z){var K=this;K.triggered||(K.triggered=!0,K.def&&(K=K.def),K.msg=z,K.state=2,K.chain.length>0&&E(_,K))}function C(z,K,W,ge){for(var he=0;he-1?Z=ie:(oe=o.isUndefined(N)?void 0:z(N),o.isUndefined(oe)?Z=ie:((Z=oe).path=f(l.join(oe.path,ie.path)),Z.query=function(re,Se){var Pe={};function Fe(Ke){o.forOwn(Ke,function(He,xe){Pe[xe]=He})}return Fe(c.parse(re||"")),Fe(c.parse(Se||"")),Object.keys(Pe).length===0?void 0:c.stringify(Pe)}(oe.query,ie.query))),Z.fragment=void 0,(b.indexOf(Z.reference)===-1&&Z.path.indexOf("../")===0?"../":"")+h.serialize(Z)}function _(N){return y.indexOf(C(N))>-1}function w(N){return o.isUndefined(N.error)&&N.type!=="invalid"}function S(N,G){var oe=N;return G.forEach(function(Z){if(!(Z in oe))throw Error("JSON Pointer points to missing location: "+ne(G));oe=oe[Z]}),oe}function k(N){return Object.keys(N).filter(function(G){return G!=="$ref"})}function C(N){var G;switch(N.uriDetails.reference){case"absolute":case"uri":G="remote";break;case"same-document":G="local";break;default:G=N.uriDetails.reference}return G}function $(N,G){var oe=g[N],Z=Promise.resolve(),ie=o.cloneDeep(G.loaderOptions||{});return o.isUndefined(oe)?(o.isUndefined(ie.processContent)&&(ie.processContent=function(re,Se){Se(void 0,JSON.parse(re.text))}),Z=(Z=s.load(decodeURI(N),ie)).then(function(re){return g[N]={value:re},re}).catch(function(re){throw g[N]={error:re},re})):Z=Z.then(function(){if(o.isError(oe.error))throw oe.error;return oe.value}),Z=Z.then(function(re){return o.cloneDeep(re)})}function L(N,G){var oe=!0;try{if(!o.isPlainObject(N))throw new Error("obj is not an Object");if(!o.isString(N.$ref))throw new Error("obj.$ref is not a String")}catch(Z){if(G)throw Z;oe=!1}return oe}function U(N){return N.indexOf("://")!==-1||l.isAbsolute(N)?N:l.resolve(r.cwd(),N)}function ce(N,G){N.error=G.message,N.missing=!0}function z(N){return h.parse(N)}function K(N,G,oe){S(N,G.slice(0,G.length-1))[G[G.length-1]]=oe}function W(N,G){var oe,Z;if(N=o.isUndefined(N)?{}:o.cloneDeep(N),!o.isObject(N))throw new TypeError("options must be an Object");if(!o.isUndefined(N.resolveCirculars)&&!o.isBoolean(N.resolveCirculars))throw new TypeError("options.resolveCirculars must be a Boolean");if(!(o.isUndefined(N.filter)||o.isArray(N.filter)||o.isFunction(N.filter)||o.isString(N.filter)))throw new TypeError("options.filter must be an Array, a Function of a String");if(!o.isUndefined(N.includeInvalid)&&!o.isBoolean(N.includeInvalid))throw new TypeError("options.includeInvalid must be a Boolean");if(!o.isUndefined(N.location)&&!o.isString(N.location))throw new TypeError("options.location must be a String");if(!o.isUndefined(N.refPreProcessor)&&!o.isFunction(N.refPreProcessor))throw new TypeError("options.refPreProcessor must be a Function");if(!o.isUndefined(N.refPostProcessor)&&!o.isFunction(N.refPostProcessor))throw new TypeError("options.refPostProcessor must be a Function");if(!o.isUndefined(N.subDocPath)&&!o.isArray(N.subDocPath)&&!Be(N.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(o.isUndefined(N.resolveCirculars)&&(N.resolveCirculars=!1),N.filter=function(ie){var re,Se;return o.isArray(ie.filter)||o.isString(ie.filter)?(Se=o.isString(ie.filter)?[ie.filter]:ie.filter,re=function(Pe){return Se.indexOf(Pe.type)>-1||Se.indexOf(C(Pe))>-1}):o.isFunction(ie.filter)?re=ie.filter:o.isUndefined(ie.filter)&&(re=function(){return!0}),function(Pe,Fe){return(Pe.type!=="invalid"||ie.includeInvalid===!0)&&re(Pe,Fe)}}(N),o.isUndefined(N.location)&&(N.location=U("./root.json")),(oe=N.location.split("#")).length>1&&(N.subDocPath="#"+oe[1]),Z=decodeURI(N.location)===N.location,N.location=O(N.location,void 0),Z&&(N.location=decodeURI(N.location)),N.subDocPath=function(ie){var re;return o.isArray(ie.subDocPath)?re=ie.subDocPath:o.isString(ie.subDocPath)?re=X(ie.subDocPath):o.isUndefined(ie.subDocPath)&&(re=[]),re}(N),!o.isUndefined(G))try{S(G,N.subDocPath)}catch(ie){throw ie.message=ie.message.replace("JSON Pointer","options.subDocPath"),ie}return N}function ge(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~1/g,"/").replace(/~0/g,"~")})}function he(N){if(!o.isArray(N))throw new TypeError("path must be an array");return N.map(function(G){return o.isString(G)||(G=JSON.stringify(G)),G.replace(/~/g,"~0").replace(/\//g,"~1")})}function be(N,G){var oe={};if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");return function Z(ie,re,Se,Pe){var Fe=!0;function Ke(He,xe){Se.push(xe),Z(ie,He,Se,Pe),Se.pop()}o.isFunction(Pe)&&(Fe=Pe(ie,re,Se)),ie.indexOf(re)===-1&&(ie.push(re),Fe!==!1&&(o.isArray(re)?re.forEach(function(He,xe){Ke(He,xe.toString())}):o.isObject(re)&&o.forOwn(re,function(He,xe){Ke(He,xe)})),ie.pop())}(function(Z,ie){var re,Se=[];return ie.length>0&&(re=Z,ie.slice(0,ie.length-1).forEach(function(Pe){Pe in re&&(re=re[Pe],Se.push(re))})),Se}(N,(G=W(G,N)).subDocPath),S(N,G.subDocPath),o.cloneDeep(G.subDocPath),function(Z,ie,re){var Se,Pe,Fe=!0;return L(ie)&&(o.isUndefined(G.refPreProcessor)||(ie=G.refPreProcessor(o.cloneDeep(ie),re)),Se=De(ie),o.isUndefined(G.refPostProcessor)||(Se=G.refPostProcessor(Se,re)),G.filter(Se,re)&&(Pe=ne(re),oe[Pe]=Se),k(ie).length>0&&(Fe=!1)),Fe}),oe}function De(N){var G,oe,Z,ie={def:N};try{if(L(N,!0),G=N.$ref,Z=E[G],o.isUndefined(Z)&&(Z=E[G]=z(G)),ie.uri=G,ie.uriDetails=Z,o.isUndefined(Z.error)){ie.type=C(ie);try{["#","/"].indexOf(G[0])>-1?Be(G,!0):G.indexOf("#")>-1&&Be(Z.fragment,!0)}catch(re){ie.error=re.message,ie.type="invalid"}}else ie.error=ie.uriDetails.error,ie.type="invalid";(oe=k(N)).length>0&&(ie.warning="Extra JSON Reference properties will be ignored: "+oe.join(", "))}catch(re){ie.error=re.message,ie.type="invalid"}return ie}function Be(N,G){var oe,Z=!0;try{if(!o.isString(N))throw new Error("ptr is not a String");if(N!==""){if(oe=N.charAt(0),["#","/"].indexOf(oe)===-1)throw new Error("ptr must start with a / or #/");if(oe==="#"&&N!=="#"&&N.charAt(1)!=="/")throw new Error("ptr must start with a / or #/");if(N.match(p))throw new Error("ptr has invalid token(s)")}}catch(ie){if(G===!0)throw ie;Z=!1}return Z}function X(N){try{Be(N,!0)}catch(oe){throw new Error("ptr must be a JSON Pointer: "+oe.message)}var G=N.split("/");return G.shift(),ge(G)}function ne(N,G){if(!o.isArray(N))throw new Error("path must be an Array");return(G!==!1?"#":"")+(N.length>0?"/":"")+he(N).join("/")}function _e(N,G){var oe=Promise.resolve();return oe=oe.then(function(){if(!o.isArray(N)&&!o.isObject(N))throw new TypeError("obj must be an Array or an Object");G=W(G,N),N=o.cloneDeep(N)}).then(function(){var Z={deps:{},docs:{},refs:{}};return function ie(re,Se,Pe){var Fe,Ke,He=Promise.resolve(),xe=ne(Se.subDocPath),Xe=U(Se.location),rt=l.dirname(Se.location),Ie=Xe+xe;return o.isUndefined(Pe.docs[Xe])&&(Pe.docs[Xe]=re),o.isUndefined(Pe.deps[Ie])&&(Pe.deps[Ie]={},Fe=be(re,Se),o.forOwn(Fe,function(Ze,gt){var Mt,jt,yt=U(Se.location)+gt,kt=Ze.refdId=decodeURI(U(_(Ze)?O(rt,Ze.uri):Se.location)+"#"+(Ze.uri.indexOf("#")>-1?Ze.uri.split("#")[1]:""));Pe.refs[yt]=Ze,w(Ze)&&(Ze.fqURI=kt,Pe.deps[Ie][gt===xe?"#":gt.replace(xe+"/","#/")]=kt,yt.indexOf(kt+"/")!==0&&yt!==kt?((Ke=o.cloneDeep(Se)).subDocPath=o.isUndefined(Ze.uriDetails.fragment)?[]:X(decodeURI(Ze.uriDetails.fragment)),_(Ze)?(delete Ke.filter,Ke.location=kt.split("#")[0],He=He.then((Mt=Pe,jt=Ke,function(){var $e=U(jt.location),Bt=Mt.docs[$e];return o.isUndefined(Bt)?$($e,jt).catch(function(se){return Mt.docs[$e]=se,se}):Promise.resolve().then(function(){return Bt})}))):He=He.then(function(){return re}),He=He.then(function($e,Bt,se){return function(Oe){if(o.isError(Oe))ce(se,Oe);else try{return ie(Oe,Bt,$e).catch(function(pt){ce(se,pt)})}catch(pt){ce(se,pt)}}}(Pe,Ke,Ze))):Ze.circular=!0)})),He}(N,G,Z).then(function(){return Z})}).then(function(Z){var ie={},re=[],Se=[],Pe=new i.Graph,Fe=U(G.location),Ke=Fe+ne(G.subDocPath),He=l.dirname(Fe);return Object.keys(Z.deps).forEach(function(xe){Pe.setNode(xe)}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt){Pe.setEdge(Xe,rt)})}),(re=i.alg.findCycles(Pe)).forEach(function(xe){xe.forEach(function(Xe){Se.indexOf(Xe)===-1&&Se.push(Xe)})}),o.forOwn(Z.deps,function(xe,Xe){o.forOwn(xe,function(rt,Ie){var Ze,gt=!1,Mt=Xe+Ie.slice(1),jt=Z.refs[Xe+Ie.slice(1)],yt=_(jt);Se.indexOf(rt)>-1&&re.forEach(function(kt){gt||(Ze=kt.indexOf(rt))>-1&&kt.forEach(function($e){gt||Mt.indexOf($e+"/")===0&&(yt&&Ze!==kt.length-1&&rt[rt.length-1]==="#"||(gt=!0))})}),gt&&(jt.circular=!0)})}),o.forOwn(Object.keys(Z.deps).reverse(),function(xe){var Xe=Z.deps[xe],rt=xe.split("#"),Ie=Z.docs[rt[0]],Ze=X(rt[1]);o.forOwn(Xe,function(gt,Mt){var jt=gt.split("#"),yt=Z.docs[jt[0]],kt=Ze.concat(X(Mt)),$e=Z.refs[rt[0]+ne(kt)];if(o.isUndefined($e.error)&&o.isUndefined($e.missing))if(!G.resolveCirculars&&$e.circular)$e.value=o.cloneDeep($e.def);else{try{$e.value=S(yt,X(jt[1]))}catch(Bt){return void ce($e,Bt)}rt[1]===""&&Mt==="#"?Z.docs[rt[0]]=$e.value:K(Ie,kt,$e.value)}})}),Object.keys(Z.refs).forEach(function(xe){var Xe,rt,Ie=Z.refs[xe];Ie.type!=="invalid"&&(Ie.fqURI[Ie.fqURI.length-1]==="#"&&Ie.uri[Ie.uri.length-1]!=="#"&&(Ie.fqURI=Ie.fqURI.substr(0,Ie.fqURI.length-1)),Xe=Ie.fqURI.split("/"),rt=Ie.uri.split("/"),o.times(rt.length-1,function(Ze){var gt=rt[rt.length-Ze-1],Mt=rt[rt.length-Ze],jt=Xe.length-Ze-1;gt!=="."&>!==".."&&Mt!==".."&&(Xe[jt]=gt)}),Ie.fqURI=Xe.join("/"),Ie.fqURI.indexOf(Fe)===0?Ie.fqURI=Ie.fqURI.replace(Fe,""):Ie.fqURI.indexOf(He)===0&&(Ie.fqURI=Ie.fqURI.replace(He,"")),Ie.fqURI[0]==="/"&&(Ie.fqURI="."+Ie.fqURI)),xe.indexOf(Ke)===0&&function Ze(gt,Mt,jt){var yt,kt=Mt.split("#"),$e=Z.refs[Mt];ie[kt[0]===G.location?"#"+kt[1]:ne(G.subDocPath.concat(jt))]=$e,!$e.circular&&w($e)?(yt=Z.deps[$e.refdId],$e.refdId.indexOf(gt)!==0&&Object.keys(yt).forEach(function(Bt){Ze($e.refdId,$e.refdId+Bt.substr(1),jt.concat(X(Bt)))})):!$e.circular&&$e.error&&($e.error=$e.error.replace("options.subDocPath","JSON Pointer"),$e.error.indexOf("#")>-1&&($e.error=$e.error.replace($e.uri.substr($e.uri.indexOf("#")),$e.uri)),$e.error.indexOf("ENOENT:")!==0&&$e.error.indexOf("Not Found")!==0||($e.error="JSON Pointer points to missing location: "+$e.uri))}(Ke,xe,X(xe.substr(Ke.length)))}),o.forOwn(ie,function(xe,Xe){delete xe.refdId,xe.circular&&xe.type==="local"&&(xe.value.$ref=xe.fqURI,K(Z.docs[Fe],X(Xe),xe.value)),xe.missing&&(xe.error=xe.error.split(": ")[0]+": "+xe.def.$ref)}),{refs:ie,resolved:Z.docs[Fe]}})}typeof Promise>"u"&&n(83),e.exports.clearCache=function(){g={}},e.exports.decodePath=function(N){return ge(N)},e.exports.encodePath=function(N){return he(N)},e.exports.findRefs=function(N,G){return be(N,G)},e.exports.findRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){var Se=o.cloneDeep(g[Z.location]),Pe=o.cloneDeep(Z);return o.isUndefined(Se.refs)&&(delete Pe.filter,delete Pe.subDocPath,Pe.includeInvalid=!0,g[Z.location].refs=be(re,Pe)),o.isUndefined(Z.filter)||(Pe.filter=Z.filter),{refs:be(re,Pe),value:re}})}(N,G)},e.exports.getRefDetails=function(N){return De(N)},e.exports.isPtr=function(N,G){return Be(N,G)},e.exports.isRef=function(N,G){return function(oe,Z){return L(oe,Z)&&De(oe).type!=="invalid"}(N,G)},e.exports.pathFromPtr=function(N){return X(N)},e.exports.pathToPtr=function(N,G){return ne(N,G)},e.exports.resolveRefs=function(N,G){return _e(N,G)},e.exports.resolveRefsAt=function(N,G){return function(oe,Z){var ie=Promise.resolve();return ie=ie.then(function(){if(!o.isString(oe))throw new TypeError("location must be a string");return o.isUndefined(Z)&&(Z={}),o.isObject(Z)&&(Z.location=oe),$((Z=W(Z)).location,Z)}).then(function(re){return _e(re,Z).then(function(Se){return{refs:Se.refs,resolved:Se.resolved,value:re}})})}(N,G)}}).call(this,n(13))},function(e,t,n){(function(r,o){var i;function l(s){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(s)}/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var s="Expected a function",c="__lodash_placeholder__",f=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],h="[object Arguments]",p="[object Array]",g="[object Boolean]",y="[object Date]",b="[object Error]",E="[object Function]",O="[object GeneratorFunction]",_="[object Map]",w="[object Number]",S="[object Object]",k="[object RegExp]",C="[object Set]",$="[object String]",L="[object Symbol]",U="[object WeakMap]",ce="[object ArrayBuffer]",z="[object DataView]",K="[object Float32Array]",W="[object Float64Array]",ge="[object Int8Array]",he="[object Int16Array]",be="[object Int32Array]",De="[object Uint8Array]",Be="[object Uint16Array]",X="[object Uint32Array]",ne=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,oe=/[&<>"']/g,Z=RegExp(G.source),ie=RegExp(oe.source),re=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ke=/^\w*$/,He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xe=/[\\^$.*+?()[\]{}|]/g,Xe=RegExp(xe.source),rt=/^\s+|\s+$/g,Ie=/^\s+/,Ze=/\s+$/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kt=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,se=/^[-+]0x[0-9a-f]+$/i,Oe=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Pn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dn=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Rn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",A="[\\ud800-\\udfff]",R="["+Xn+"]",I="["+Rn+"]",q="\\d+",V="[\\u2700-\\u27bf]",de="[a-z\\xdf-\\xf6\\xf8-\\xff]",ve="[^\\ud800-\\udfff"+Xn+q+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ge="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ft="(?:"+de+"|"+ve+")",ut="(?:"+lt+"|"+ve+")",Ht="(?:"+I+"|"+Ge+")?",bt="[\\ufe0e\\ufe0f]?"+Ht+("(?:\\u200d(?:"+[st,Re,ct].join("|")+")[\\ufe0e\\ufe0f]?"+Ht+")*"),Tt="(?:"+[V,Re,ct].join("|")+")"+bt,bn="(?:"+[st+I+"?",I,Re,ct,A].join("|")+")",Un=RegExp("['’]","g"),pr=RegExp(I,"g"),Zn=RegExp(Ge+"(?="+Ge+")|"+bn+bt,"g"),vn=RegExp([lt+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[R,lt,"$"].join("|")+")",ut+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[R,lt+Ft,"$"].join("|")+")",lt+"?"+Ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q,Tt].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+Rn+"\\ufe0e\\ufe0f]"),Wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pi=-1,ht={};ht[K]=ht[W]=ht[ge]=ht[he]=ht[be]=ht[De]=ht["[object Uint8ClampedArray]"]=ht[Be]=ht[X]=!0,ht[h]=ht[p]=ht[ce]=ht[g]=ht[z]=ht[y]=ht[b]=ht[E]=ht[_]=ht[w]=ht[S]=ht[k]=ht[C]=ht[$]=ht[U]=!1;var mt={};mt[h]=mt[p]=mt[ce]=mt[z]=mt[g]=mt[y]=mt[K]=mt[W]=mt[ge]=mt[he]=mt[be]=mt[_]=mt[w]=mt[S]=mt[k]=mt[C]=mt[$]=mt[L]=mt[De]=mt["[object Uint8ClampedArray]"]=mt[Be]=mt[X]=!0,mt[b]=mt[E]=mt[U]=!1;var ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},F=parseFloat,ae=parseInt,ye=(r===void 0?"undefined":l(r))=="object"&&r&&r.Object===Object&&r,vt=(typeof self>"u"?"undefined":l(self))=="object"&&self&&self.Object===Object&&self,Qe=ye||vt||Function("return this")(),rn=l(t)=="object"&&t&&!t.nodeType&&t,Zt=rn&&l(o)=="object"&&o&&!o.nodeType&&o,Gr=Zt&&Zt.exports===rn,ao=Gr&&ye.process,Ct=function(){try{var H=Zt&&Zt.require&&Zt.require("util").types;return H||ao&&ao.binding&&ao.binding("util")}catch{}}(),Va=Ct&&Ct.isArrayBuffer,qa=Ct&&Ct.isDate,Ig=Ct&&Ct.isMap,Lg=Ct&&Ct.isRegExp,Mg=Ct&&Ct.isSet,Fg=Ct&&Ct.isTypedArray;function Jn(H,ee,J){switch(J.length){case 0:return H.call(ee);case 1:return H.call(ee,J[0]);case 2:return H.call(ee,J[0],J[1]);case 3:return H.call(ee,J[0],J[1],J[2])}return H.apply(ee,J)}function Hx(H,ee,J,pe){for(var Ve=-1,ft=H==null?0:H.length;++Ve-1}function df(H,ee,J){for(var pe=-1,Ve=H==null?0:H.length;++pe-1;);return J}function Vg(H,ee){for(var J=H.length;J--&&Wi(ee,H[J],0)>-1;);return J}function Kx(H,ee){for(var J=H.length,pe=0;J--;)H[J]===ee&&++pe;return pe}var Qx=mf({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yx=mf({"&":"&","<":"<",">":">",'"':""","'":"'"});function Xx(H){return"\\"+ke[H]}function Gi(H){return Xt.test(H)}function _f(H){var ee=-1,J=Array(H.size);return H.forEach(function(pe,Ve){J[++ee]=[Ve,pe]}),J}function qg(H,ee){return function(J){return H(ee(J))}}function Ro(H,ee){for(var J=-1,pe=H.length,Ve=0,ft=[];++J",""":'"',"'":"'"}),$o=function H(ee){var J,pe=(ee=ee==null?Qe:$o.defaults(Qe.Object(),ee,$o.pick(Qe,hr))).Array,Ve=ee.Date,ft=ee.Error,an=ee.Function,Vr=ee.Math,$t=ee.Object,xf=ee.RegExp,eb=ee.String,mr=ee.TypeError,xu=pe.prototype,tb=an.prototype,qi=$t.prototype,bu=ee["__core-js_shared__"],Su=tb.toString,St=qi.hasOwnProperty,nb=0,Kg=(J=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Eu=qi.toString,rb=Su.call($t),ob=Qe._,ib=xf("^"+Su.call(St).replace(xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Gr?ee.Buffer:void 0,No=ee.Symbol,Tu=ee.Uint8Array,Qg=ku?ku.allocUnsafe:void 0,Cu=qg($t.getPrototypeOf,$t),Yg=$t.create,Xg=qi.propertyIsEnumerable,Ou=xu.splice,Zg=No?No.isConcatSpreadable:void 0,Qa=No?No.iterator:void 0,hi=No?No.toStringTag:void 0,Au=function(){try{var a=yi($t,"defineProperty");return a({},"",{}),a}catch{}}(),ab=ee.clearTimeout!==Qe.clearTimeout&&ee.clearTimeout,lb=Ve&&Ve.now!==Qe.Date.now&&Ve.now,ub=ee.setTimeout!==Qe.setTimeout&&ee.setTimeout,ju=Vr.ceil,Pu=Vr.floor,bf=$t.getOwnPropertySymbols,sb=ku?ku.isBuffer:void 0,Jg=ee.isFinite,cb=xu.join,fb=qg($t.keys,$t),ln=Vr.max,Sn=Vr.min,db=Ve.now,pb=ee.parseInt,em=Vr.random,hb=xu.reverse,Sf=yi(ee,"DataView"),Ya=yi(ee,"Map"),Ef=yi(ee,"Promise"),Ki=yi(ee,"Set"),Xa=yi(ee,"WeakMap"),Za=yi($t,"create"),Ru=Xa&&new Xa,Qi={},gb=wi(Sf),mb=wi(Ya),vb=wi(Ef),yb=wi(Ki),wb=wi(Xa),$u=No?No.prototype:void 0,Ja=$u?$u.valueOf:void 0,tm=$u?$u.toString:void 0;function x(a){if(Jt(a)&&!qe(a)&&!(a instanceof it)){if(a instanceof vr)return a;if(St.call(a,"__wrapped__"))return nv(a)}return new vr(a)}var Yi=function(){function a(){}return function(u){if(!Gt(u))return{};if(Yg)return Yg(u);a.prototype=u;var d=new a;return a.prototype=void 0,d}}();function Nu(){}function vr(a,u){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}function it(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function gi(a){var u=-1,d=a==null?0:a.length;for(this.clear();++u=u?a:u)),a}function yr(a,u,d,m,v,T){var P,D=1&u,B=2&u,Y=4&u;if(d&&(P=v?d(a,m,v,T):d(a)),P!==void 0)return P;if(!Gt(a))return a;var Q=qe(a);if(Q){if(P=function(te){var fe=te.length,ze=new te.constructor(fe);return fe&&typeof te[0]=="string"&&St.call(te,"index")&&(ze.index=te.index,ze.input=te.input),ze}(a),!D)return Bn(a,P)}else{var le=En(a),Te=le==E||le==O;if(Fo(a))return Om(a,D);if(le==S||le==h||Te&&!v){if(P=B||Te?{}:qm(a),!D)return B?function(te,fe){return Kr(te,Gm(te),fe)}(a,function(te,fe){return te&&Kr(fe,Wn(fe),te)}(P,a)):function(te,fe){return Kr(te,Qf(te),fe)}(a,om(P,a))}else{if(!mt[le])return v?a:{};P=function(te,fe,ze){var Ee=te.constructor;switch(fe){case ce:return Bf(te);case g:case y:return new Ee(+te);case z:return function(We,nt){var Ae=nt?Bf(We.buffer):We.buffer;return new We.constructor(Ae,We.byteOffset,We.byteLength)}(te,ze);case K:case W:case ge:case he:case be:case De:case"[object Uint8ClampedArray]":case Be:case X:return Am(te,ze);case _:return new Ee;case w:case $:return new Ee(te);case k:return function(We){var nt=new We.constructor(We.source,Bt.exec(We));return nt.lastIndex=We.lastIndex,nt}(te);case C:return new Ee;case L:return Ue=te,Ja?$t(Ja.call(Ue)):{}}var Ue}(a,le,D)}}T||(T=new Rr);var Ce=T.get(a);if(Ce)return Ce;T.set(a,P),_v(a)?a.forEach(function(te){P.add(yr(te,u,d,te,a,T))}):yv(a)&&a.forEach(function(te,fe){P.set(fe,yr(te,u,d,fe,a,T))});var Le=Q?void 0:(Y?B?Vf:Gf:B?Wn:hn)(a);return gr(Le||a,function(te,fe){Le&&(te=a[fe=te]),el(P,fe,yr(te,u,d,fe,a,T))}),P}function im(a,u,d){var m=d.length;if(a==null)return!m;for(a=$t(a);m--;){var v=d[m],T=u[v],P=a[v];if(P===void 0&&!(v in a)||!T(P))return!1}return!0}function am(a,u,d){if(typeof a!="function")throw new mr(s);return ll(function(){a.apply(void 0,d)},u)}function tl(a,u,d,m){var v=-1,T=yu,P=!0,D=a.length,B=[],Y=u.length;if(!D)return B;d&&(u=Wt(u,er(d))),m?(T=df,P=!1):u.length>=200&&(T=Ka,P=!1,u=new mi(u));e:for(;++v-1},lo.prototype.set=function(a,u){var d=this.__data__,m=Du(d,a);return m<0?(++this.size,d.push([a,u])):d[m][1]=u,this},uo.prototype.clear=function(){this.size=0,this.__data__={hash:new gi,map:new(Ya||lo),string:new gi}},uo.prototype.delete=function(a){var u=qu(this,a).delete(a);return this.size-=u?1:0,u},uo.prototype.get=function(a){return qu(this,a).get(a)},uo.prototype.has=function(a){return qu(this,a).has(a)},uo.prototype.set=function(a,u){var d=qu(this,a),m=d.size;return d.set(a,u),this.size+=d.size==m?0:1,this},mi.prototype.add=mi.prototype.push=function(a){return this.__data__.set(a,"__lodash_hash_undefined__"),this},mi.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.clear=function(){this.__data__=new lo,this.size=0},Rr.prototype.delete=function(a){var u=this.__data__,d=u.delete(a);return this.size=u.size,d},Rr.prototype.get=function(a){return this.__data__.get(a)},Rr.prototype.has=function(a){return this.__data__.has(a)},Rr.prototype.set=function(a,u){var d=this.__data__;if(d instanceof lo){var m=d.__data__;if(!Ya||m.length<199)return m.push([a,u]),this.size=++d.size,this;d=this.__data__=new uo(m)}return d.set(a,u),this.size=d.size,this};var Do=$m(qr),lm=$m(Of,!0);function Sb(a,u){var d=!0;return Do(a,function(m,v,T){return d=!!u(m,v,T)}),d}function Iu(a,u,d){for(var m=-1,v=a.length;++m0&&d(D)?u>1?yn(D,u-1,d,m,v):Po(v,D):m||(v[v.length]=D)}return v}var Cf=Nm(),sm=Nm(!0);function qr(a,u){return a&&Cf(a,u,hn)}function Of(a,u){return a&&sm(a,u,hn)}function Lu(a,u){return jo(u,function(d){return ho(a[d])})}function Xi(a,u){for(var d=0,m=(u=Lo(u,a)).length;a!=null&&du}function Eb(a,u){return a!=null&&St.call(a,u)}function kb(a,u){return a!=null&&u in $t(a)}function jf(a,u,d){for(var m=d?df:yu,v=a[0].length,T=a.length,P=T,D=pe(T),B=1/0,Y=[];P--;){var Q=a[P];P&&u&&(Q=Wt(Q,er(u))),B=Sn(Q.length,B),D[P]=!d&&(u||v>=120&&Q.length>=120)?new mi(P&&Q):void 0}Q=a[0];var le=-1,Te=D[0];e:for(;++le=Ce)return Le;var te=B[Y];return Le*(te=="desc"?-1:1)}}return P.index-D.index}(v,T,d)})}function wm(a,u,d){for(var m=-1,v=u.length,T={};++m-1;)D!==a&&Ou.call(D,B,1),Ou.call(a,B,1);return a}function _m(a,u){for(var d=a?u.length:0,m=d-1;d--;){var v=u[d];if(d==m||v!==T){var T=v;po(v)?Ou.call(a,v,1):Mf(a,v)}}return a}function Df(a,u){return a+Pu(em()*(u-a+1))}function If(a,u){var d="";if(!a||u<1||u>9007199254740991)return d;do u%2&&(d+=a),(u=Pu(u/2))&&(a+=a);while(u);return d}function tt(a,u){return Jf(Ym(a,u,Gn),a+"")}function Cb(a){return rm(na(a))}function Ob(a,u){var d=na(a);return Ku(d,vi(u,0,d.length))}function ol(a,u,d,m){if(!Gt(a))return a;for(var v=-1,T=(u=Lo(u,a)).length,P=T-1,D=a;D!=null&&++vv?0:v+u),(d=d>v?v:d)<0&&(d+=v),v=u>d?0:d-u>>>0,u>>>=0;for(var T=pe(v);++m>>1,P=a[T];P!==null&&!nr(P)&&(d?P<=u:P=200){var Y=u?null:$b(a);if(Y)return _u(Y);P=!1,v=Ka,B=new mi}else B=u?[]:D;e:for(;++m=m?a:wr(a,u,d)}var Cm=ab||function(a){return Qe.clearTimeout(a)};function Om(a,u){if(u)return a.slice();var d=a.length,m=Qg?Qg(d):new a.constructor(d);return a.copy(m),m}function Bf(a){var u=new a.constructor(a.byteLength);return new Tu(u).set(new Tu(a)),u}function Am(a,u){var d=u?Bf(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function jm(a,u){if(a!==u){var d=a!==void 0,m=a===null,v=a==a,T=nr(a),P=u!==void 0,D=u===null,B=u==u,Y=nr(u);if(!D&&!Y&&!T&&a>u||T&&P&&B&&!D&&!Y||m&&P&&B||!d&&B||!v)return 1;if(!m&&!T&&!Y&&a1?d[v-1]:void 0,P=v>2?d[2]:void 0;for(T=a.length>3&&typeof T=="function"?(v--,T):void 0,P&&Nn(d[0],d[1],P)&&(T=v<3?void 0:T,v=1),u=$t(u);++m-1?v[T?u[P]:P]:void 0}}function Lm(a){return fo(function(u){var d=u.length,m=d,v=vr.prototype.thru;for(a&&u.reverse();m--;){var T=u[m];if(typeof T!="function")throw new mr(s);if(v&&!P&&Vu(T)=="wrapper")var P=new vr([],!0)}for(m=P?m:d;++m1&&Ee.reverse(),Q&&BD))return!1;var Y=T.get(a);if(Y&&T.get(u))return Y==u;var Q=-1,le=!0,Te=2&d?new mi:void 0;for(T.set(a,u),T.set(u,a);++Q-1&&a%1==0&&a1?"& ":"")+T[D],T=T.join(P>2?", ":" "),v.replace(gt,`{ -/* [wrapped with `+T+`] */ -`)}(m,function(v,T){return gr(f,function(P){var D="_."+P[0];T&P[1]&&!yu(v,D)&&v.push(D)}),v.sort()}(function(v){var T=v.match(Mt);return T?T[1].split(jt):[]}(m),d)))}function ev(a){var u=0,d=0;return function(){var m=db(),v=16-(m-d);if(d=m,v>0){if(++u>=800)return arguments[0]}else u=0;return a.apply(void 0,arguments)}}function Ku(a,u){var d=-1,m=a.length,v=m-1;for(u=u===void 0?m:u;++d1?a[u-1]:void 0;return d=typeof d=="function"?(a.pop(),d):void 0,uv(a,d)});function sv(a){var u=x(a);return u.__chain__=!0,u}function Qu(a,u){return u(a)}var tS=fo(function(a){var u=a.length,d=u?a[0]:0,m=this.__wrapped__,v=function(T){return Tf(T,a)};return!(u>1||this.__actions__.length)&&m instanceof it&&po(d)?((m=m.slice(d,+d+(u?1:0))).__actions__.push({func:Qu,args:[v],thisArg:void 0}),new vr(m,this.__chain__).thru(function(T){return u&&!T.length&&T.push(void 0),T})):this.thru(v)}),nS=Uu(function(a,u,d){St.call(a,d)?++a[d]:so(a,d,1)}),rS=Im(rv),oS=Im(ov);function cv(a,u){return(qe(a)?gr:Do)(a,Ne(u,3))}function fv(a,u){return(qe(a)?Wx:lm)(a,Ne(u,3))}var iS=Uu(function(a,u,d){St.call(a,d)?a[d].push(u):so(a,d,[u])}),aS=tt(function(a,u,d){var m=-1,v=typeof u=="function",T=Hn(a)?pe(a.length):[];return Do(a,function(P){T[++m]=v?Jn(u,P,d):nl(P,u,d)}),T}),lS=Uu(function(a,u,d){so(a,d,u)});function Yu(a,u){return(qe(a)?Wt:hm)(a,Ne(u,3))}var uS=Uu(function(a,u,d){a[d?0:1].push(u)},function(){return[[],[]]}),sS=tt(function(a,u){if(a==null)return[];var d=u.length;return d>1&&Nn(a,u[0],u[1])?u=[]:d>2&&Nn(u[0],u[1],u[2])&&(u=[u[0]]),ym(a,yn(u,1),[])}),Xu=lb||function(){return Qe.Date.now()};function dv(a,u,d){return u=d?void 0:u,co(a,128,void 0,void 0,void 0,void 0,u=a&&u==null?a.length:u)}function pv(a,u){var d;if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){return--a>0&&(d=u.apply(this,arguments)),a<=1&&(u=void 0),d}}var nd=tt(function(a,u,d){var m=1;if(d.length){var v=Ro(d,ea(nd));m|=32}return co(a,m,u,d,v)}),hv=tt(function(a,u,d){var m=3;if(d.length){var v=Ro(d,ea(hv));m|=32}return co(u,m,a,d,v)});function gv(a,u,d){var m,v,T,P,D,B,Y=0,Q=!1,le=!1,Te=!0;if(typeof a!="function")throw new mr(s);function Ce(Ue){var We=m,nt=v;return m=v=void 0,Y=Ue,P=a.apply(nt,We)}function Le(Ue){return Y=Ue,D=ll(fe,u),Q?Ce(Ue):P}function te(Ue){var We=Ue-B;return B===void 0||We>=u||We<0||le&&Ue-Y>=T}function fe(){var Ue=Xu();if(te(Ue))return ze(Ue);D=ll(fe,function(We){var nt=u-(We-B);return le?Sn(nt,T-(We-Y)):nt}(Ue))}function ze(Ue){return D=void 0,Te&&m?Ce(Ue):(m=v=void 0,P)}function Ee(){var Ue=Xu(),We=te(Ue);if(m=arguments,v=this,B=Ue,We){if(D===void 0)return Le(B);if(le)return Cm(D),D=ll(fe,u),Ce(B)}return D===void 0&&(D=ll(fe,u)),P}return u=xr(u)||0,Gt(d)&&(Q=!!d.leading,T=(le="maxWait"in d)?ln(xr(d.maxWait)||0,u):T,Te="trailing"in d?!!d.trailing:Te),Ee.cancel=function(){D!==void 0&&Cm(D),Y=0,m=B=v=D=void 0},Ee.flush=function(){return D===void 0?P:ze(Xu())},Ee}var cS=tt(function(a,u){return am(a,1,u)}),fS=tt(function(a,u,d){return am(a,xr(u)||0,d)});function Zu(a,u){if(typeof a!="function"||u!=null&&typeof u!="function")throw new mr(s);var d=function m(){var v=arguments,T=u?u.apply(this,v):v[0],P=m.cache;if(P.has(T))return P.get(T);var D=a.apply(this,v);return m.cache=P.set(T,D)||P,D};return d.cache=new(Zu.Cache||uo),d}function Ju(a){if(typeof a!="function")throw new mr(s);return function(){var u=arguments;switch(u.length){case 0:return!a.call(this);case 1:return!a.call(this,u[0]);case 2:return!a.call(this,u[0],u[1]);case 3:return!a.call(this,u[0],u[1],u[2])}return!a.apply(this,u)}}Zu.Cache=uo;var dS=Rb(function(a,u){var d=(u=u.length==1&&qe(u[0])?Wt(u[0],er(Ne())):Wt(yn(u,1),er(Ne()))).length;return tt(function(m){for(var v=-1,T=Sn(m.length,d);++v=u}),_i=fm(function(){return arguments}())?fm:function(a){return Jt(a)&&St.call(a,"callee")&&!Xg.call(a,"callee")},qe=pe.isArray,mS=Va?er(Va):function(a){return Jt(a)&&$n(a)==ce};function Hn(a){return a!=null&&es(a.length)&&!ho(a)}function tn(a){return Jt(a)&&Hn(a)}var Fo=sb||hd,vS=qa?er(qa):function(a){return Jt(a)&&$n(a)==y};function od(a){if(!Jt(a))return!1;var u=$n(a);return u==b||u=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!ul(a)}function ho(a){if(!Gt(a))return!1;var u=$n(a);return u==E||u==O||u=="[object AsyncFunction]"||u=="[object Proxy]"}function vv(a){return typeof a=="number"&&a==Ye(a)}function es(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=9007199254740991}function Gt(a){var u=l(a);return a!=null&&(u=="object"||u=="function")}function Jt(a){return a!=null&&l(a)=="object"}var yv=Ig?er(Ig):function(a){return Jt(a)&&En(a)==_};function wv(a){return typeof a=="number"||Jt(a)&&$n(a)==w}function ul(a){if(!Jt(a)||$n(a)!=S)return!1;var u=Cu(a);if(u===null)return!0;var d=St.call(u,"constructor")&&u.constructor;return typeof d=="function"&&d instanceof d&&Su.call(d)==rb}var id=Lg?er(Lg):function(a){return Jt(a)&&$n(a)==k},_v=Mg?er(Mg):function(a){return Jt(a)&&En(a)==C};function ts(a){return typeof a=="string"||!qe(a)&&Jt(a)&&$n(a)==$}function nr(a){return l(a)=="symbol"||Jt(a)&&$n(a)==L}var ta=Fg?er(Fg):function(a){return Jt(a)&&es(a.length)&&!!ht[$n(a)]},yS=Gu($f),wS=Gu(function(a,u){return a<=u});function xv(a){if(!a)return[];if(Hn(a))return ts(a)?Pr(a):Bn(a);if(Qa&&a[Qa])return function(d){for(var m,v=[];!(m=d.next()).done;)v.push(m.value);return v}(a[Qa]());var u=En(a);return(u==_?_f:u==C?_u:na)(a)}function go(a){return a?(a=xr(a))===1/0||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ye(a){var u=go(a),d=u%1;return u==u?d?u-d:u:0}function bv(a){return a?vi(Ye(a),0,4294967295):0}function xr(a){if(typeof a=="number")return a;if(nr(a))return NaN;if(Gt(a)){var u=typeof a.valueOf=="function"?a.valueOf():a;a=Gt(u)?u+"":u}if(typeof a!="string")return a===0?a:+a;a=a.replace(rt,"");var d=Oe.test(a);return d||Rt.test(a)?ae(a.slice(2),d?2:8):se.test(a)?NaN:+a}function Sv(a){return Kr(a,Wn(a))}function wt(a){return a==null?"":tr(a)}var _S=Zi(function(a,u){if(al(u)||Hn(u))Kr(u,hn(u),a);else for(var d in u)St.call(u,d)&&el(a,d,u[d])}),Ev=Zi(function(a,u){Kr(u,Wn(u),a)}),ns=Zi(function(a,u,d,m){Kr(u,Wn(u),a,m)}),xS=Zi(function(a,u,d,m){Kr(u,hn(u),a,m)}),bS=fo(Tf),SS=tt(function(a,u){a=$t(a);var d=-1,m=u.length,v=m>2?u[2]:void 0;for(v&&Nn(u[0],u[1],v)&&(m=1);++d1),T}),Kr(a,Vf(a),d),m&&(d=yr(d,7,Nb));for(var v=u.length;v--;)Mf(d,u[v]);return d}),jS=fo(function(a,u){return a==null?{}:function(d,m){return wm(d,m,function(v,T){return ld(d,T)})}(a,u)});function Tv(a,u){if(a==null)return{};var d=Wt(Vf(a),function(m){return[m]});return u=Ne(u),wm(a,d,function(m,v){return u(m,v[0])})}var Cv=Um(hn),Ov=Um(Wn);function na(a){return a==null?[]:wf(a,hn(a))}var PS=Ji(function(a,u,d){return u=u.toLowerCase(),a+(d?Av(u):u)});function Av(a){return ud(wt(a).toLowerCase())}function jv(a){return(a=wt(a))&&a.replace(Pn,Qx).replace(pr,"")}var RS=Ji(function(a,u,d){return a+(d?"-":"")+u.toLowerCase()}),$S=Ji(function(a,u,d){return a+(d?" ":"")+u.toLowerCase()}),NS=Dm("toLowerCase"),DS=Ji(function(a,u,d){return a+(d?"_":"")+u.toLowerCase()}),IS=Ji(function(a,u,d){return a+(d?" ":"")+ud(u)}),LS=Ji(function(a,u,d){return a+(d?" ":"")+u.toUpperCase()}),ud=Dm("toUpperCase");function Pv(a,u,d){return a=wt(a),(u=d?void 0:u)===void 0?function(m){return Wr.test(m)}(a)?function(m){return m.match(vn)||[]}(a):function(m){return m.match(yt)||[]}(a):a.match(u)||[]}var Rv=tt(function(a,u){try{return Jn(a,void 0,u)}catch(d){return od(d)?d:new ft(d)}}),MS=fo(function(a,u){return gr(u,function(d){d=Qr(d),so(a,d,nd(a[d],a))}),a});function sd(a){return function(){return a}}var FS=Lm(),zS=Lm(!0);function Gn(a){return a}function cd(a){return pm(typeof a=="function"?a:yr(a,1))}var US=tt(function(a,u){return function(d){return nl(d,a,u)}}),BS=tt(function(a,u){return function(d){return nl(a,d,u)}});function fd(a,u,d){var m=hn(u),v=Lu(u,m);d!=null||Gt(u)&&(v.length||!m.length)||(d=u,u=a,a=this,v=Lu(u,hn(u)));var T=!(Gt(d)&&"chain"in d&&!d.chain),P=ho(a);return gr(v,function(D){var B=u[D];a[D]=B,P&&(a.prototype[D]=function(){var Y=this.__chain__;if(T||Y){var Q=a(this.__wrapped__),le=Q.__actions__=Bn(this.__actions__);return le.push({func:B,args:arguments,thisArg:a}),Q.__chain__=Y,Q}return B.apply(a,Po([this.value()],arguments))})}),a}function dd(){}var HS=Hf(Wt),WS=Hf(zg),GS=Hf(hf);function $v(a){return Yf(a)?gf(Qr(a)):function(u){return function(d){return Xi(d,u)}}(a)}var VS=Fm(),qS=Fm(!0);function pd(){return[]}function hd(){return!1}var KS=Hu(function(a,u){return a+u},0),QS=Wf("ceil"),YS=Hu(function(a,u){return a/u},1),XS=Wf("floor"),gd,ZS=Hu(function(a,u){return a*u},1),JS=Wf("round"),eE=Hu(function(a,u){return a-u},0);return x.after=function(a,u){if(typeof u!="function")throw new mr(s);return a=Ye(a),function(){if(--a<1)return u.apply(this,arguments)}},x.ary=dv,x.assign=_S,x.assignIn=Ev,x.assignInWith=ns,x.assignWith=xS,x.at=bS,x.before=pv,x.bind=nd,x.bindAll=MS,x.bindKey=hv,x.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return qe(a)?a:[a]},x.chain=sv,x.chunk=function(a,u,d){u=(d?Nn(a,u,d):u===void 0)?1:ln(Ye(u),0);var m=a==null?0:a.length;if(!m||u<1)return[];for(var v=0,T=0,P=pe(ju(m/u));vY?0:Y+D),(B=B===void 0||B>Y?Y:Ye(B))<0&&(B+=Y),B=D>B?0:bv(B);D>>0)?(a=wt(a))&&(typeof u=="string"||u!=null&&!id(u))&&!(u=tr(u))&&Gi(a)?Mo(Pr(a),0,d):a.split(u,d):[]},x.spread=function(a,u){if(typeof a!="function")throw new mr(s);return u=u==null?0:ln(Ye(u),0),tt(function(d){var m=d[u],v=Mo(d,0,u);return m&&Po(v,m),Jn(a,this,v)})},x.tail=function(a){var u=a==null?0:a.length;return u?wr(a,1,u):[]},x.take=function(a,u,d){return a&&a.length?wr(a,0,(u=d||u===void 0?1:Ye(u))<0?0:u):[]},x.takeRight=function(a,u,d){var m=a==null?0:a.length;return m?wr(a,(u=m-(u=d||u===void 0?1:Ye(u)))<0?0:u,m):[]},x.takeRightWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3),!1,!0):[]},x.takeWhile=function(a,u){return a&&a.length?zu(a,Ne(u,3)):[]},x.tap=function(a,u){return u(a),a},x.throttle=function(a,u,d){var m=!0,v=!0;if(typeof a!="function")throw new mr(s);return Gt(d)&&(m="leading"in d?!!d.leading:m,v="trailing"in d?!!d.trailing:v),gv(a,u,{leading:m,maxWait:u,trailing:v})},x.thru=Qu,x.toArray=xv,x.toPairs=Cv,x.toPairsIn=Ov,x.toPath=function(a){return qe(a)?Wt(a,Qr):nr(a)?[a]:Bn(tv(wt(a)))},x.toPlainObject=Sv,x.transform=function(a,u,d){var m=qe(a),v=m||Fo(a)||ta(a);if(u=Ne(u,4),d==null){var T=a&&a.constructor;d=v?m?new T:[]:Gt(a)&&ho(T)?Yi(Cu(a)):{}}return(v?gr:qr)(a,function(P,D,B){return u(d,P,D,B)}),d},x.unary=function(a){return dv(a,1)},x.union=Vb,x.unionBy=qb,x.unionWith=Kb,x.uniq=function(a){return a&&a.length?Io(a):[]},x.uniqBy=function(a,u){return a&&a.length?Io(a,Ne(u,2)):[]},x.uniqWith=function(a,u){return u=typeof u=="function"?u:void 0,a&&a.length?Io(a,void 0,u):[]},x.unset=function(a,u){return a==null||Mf(a,u)},x.unzip=td,x.unzipWith=uv,x.update=function(a,u,d){return a==null?a:Em(a,u,Uf(d))},x.updateWith=function(a,u,d,m){return m=typeof m=="function"?m:void 0,a==null?a:Em(a,u,Uf(d),m)},x.values=na,x.valuesIn=function(a){return a==null?[]:wf(a,Wn(a))},x.without=Qb,x.words=Pv,x.wrap=function(a,u){return rd(Uf(u),a)},x.xor=Yb,x.xorBy=Xb,x.xorWith=Zb,x.zip=Jb,x.zipObject=function(a,u){return Tm(a||[],u||[],el)},x.zipObjectDeep=function(a,u){return Tm(a||[],u||[],ol)},x.zipWith=eS,x.entries=Cv,x.entriesIn=Ov,x.extend=Ev,x.extendWith=ns,fd(x,x),x.add=KS,x.attempt=Rv,x.camelCase=PS,x.capitalize=Av,x.ceil=QS,x.clamp=function(a,u,d){return d===void 0&&(d=u,u=void 0),d!==void 0&&(d=(d=xr(d))==d?d:0),u!==void 0&&(u=(u=xr(u))==u?u:0),vi(xr(a),u,d)},x.clone=function(a){return yr(a,4)},x.cloneDeep=function(a){return yr(a,5)},x.cloneDeepWith=function(a,u){return yr(a,5,u=typeof u=="function"?u:void 0)},x.cloneWith=function(a,u){return yr(a,4,u=typeof u=="function"?u:void 0)},x.conformsTo=function(a,u){return u==null||im(a,u,hn(u))},x.deburr=jv,x.defaultTo=function(a,u){return a==null||a!=a?u:a},x.divide=YS,x.endsWith=function(a,u,d){a=wt(a),u=tr(u);var m=a.length,v=d=d===void 0?m:vi(Ye(d),0,m);return(d-=u.length)>=0&&a.slice(d,v)==u},x.eq=$r,x.escape=function(a){return(a=wt(a))&&ie.test(a)?a.replace(oe,Yx):a},x.escapeRegExp=function(a){return(a=wt(a))&&Xe.test(a)?a.replace(xe,"\\$&"):a},x.every=function(a,u,d){var m=qe(a)?zg:Sb;return d&&Nn(a,u,d)&&(u=void 0),m(a,Ne(u,3))},x.find=rS,x.findIndex=rv,x.findKey=function(a,u){return Ug(a,Ne(u,3),qr)},x.findLast=oS,x.findLastIndex=ov,x.findLastKey=function(a,u){return Ug(a,Ne(u,3),Of)},x.floor=XS,x.forEach=cv,x.forEachRight=fv,x.forIn=function(a,u){return a==null?a:Cf(a,Ne(u,3),Wn)},x.forInRight=function(a,u){return a==null?a:sm(a,Ne(u,3),Wn)},x.forOwn=function(a,u){return a&&qr(a,Ne(u,3))},x.forOwnRight=function(a,u){return a&&Of(a,Ne(u,3))},x.get=ad,x.gt=hS,x.gte=gS,x.has=function(a,u){return a!=null&&Vm(a,u,Eb)},x.hasIn=ld,x.head=av,x.identity=Gn,x.includes=function(a,u,d,m){a=Hn(a)?a:na(a),d=d&&!m?Ye(d):0;var v=a.length;return d<0&&(d=ln(v+d,0)),ts(a)?d<=v&&a.indexOf(u,d)>-1:!!v&&Wi(a,u,d)>-1},x.indexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=d==null?0:Ye(d);return v<0&&(v=ln(m+v,0)),Wi(a,u,v)},x.inRange=function(a,u,d){return u=go(u),d===void 0?(d=u,u=0):d=go(d),function(m,v,T){return m>=Sn(v,T)&&m=-9007199254740991&&a<=9007199254740991},x.isSet=_v,x.isString=ts,x.isSymbol=nr,x.isTypedArray=ta,x.isUndefined=function(a){return a===void 0},x.isWeakMap=function(a){return Jt(a)&&En(a)==U},x.isWeakSet=function(a){return Jt(a)&&$n(a)=="[object WeakSet]"},x.join=function(a,u){return a==null?"":cb.call(a,u)},x.kebabCase=RS,x.last=_r,x.lastIndexOf=function(a,u,d){var m=a==null?0:a.length;if(!m)return-1;var v=m;return d!==void 0&&(v=(v=Ye(d))<0?ln(m+v,0):Sn(v,m-1)),u==u?function(T,P,D){for(var B=D+1;B--;)if(T[B]===P)return B;return B}(a,u,v):wu(a,Bg,v,!0)},x.lowerCase=$S,x.lowerFirst=NS,x.lt=yS,x.lte=wS,x.max=function(a){return a&&a.length?Iu(a,Gn,Af):void 0},x.maxBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),Af):void 0},x.mean=function(a){return Hg(a,Gn)},x.meanBy=function(a,u){return Hg(a,Ne(u,2))},x.min=function(a){return a&&a.length?Iu(a,Gn,$f):void 0},x.minBy=function(a,u){return a&&a.length?Iu(a,Ne(u,2),$f):void 0},x.stubArray=pd,x.stubFalse=hd,x.stubObject=function(){return{}},x.stubString=function(){return""},x.stubTrue=function(){return!0},x.multiply=ZS,x.nth=function(a,u){return a&&a.length?vm(a,Ye(u)):void 0},x.noConflict=function(){return Qe._===this&&(Qe._=ob),this},x.noop=dd,x.now=Xu,x.pad=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;if(!u||m>=u)return a;var v=(u-m)/2;return Wu(Pu(v),d)+a+Wu(ju(v),d)},x.padEnd=function(a,u,d){a=wt(a);var m=(u=Ye(u))?Vi(a):0;return u&&mu){var m=a;a=u,u=m}if(d||a%1||u%1){var v=em();return Sn(a+v*(u-a+F("1e-"+((v+"").length-1))),u)}return Df(a,u)},x.reduce=function(a,u,d){var m=qe(a)?pf:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,Do)},x.reduceRight=function(a,u,d){var m=qe(a)?Gx:Wg,v=arguments.length<3;return m(a,Ne(u,4),d,v,lm)},x.repeat=function(a,u,d){return u=(d?Nn(a,u,d):u===void 0)?1:Ye(u),If(wt(a),u)},x.replace=function(){var a=arguments,u=wt(a[0]);return a.length<3?u:u.replace(a[1],a[2])},x.result=function(a,u,d){var m=-1,v=(u=Lo(u,a)).length;for(v||(v=1,a=void 0);++m9007199254740991)return[];var d=4294967295,m=Sn(a,4294967295);a-=4294967295;for(var v=yf(m,u=Ne(u));++d=T)return a;var D=d-Vi(m);if(D<1)return m;var B=P?Mo(P,0,D).join(""):a.slice(0,D);if(v===void 0)return B+m;if(P&&(D+=B.length-D),id(v)){if(a.slice(D).search(v)){var Y,Q=B;for(v.global||(v=xf(v.source,wt(Bt.exec(v))+"g")),v.lastIndex=0;Y=v.exec(Q);)var le=Y.index;B=B.slice(0,le===void 0?D:le)}}else if(a.indexOf(tr(v),D)!=D){var Te=B.lastIndexOf(v);Te>-1&&(B=B.slice(0,Te))}return B+m},x.unescape=function(a){return(a=wt(a))&&Z.test(a)?a.replace(G,Jx):a},x.uniqueId=function(a){var u=++nb;return wt(a)+u},x.upperCase=LS,x.upperFirst=ud,x.each=cv,x.eachRight=fv,x.first=av,fd(x,(gd={},qr(x,function(a,u){St.call(x.prototype,u)||(gd[u]=a)}),gd),{chain:!1}),x.VERSION="4.17.15",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){x[a].placeholder=x}),gr(["drop","take"],function(a,u){it.prototype[a]=function(d){d=d===void 0?1:ln(Ye(d),0);var m=this.__filtered__&&!u?new it(this):this.clone();return m.__filtered__?m.__takeCount__=Sn(d,m.__takeCount__):m.__views__.push({size:Sn(d,4294967295),type:a+(m.__dir__<0?"Right":"")}),m},it.prototype[a+"Right"]=function(d){return this.reverse()[a](d).reverse()}}),gr(["filter","map","takeWhile"],function(a,u){var d=u+1,m=d==1||d==3;it.prototype[a]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:Ne(v,3),type:d}),T.__filtered__=T.__filtered__||m,T}}),gr(["head","last"],function(a,u){var d="take"+(u?"Right":"");it.prototype[a]=function(){return this[d](1).value()[0]}}),gr(["initial","tail"],function(a,u){var d="drop"+(u?"":"Right");it.prototype[a]=function(){return this.__filtered__?new it(this):this[d](1)}}),it.prototype.compact=function(){return this.filter(Gn)},it.prototype.find=function(a){return this.filter(a).head()},it.prototype.findLast=function(a){return this.reverse().find(a)},it.prototype.invokeMap=tt(function(a,u){return typeof a=="function"?new it(this):this.map(function(d){return nl(d,a,u)})}),it.prototype.reject=function(a){return this.filter(Ju(Ne(a)))},it.prototype.slice=function(a,u){a=Ye(a);var d=this;return d.__filtered__&&(a>0||u<0)?new it(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),u!==void 0&&(d=(u=Ye(u))<0?d.dropRight(-u):d.take(u-a)),d)},it.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},it.prototype.toArray=function(){return this.take(4294967295)},qr(it.prototype,function(a,u){var d=/^(?:filter|find|map|reject)|While$/.test(u),m=/^(?:head|last)$/.test(u),v=x[m?"take"+(u=="last"?"Right":""):u],T=m||/^find/.test(u);v&&(x.prototype[u]=function(){var P=this.__wrapped__,D=m?[1]:arguments,B=P instanceof it,Y=D[0],Q=B||qe(P),le=function(ze){var Ee=v.apply(x,Po([ze],D));return m&&Te?Ee[0]:Ee};Q&&d&&typeof Y=="function"&&Y.length!=1&&(B=Q=!1);var Te=this.__chain__,Ce=!!this.__actions__.length,Le=T&&!Te,te=B&&!Ce;if(!T&&Q){P=te?P:new it(this);var fe=a.apply(P,D);return fe.__actions__.push({func:Qu,args:[le],thisArg:void 0}),new vr(fe,Te)}return Le&&te?a.apply(this,D):(fe=this.thru(le),Le?m?fe.value()[0]:fe.value():fe)})}),gr(["pop","push","shift","sort","splice","unshift"],function(a){var u=xu[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);x.prototype[a]=function(){var v=arguments;if(m&&!this.__chain__){var T=this.value();return u.apply(qe(T)?T:[],v)}return this[d](function(P){return u.apply(qe(P)?P:[],v)})}}),qr(it.prototype,function(a,u){var d=x[u];if(d){var m=d.name+"";St.call(Qi,m)||(Qi[m]=[]),Qi[m].push({name:u,func:d})}}),Qi[Bu(void 0,2).name]=[{name:"wrapper",func:void 0}],it.prototype.clone=function(){var a=new it(this.__wrapped__);return a.__actions__=Bn(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Bn(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Bn(this.__views__),a},it.prototype.reverse=function(){if(this.__filtered__){var a=new it(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},it.prototype.value=function(){var a=this.__wrapped__.value(),u=this.__dir__,d=qe(a),m=u<0,v=d?a.length:0,T=function(nt,Ae,Me){for(var un=-1,Dn=Me.length;++un=this.__values__.length;return{done:a,value:a?void 0:this.__values__[this.__index__++]}},x.prototype.plant=function(a){for(var u,d=this;d instanceof Nu;){var m=nv(d);m.__index__=0,m.__values__=void 0,u?v.__wrapped__=m:u=m;var v=m;d=d.__wrapped__}return v.__wrapped__=a,u},x.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof it){var u=a;return this.__actions__.length&&(u=new it(this)),(u=u.reverse()).__actions__.push({func:Qu,args:[ed],thisArg:void 0}),new vr(u,this.__chain__)}return this.thru(ed)},x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=function(){return km(this.__wrapped__,this.__actions__)},x.prototype.first=x.prototype.head,Qa&&(x.prototype[Qa]=function(){return this}),x}();l(n(46))=="object"&&n(46)?(Qe._=$o,(i=(function(){return $o}).call(t,n,t,o))===void 0||(o.exports=i)):Zt?((Zt.exports=$o)._=$o,rn._=$o):Qe._=$o}).call(this)}).call(this,n(11),n(14)(e))},function(e,t,n){var r=n(87);e.exports={Graph:r.Graph,json:n(213),alg:n(214),version:r.version}},function(e,t,n){e.exports={Graph:n(28),version:n(212)}},function(e,t,n){var r=n(89);e.exports=function(o){return r(o,4)}},function(e,t,n){var r=n(29),o=n(33),i=n(49),l=n(118),s=n(124),c=n(127),f=n(128),h=n(129),p=n(130),g=n(59),y=n(131),b=n(10),E=n(135),O=n(136),_=n(141),w=n(0),S=n(12),k=n(142),C=n(5),$=n(144),L=n(6),U={};U["[object Arguments]"]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U["[object Object]"]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U["[object Function]"]=U["[object WeakMap]"]=!1,e.exports=function ce(z,K,W,ge,he,be){var De,Be=1&K,X=2&K,ne=4&K;if(W&&(De=he?W(z,ge,he,be):W(z)),De!==void 0)return De;if(!C(z))return z;var _e=w(z);if(_e){if(De=E(z),!Be)return f(z,De)}else{var N=b(z),G=N=="[object Function]"||N=="[object GeneratorFunction]";if(S(z))return c(z,Be);if(N=="[object Object]"||N=="[object Arguments]"||G&&!he){if(De=X||G?{}:_(z),!Be)return X?p(z,s(De,z)):h(z,l(De,z))}else{if(!U[N])return he?z:{};De=O(z,N,Be)}}be||(be=new r);var oe=be.get(z);if(oe)return oe;be.set(z,De),$(z)?z.forEach(function(re){De.add(ce(re,K,W,re,z,be))}):k(z)&&z.forEach(function(re,Se){De.set(Se,ce(re,K,W,Se,z,be))});var Z=ne?X?y:g:X?keysIn:L,ie=_e?void 0:Z(z);return o(ie||z,function(re,Se){ie&&(re=z[Se=re]),i(De,Se,ce(re,K,W,Se,z,be))}),De}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(16),o=Array.prototype.splice;e.exports=function(i){var l=this.__data__,s=r(l,i);return!(s<0)&&(s==l.length-1?l.pop():o.call(l,s,1),--this.size,!0)}},function(e,t,n){var r=n(16);e.exports=function(o){var i=this.__data__,l=r(i,o);return l<0?void 0:i[l][1]}},function(e,t,n){var r=n(16);e.exports=function(o){return r(this.__data__,o)>-1}},function(e,t,n){var r=n(16);e.exports=function(o,i){var l=this.__data__,s=r(l,o);return s<0?(++this.size,l.push([o,i])):l[s][1]=i,this}},function(e,t,n){var r=n(15);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(n){var r=this.__data__,o=r.delete(n);return this.size=r.size,o}},function(e,t){e.exports=function(n){return this.__data__.get(n)}},function(e,t){e.exports=function(n){return this.__data__.has(n)}},function(e,t,n){var r=n(15),o=n(31),i=n(32);e.exports=function(l,s){var c=this.__data__;if(c instanceof r){var f=c.__data__;if(!o||f.length<199)return f.push([l,s]),this.size=++c.size,this;c=this.__data__=new i(f)}return c.set(l,s),this.size=c.size,this}},function(e,t,n){var r=n(17),o=n(103),i=n(5),l=n(48),s=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,h=c.toString,p=f.hasOwnProperty,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(y){return!(!i(y)||o(y))&&(r(y)?g:s).test(l(y))}},function(e,t,n){var r=n(9),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=function(c){var f=i.call(c,s),h=c[s];try{c[s]=void 0;var p=!0}catch{}var g=l.call(c);return p&&(f?c[s]=h:delete c[s]),g}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r,o=n(104),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(l){return!!i&&i in l}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(n,r){return n==null?void 0:n[r]}},function(e,t,n){var r=n(107),o=n(15),i=n(31);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(108),o=n(109),i=n(110),l=n(111),s=n(112);function c(f){var h=-1,p=f==null?0:f.length;for(this.clear();++h0&&c(y)?s>1?i(y,s-1,c,f,h):r(h,y):f||(h[h.length]=y)}return h}},function(e,t,n){var r=n(9),o=n(21),i=n(0),l=r?r.isConcatSpreadable:void 0;e.exports=function(s){return i(s)||o(s)||!!(l&&s&&s[l])}},function(e,t,n){var r=n(25),o=n(195),i=n(197);e.exports=function(l,s){return i(o(l,s,r),l+"")}},function(e,t,n){var r=n(196),o=Math.max;e.exports=function(i,l,s){return l=o(l===void 0?i.length-1:l,0),function(){for(var c=arguments,f=-1,h=o(c.length-l,0),p=Array(h);++f0){if(++o>=800)return arguments[0]}else o=0;return r.apply(void 0,arguments)}}},function(e,t,n){var r=n(68),o=n(201),i=n(206),l=n(69),s=n(207),c=n(42);e.exports=function(f,h,p){var g=-1,y=o,b=f.length,E=!0,O=[],_=O;if(p)E=!1,y=i;else if(b>=200){var w=h?null:s(f);if(w)return c(w);E=!1,y=l,_=new r}else _=h?[]:O;e:for(;++g-1}},function(e,t,n){var r=n(203),o=n(204),i=n(205);e.exports=function(l,s,c){return s==s?i(l,s,c):r(l,o,c)}},function(e,t){e.exports=function(n,r,o,i){for(var l=n.length,s=o+(i?1:-1);i?s--:++s1||l.length===1&&i.hasEdge(l[0],l[0])})}},function(e,t,n){var r=n(1);e.exports=function(i,l,s){return function(c,f,h){var p={},g=c.nodes();return g.forEach(function(y){p[y]={},p[y][y]={distance:0},g.forEach(function(b){y!==b&&(p[y][b]={distance:Number.POSITIVE_INFINITY})}),h(y).forEach(function(b){var E=b.v===y?b.w:b.v,O=f(b);p[y][E]={distance:O,predecessor:y}})}),g.forEach(function(y){var b=p[y];g.forEach(function(E){var O=p[E];g.forEach(function(_){var w=O[y],S=b[_],k=O[_],C=w.distance+S.distance;C0;){if(c=p.removeMin(),r.has(h,c))f.setEdge(c,h[c]);else{if(y)throw new Error("Input graph is not connected: "+l);y=!0}l.nodeEdges(c).forEach(g)}return f}},function(e,t,n){(function(r){function o(s,c){for(var f=0,h=s.length-1;h>=0;h--){var p=s[h];p==="."?s.splice(h,1):p===".."?(s.splice(h,1),f++):f&&(s.splice(h,1),f--)}if(c)for(;f--;f)s.unshift("..");return s}function i(s,c){if(s.filter)return s.filter(c);for(var f=[],h=0;h=-1&&!c;f--){var h=f>=0?arguments[f]:r.cwd();if(typeof h!="string")throw new TypeError("Arguments to path.resolve must be strings");h&&(s=h+"/"+s,c=h.charAt(0)==="/")}return(c?"/":"")+(s=o(i(s.split("/"),function(p){return!!p}),!c).join("/"))||"."},t.normalize=function(s){var c=t.isAbsolute(s),f=l(s,-1)==="/";return(s=o(i(s.split("/"),function(h){return!!h}),!c).join("/"))||c||(s="."),s&&f&&(s+="/"),(c?"/":"")+s},t.isAbsolute=function(s){return s.charAt(0)==="/"},t.join=function(){var s=Array.prototype.slice.call(arguments,0);return t.normalize(i(s,function(c,f){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(s,c){function f(O){for(var _=0;_=0&&O[w]==="";w--);return _>w?[]:O.slice(_,w-_+1)}s=t.resolve(s).substr(1),c=t.resolve(c).substr(1);for(var h=f(s.split("/")),p=f(c.split("/")),g=Math.min(h.length,p.length),y=g,b=0;b=1;--g)if((c=s.charCodeAt(g))===47){if(!p){h=g;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"/":s.slice(0,h)},t.basename=function(s,c){var f=function(h){typeof h!="string"&&(h+="");var p,g=0,y=-1,b=!0;for(p=h.length-1;p>=0;--p)if(h.charCodeAt(p)===47){if(!b){g=p+1;break}}else y===-1&&(b=!1,y=p+1);return y===-1?"":h.slice(g,y)}(s);return c&&f.substr(-1*c.length)===c&&(f=f.substr(0,f.length-c.length)),f},t.extname=function(s){typeof s!="string"&&(s+="");for(var c=-1,f=0,h=-1,p=!0,g=0,y=s.length-1;y>=0;--y){var b=s.charCodeAt(y);if(b!==47)h===-1&&(p=!1,h=y+1),b===46?c===-1?c=y:g!==1&&(g=1):c!==-1&&(g=-1);else if(!p){f=y+1;break}}return c===-1||h===-1||g===0||g===1&&c===h-1&&c===f+1?"":s.slice(c,h)};var l="ab".substr(-1)==="b"?function(s,c,f){return s.substr(c,f)}:function(s,c,f){return c<0&&(c=s.length+c),s.substr(c,f)}}).call(this,n(13))},function(e,t,n){function r(l){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}var o={file:n(225),http:n(81),https:n(81)},i=(typeof window>"u"?"undefined":r(window))==="object"||typeof importScripts=="function"?o.http:o.file;typeof Promise>"u"&&n(83),e.exports.load=function(l,s){var c=Promise.resolve();return s===void 0&&(s={}),c=(c=c.then(function(){if(l===void 0)throw new TypeError("location is required");if(typeof l!="string")throw new TypeError("location must be a string");if(s!==void 0){if(r(s)!=="object")throw new TypeError("options must be an object");if(s.processContent!==void 0&&typeof s.processContent!="function")throw new TypeError("options.processContent must be a function")}})).then(function(){return new Promise(function(f,h){(function(p){var g=function(b){return b!==void 0&&(b=b.indexOf("://")===-1?"":b.split("://")[0]),b}(p),y=o[g];if(y===void 0){if(g!=="")throw new Error("Unsupported scheme: "+g);y=i}return y})(l).load(l,s||{},function(p,g){p?h(p):f(g)})})}).then(function(f){return s.processContent?new Promise(function(h,p){r(f)!=="object"&&(f={text:f}),f.location=l,s.processContent(f,function(g,y){g?p(g):h(y)})}):r(f)==="object"?f.text:f})}},function(e,t,n){var r=new TypeError("The 'file' scheme is not supported in the browser");e.exports.getBase=function(){throw r},e.exports.load=function(){var o=arguments[arguments.length-1];if(typeof o!="function")throw r;o(r)}},function(e,t,n){function r(k){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}var o;typeof window<"u"?o=window:typeof self<"u"?o=self:(console.warn("Using browser-only version of superagent in non-browser environment"),o=this);var i=n(227),l=n(228),s=n(82),c=n(229),f=n(231);function h(){}var p=t=e.exports=function(k,C){return typeof C=="function"?new t.Request("GET",k).end(C):arguments.length==1?new t.Request("GET",k):new t.Request(k,C)};t.Request=w,p.getXHR=function(){if(!(!o.XMLHttpRequest||o.location&&o.location.protocol=="file:"&&o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(k){return k.trim()}:function(k){return k.replace(/(^\s*|\s*$)/g,"")};function y(k){if(!s(k))return k;var C=[];for(var $ in k)b(C,$,k[$]);return C.join("&")}function b(k,C,$){if($!=null)if(Array.isArray($))$.forEach(function(U){b(k,C,U)});else if(s($))for(var L in $)b(k,C+"["+L+"]",$[L]);else k.push(encodeURIComponent(C)+"="+encodeURIComponent($));else $===null&&k.push(encodeURIComponent(C))}function E(k){for(var C,$,L={},U=k.split("&"),ce=0,z=U.length;ce=2&&k._responseTimeoutTimer&&clearTimeout(k._responseTimeoutTimer),K==4){var W;try{W=C.status}catch{W=0}if(!W)return k.timedout||k._aborted?void 0:k.crossDomainError();k.emit("end")}};var L=function(K,W){W.total>0&&(W.percent=W.loaded/W.total*100),W.direction=K,k.emit("progress",W)};if(this.hasListeners("progress"))try{C.onprogress=L.bind(null,"download"),C.upload&&(C.upload.onprogress=L.bind(null,"upload"))}catch{}try{this.username&&this.password?C.open(this.method,this.url,!0,this.username,this.password):C.open(this.method,this.url,!0)}catch(K){return this.callback(K)}if(this._withCredentials&&(C.withCredentials=!0),!this._formData&&this.method!="GET"&&this.method!="HEAD"&&typeof $!="string"&&!this._isHost($)){var U=this._header["content-type"],ce=this._serializer||p.serialize[U?U.split(";")[0]:""];!ce&&O(U)&&(ce=p.serialize["application/json"]),ce&&($=ce($))}for(var z in this.header)this.header[z]!=null&&this.header.hasOwnProperty(z)&&C.setRequestHeader(z,this.header[z]);return this._responseType&&(C.responseType=this._responseType),this.emit("request",this),C.send($!==void 0?$:null),this},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(k){f.prototype[k.toLowerCase()]=function(C,$){var L=new p.Request(k,C);return this._setDefaults(L),$&&L.end($),L}}),f.prototype.del=f.prototype.delete,p.get=function(k,C,$){var L=p("GET",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.head=function(k,C,$){var L=p("HEAD",k);return typeof C=="function"&&($=C,C=null),C&&L.query(C),$&&L.end($),L},p.options=function(k,C,$){var L=p("OPTIONS",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.del=S,p.delete=S,p.patch=function(k,C,$){var L=p("PATCH",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.post=function(k,C,$){var L=p("POST",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L},p.put=function(k,C,$){var L=p("PUT",k);return typeof C=="function"&&($=C,C=null),C&&L.send(C),$&&L.end($),L}},function(e,t,n){function r(o){if(o)return function(i){for(var l in r.prototype)i[l]=r.prototype[l];return i}(o)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(o,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+o]=this._callbacks["$"+o]||[]).push(i),this},r.prototype.once=function(o,i){function l(){this.off(o,l),i.apply(this,arguments)}return l.fn=i,this.on(o,l),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(o,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l,s=this._callbacks["$"+o];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+o],this;for(var c=0;c=this._maxRetries)return!1;if(this._retryCallback)try{var f=this._retryCallback(s,c);if(f===!0)return!0;if(f===!1)return!1}catch(h){console.error(h)}return!!(c&&c.status&&c.status>=500&&c.status!=501||s&&(s.code&&~l.indexOf(s.code)||s.timeout&&s.code=="ECONNABORTED"||s.crossDomain))},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(s,c){if(!this._fullfilledPromise){var f=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(h,p){f.end(function(g,y){g?p(g):h(y)})})}return this._fullfilledPromise.then(s,c)},i.prototype.catch=function(s){return this.then(void 0,s)},i.prototype.use=function(s){return s(this),this},i.prototype.ok=function(s){if(typeof s!="function")throw Error("Callback required");return this._okCallback=s,this},i.prototype._isResponseOK=function(s){return!!s&&(this._okCallback?this._okCallback(s):s.status>=200&&s.status<300)},i.prototype.get=function(s){return this._header[s.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(s,c){if(o(s)){for(var f in s)this.set(f,s[f]);return this}return this._header[s.toLowerCase()]=c,this.header[s]=c,this},i.prototype.unset=function(s){return delete this._header[s.toLowerCase()],delete this.header[s],this},i.prototype.field=function(s,c){if(s==null)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(s)){for(var f in s)this.field(f,s[f]);return this}if(Array.isArray(c)){for(var h in c)this.field(s,c[h]);return this}if(c==null)throw new Error(".field(name, val) val can not be empty");return typeof c=="boolean"&&(c=""+c),this._getFormData().append(s,c),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(s,c,f,h){switch(f.type){case"basic":this.set("Authorization","Basic "+h(s+":"+c));break;case"auto":this.username=s,this.password=c;break;case"bearer":this.set("Authorization","Bearer "+s)}return this},i.prototype.withCredentials=function(s){return s==null&&(s=!0),this._withCredentials=s,this},i.prototype.redirects=function(s){return this._maxRedirects=s,this},i.prototype.maxResponseSize=function(s){if(typeof s!="number")throw TypeError("Invalid argument");return this._maxResponseSize=s,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(s){var c=o(s),f=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),c&&!this._data)Array.isArray(s)?this._data=[]:this._isHost(s)||(this._data={});else if(s&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(c&&o(this._data))for(var h in s)this._data[h]=s[h];else typeof s=="string"?(f||this.type("form"),f=this._header["content-type"],this._data=f=="application/x-www-form-urlencoded"?this._data?this._data+"&"+s:s:(this._data||"")+s):this._data=s;return!c||this._isHost(s)||f||this.type("json"),this},i.prototype.sortQuery=function(s){return this._sort=s===void 0||s,this},i.prototype._finalizeQueryString=function(){var s=this._query.join("&");if(s&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+s),this._query.length=0,this._sort){var c=this.url.indexOf("?");if(c>=0){var f=this.url.substring(c+1).split("&");typeof this._sort=="function"?f.sort(this._sort):f.sort(),this.url=this.url.substring(0,c)+"?"+f.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(s,c,f){if(!this._aborted){var h=new Error(s+c+"ms exceeded");h.timeout=c,h.code="ECONNABORTED",h.errno=f,this.timedout=!0,this.abort(),this.callback(h)}},i.prototype._setTimeouts=function(){var s=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){s._timeoutError("Timeout of ",s._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){s._timeoutError("Response timeout of ",s._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){var r=n(230);function o(i){if(i)return function(l){for(var s in o.prototype)l[s]=o.prototype[s];return l}(i)}e.exports=o,o.prototype.get=function(i){return this.header[i.toLowerCase()]},o.prototype._setHeaderProperties=function(i){var l=i["content-type"]||"";this.type=r.type(l);var s=r.params(l);for(var c in s)this[c]=s[c];this.links={};try{i.link&&(this.links=r.parseLinks(i.link))}catch{}},o.prototype._setStatusProperties=function(i){var l=i/100|0;this.status=this.statusCode=i,this.statusType=l,this.info=l==1,this.ok=l==2,this.redirect=l==3,this.clientError=l==4,this.serverError=l==5,this.error=(l==4||l==5)&&this.toError(),this.created=i==201,this.accepted=i==202,this.noContent=i==204,this.badRequest=i==400,this.unauthorized=i==401,this.notAcceptable=i==406,this.forbidden=i==403,this.notFound=i==404,this.unprocessableEntity=i==422}},function(e,t,n){t.type=function(r){return r.split(/ *; */).shift()},t.params=function(r){return r.split(/ *; */).reduce(function(o,i){var l=i.split(/ *= */),s=l.shift(),c=l.shift();return s&&c&&(o[s]=c),o},{})},t.parseLinks=function(r){return r.split(/ *, */).reduce(function(o,i){var l=i.split(/ *; */),s=l[0].slice(1,-1);return o[l[1].split(/ *= */)[1].slice(1,-1)]=s,o},{})},t.cleanHeader=function(r,o){return delete r["content-type"],delete r["content-length"],delete r["transfer-encoding"],delete r.host,o&&(delete r.authorization,delete r.cookie),r}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(r){n.prototype[r]=function(){return this._defaults.push({fn:r,arguments}),this}}),n.prototype._setDefaults=function(r){this._defaults.forEach(function(o){r[o.fn].apply(r,o.arguments)})},e.exports=n},function(e,t,n){(function(r){var o=r!==void 0&&r||typeof self<"u"&&self||window,i=Function.prototype.apply;function l(s,c){this._id=s,this._clearFn=c}t.setTimeout=function(){return new l(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new l(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(s){s&&s.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(s,c){clearTimeout(s._idleTimeoutId),s._idleTimeout=c},t.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},t._unrefActive=t.active=function(s){clearTimeout(s._idleTimeoutId);var c=s._idleTimeout;c>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},c))},n(233),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(11))},function(e,t,n){(function(r,o){(function(i,l){if(!i.setImmediate){var s,c,f,h,p,g=1,y={},b=!1,E=i.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(i);O=O&&O.setTimeout?O:i,{}.toString.call(i.process)==="[object process]"?s=function(S){o.nextTick(function(){w(S)})}:function(){if(i.postMessage&&!i.importScripts){var S=!0,k=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=k,S}}()?(h="setImmediate$"+Math.random()+"$",p=function(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(h)===0&&w(+S.data.slice(h.length))},i.addEventListener?i.addEventListener("message",p,!1):i.attachEvent("onmessage",p),s=function(S){i.postMessage(h+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},s=function(S){f.port2.postMessage(S)}):E&&"onreadystatechange"in E.createElement("script")?(c=E.documentElement,s=function(S){var k=E.createElement("script");k.onreadystatechange=function(){w(S),k.onreadystatechange=null,c.removeChild(k),k=null},c.appendChild(k)}):s=function(S){setTimeout(w,0,S)},O.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),C=0;C"u"?r===void 0?this:r:self)}).call(this,n(11),n(13))},function(e,t,n){t.decode=t.parse=n(235),t.encode=t.stringify=n(236)},function(e,t,n){function r(i,l){return Object.prototype.hasOwnProperty.call(i,l)}e.exports=function(i,l,s,c){l=l||"&",s=s||"=";var f={};if(typeof i!="string"||i.length===0)return f;var h=/\+/g;i=i.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var g=i.length;p>0&&g>p&&(g=p);for(var y=0;y=0?(b=w.substr(0,S),E=w.substr(S+1)):(b=w,E=""),O=decodeURIComponent(b),_=decodeURIComponent(E),r(f,O)?o(f[O])?f[O].push(_):f[O]=[f[O],_]:f[O]=_}return f};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}},function(e,t,n){function r(c){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(c)}var o=function(c){switch(r(c)){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};e.exports=function(c,f,h,p){return f=f||"&",h=h||"=",c===null&&(c=void 0),r(c)==="object"?l(s(c),function(g){var y=encodeURIComponent(o(g))+h;return i(c[g])?l(c[g],function(b){return y+encodeURIComponent(o(b))}).join(f):y+encodeURIComponent(o(c[g]))}).join(f):p?encodeURIComponent(o(p))+h+encodeURIComponent(o(c)):""};var i=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function l(c,f){if(c.map)return c.map(f);for(var h=[],p=0;p1){R[0]=R[0].slice(0,-1);for(var q=R.length-1,V=1;V= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,L=String.fromCharCode;function U(A){throw new RangeError(C[A])}function ce(A,R){var I=A.split("@"),q="";I.length>1&&(q=I[0]+"@",A=I[1]);var V=function(de,ve){for(var Ge=[],st=de.length;st--;)Ge[st]=ve(de[st]);return Ge}((A=A.replace(k,".")).split("."),R).join(".");return q+V}function z(A){for(var R=[],I=0,q=A.length;I=55296&&V<=56319&&I>1,A+=$(A/R);A>455;q+=36)A=$(A/35);return $(q+36*A/(A+38))},ge=function(A){var R,I=[],q=A.length,V=0,de=128,ve=72,Ge=A.lastIndexOf("-");Ge<0&&(Ge=0);for(var st=0;st=128&&U("not-basic"),I.push(A.charCodeAt(st));for(var Re=Ge>0?Ge+1:0;Re=q&&U("invalid-input");var ut=(R=A.charCodeAt(Re++))-48<10?R-22:R-65<26?R-65:R-97<26?R-97:36;(ut>=36||ut>$((_-V)/lt))&&U("overflow"),V+=ut*lt;var Ht=Ft<=ve?1:Ft>=ve+26?26:Ft-ve;if(ut$(_/bt)&&U("overflow"),lt*=bt}var Tt=I.length+1;ve=W(V-ct,Tt,ct==0),$(V/Tt)>_-de&&U("overflow"),de+=$(V/Tt),V%=Tt,I.splice(V++,0,de)}return String.fromCodePoint.apply(String,I)},he=function(A){var R=[],I=(A=z(A)).length,q=128,V=0,de=72,ve=!0,Ge=!1,st=void 0;try{for(var Re,ct=A[Symbol.iterator]();!(ve=(Re=ct.next()).done);ve=!0){var lt=Re.value;lt<128&&R.push(L(lt))}}catch(Qe){Ge=!0,st=Qe}finally{try{!ve&&ct.return&&ct.return()}finally{if(Ge)throw st}}var Ft=R.length,ut=Ft;for(Ft&&R.push("-");ut=q&&Zn$((_-V)/vn)&&U("overflow"),V+=(Ht-q)*vn,q=Ht;var Xt=!0,Wr=!1,hr=void 0;try{for(var pi,ht=A[Symbol.iterator]();!(Xt=(pi=ht.next()).done);Xt=!0){var mt=pi.value;if(mt_&&U("overflow"),mt==q){for(var ke=V,F=36;;F+=36){var ae=F<=de?1:F>=de+26?26:F-de;if(ke>6|192).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase():"%"+(R>>12|224).toString(16).toUpperCase()+"%"+(R>>6&63|128).toString(16).toUpperCase()+"%"+(63&R|128).toString(16).toUpperCase()}function ne(A){for(var R="",I=0,q=A.length;I=194&&V<224){if(q-I>=6){var de=parseInt(A.substr(I+4,2),16);R+=String.fromCharCode((31&V)<<6|63&de)}else R+=A.substr(I,6);I+=6}else if(V>=224){if(q-I>=9){var ve=parseInt(A.substr(I+4,2),16),Ge=parseInt(A.substr(I+7,2),16);R+=String.fromCharCode((15&V)<<12|(63&ve)<<6|63&Ge)}else R+=A.substr(I,9);I+=9}else R+=A.substr(I,3),I+=3}return R}function _e(A,R){function I(q){var V=ne(q);return V.match(R.UNRESERVED)?V:q}return A.scheme&&(A.scheme=String(A.scheme).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(R.PCT_ENCODED,I).replace(R.NOT_USERINFO,X).replace(R.PCT_ENCODED,g)),A.host!==void 0&&(A.host=String(A.host).replace(R.PCT_ENCODED,I).toLowerCase().replace(R.NOT_HOST,X).replace(R.PCT_ENCODED,g)),A.path!==void 0&&(A.path=String(A.path).replace(R.PCT_ENCODED,I).replace(A.scheme?R.NOT_PATH:R.NOT_PATH_NOSCHEME,X).replace(R.PCT_ENCODED,g)),A.query!==void 0&&(A.query=String(A.query).replace(R.PCT_ENCODED,I).replace(R.NOT_QUERY,X).replace(R.PCT_ENCODED,g)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(R.PCT_ENCODED,I).replace(R.NOT_FRAGMENT,X).replace(R.PCT_ENCODED,g)),A}function N(A){return A.replace(/^0*(.*)/,"$1")||"0"}function G(A,R){var I=A.match(R.IPV4ADDRESS)||[],q=O(I,2)[1];return q?q.split(".").map(N).join("."):A}function oe(A,R){var I=A.match(R.IPV6ADDRESS)||[],q=O(I,3),V=q[1],de=q[2];if(V){for(var ve=V.toLowerCase().split("::").reverse(),Ge=O(ve,2),st=Ge[0],Re=Ge[1],ct=Re?Re.split(":").map(N):[],lt=st.split(":").map(N),Ft=R.IPV4ADDRESS.test(lt[lt.length-1]),ut=Ft?7:8,Ht=lt.length-ut,bt=Array(ut),Tt=0;Tt1){var pr=bt.slice(0,bn.index),Zn=bt.slice(bn.index+bn.length);Un=pr.join(":")+"::"+Zn.join(":")}else Un=bt.join(":");return de&&(Un+="%"+de),Un}return A}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie="".match(/(){0}/)[1]===void 0;function re(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I={},q=R.iri!==!1?E:b;R.reference==="suffix"&&(A=(R.scheme?R.scheme+":":"")+"//"+A);var V=A.match(Z);if(V){ie?(I.scheme=V[1],I.userinfo=V[3],I.host=V[4],I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=V[7],I.fragment=V[8],isNaN(I.port)&&(I.port=V[5])):(I.scheme=V[1]||void 0,I.userinfo=A.indexOf("@")!==-1?V[3]:void 0,I.host=A.indexOf("//")!==-1?V[4]:void 0,I.port=parseInt(V[5],10),I.path=V[6]||"",I.query=A.indexOf("?")!==-1?V[7]:void 0,I.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(I.port)&&(I.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),I.host&&(I.host=oe(G(I.host,q),q)),I.scheme!==void 0||I.userinfo!==void 0||I.host!==void 0||I.port!==void 0||I.path||I.query!==void 0?I.scheme===void 0?I.reference="relative":I.fragment===void 0?I.reference="absolute":I.reference="uri":I.reference="same-document",R.reference&&R.reference!=="suffix"&&R.reference!==I.reference&&(I.error=I.error||"URI is not a "+R.reference+" reference.");var de=Be[(R.scheme||I.scheme||"").toLowerCase()];if(R.unicodeSupport||de&&de.unicodeSupport)_e(I,q);else{if(I.host&&(R.domainHost||de&&de.domainHost))try{I.host=be(I.host.replace(q.PCT_ENCODED,ne).toLowerCase())}catch(ve){I.error=I.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}_e(I,b)}de&&de.parse&&de.parse(I,R)}else I.error=I.error||"URI can not be parsed.";return I}function Se(A,R){var I=R.iri!==!1?E:b,q=[];return A.userinfo!==void 0&&(q.push(A.userinfo),q.push("@")),A.host!==void 0&&q.push(oe(G(String(A.host),I),I).replace(I.IPV6ADDRESS,function(V,de,ve){return"["+de+(ve?"%25"+ve:"")+"]"})),typeof A.port=="number"&&(q.push(":"),q.push(A.port.toString(10))),q.length?q.join(""):void 0}var Pe=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Ke=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function xe(A){for(var R=[];A.length;)if(A.match(Pe))A=A.replace(Pe,"");else if(A.match(Fe))A=A.replace(Fe,"/");else if(A.match(Ke))A=A.replace(Ke,"/"),R.pop();else if(A==="."||A==="..")A="";else{var I=A.match(He);if(!I)throw new Error("Unexpected dot segment condition");var q=I[0];A=A.slice(q.length),R.push(q)}return R.join("")}function Xe(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=R.iri?E:b,q=[],V=Be[(R.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,R),A.host&&!I.IPV6ADDRESS.test(A.host)){if(R.domainHost||V&&V.domainHost)try{A.host=R.iri?De(A.host):be(A.host.replace(I.PCT_ENCODED,ne).toLowerCase())}catch(Ge){A.error=A.error||"Host's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+Ge}}_e(A,I),R.reference!=="suffix"&&A.scheme&&(q.push(A.scheme),q.push(":"));var de=Se(A,R);if(de!==void 0&&(R.reference!=="suffix"&&q.push("//"),q.push(de),A.path&&A.path.charAt(0)!=="/"&&q.push("/")),A.path!==void 0){var ve=A.path;R.absolutePath||V&&V.absolutePath||(ve=xe(ve)),de===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),q.push(ve)}return A.query!==void 0&&(q.push("?"),q.push(A.query)),A.fragment!==void 0&&(q.push("#"),q.push(A.fragment)),q.join("")}function rt(A,R){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],V={};return q||(A=re(Xe(A,I),I),R=re(Xe(R,I),I)),!(I=I||{}).tolerant&&R.scheme?(V.scheme=R.scheme,V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(V.userinfo=R.userinfo,V.host=R.host,V.port=R.port,V.path=xe(R.path||""),V.query=R.query):(R.path?(R.path.charAt(0)==="/"?V.path=xe(R.path):(A.userinfo===void 0&&A.host===void 0&&A.port===void 0||A.path?A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+R.path:V.path=R.path:V.path="/"+R.path,V.path=xe(V.path)),V.query=R.query):(V.path=A.path,R.query!==void 0?V.query=R.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=R.fragment,V}function Ie(A,R){return A&&A.toString().replace(R&&R.iri?E.PCT_ENCODED:b.PCT_ENCODED,ne)}var Ze={scheme:"http",domainHost:!0,parse:function(A,R){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,R){return A.port!==(String(A.scheme).toLowerCase()!=="https"?80:443)&&A.port!==""||(A.port=void 0),A.path||(A.path="/"),A}},gt={scheme:"https",domainHost:Ze.domainHost,parse:Ze.parse,serialize:Ze.serialize},Mt={},jt="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",yt="[0-9A-Fa-f]",kt=h(h("%[EFef][0-9A-Fa-f]%"+yt+yt+"%"+yt+yt)+"|"+h("%[89A-Fa-f][0-9A-Fa-f]%"+yt+yt)+"|"+h("%"+yt+yt)),$e=f("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Bt=new RegExp(jt,"g"),se=new RegExp(kt,"g"),Oe=new RegExp(f("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',$e),"g"),pt=new RegExp(f("[^]",jt,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Rt=pt;function Yt(A){var R=ne(A);return R.match(Bt)?R:A}var Pn={scheme:"mailto",parse:function(A,R){var I=A,q=I.to=I.path?I.path.split(","):[];if(I.path=void 0,I.query){for(var V=!1,de={},ve=I.query.split("&"),Ge=0,st=ve.length;Get.resolved)}const Dc=e=>typeof e=="object"&&e!==null&&e.toString()==={}.toString(),ff=e=>JSON.parse(JSON.stringify(e)),Dg=(e,t)=>{e=ff(e);for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],o=e[n];Dc(r)&&Dc(o)?e[n]=Dg(o,r):e[n]=r}return e},Bx=function(e,t){const n=e.replace(/^#\/definitions\//,"").split("/"),r=function(i,l){const s=i.shift();return s?l[s]?i.length?r(i,l[s]):l[s]:{}:{}},o=r(n,t);return Dc(o)?ff(o):o},RL=function(e,t){const n=e.length;let r=-1,o={};for(;++r{if(typeof e.default<"u")return e.default;if(typeof e.allOf<"u"){const n=RL(e.allOf,t);return aa(n,t)}else if(typeof e.$ref<"u"){const n=Bx(e.$ref,t);return aa(n,t)}else if(e.type==="object"){if(!e.properties)return{};for(const n in e.properties)e.properties.hasOwnProperty(n)&&(e.properties[n]=aa(e.properties[n],t),typeof e.properties[n]>"u"&&delete e.properties[n]);return e.properties}else if(e.type==="array"){if(!e.items)return[];const n=e.minItems||0;if(e.items.constructor===Array){const o=e.items.map(i=>aa(i,t));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>n&&o.pop();return o.every(i=>typeof i>"u")?void 0:o}const r=aa(e.items,t);if(typeof r>"u")return[];{const o=[];for(let i=0;i"u"?t=e.definitions||{}:Dc(e.definitions)&&(t=Dg(t,e.definitions)),aa(ff(e),t)}function NL(){const[e,t]=j.useState({configSchema:null,configDefaults:null});return j.useEffect(()=>{async function n(){const r=await fetch("/runs/config_schema").then(o=>o.json()).then(PL);t({configSchema:r,configDefaults:$L(r)})}n()},[]),e}async function DL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function IL(e){let t,n,r,o=!1;return function(l){t===void 0?(t=l,n=0,r=-1):t=ML(t,l);const s=t.length;let c=0;for(;n0){const c=o.decode(l.subarray(0,s)),f=s+(l[s+1]===32?2:1),h=o.decode(l.subarray(f));switch(c){case"data":r.data=r.data?r.data+` -`+h:h;break;case"event":r.event=h;break;case"id":e(r.id=h);break;case"retry":const p=parseInt(h,10);isNaN(p)||t(r.retry=p);break}}}}function ML(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function o1(){return{data:"",event:"",id:"",retry:void 0}}var FL=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const y=Object.assign({},r);y.accept||(y.accept=_h);let b;function E(){b.abort(),document.hidden||C()}c||document.addEventListener("visibilitychange",E);let O=zL,_=0;function w(){document.removeEventListener("visibilitychange",E),window.clearTimeout(_),b.abort()}n==null||n.addEventListener("abort",()=>{w(),p()});const S=f??window.fetch,k=o??BL;async function C(){var $;b=new AbortController;try{const L=await S(e,Object.assign(Object.assign({},h),{headers:y,signal:b.signal}));await k(L),await DL(L.body,IL(LL(U=>{U?y[i1]=U:delete y[i1]},U=>{O=U},i))),l==null||l(),w(),p()}catch(L){if(!b.signal.aborted)try{const U=($=s==null?void 0:s(L))!==null&&$!==void 0?$:O;window.clearTimeout(_),_=window.setTimeout(C,U)}catch(U){w(),g(U)}}}C()})}function BL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(_h)))throw new Error(`Expected content-type to be ${_h}, Actual: ${t}`)}function HL(){const[e,t]=j.useState(null),[n,r]=j.useState(null),o=j.useCallback(async(l,s,c)=>{const f=new AbortController;r(f),t({status:"inflight",messages:l.messages,merge:!0}),await UL("/runs",{signal:f.signal,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:l,assistant_id:s,thread_id:c,stream:!0}),onmessage(h){if(h.event==="data"){const{messages:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:p,run_id:g==null?void 0:g.run_id}))}else if(h.event==="metadata"){const{run_id:p}=JSON.parse(h.data);t(g=>({status:"inflight",messages:g==null?void 0:g.messages,run_id:p}))}else h.event==="error"&&t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id}))},onclose(){t(h=>({status:(h==null?void 0:h.status)==="error"?h.status:"done",messages:h==null?void 0:h.messages,run_id:h==null?void 0:h.run_id,merge:h==null?void 0:h.merge})),r(null)},onerror(h){throw t(p=>({status:"error",messages:p==null?void 0:p.messages,run_id:p==null?void 0:p.run_id,merge:p==null?void 0:p.merge})),r(null),h}})},[]),i=j.useCallback((l=!1)=>{n==null||n.abort(),r(null),l&&t(null)},[n]);return{startStream:o,stopStream:i,stream:e}}function WL(e,t){if(e=e??[],!Array.isArray(t)){const n=t;t=[...e.filter(r=>r.assistant_id!==n.assistant_id),n]}return Ux(t,"updated_at","desc")}function GL(){const[e,t]=j.useReducer(WL,null),[n,r]=j.useState(null);j.useEffect(()=>{async function l(){const c=new URLSearchParams(window.location.search).get("shared_id"),[f,h]=await Promise.all([fetch("/assistants/",{headers:{Accept:"application/json"}}).then(p=>p.json()).then(p=>p.map(g=>({...g,mine:!0}))),fetch("/assistants/public/"+(c?`?shared_id=${c}`:""),{headers:{Accept:"application/json"}}).then(p=>p.json())]);t(f.concat(h)),h.find(p=>p.assistant_id===c)&&r(c)}l()},[]);const o=j.useCallback(async(l,s,c,f,h=crypto.randomUUID())=>{const p=c.reduce((y,b)=>(y.append("files",b),y),new FormData);p.append("config",JSON.stringify({configurable:{assistant_id:h}}));const[g]=await Promise.all([fetch(`/assistants/${h}`,{method:"PUT",body:JSON.stringify({name:l,config:s,public:f}),headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(y=>y.json()),c.length?fetch("/ingest",{method:"POST",body:p}):Promise.resolve()]);t({...g,mine:!0}),r(g.assistant_id)},[]),i=j.useCallback(l=>{r(l)},[]);return{configs:e,currentConfig:(e==null?void 0:e.find(l=>l.assistant_id===n))||null,saveConfig:o,enterConfig:i}}function VL(){const[e,t]=j.useState(!1),{configSchema:n,configDefaults:r}=NL(),{chats:o,currentChat:i,createChat:l,enterChat:s}=AL(),{configs:c,currentConfig:f,saveConfig:h,enterConfig:p}=GL(),{startStream:g,stopStream:y,stream:b}=HL(),E=j.useCallback(async(k,C=i)=>{var L;!C||!((L=c==null?void 0:c.find(U=>U.assistant_id===C.assistant_id))!=null&&L.config)||await g({messages:[{content:k,additional_kwargs:{},type:"human",example:!1}]},C.assistant_id,C.thread_id)},[i,g,c]),O=j.useCallback(async k=>{if(!f)return;const C=await l(k,f.assistant_id);return E(k,C)},[l,E,f]),_=j.useCallback(async k=>{i&&(y==null||y(!0)),s(k),e&&t(!1)},[s,y,e,i]),w=i?M.jsx(_C,{chat:i,startStream:E,stopStream:y,stream:b}):M.jsx(Cj,{startChat:O,configSchema:n,configDefaults:r,configs:c,currentConfig:f,saveConfig:h,enterConfig:p}),S=c==null?void 0:c.find(k=>k.assistant_id===(i==null?void 0:i.assistant_id));return M.jsx(mA,{subtitle:S?M.jsxs("span",{className:"inline-flex gap-1 items-center",children:[S.name,M.jsx(q2,{className:"h-5 w-5 cursor-pointer text-indigo-600",onClick:()=>{s(null),p(S.assistant_id)}})]}):null,sidebarOpen:e,setSidebarOpen:t,sidebar:M.jsx(xC,{chats:j.useMemo(()=>c===null||o===null?null:o.filter(k=>c.some(C=>C.assistant_id===k.assistant_id)),[o,c]),currentChat:i,enterChat:_}),children:n?w:null})}document.cookie.indexOf("user_id")===-1&&(document.cookie=`opengpts_user_id=${crypto.randomUUID()}`);ap.createRoot(document.getElementById("root")).render(M.jsx(VL,{})); diff --git a/backend/ui/index.html b/backend/ui/index.html deleted file mode 100644 index a9626b61..00000000 --- a/backend/ui/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - OpenGPTs - - - - - -
    - - -