@waniwani/sdk 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/embed.js +62 -62
- package/dist/chat/embed.js.map +1 -1
- package/dist/chat/express-js/index.d.ts +17 -8
- package/dist/chat/index.d.ts +259 -0
- package/dist/chat/index.js +7 -7
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/next-js/index.d.ts +17 -8
- package/dist/chunk-GYLVCP7M.js +3 -0
- package/dist/chunk-GYLVCP7M.js.map +1 -0
- package/dist/index.d.ts +88 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/chat/express-js/index.d.ts +17 -8
- package/dist/legacy/chat/next-js/index.d.ts +17 -8
- package/dist/legacy/index.d.ts +39 -8
- package/dist/legacy/index.js +11 -11
- package/dist/legacy/index.js.map +1 -1
- package/dist/mcp/index.d.ts +43 -14
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/react.d.ts +281 -50
- package/dist/mcp/react.js +7 -7
- package/dist/mcp/react.js.map +1 -1
- package/dist/widget-client-4MBLDRHD.js +3 -0
- package/dist/widget-client-4MBLDRHD.js.map +1 -0
- package/package.json +1 -1
package/dist/chat/embed.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";var WaniWaniChatEmbed=(()=>{var rD=Object.create;var yu=Object.defineProperty;var oD=Object.getOwnPropertyDescriptor;var lD=Object.getOwnPropertyNames;var iD=Object.getPrototypeOf,sD=Object.prototype.hasOwnProperty;var uD=(e,t,a)=>t in e?yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var I=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wu=(e,t)=>{for(var a in t)yu(e,a,{get:t[a],enumerable:!0})},cD=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of lD(t))!sD.call(e,r)&&r!==a&&yu(e,r,{get:()=>t[r],enumerable:!(n=oD(t,r))||n.enumerable});return e};var q=(e,t,a)=>(a=e!=null?rD(iD(e)):{},cD(t||!e||!e.__esModule?yu(a,"default",{value:e,enumerable:!0}):a,e));var _e=(e,t,a)=>uD(e,typeof t!="symbol"?t+"":t,a);var sx=Wt(se=>{"use strict";var $f=Symbol.for("react.transitional.element"),dD=Symbol.for("react.portal"),fD=Symbol.for("react.fragment"),pD=Symbol.for("react.strict_mode"),mD=Symbol.for("react.profiler"),hD=Symbol.for("react.consumer"),gD=Symbol.for("react.context"),yD=Symbol.for("react.forward_ref"),wD=Symbol.for("react.suspense"),xD=Symbol.for("react.memo"),ax=Symbol.for("react.lazy"),vD=Symbol.for("react.activity"),Yw=Symbol.iterator;function bD(e){return e===null||typeof e!="object"?null:(e=Yw&&e[Yw]||e["@@iterator"],typeof e=="function"?e:null)}var nx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rx=Object.assign,ox={};function jo(e,t,a){this.props=e,this.context=t,this.refs=ox,this.updater=a||nx}jo.prototype.isReactComponent={};jo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lx(){}lx.prototype=jo.prototype;function Wf(e,t,a){this.props=e,this.context=t,this.refs=ox,this.updater=a||nx}var Xf=Wf.prototype=new lx;Xf.constructor=Wf;rx(Xf,jo.prototype);Xf.isPureReactComponent=!0;var Jw=Array.isArray;function Gf(){}var lt={H:null,A:null,T:null,S:null},ix=Object.prototype.hasOwnProperty;function Zf(e,t,a){var n=a.ref;return{$$typeof:$f,type:e,key:t,ref:n!==void 0?n:null,props:a}}function SD(e,t){return Zf(e.type,t,e.props)}function Qf(e){return typeof e=="object"&&e!==null&&e.$$typeof===$f}function CD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var ex=/\/+/g;function Vf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?CD(""+e.key):t.toString(36)}function ID(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Gf,Gf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ho(e,t,a,n,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case $f:case dD:l=!0;break;case ax:return l=e._init,Ho(l(e._payload),t,a,n,r)}}if(l)return r=r(e),l=n===""?"."+Vf(e,0):n,Jw(r)?(a="",l!=null&&(a=l.replace(ex,"$&/")+"/"),Ho(r,t,a,"",function(u){return u})):r!=null&&(Qf(r)&&(r=SD(r,a+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(ex,"$&/")+"/")+l)),t.push(r)),1;l=0;var i=n===""?".":n+":";if(Jw(e))for(var s=0;s<e.length;s++)n=e[s],o=i+Vf(n,s),l+=Ho(n,t,a,o,r);else if(s=bD(e),typeof s=="function")for(e=s.call(e),s=0;!(n=e.next()).done;)n=n.value,o=i+Vf(n,s++),l+=Ho(n,t,a,o,r);else if(o==="object"){if(typeof e.then=="function")return Ho(ID(e),t,a,n,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function xu(e,t,a){if(e==null)return e;var n=[],r=0;return Ho(e,n,"","",function(o){return t.call(a,o,r++)}),n}function LD(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var tx=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},kD={map:xu,forEach:function(e,t,a){xu(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return xu(e,function(){t++}),t},toArray:function(e){return xu(e,function(t){return t})||[]},only:function(e){if(!Qf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Activity=vD;se.Children=kD;se.Component=jo;se.Fragment=fD;se.Profiler=mD;se.PureComponent=Wf;se.StrictMode=pD;se.Suspense=wD;se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=lt;se.__COMPILER_RUNTIME={__proto__:null,c:function(e){return lt.H.useMemoCache(e)}};se.cache=function(e){return function(){return e.apply(null,arguments)}};se.cacheSignal=function(){return null};se.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=rx({},e.props),r=e.key;if(t!=null)for(o in t.key!==void 0&&(r=""+t.key),t)!ix.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(n[o]=t[o]);var o=arguments.length-2;if(o===1)n.children=a;else if(1<o){for(var l=Array(o),i=0;i<o;i++)l[i]=arguments[i+2];n.children=l}return Zf(e.type,r,n)};se.createContext=function(e){return e={$$typeof:gD,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:hD,_context:e},e};se.createElement=function(e,t,a){var n,r={},o=null;if(t!=null)for(n in t.key!==void 0&&(o=""+t.key),t)ix.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(r[n]=t[n]);var l=arguments.length-2;if(l===1)r.children=a;else if(1<l){for(var i=Array(l),s=0;s<l;s++)i[s]=arguments[s+2];r.children=i}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)r[n]===void 0&&(r[n]=l[n]);return Zf(e,o,r)};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:yD,render:e}};se.isValidElement=Qf;se.lazy=function(e){return{$$typeof:ax,_payload:{_status:-1,_result:e},_init:LD}};se.memo=function(e,t){return{$$typeof:xD,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=lt.T,a={};lt.T=a;try{var n=e(),r=lt.S;r!==null&&r(a,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Gf,tx)}catch(o){tx(o)}finally{t!==null&&a.types!==null&&(t.types=a.types),lt.T=t}};se.unstable_useCacheRefresh=function(){return lt.H.useCacheRefresh()};se.use=function(e){return lt.H.use(e)};se.useActionState=function(e,t,a){return lt.H.useActionState(e,t,a)};se.useCallback=function(e,t){return lt.H.useCallback(e,t)};se.useContext=function(e){return lt.H.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e,t){return lt.H.useDeferredValue(e,t)};se.useEffect=function(e,t){return lt.H.useEffect(e,t)};se.useEffectEvent=function(e){return lt.H.useEffectEvent(e)};se.useId=function(){return lt.H.useId()};se.useImperativeHandle=function(e,t,a){return lt.H.useImperativeHandle(e,t,a)};se.useInsertionEffect=function(e,t){return lt.H.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return lt.H.useLayoutEffect(e,t)};se.useMemo=function(e,t){return lt.H.useMemo(e,t)};se.useOptimistic=function(e,t){return lt.H.useOptimistic(e,t)};se.useReducer=function(e,t,a){return lt.H.useReducer(e,t,a)};se.useRef=function(e){return lt.H.useRef(e)};se.useState=function(e){return lt.H.useState(e)};se.useSyncExternalStore=function(e,t,a){return lt.H.useSyncExternalStore(e,t,a)};se.useTransition=function(){return lt.H.useTransition()};se.version="19.2.4"});var Ae=Wt((j9,ux)=>{"use strict";ux.exports=sx()});var xx=Wt(dt=>{"use strict";function ep(e,t){var a=e.length;e.push(t);e:for(;0<a;){var n=a-1>>>1,r=e[n];if(0<vu(r,t))e[n]=t,e[a]=r,a=n;else break e}}function cn(e){return e.length===0?null:e[0]}function Su(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,r=e.length,o=r>>>1;n<o;){var l=2*(n+1)-1,i=e[l],s=l+1,u=e[s];if(0>vu(i,a))s<r&&0>vu(u,i)?(e[n]=u,e[s]=a,n=s):(e[n]=i,e[l]=a,n=l);else if(s<r&&0>vu(u,a))e[n]=u,e[s]=a,n=s;else break e}}return t}function vu(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}dt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(cx=performance,dt.unstable_now=function(){return cx.now()}):(Kf=Date,dx=Kf.now(),dt.unstable_now=function(){return Kf.now()-dx});var cx,Kf,dx,Tn=[],lr=[],TD=1,Pa=null,Xt=3,tp=!1,li=!1,ii=!1,ap=!1,mx=typeof setTimeout=="function"?setTimeout:null,hx=typeof clearTimeout=="function"?clearTimeout:null,fx=typeof setImmediate<"u"?setImmediate:null;function bu(e){for(var t=cn(lr);t!==null;){if(t.callback===null)Su(lr);else if(t.startTime<=e)Su(lr),t.sortIndex=t.expirationTime,ep(Tn,t);else break;t=cn(lr)}}function np(e){if(ii=!1,bu(e),!li)if(cn(Tn)!==null)li=!0,Go||(Go=!0,Vo());else{var t=cn(lr);t!==null&&rp(np,t.startTime-e)}}var Go=!1,si=-1,gx=5,yx=-1;function wx(){return ap?!0:!(dt.unstable_now()-yx<gx)}function Yf(){if(ap=!1,Go){var e=dt.unstable_now();yx=e;var t=!0;try{e:{li=!1,ii&&(ii=!1,hx(si),si=-1),tp=!0;var a=Xt;try{t:{for(bu(e),Pa=cn(Tn);Pa!==null&&!(Pa.expirationTime>e&&wx());){var n=Pa.callback;if(typeof n=="function"){Pa.callback=null,Xt=Pa.priorityLevel;var r=n(Pa.expirationTime<=e);if(e=dt.unstable_now(),typeof r=="function"){Pa.callback=r,bu(e),t=!0;break t}Pa===cn(Tn)&&Su(Tn),bu(e)}else Su(Tn);Pa=cn(Tn)}if(Pa!==null)t=!0;else{var o=cn(lr);o!==null&&rp(np,o.startTime-e),t=!1}}break e}finally{Pa=null,Xt=a,tp=!1}t=void 0}}finally{t?Vo():Go=!1}}}var Vo;typeof fx=="function"?Vo=function(){fx(Yf)}:typeof MessageChannel<"u"?(Jf=new MessageChannel,px=Jf.port2,Jf.port1.onmessage=Yf,Vo=function(){px.postMessage(null)}):Vo=function(){mx(Yf,0)};var Jf,px;function rp(e,t){si=mx(function(){e(dt.unstable_now())},t)}dt.unstable_IdlePriority=5;dt.unstable_ImmediatePriority=1;dt.unstable_LowPriority=4;dt.unstable_NormalPriority=3;dt.unstable_Profiling=null;dt.unstable_UserBlockingPriority=2;dt.unstable_cancelCallback=function(e){e.callback=null};dt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):gx=0<e?Math.floor(1e3/e):5};dt.unstable_getCurrentPriorityLevel=function(){return Xt};dt.unstable_next=function(e){switch(Xt){case 1:case 2:case 3:var t=3;break;default:t=Xt}var a=Xt;Xt=t;try{return e()}finally{Xt=a}};dt.unstable_requestPaint=function(){ap=!0};dt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=Xt;Xt=e;try{return t()}finally{Xt=a}};dt.unstable_scheduleCallback=function(e,t,a){var n=dt.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?n+a:n):a=n,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=a+r,e={id:TD++,callback:t,priorityLevel:e,startTime:a,expirationTime:r,sortIndex:-1},a>n?(e.sortIndex=a,ep(lr,e),cn(Tn)===null&&e===cn(lr)&&(ii?(hx(si),si=-1):ii=!0,rp(np,a-n))):(e.sortIndex=r,ep(Tn,e),li||tp||(li=!0,Go||(Go=!0,Vo()))),e};dt.unstable_shouldYield=wx;dt.unstable_wrapCallback=function(e){var t=Xt;return function(){var a=Xt;Xt=t;try{return e.apply(this,arguments)}finally{Xt=a}}}});var bx=Wt((G9,vx)=>{"use strict";vx.exports=xx()});var Cx=Wt(Jt=>{"use strict";var AD=Ae();function Sx(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ir(){}var Yt={d:{f:ir,r:function(){throw Error(Sx(522))},D:ir,C:ir,L:ir,m:ir,X:ir,S:ir,M:ir},p:0,findDOMNode:null},MD=Symbol.for("react.portal");function ED(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:MD,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var ui=AD.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Cu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;Jt.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Sx(299));return ED(e,t,null,a)};Jt.flushSync=function(e){var t=ui.T,a=Yt.p;try{if(ui.T=null,Yt.p=2,e)return e()}finally{ui.T=t,Yt.p=a,Yt.d.f()}};Jt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};Jt.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};Jt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=Cu(a,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,o=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:r,fetchPriority:o}):a==="script"&&Yt.d.X(e,{crossOrigin:n,integrity:r,fetchPriority:o,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Jt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=Cu(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};Jt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=Cu(a,t.crossOrigin);Yt.d.L(e,a,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Jt.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=Cu(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};Jt.requestFormReset=function(e){Yt.d.r(e)};Jt.unstable_batchedUpdates=function(e,t){return e(t)};Jt.useFormState=function(e,t,a){return ui.H.useFormState(e,t,a)};Jt.useFormStatus=function(){return ui.H.useHostTransitionStatus()};Jt.version="19.2.4"});var kx=Wt((W9,Lx)=>{"use strict";function Ix(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ix)}catch(e){console.error(e)}}Ix(),Lx.exports=Cx()});var U0=Wt(Xc=>{"use strict";var _t=bx(),Yv=Ae(),RD=kx();function P(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Jv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zi(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function eb(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function tb(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Tx(e){if(Zi(e)!==e)throw Error(P(188))}function DD(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(P(188));return t!==e?null:e}for(var a=e,n=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(n=r.return,n!==null){a=n;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return Tx(r),e;if(o===n)return Tx(r),t;o=o.sibling}throw Error(P(188))}if(a.return!==n.return)a=r,n=o;else{for(var l=!1,i=r.child;i;){if(i===a){l=!0,a=r,n=o;break}if(i===n){l=!0,n=r,a=o;break}i=i.sibling}if(!l){for(i=o.child;i;){if(i===a){l=!0,a=o,n=r;break}if(i===n){l=!0,n=o,a=r;break}i=i.sibling}if(!l)throw Error(P(189))}}if(a.alternate!==n)throw Error(P(190))}if(a.tag!==3)throw Error(P(188));return a.stateNode.current===a?e:t}function ab(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ab(e),t!==null)return t;e=e.sibling}return null}var ut=Object.assign,_D=Symbol.for("react.element"),Iu=Symbol.for("react.transitional.element"),yi=Symbol.for("react.portal"),Ko=Symbol.for("react.fragment"),nb=Symbol.for("react.strict_mode"),Up=Symbol.for("react.profiler"),rb=Symbol.for("react.consumer"),Pn=Symbol.for("react.context"),_m=Symbol.for("react.forward_ref"),zp=Symbol.for("react.suspense"),qp=Symbol.for("react.suspense_list"),Om=Symbol.for("react.memo"),sr=Symbol.for("react.lazy"),Fp=Symbol.for("react.activity"),OD=Symbol.for("react.memo_cache_sentinel"),Ax=Symbol.iterator;function ci(e){return e===null||typeof e!="object"?null:(e=Ax&&e[Ax]||e["@@iterator"],typeof e=="function"?e:null)}var PD=Symbol.for("react.client.reference");function Hp(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===PD?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ko:return"Fragment";case Up:return"Profiler";case nb:return"StrictMode";case zp:return"Suspense";case qp:return"SuspenseList";case Fp:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case yi:return"Portal";case Pn:return e.displayName||"Context";case rb:return(e._context.displayName||"Context")+".Consumer";case _m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Om:return t=e.displayName||null,t!==null?t:Hp(e.type)||"Memo";case sr:t=e._payload,e=e._init;try{return Hp(e(t))}catch{}}return null}var wi=Array.isArray,ne=Yv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qe=RD.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ao={pending:!1,data:null,method:null,action:null},jp=[],Yo=-1;function hn(e){return{current:e}}function zt(e){0>Yo||(e.current=jp[Yo],jp[Yo]=null,Yo--)}function ot(e,t){Yo++,jp[Yo]=e.current,e.current=t}var mn=hn(null),Pi=hn(null),xr=hn(null),nc=hn(null);function rc(e,t){switch(ot(xr,t),ot(Pi,e),ot(mn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pv(t),e=I0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}zt(mn),ot(mn,e)}function gl(){zt(mn),zt(Pi),zt(xr)}function Vp(e){e.memoizedState!==null&&ot(nc,e);var t=mn.current,a=I0(t,e.type);t!==a&&(ot(Pi,e),ot(mn,a))}function oc(e){Pi.current===e&&(zt(mn),zt(Pi)),nc.current===e&&(zt(nc),$i._currentValue=ao)}var op,Mx;function Yr(e){if(op===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);op=t&&t[1]||"",Mx=-1<a.stack.indexOf(`
|
|
1
|
+
"use strict";var WaniWaniChatEmbed=(()=>{var LD=Object.create;var vu=Object.defineProperty;var TD=Object.getOwnPropertyDescriptor;var AD=Object.getOwnPropertyNames;var MD=Object.getPrototypeOf,ED=Object.prototype.hasOwnProperty;var RD=(e,t,a)=>t in e?vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var C=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bu=(e,t)=>{for(var a in t)vu(e,a,{get:t[a],enumerable:!0})},DD=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of AD(t))!ED.call(e,r)&&r!==a&&vu(e,r,{get:()=>t[r],enumerable:!(n=TD(t,r))||n.enumerable});return e};var z=(e,t,a)=>(a=e!=null?LD(MD(e)):{},DD(t||!e||!e.__esModule?vu(a,"default",{value:e,enumerable:!0}):a,e));var Z=(e,t,a)=>RD(e,typeof t!="symbol"?t+"":t,a);var gx=Wt(ue=>{"use strict";var Qf=Symbol.for("react.transitional.element"),_D=Symbol.for("react.portal"),OD=Symbol.for("react.fragment"),PD=Symbol.for("react.strict_mode"),ND=Symbol.for("react.profiler"),BD=Symbol.for("react.consumer"),UD=Symbol.for("react.context"),FD=Symbol.for("react.forward_ref"),zD=Symbol.for("react.suspense"),qD=Symbol.for("react.memo"),cx=Symbol.for("react.lazy"),HD=Symbol.for("react.activity"),lx=Symbol.iterator;function jD(e){return e===null||typeof e!="object"?null:(e=lx&&e[lx]||e["@@iterator"],typeof e=="function"?e:null)}var dx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fx=Object.assign,px={};function Go(e,t,a){this.props=e,this.context=t,this.refs=px,this.updater=a||dx}Go.prototype.isReactComponent={};Go.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mx(){}mx.prototype=Go.prototype;function Yf(e,t,a){this.props=e,this.context=t,this.refs=px,this.updater=a||dx}var Jf=Yf.prototype=new mx;Jf.constructor=Yf;fx(Jf,Go.prototype);Jf.isPureReactComponent=!0;var ix=Array.isArray;function Zf(){}var lt={H:null,A:null,T:null,S:null},hx=Object.prototype.hasOwnProperty;function ep(e,t,a){var n=a.ref;return{$$typeof:Qf,type:e,key:t,ref:n!==void 0?n:null,props:a}}function VD(e,t){return ep(e.type,t,e.props)}function tp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function GD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var sx=/\/+/g;function Kf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?GD(""+e.key):t.toString(36)}function $D(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Zf,Zf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Vo(e,t,a,n,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Qf:case _D:l=!0;break;case cx:return l=e._init,Vo(l(e._payload),t,a,n,r)}}if(l)return r=r(e),l=n===""?"."+Kf(e,0):n,ix(r)?(a="",l!=null&&(a=l.replace(sx,"$&/")+"/"),Vo(r,t,a,"",function(u){return u})):r!=null&&(tp(r)&&(r=VD(r,a+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(sx,"$&/")+"/")+l)),t.push(r)),1;l=0;var i=n===""?".":n+":";if(ix(e))for(var s=0;s<e.length;s++)n=e[s],o=i+Kf(n,s),l+=Vo(n,t,a,o,r);else if(s=jD(e),typeof s=="function")for(e=s.call(e),s=0;!(n=e.next()).done;)n=n.value,o=i+Kf(n,s++),l+=Vo(n,t,a,o,r);else if(o==="object"){if(typeof e.then=="function")return Vo($D(e),t,a,n,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Su(e,t,a){if(e==null)return e;var n=[],r=0;return Vo(e,n,"","",function(o){return t.call(a,o,r++)}),n}function WD(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ux=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},XD={map:Su,forEach:function(e,t,a){Su(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return Su(e,function(){t++}),t},toArray:function(e){return Su(e,function(t){return t})||[]},only:function(e){if(!tp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Activity=HD;ue.Children=XD;ue.Component=Go;ue.Fragment=OD;ue.Profiler=ND;ue.PureComponent=Yf;ue.StrictMode=PD;ue.Suspense=zD;ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=lt;ue.__COMPILER_RUNTIME={__proto__:null,c:function(e){return lt.H.useMemoCache(e)}};ue.cache=function(e){return function(){return e.apply(null,arguments)}};ue.cacheSignal=function(){return null};ue.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=fx({},e.props),r=e.key;if(t!=null)for(o in t.key!==void 0&&(r=""+t.key),t)!hx.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(n[o]=t[o]);var o=arguments.length-2;if(o===1)n.children=a;else if(1<o){for(var l=Array(o),i=0;i<o;i++)l[i]=arguments[i+2];n.children=l}return ep(e.type,r,n)};ue.createContext=function(e){return e={$$typeof:UD,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:BD,_context:e},e};ue.createElement=function(e,t,a){var n,r={},o=null;if(t!=null)for(n in t.key!==void 0&&(o=""+t.key),t)hx.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(r[n]=t[n]);var l=arguments.length-2;if(l===1)r.children=a;else if(1<l){for(var i=Array(l),s=0;s<l;s++)i[s]=arguments[s+2];r.children=i}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)r[n]===void 0&&(r[n]=l[n]);return ep(e,o,r)};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:FD,render:e}};ue.isValidElement=tp;ue.lazy=function(e){return{$$typeof:cx,_payload:{_status:-1,_result:e},_init:WD}};ue.memo=function(e,t){return{$$typeof:qD,type:e,compare:t===void 0?null:t}};ue.startTransition=function(e){var t=lt.T,a={};lt.T=a;try{var n=e(),r=lt.S;r!==null&&r(a,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Zf,ux)}catch(o){ux(o)}finally{t!==null&&a.types!==null&&(t.types=a.types),lt.T=t}};ue.unstable_useCacheRefresh=function(){return lt.H.useCacheRefresh()};ue.use=function(e){return lt.H.use(e)};ue.useActionState=function(e,t,a){return lt.H.useActionState(e,t,a)};ue.useCallback=function(e,t){return lt.H.useCallback(e,t)};ue.useContext=function(e){return lt.H.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e,t){return lt.H.useDeferredValue(e,t)};ue.useEffect=function(e,t){return lt.H.useEffect(e,t)};ue.useEffectEvent=function(e){return lt.H.useEffectEvent(e)};ue.useId=function(){return lt.H.useId()};ue.useImperativeHandle=function(e,t,a){return lt.H.useImperativeHandle(e,t,a)};ue.useInsertionEffect=function(e,t){return lt.H.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return lt.H.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return lt.H.useMemo(e,t)};ue.useOptimistic=function(e,t){return lt.H.useOptimistic(e,t)};ue.useReducer=function(e,t,a){return lt.H.useReducer(e,t,a)};ue.useRef=function(e){return lt.H.useRef(e)};ue.useState=function(e){return lt.H.useState(e)};ue.useSyncExternalStore=function(e,t,a){return lt.H.useSyncExternalStore(e,t,a)};ue.useTransition=function(){return lt.H.useTransition()};ue.version="19.2.4"});var Me=Wt((_j,yx)=>{"use strict";yx.exports=gx()});var Tx=Wt(dt=>{"use strict";function op(e,t){var a=e.length;e.push(t);e:for(;0<a;){var n=a-1>>>1,r=e[n];if(0<Iu(r,t))e[n]=t,e[a]=r,a=n;else break e}}function dn(e){return e.length===0?null:e[0]}function ku(e){if(e.length===0)return null;var t=e[0],a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,r=e.length,o=r>>>1;n<o;){var l=2*(n+1)-1,i=e[l],s=l+1,u=e[s];if(0>Iu(i,a))s<r&&0>Iu(u,i)?(e[n]=u,e[s]=a,n=s):(e[n]=i,e[l]=a,n=l);else if(s<r&&0>Iu(u,a))e[n]=u,e[s]=a,n=s;else break e}}return t}function Iu(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}dt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(wx=performance,dt.unstable_now=function(){return wx.now()}):(ap=Date,xx=ap.now(),dt.unstable_now=function(){return ap.now()-xx});var wx,ap,xx,An=[],ir=[],KD=1,Na=null,Xt=3,lp=!1,ci=!1,di=!1,ip=!1,Sx=typeof setTimeout=="function"?setTimeout:null,Ix=typeof clearTimeout=="function"?clearTimeout:null,vx=typeof setImmediate<"u"?setImmediate:null;function Cu(e){for(var t=dn(ir);t!==null;){if(t.callback===null)ku(ir);else if(t.startTime<=e)ku(ir),t.sortIndex=t.expirationTime,op(An,t);else break;t=dn(ir)}}function sp(e){if(di=!1,Cu(e),!ci)if(dn(An)!==null)ci=!0,Wo||(Wo=!0,$o());else{var t=dn(ir);t!==null&&up(sp,t.startTime-e)}}var Wo=!1,fi=-1,Cx=5,kx=-1;function Lx(){return ip?!0:!(dt.unstable_now()-kx<Cx)}function np(){if(ip=!1,Wo){var e=dt.unstable_now();kx=e;var t=!0;try{e:{ci=!1,di&&(di=!1,Ix(fi),fi=-1),lp=!0;var a=Xt;try{t:{for(Cu(e),Na=dn(An);Na!==null&&!(Na.expirationTime>e&&Lx());){var n=Na.callback;if(typeof n=="function"){Na.callback=null,Xt=Na.priorityLevel;var r=n(Na.expirationTime<=e);if(e=dt.unstable_now(),typeof r=="function"){Na.callback=r,Cu(e),t=!0;break t}Na===dn(An)&&ku(An),Cu(e)}else ku(An);Na=dn(An)}if(Na!==null)t=!0;else{var o=dn(ir);o!==null&&up(sp,o.startTime-e),t=!1}}break e}finally{Na=null,Xt=a,lp=!1}t=void 0}}finally{t?$o():Wo=!1}}}var $o;typeof vx=="function"?$o=function(){vx(np)}:typeof MessageChannel<"u"?(rp=new MessageChannel,bx=rp.port2,rp.port1.onmessage=np,$o=function(){bx.postMessage(null)}):$o=function(){Sx(np,0)};var rp,bx;function up(e,t){fi=Sx(function(){e(dt.unstable_now())},t)}dt.unstable_IdlePriority=5;dt.unstable_ImmediatePriority=1;dt.unstable_LowPriority=4;dt.unstable_NormalPriority=3;dt.unstable_Profiling=null;dt.unstable_UserBlockingPriority=2;dt.unstable_cancelCallback=function(e){e.callback=null};dt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Cx=0<e?Math.floor(1e3/e):5};dt.unstable_getCurrentPriorityLevel=function(){return Xt};dt.unstable_next=function(e){switch(Xt){case 1:case 2:case 3:var t=3;break;default:t=Xt}var a=Xt;Xt=t;try{return e()}finally{Xt=a}};dt.unstable_requestPaint=function(){ip=!0};dt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=Xt;Xt=e;try{return t()}finally{Xt=a}};dt.unstable_scheduleCallback=function(e,t,a){var n=dt.unstable_now();switch(typeof a=="object"&&a!==null?(a=a.delay,a=typeof a=="number"&&0<a?n+a:n):a=n,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=a+r,e={id:KD++,callback:t,priorityLevel:e,startTime:a,expirationTime:r,sortIndex:-1},a>n?(e.sortIndex=a,op(ir,e),dn(An)===null&&e===dn(ir)&&(di?(Ix(fi),fi=-1):di=!0,up(sp,a-n))):(e.sortIndex=r,op(An,e),ci||lp||(ci=!0,Wo||(Wo=!0,$o()))),e};dt.unstable_shouldYield=Lx;dt.unstable_wrapCallback=function(e){var t=Xt;return function(){var a=Xt;Xt=t;try{return e.apply(this,arguments)}finally{Xt=a}}}});var Mx=Wt((Pj,Ax)=>{"use strict";Ax.exports=Tx()});var Rx=Wt(Jt=>{"use strict";var ZD=Me();function Ex(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function sr(){}var Yt={d:{f:sr,r:function(){throw Error(Ex(522))},D:sr,C:sr,L:sr,m:sr,X:sr,S:sr,M:sr},p:0,findDOMNode:null},QD=Symbol.for("react.portal");function YD(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:QD,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var pi=ZD.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Lu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;Jt.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Ex(299));return YD(e,t,null,a)};Jt.flushSync=function(e){var t=pi.T,a=Yt.p;try{if(pi.T=null,Yt.p=2,e)return e()}finally{pi.T=t,Yt.p=a,Yt.d.f()}};Jt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};Jt.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};Jt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=Lu(a,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,o=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:r,fetchPriority:o}):a==="script"&&Yt.d.X(e,{crossOrigin:n,integrity:r,fetchPriority:o,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Jt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=Lu(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};Jt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=Lu(a,t.crossOrigin);Yt.d.L(e,a,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Jt.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=Lu(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};Jt.requestFormReset=function(e){Yt.d.r(e)};Jt.unstable_batchedUpdates=function(e,t){return e(t)};Jt.useFormState=function(e,t,a){return pi.H.useFormState(e,t,a)};Jt.useFormStatus=function(){return pi.H.useHostTransitionStatus()};Jt.version="19.2.4"});var Ox=Wt((Bj,_x)=>{"use strict";function Dx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dx)}catch(e){console.error(e)}}Dx(),_x.exports=Rx()});var $0=Wt(Qc=>{"use strict";var Ot=Mx(),lb=Me(),JD=Ox();function P(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ib(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ji(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function sb(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ub(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Px(e){if(Ji(e)!==e)throw Error(P(188))}function e_(e){var t=e.alternate;if(!t){if(t=Ji(e),t===null)throw Error(P(188));return t!==e?null:e}for(var a=e,n=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(n=r.return,n!==null){a=n;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return Px(r),e;if(o===n)return Px(r),t;o=o.sibling}throw Error(P(188))}if(a.return!==n.return)a=r,n=o;else{for(var l=!1,i=r.child;i;){if(i===a){l=!0,a=r,n=o;break}if(i===n){l=!0,n=r,a=o;break}i=i.sibling}if(!l){for(i=o.child;i;){if(i===a){l=!0,a=o,n=r;break}if(i===n){l=!0,n=o,a=r;break}i=i.sibling}if(!l)throw Error(P(189))}}if(a.alternate!==n)throw Error(P(190))}if(a.tag!==3)throw Error(P(188));return a.stateNode.current===a?e:t}function cb(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=cb(e),t!==null)return t;e=e.sibling}return null}var ut=Object.assign,t_=Symbol.for("react.element"),Tu=Symbol.for("react.transitional.element"),bi=Symbol.for("react.portal"),Jo=Symbol.for("react.fragment"),db=Symbol.for("react.strict_mode"),jp=Symbol.for("react.profiler"),fb=Symbol.for("react.consumer"),Nn=Symbol.for("react.context"),Um=Symbol.for("react.forward_ref"),Vp=Symbol.for("react.suspense"),Gp=Symbol.for("react.suspense_list"),Fm=Symbol.for("react.memo"),ur=Symbol.for("react.lazy"),$p=Symbol.for("react.activity"),a_=Symbol.for("react.memo_cache_sentinel"),Nx=Symbol.iterator;function mi(e){return e===null||typeof e!="object"?null:(e=Nx&&e[Nx]||e["@@iterator"],typeof e=="function"?e:null)}var n_=Symbol.for("react.client.reference");function Wp(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===n_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jo:return"Fragment";case jp:return"Profiler";case db:return"StrictMode";case Vp:return"Suspense";case Gp:return"SuspenseList";case $p:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case bi:return"Portal";case Nn:return e.displayName||"Context";case fb:return(e._context.displayName||"Context")+".Consumer";case Um:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fm:return t=e.displayName||null,t!==null?t:Wp(e.type)||"Memo";case ur:t=e._payload,e=e._init;try{return Wp(e(t))}catch{}}return null}var Si=Array.isArray,re=lb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ze=JD.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,no={pending:!1,data:null,method:null,action:null},Xp=[],el=-1;function gn(e){return{current:e}}function zt(e){0>el||(e.current=Xp[el],Xp[el]=null,el--)}function ot(e,t){el++,Xp[el]=e.current,e.current=t}var hn=gn(null),Fi=gn(null),vr=gn(null),lc=gn(null);function ic(e,t){switch(ot(vr,t),ot(Fi,e),ot(hn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jv(t),e=D0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}zt(hn),ot(hn,e)}function wl(){zt(hn),zt(Fi),zt(vr)}function Kp(e){e.memoizedState!==null&&ot(lc,e);var t=hn.current,a=D0(t,e.type);t!==a&&(ot(Fi,e),ot(hn,a))}function sc(e){Fi.current===e&&(zt(hn),zt(Fi)),lc.current===e&&(zt(lc),Zi._currentValue=no)}var cp,Bx;function Jr(e){if(cp===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);cp=t&&t[1]||"",Bx=-1<a.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
3
|
+
`+cp+e+Bx}var dp=!1;function fp(e,t){if(!e||dp)return"";dp=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(p){var f=p}Reflect.construct(e,[],d)}else{try{d.call()}catch(p){f=p}e.call(d.prototype)}}else{try{throw Error()}catch(p){f=p}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),l=o[0],i=o[1];if(l&&i){var s=l.split(`
|
|
4
4
|
`),u=i.split(`
|
|
5
5
|
`);for(r=n=0;n<s.length&&!s[n].includes("DetermineComponentFrameRoot");)n++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(n===s.length||r===u.length)for(n=s.length-1,r=u.length-1;1<=n&&0<=r&&s[n]!==u[r];)r--;for(;1<=n&&0<=r;n--,r--)if(s[n]!==u[r]){if(n!==1||r!==1)do if(n--,r--,0>r||s[n]!==u[r]){var c=`
|
|
6
|
-
`+s[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=r);break}}}finally{
|
|
6
|
+
`+s[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=r);break}}}finally{dp=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Jr(a):""}function r_(e,t){switch(e.tag){case 26:case 27:case 5:return Jr(e.type);case 16:return Jr("Lazy");case 13:return e.child!==t&&t!==null?Jr("Suspense Fallback"):Jr("Suspense");case 19:return Jr("SuspenseList");case 0:case 15:return fp(e.type,!1);case 11:return fp(e.type.render,!1);case 1:return fp(e.type,!0);case 31:return Jr("Activity");default:return""}}function Ux(e){try{var t="",a=null;do t+=r_(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
7
|
Error generating stack: `+n.message+`
|
|
8
|
-
`+n.stack}}var Gp=Object.prototype.hasOwnProperty,Pm=_t.unstable_scheduleCallback,sp=_t.unstable_cancelCallback,BD=_t.unstable_shouldYield,UD=_t.unstable_requestPaint,Ia=_t.unstable_now,zD=_t.unstable_getCurrentPriorityLevel,ob=_t.unstable_ImmediatePriority,lb=_t.unstable_UserBlockingPriority,lc=_t.unstable_NormalPriority,qD=_t.unstable_LowPriority,ib=_t.unstable_IdlePriority,FD=_t.log,HD=_t.unstable_setDisableYieldValue,Qi=null,La=null;function mr(e){if(typeof FD=="function"&&HD(e),La&&typeof La.setStrictMode=="function")try{La.setStrictMode(Qi,e)}catch{}}var ka=Math.clz32?Math.clz32:GD,jD=Math.log,VD=Math.LN2;function GD(e){return e>>>=0,e===0?32:31-(jD(e)/VD|0)|0}var Lu=256,ku=262144,Tu=4194304;function Jr(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dc(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var i=n&134217727;return i!==0?(n=i&~o,n!==0?r=Jr(n):(l&=i,l!==0?r=Jr(l):a||(a=i&~e,a!==0&&(r=Jr(a))))):(i=n&~o,i!==0?r=Jr(i):l!==0?r=Jr(l):a||(a=n&~e,a!==0&&(r=Jr(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function Ki(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $D(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sb(){var e=Tu;return Tu<<=1,(Tu&62914560)===0&&(Tu=4194304),e}function up(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Yi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function WD(e,t,a,n,r,o){var l=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(a=l&~a;0<a;){var c=31-ka(a),d=1<<c;i[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var p=f[c];p!==null&&(p.lane&=-536870913)}a&=~d}n!==0&&ub(e,n,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(l&~t))}function ub(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-ka(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function cb(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-ka(a),r=1<<n;r&t|e[n]&t&&(e[n]|=t),a&=~r}}function db(e,t){var a=t&-t;return a=(a&42)!==0?1:Nm(a),(a&(e.suspendedLanes|t))!==0?0:a}function Nm(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Bm(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fb(){var e=qe.p;return e!==0?e:(e=window.event,e===void 0?32:P0(e.type))}function Rx(e,t){var a=qe.p;try{return qe.p=e,t()}finally{qe.p=a}}var Dr=Math.random().toString(36).slice(2),jt="__reactFiber$"+Dr,ma="__reactProps$"+Dr,Tl="__reactContainer$"+Dr,$p="__reactEvents$"+Dr,XD="__reactListeners$"+Dr,ZD="__reactHandles$"+Dr,Dx="__reactResources$"+Dr,Ji="__reactMarker$"+Dr;function Um(e){delete e[jt],delete e[ma],delete e[$p],delete e[XD],delete e[ZD]}function Jo(e){var t=e[jt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Tl]||a[jt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=qv(e);e!==null;){if(a=e[jt])return a;e=qv(e)}return t}e=a,a=e.parentNode}return null}function Al(e){if(e=e[jt]||e[Tl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function ul(e){var t=e[Dx];return t||(t=e[Dx]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ut(e){e[Ji]=!0}var pb=new Set,mb={};function po(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(mb[e]=t,e=0;e<t.length;e++)pb.add(t[e])}var QD=RegExp("^[: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]*$"),_x={},Ox={};function KD(e){return Gp.call(Ox,e)?!0:Gp.call(_x,e)?!1:QD.test(e)?Ox[e]=!0:(_x[e]=!0,!1)}function Hu(e,t,a){if(KD(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Au(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function An(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Ba(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function YD(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(l){a=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(l){a=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wp(e){if(!e._valueTracker){var t=hb(e)?"checked":"value";e._valueTracker=YD(e,t,""+e[t])}}function gb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=hb(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ic(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}}var JD=/[\n"\\]/g;function qa(e){return e.replace(JD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xp(e,t,a,n,r,o,l,i){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ba(t)):e.value!==""+Ba(t)&&(e.value=""+Ba(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Zp(e,l,Ba(t)):a!=null?Zp(e,l,Ba(a)):n!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+Ba(i):e.removeAttribute("name")}function yb(e,t,a,n,r,o,l,i){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Wp(e);return}a=a!=null?""+Ba(a):"",t=t!=null?""+Ba(t):a,i||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=i?e.checked:!!n,e.defaultChecked=!!n,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Wp(e)}function Zp(e,t,a){t==="number"&&ic(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cl(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ba(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function wb(e,t,a){if(t!=null&&(t=""+Ba(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ba(a):""}function xb(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(P(92));if(wi(n)){if(1<n.length)throw Error(P(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ba(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Wp(e)}function wl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var e_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Px(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||e_.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function vb(e,t,a){if(t!=null&&typeof t!="object")throw Error(P(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&a[r]!==n&&Px(e,r,n)}else for(var o in t)t.hasOwnProperty(o)&&Px(e,o,t[o])}function zm(e){if(e.indexOf("-")===-1)return!1;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 t_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),a_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ju(e){return a_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nn(){}var Qp=null;function qm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var el=null,dl=null;function Nx(e){var t=Al(e);if(t&&(e=t.stateNode)){var a=e[ma]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xp(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+qa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var r=n[ma]||null;if(!r)throw Error(P(90));Xp(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&gb(n)}break e;case"textarea":wb(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&cl(e,!!a.multiple,t,!1)}}}var cp=!1;function bb(e,t,a){if(cp)return e(t,a);cp=!0;try{var n=e(t);return n}finally{if(cp=!1,(el!==null||dl!==null)&&(Vc(),el&&(t=el,e=dl,dl=el=null,Nx(t),e)))for(t=0;t<e.length;t++)Nx(e[t])}}function Ni(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ma]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(P(231,t,typeof a));return a}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kp=!1;if(Fn)try{$o={},Object.defineProperty($o,"passive",{get:function(){Kp=!0}}),window.addEventListener("test",$o,$o),window.removeEventListener("test",$o,$o)}catch{Kp=!1}var $o,hr=null,Fm=null,Vu=null;function Sb(){if(Vu)return Vu;var e,t=Fm,a=t.length,n,r="value"in hr?hr.value:hr.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var l=a-e;for(n=1;n<=l&&t[a-n]===r[o-n];n++);return Vu=r.slice(e,1<n?1-n:void 0)}function Gu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mu(){return!0}function Bx(){return!1}function ha(e){function t(a,n,r,o,l){this._reactName=a,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(a=e[i],this[i]=a?a(o):o[i]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Mu:Bx,this.isPropagationStopped=Bx,this}return ut(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Mu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Mu)},persist:function(){},isPersistent:Mu}),t}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_c=ha(mo),es=ut({},mo,{view:0,detail:0}),n_=ha(es),dp,fp,di,Oc=ut({},es,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==di&&(di&&e.type==="mousemove"?(dp=e.screenX-di.screenX,fp=e.screenY-di.screenY):fp=dp=0,di=e),dp)},movementY:function(e){return"movementY"in e?e.movementY:fp}}),Ux=ha(Oc),r_=ut({},Oc,{dataTransfer:0}),o_=ha(r_),l_=ut({},es,{relatedTarget:0}),pp=ha(l_),i_=ut({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),s_=ha(i_),u_=ut({},mo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),c_=ha(u_),d_=ut({},mo,{data:0}),zx=ha(d_),f_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},m_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=m_[e])?!!t[e]:!1}function Hm(){return h_}var g_=ut({},es,{key:function(e){if(e.key){var t=f_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?p_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hm,charCode:function(e){return e.type==="keypress"?Gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),y_=ha(g_),w_=ut({},Oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qx=ha(w_),x_=ut({},es,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hm}),v_=ha(x_),b_=ut({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),S_=ha(b_),C_=ut({},Oc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),I_=ha(C_),L_=ut({},mo,{newState:0,oldState:0}),k_=ha(L_),T_=[9,13,27,32],jm=Fn&&"CompositionEvent"in window,Si=null;Fn&&"documentMode"in document&&(Si=document.documentMode);var A_=Fn&&"TextEvent"in window&&!Si,Cb=Fn&&(!jm||Si&&8<Si&&11>=Si),Fx=" ",Hx=!1;function Ib(e,t){switch(e){case"keyup":return T_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tl=!1;function M_(e,t){switch(e){case"compositionend":return Lb(t);case"keypress":return t.which!==32?null:(Hx=!0,Fx);case"textInput":return e=t.data,e===Fx&&Hx?null:e;default:return null}}function E_(e,t){if(tl)return e==="compositionend"||!jm&&Ib(e,t)?(e=Sb(),Vu=Fm=hr=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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Cb&&t.locale!=="ko"?null:t.data;default:return null}}var R_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!R_[e.type]:t==="textarea"}function kb(e,t,a,n){el?dl?dl.push(n):dl=[n]:el=n,t=Lc(t,"onChange"),0<t.length&&(a=new _c("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Ci=null,Bi=null;function D_(e){b0(e,0)}function Pc(e){var t=xi(e);if(gb(t))return e}function Vx(e,t){if(e==="change")return t}var Tb=!1;Fn&&(Fn?(Ru="oninput"in document,Ru||(mp=document.createElement("div"),mp.setAttribute("oninput","return;"),Ru=typeof mp.oninput=="function"),Eu=Ru):Eu=!1,Tb=Eu&&(!document.documentMode||9<document.documentMode));var Eu,Ru,mp;function Gx(){Ci&&(Ci.detachEvent("onpropertychange",Ab),Bi=Ci=null)}function Ab(e){if(e.propertyName==="value"&&Pc(Bi)){var t=[];kb(t,Bi,e,qm(e)),bb(D_,t)}}function __(e,t,a){e==="focusin"?(Gx(),Ci=t,Bi=a,Ci.attachEvent("onpropertychange",Ab)):e==="focusout"&&Gx()}function O_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pc(Bi)}function P_(e,t){if(e==="click")return Pc(t)}function N_(e,t){if(e==="input"||e==="change")return Pc(t)}function B_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Aa=typeof Object.is=="function"?Object.is:B_;function Ui(e,t){if(Aa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var r=a[n];if(!Gp.call(t,r)||!Aa(e[r],t[r]))return!1}return!0}function $x(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wx(e,t){var a=$x(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$x(a)}}function Mb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Eb(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ic(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ic(e.document)}return t}function Vm(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")}var U_=Fn&&"documentMode"in document&&11>=document.documentMode,al=null,Yp=null,Ii=null,Jp=!1;function Xx(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jp||al==null||al!==ic(n)||(n=al,"selectionStart"in n&&Vm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ii&&Ui(Ii,n)||(Ii=n,n=Lc(Yp,"onSelect"),0<n.length&&(t=new _c("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=al)))}function Kr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var nl={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},hp={},Rb={};Fn&&(Rb=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function ho(e){if(hp[e])return hp[e];if(!nl[e])return e;var t=nl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Rb)return hp[e]=t[a];return e}var Db=ho("animationend"),_b=ho("animationiteration"),Ob=ho("animationstart"),z_=ho("transitionrun"),q_=ho("transitionstart"),F_=ho("transitioncancel"),Pb=ho("transitionend"),Nb=new Map,em="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");em.push("scrollEnd");function tn(e,t){Nb.set(e,t),po(t,[e])}var sc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Na=[],rl=0,Gm=0;function Nc(){for(var e=rl,t=Gm=rl=0;t<e;){var a=Na[t];Na[t++]=null;var n=Na[t];Na[t++]=null;var r=Na[t];Na[t++]=null;var o=Na[t];if(Na[t++]=null,n!==null&&r!==null){var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}o!==0&&Bb(a,r,o)}}function Bc(e,t,a,n){Na[rl++]=e,Na[rl++]=t,Na[rl++]=a,Na[rl++]=n,Gm|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function $m(e,t,a,n){return Bc(e,t,a,n),uc(e)}function go(e,t){return Bc(e,null,null,t),uc(e)}function Bb(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-ka(a),e=o.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=a|536870912),o):null}function uc(e){if(50<_i)throw _i=0,bm=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ol={};function H_(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sa(e,t,a,n){return new H_(e,t,a,n)}function Wm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Un(e,t){var a=e.alternate;return a===null?(a=Sa(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ub(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $u(e,t,a,n,r,o){var l=0;if(n=e,typeof e=="function")Wm(e)&&(l=1);else if(typeof e=="string")l=GO(e,a,mn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Fp:return e=Sa(31,a,t,r),e.elementType=Fp,e.lanes=o,e;case Ko:return no(a.children,r,o,t);case nb:l=8,r|=24;break;case Up:return e=Sa(12,a,t,r|2),e.elementType=Up,e.lanes=o,e;case zp:return e=Sa(13,a,t,r),e.elementType=zp,e.lanes=o,e;case qp:return e=Sa(19,a,t,r),e.elementType=qp,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pn:l=10;break e;case rb:l=9;break e;case _m:l=11;break e;case Om:l=14;break e;case sr:l=16,n=null;break e}l=29,a=Error(P(130,e===null?"null":typeof e,"")),n=null}return t=Sa(l,a,t,r),t.elementType=e,t.type=n,t.lanes=o,t}function no(e,t,a,n){return e=Sa(7,e,n,t),e.lanes=a,e}function gp(e,t,a){return e=Sa(6,e,null,t),e.lanes=a,e}function zb(e){var t=Sa(18,null,null,0);return t.stateNode=e,t}function yp(e,t,a){return t=Sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zx=new WeakMap;function Fa(e,t){if(typeof e=="object"&&e!==null){var a=Zx.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ex(t)},Zx.set(e,t),t)}return{value:e,source:t,stack:Ex(t)}}var ll=[],il=0,cc=null,zi=0,Ua=[],za=0,Ar=null,dn=1,fn="";function _n(e,t){ll[il++]=zi,ll[il++]=cc,cc=e,zi=t}function qb(e,t,a){Ua[za++]=dn,Ua[za++]=fn,Ua[za++]=Ar,Ar=e;var n=dn;e=fn;var r=32-ka(n)-1;n&=~(1<<r),a+=1;var o=32-ka(t)+r;if(30<o){var l=r-r%5;o=(n&(1<<l)-1).toString(32),n>>=l,r-=l,dn=1<<32-ka(t)+r|a<<r|n,fn=o+e}else dn=1<<o|a<<r|n,fn=e}function Xm(e){e.return!==null&&(_n(e,1),qb(e,1,0))}function Zm(e){for(;e===cc;)cc=ll[--il],ll[il]=null,zi=ll[--il],ll[il]=null;for(;e===Ar;)Ar=Ua[--za],Ua[za]=null,fn=Ua[--za],Ua[za]=null,dn=Ua[--za],Ua[za]=null}function Fb(e,t){Ua[za++]=dn,Ua[za++]=fn,Ua[za++]=Ar,dn=t.id,fn=t.overflow,Ar=e}var Vt=null,st=null,ke=!1,vr=null,Ha=!1,tm=Error(P(519));function Mr(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qi(Fa(t,e)),tm}function Qx(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[jt]=e,t[ma]=n,a){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)we(Vi[a],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),yb(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),xb(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||C0(t.textContent,a)?(n.popover!=null&&(we("beforetoggle",t),we("toggle",t)),n.onScroll!=null&&we("scroll",t),n.onScrollEnd!=null&&we("scrollend",t),n.onClick!=null&&(t.onclick=Nn),t=!0):t=!1,t||Mr(e,!0)}function Kx(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Ha=!1;return;case 27:case 3:Ha=!0;return;default:Vt=Vt.return}}function Wo(e){if(e!==Vt)return!1;if(!ke)return Kx(e),ke=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||km(e.type,e.memoizedProps)),a=!a),a&&st&&Mr(e),Kx(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));st=zv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));st=zv(e)}else t===27?(t=st,_r(e.type)?(e=Em,Em=null,st=e):st=t):st=Vt?Va(e.stateNode.nextSibling):null;return!0}function io(){st=Vt=null,ke=!1}function wp(){var e=vr;return e!==null&&(fa===null?fa=e:fa.push.apply(fa,e),vr=null),e}function qi(e){vr===null?vr=[e]:vr.push(e)}var am=hn(null),yo=null,Bn=null;function cr(e,t,a){ot(am,t._currentValue),t._currentValue=a}function zn(e){e._currentValue=am.current,zt(am)}function nm(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function rm(e,t,a,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var l=r.child;o=o.firstContext;e:for(;o!==null;){var i=o;o=r;for(var s=0;s<t.length;s++)if(i.context===t[s]){o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),nm(o.return,a,e),n||(l=null);break e}o=i.next}}else if(r.tag===18){if(l=r.return,l===null)throw Error(P(341));l.lanes|=a,o=l.alternate,o!==null&&(o.lanes|=a),nm(l,a,e),l=null}else l=r.child;if(l!==null)l.return=r;else for(l=r;l!==null;){if(l===e){l=null;break}if(r=l.sibling,r!==null){r.return=l.return,l=r;break}l=l.return}r=l}}function Ml(e,t,a,n){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var l=r.alternate;if(l===null)throw Error(P(387));if(l=l.memoizedProps,l!==null){var i=r.type;Aa(r.pendingProps.value,l.value)||(e!==null?e.push(i):e=[i])}}else if(r===nc.current){if(l=r.alternate,l===null)throw Error(P(387));l.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push($i):e=[$i])}r=r.return}e!==null&&rm(t,e,a,n),t.flags|=262144}function dc(e){for(e=e.firstContext;e!==null;){if(!Aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function so(e){yo=e,Bn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Hb(yo,e)}function Du(e,t){return yo===null&&so(e),Hb(e,t)}function Hb(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Bn===null){if(e===null)throw Error(P(308));Bn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bn=Bn.next=t;return a}var j_=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},V_=_t.unstable_scheduleCallback,G_=_t.unstable_NormalPriority,Mt={$$typeof:Pn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qm(){return{controller:new j_,data:new Map,refCount:0}}function ts(e){e.refCount--,e.refCount===0&&V_(G_,function(){e.controller.abort()})}var Li=null,om=0,xl=0,fl=null;function $_(e,t){if(Li===null){var a=Li=[];om=0,xl=bh(),fl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return om++,t.then(Yx,Yx),t}function Yx(){if(--om===0&&Li!==null){fl!==null&&(fl.status="fulfilled");var e=Li;Li=null,xl=0,fl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function W_(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),n}var Jx=ne.S;ne.S=function(e,t){a0=Ia(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$_(e,t),Jx!==null&&Jx(e,t)};var ro=hn(null);function Km(){var e=ro.current;return e!==null?e:at.pooledCache}function Wu(e,t){t===null?ot(ro,ro.current):ot(ro,t.pool)}function jb(){var e=Km();return e===null?null:{parent:Mt._currentValue,pool:e}}var El=Error(P(460)),Ym=Error(P(474)),Uc=Error(P(542)),fc={then:function(){}};function ev(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vb(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Nn,Nn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,av(e),e;default:if(typeof t.status=="string")t.then(Nn,Nn);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,av(e),e}throw oo=t,El}}function eo(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(oo=a,El):a}}var oo=null;function tv(){if(oo===null)throw Error(P(459));var e=oo;return oo=null,e}function av(e){if(e===El||e===Uc)throw Error(P(483))}var pl=null,Fi=0;function _u(e){var t=Fi;return Fi+=1,pl===null&&(pl=[]),Vb(pl,e,t)}function fi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ou(e,t){throw t.$$typeof===_D?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Gb(e){function t(y,w){if(e){var g=y.deletions;g===null?(y.deletions=[w],y.flags|=16):g.push(w)}}function a(y,w){if(!e)return null;for(;w!==null;)t(y,w),w=w.sibling;return null}function n(y){for(var w=new Map;y!==null;)y.key!==null?w.set(y.key,y):w.set(y.index,y),y=y.sibling;return w}function r(y,w){return y=Un(y,w),y.index=0,y.sibling=null,y}function o(y,w,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<w?(y.flags|=67108866,w):g):(y.flags|=67108866,w)):(y.flags|=1048576,w)}function l(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function i(y,w,g,v){return w===null||w.tag!==6?(w=gp(g,y.mode,v),w.return=y,w):(w=r(w,g),w.return=y,w)}function s(y,w,g,v){var M=g.type;return M===Ko?c(y,w,g.props.children,v,g.key):w!==null&&(w.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===sr&&eo(M)===w.type)?(w=r(w,g.props),fi(w,g),w.return=y,w):(w=$u(g.type,g.key,g.props,null,y.mode,v),fi(w,g),w.return=y,w)}function u(y,w,g,v){return w===null||w.tag!==4||w.stateNode.containerInfo!==g.containerInfo||w.stateNode.implementation!==g.implementation?(w=yp(g,y.mode,v),w.return=y,w):(w=r(w,g.children||[]),w.return=y,w)}function c(y,w,g,v,M){return w===null||w.tag!==7?(w=no(g,y.mode,v,M),w.return=y,w):(w=r(w,g),w.return=y,w)}function d(y,w,g){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=gp(""+w,y.mode,g),w.return=y,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Iu:return g=$u(w.type,w.key,w.props,null,y.mode,g),fi(g,w),g.return=y,g;case yi:return w=yp(w,y.mode,g),w.return=y,w;case sr:return w=eo(w),d(y,w,g)}if(wi(w)||ci(w))return w=no(w,y.mode,g,null),w.return=y,w;if(typeof w.then=="function")return d(y,_u(w),g);if(w.$$typeof===Pn)return d(y,Du(y,w),g);Ou(y,w)}return null}function f(y,w,g,v){var M=w!==null?w.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return M!==null?null:i(y,w,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Iu:return g.key===M?s(y,w,g,v):null;case yi:return g.key===M?u(y,w,g,v):null;case sr:return g=eo(g),f(y,w,g,v)}if(wi(g)||ci(g))return M!==null?null:c(y,w,g,v,null);if(typeof g.then=="function")return f(y,w,_u(g),v);if(g.$$typeof===Pn)return f(y,w,Du(y,g),v);Ou(y,g)}return null}function p(y,w,g,v,M){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return y=y.get(g)||null,i(w,y,""+v,M);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Iu:return y=y.get(v.key===null?g:v.key)||null,s(w,y,v,M);case yi:return y=y.get(v.key===null?g:v.key)||null,u(w,y,v,M);case sr:return v=eo(v),p(y,w,g,v,M)}if(wi(v)||ci(v))return y=y.get(g)||null,c(w,y,v,M,null);if(typeof v.then=="function")return p(y,w,g,_u(v),M);if(v.$$typeof===Pn)return p(y,w,g,Du(w,v),M);Ou(w,v)}return null}function m(y,w,g,v){for(var M=null,C=null,A=w,E=w=0,_=null;A!==null&&E<g.length;E++){A.index>E?(_=A,A=null):_=A.sibling;var k=f(y,A,g[E],v);if(k===null){A===null&&(A=_);break}e&&A&&k.alternate===null&&t(y,A),w=o(k,w,E),C===null?M=k:C.sibling=k,C=k,A=_}if(E===g.length)return a(y,A),ke&&_n(y,E),M;if(A===null){for(;E<g.length;E++)A=d(y,g[E],v),A!==null&&(w=o(A,w,E),C===null?M=A:C.sibling=A,C=A);return ke&&_n(y,E),M}for(A=n(A);E<g.length;E++)_=p(A,y,E,g[E],v),_!==null&&(e&&_.alternate!==null&&A.delete(_.key===null?E:_.key),w=o(_,w,E),C===null?M=_:C.sibling=_,C=_);return e&&A.forEach(function(W){return t(y,W)}),ke&&_n(y,E),M}function x(y,w,g,v){if(g==null)throw Error(P(151));for(var M=null,C=null,A=w,E=w=0,_=null,k=g.next();A!==null&&!k.done;E++,k=g.next()){A.index>E?(_=A,A=null):_=A.sibling;var W=f(y,A,k.value,v);if(W===null){A===null&&(A=_);break}e&&A&&W.alternate===null&&t(y,A),w=o(W,w,E),C===null?M=W:C.sibling=W,C=W,A=_}if(k.done)return a(y,A),ke&&_n(y,E),M;if(A===null){for(;!k.done;E++,k=g.next())k=d(y,k.value,v),k!==null&&(w=o(k,w,E),C===null?M=k:C.sibling=k,C=k);return ke&&_n(y,E),M}for(A=n(A);!k.done;E++,k=g.next())k=p(A,y,E,k.value,v),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?E:k.key),w=o(k,w,E),C===null?M=k:C.sibling=k,C=k);return e&&A.forEach(function(U){return t(y,U)}),ke&&_n(y,E),M}function b(y,w,g,v){if(typeof g=="object"&&g!==null&&g.type===Ko&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Iu:e:{for(var M=g.key;w!==null;){if(w.key===M){if(M=g.type,M===Ko){if(w.tag===7){a(y,w.sibling),v=r(w,g.props.children),v.return=y,y=v;break e}}else if(w.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===sr&&eo(M)===w.type){a(y,w.sibling),v=r(w,g.props),fi(v,g),v.return=y,y=v;break e}a(y,w);break}else t(y,w);w=w.sibling}g.type===Ko?(v=no(g.props.children,y.mode,v,g.key),v.return=y,y=v):(v=$u(g.type,g.key,g.props,null,y.mode,v),fi(v,g),v.return=y,y=v)}return l(y);case yi:e:{for(M=g.key;w!==null;){if(w.key===M)if(w.tag===4&&w.stateNode.containerInfo===g.containerInfo&&w.stateNode.implementation===g.implementation){a(y,w.sibling),v=r(w,g.children||[]),v.return=y,y=v;break e}else{a(y,w);break}else t(y,w);w=w.sibling}v=yp(g,y.mode,v),v.return=y,y=v}return l(y);case sr:return g=eo(g),b(y,w,g,v)}if(wi(g))return m(y,w,g,v);if(ci(g)){if(M=ci(g),typeof M!="function")throw Error(P(150));return g=M.call(g),x(y,w,g,v)}if(typeof g.then=="function")return b(y,w,_u(g),v);if(g.$$typeof===Pn)return b(y,w,Du(y,g),v);Ou(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,w!==null&&w.tag===6?(a(y,w.sibling),v=r(w,g),v.return=y,y=v):(a(y,w),v=gp(g,y.mode,v),v.return=y,y=v),l(y)):a(y,w)}return function(y,w,g,v){try{Fi=0;var M=b(y,w,g,v);return pl=null,M}catch(A){if(A===El||A===Uc)throw A;var C=Sa(29,A,null,y.mode);return C.lanes=v,C.return=y,C}}}var uo=Gb(!0),$b=Gb(!1),ur=!1;function Jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function br(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sr(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ze&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=uc(e),Bb(e,null,a),t}return Bc(e,n,t,a),uc(e)}function ki(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,cb(e,a)}}function xp(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var l={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=l:o=o.next=l,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var im=!1;function Ti(){if(im){var e=fl;if(e!==null)throw e}}function Ai(e,t,a,n){im=!1;var r=e.updateQueue;ur=!1;var o=r.firstBaseUpdate,l=r.lastBaseUpdate,i=r.shared.pending;if(i!==null){r.shared.pending=null;var s=i,u=s.next;s.next=null,l===null?o=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,i=c.lastBaseUpdate,i!==l&&(i===null?c.firstBaseUpdate=u:i.next=u,c.lastBaseUpdate=s))}if(o!==null){var d=r.baseState;l=0,c=u=s=null,i=o;do{var f=i.lane&-536870913,p=f!==i.lane;if(p?(Ce&f)===f:(n&f)===f){f!==0&&f===xl&&(im=!0),c!==null&&(c=c.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var m=e,x=i;f=t;var b=a;switch(x.tag){case 1:if(m=x.payload,typeof m=="function"){d=m.call(b,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,f=typeof m=="function"?m.call(b,d,f):m,f==null)break e;d=ut({},d,f);break e;case 2:ur=!0}}f=i.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[f]:p.push(f))}else p={lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=p,s=d):c=c.next=p,l|=f;if(i=i.next,i===null){if(i=r.shared.pending,i===null)break;p=i,i=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);c===null&&(s=d),r.baseState=s,r.firstBaseUpdate=u,r.lastBaseUpdate=c,o===null&&(r.shared.lanes=0),Rr|=l,e.lanes=l,e.memoizedState=d}}function Wb(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function Xb(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Wb(a[e],t)}var vl=hn(null),pc=hn(0);function nv(e,t){e=Gn,ot(pc,e),ot(vl,t),Gn=e|t.baseLanes}function sm(){ot(pc,Gn),ot(vl,vl.current)}function eh(){Gn=pc.current,zt(vl),zt(pc)}var Ma=hn(null),ja=null;function dr(e){var t=e.alternate;ot(bt,bt.current&1),ot(Ma,e),ja===null&&(t===null||vl.current!==null||t.memoizedState!==null)&&(ja=e)}function um(e){ot(bt,bt.current),ot(Ma,e),ja===null&&(ja=e)}function Zb(e){e.tag===22?(ot(bt,bt.current),ot(Ma,e),ja===null&&(ja=e)):fr(e)}function fr(){ot(bt,bt.current),ot(Ma,Ma.current)}function ba(e){zt(Ma),ja===e&&(ja=null),zt(bt)}var bt=hn(0);function mc(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Am(a)||Mm(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Hn=0,ce=null,Ye=null,Tt=null,hc=!1,ml=!1,co=!1,gc=0,Hi=0,hl=null,X_=0;function gt(){throw Error(P(321))}function th(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Aa(e[a],t[a]))return!1;return!0}function ah(e,t,a,n,r,o){return Hn=o,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ne.H=e===null||e.memoizedState===null?kS:ph,co=!1,o=a(n,r),co=!1,ml&&(o=Kb(t,a,n,r)),Qb(e),o}function Qb(e){ne.H=ji;var t=Ye!==null&&Ye.next!==null;if(Hn=0,Tt=Ye=ce=null,hc=!1,Hi=0,hl=null,t)throw Error(P(300));e===null||Et||(e=e.dependencies,e!==null&&dc(e)&&(Et=!0))}function Kb(e,t,a,n){ce=e;var r=0;do{if(ml&&(hl=null),Hi=0,ml=!1,25<=r)throw Error(P(301));if(r+=1,Tt=Ye=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ne.H=TS,o=t(a,n)}while(ml);return o}function Z_(){var e=ne.H,t=e.useState()[0];return t=typeof t.then=="function"?as(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(ce.flags|=1024),t}function nh(){var e=gc!==0;return gc=0,e}function rh(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function oh(e){if(hc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}hc=!1}Hn=0,Tt=Ye=ce=null,ml=!1,Hi=gc=0,hl=null}function ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?ce.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function St(){if(Ye===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Tt===null?ce.memoizedState:Tt.next;if(t!==null)Tt=t,Ye=e;else{if(e===null)throw ce.alternate===null?Error(P(467)):Error(P(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Tt===null?ce.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function zc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var t=Hi;return Hi+=1,hl===null&&(hl=[]),e=Vb(hl,e,t),t=ce,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,ne.H=t===null||t.memoizedState===null?kS:ph),e}function qc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return as(e);if(e.$$typeof===Pn)return Gt(e)}throw Error(P(438,String(e)))}function lh(e){var t=null,a=ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=ce.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=zc(),ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=OD;return t.index++,a}function jn(e,t){return typeof t=="function"?t(e):t}function Xu(e){var t=St();return ih(t,Ye,e)}function ih(e,t,a){var n=e.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=a;var r=e.baseQueue,o=n.pending;if(o!==null){if(r!==null){var l=r.next;r.next=o.next,o.next=l}t.baseQueue=r=o,n.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var i=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ce&d)===d:(Hn&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===xl&&(c=!0);else if((Hn&f)===f){u=u.next,f===xl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=d,l=o):s=s.next=d,ce.lanes|=f,Rr|=f;d=u.action,co&&a(o,d),o=u.hasEagerState?u.eagerState:a(o,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=f,l=o):s=s.next=f,ce.lanes|=d,Rr|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=o:s.next=i,!Aa(o,e.memoizedState)&&(Et=!0,c&&(a=fl,a!==null)))throw a;e.memoizedState=o,e.baseState=l,e.baseQueue=s,n.lastRenderedState=o}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function vp(e){var t=St(),a=t.queue;if(a===null)throw Error(P(311));a.lastRenderedReducer=e;var n=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var l=r=r.next;do o=e(o,l.action),l=l.next;while(l!==r);Aa(o,t.memoizedState)||(Et=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function Yb(e,t,a){var n=ce,r=St(),o=ke;if(o){if(a===void 0)throw Error(P(407));a=a()}else a=t();var l=!Aa((Ye||r).memoizedState,a);if(l&&(r.memoizedState=a,Et=!0),r=r.queue,sh(tS.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Tt!==null&&Tt.memoizedState.tag&1){if(n.flags|=2048,bl(9,{destroy:void 0},eS.bind(null,n,r,a,t),null),at===null)throw Error(P(349));o||(Hn&127)!==0||Jb(n,t,a)}return a}function Jb(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ce.updateQueue,t===null?(t=zc(),ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function eS(e,t,a,n){t.value=a,t.getSnapshot=n,aS(t)&&nS(e)}function tS(e,t,a){return a(function(){aS(t)&&nS(e)})}function aS(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Aa(e,a)}catch{return!0}}function nS(e){var t=go(e,2);t!==null&&pa(t,e,2)}function cm(e){var t=ea();if(typeof e=="function"){var a=e;if(e=a(),co){mr(!0);try{a()}finally{mr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},t}function rS(e,t,a,n){return e.baseState=a,ih(e,Ye,typeof n=="function"?n:jn)}function Q_(e,t,a,n,r){if(Hc(e))throw Error(P(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){o.listeners.push(l)}};ne.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,oS(t,o)):(o.next=a.next,t.pending=a.next=o)}}function oS(e,t){var a=t.action,n=t.payload,r=e.state;if(t.isTransition){var o=ne.T,l={};ne.T=l;try{var i=a(r,n),s=ne.S;s!==null&&s(l,i),rv(e,t,i)}catch(u){dm(e,t,u)}finally{o!==null&&l.types!==null&&(o.types=l.types),ne.T=o}}else try{o=a(r,n),rv(e,t,o)}catch(u){dm(e,t,u)}}function rv(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ov(e,t,n)},function(n){return dm(e,t,n)}):ov(e,t,a)}function ov(e,t,a){t.status="fulfilled",t.value=a,lS(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,oS(e,a)))}function dm(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,lS(t),t=t.next;while(t!==n)}e.action=null}function lS(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function iS(e,t){return t}function lv(e,t){if(ke){var a=at.formState;if(a!==null){e:{var n=ce;if(ke){if(st){t:{for(var r=st,o=Ha;r.nodeType!==8;){if(!o){r=null;break t}if(r=Va(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){st=Va(r.nextSibling),n=r.data==="F!";break e}}Mr(n)}n=!1}n&&(t=a[0])}}return a=ea(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iS,lastRenderedState:t},a.queue=n,a=CS.bind(null,ce,n),n.dispatch=a,n=cm(!1),o=fh.bind(null,ce,!1,n.queue),n=ea(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,a=Q_.bind(null,ce,r,o,a),r.dispatch=a,n.memoizedState=e,[t,a,!1]}function iv(e){var t=St();return sS(t,Ye,e)}function sS(e,t,a){if(t=ih(e,t,iS)[0],e=Xu(jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=as(t)}catch(l){throw l===El?Uc:l}else n=t;t=St();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ce.flags|=2048,bl(9,{destroy:void 0},K_.bind(null,r,a),null)),[n,o,e]}function K_(e,t){e.action=t}function sv(e){var t=St(),a=Ye;if(a!==null)return sS(t,a,e);St(),t=t.memoizedState,a=St();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function bl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=ce.updateQueue,t===null&&(t=zc(),ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function uS(){return St().memoizedState}function Zu(e,t,a,n){var r=ea();ce.flags|=e,r.memoizedState=bl(1|t,{destroy:void 0},a,n===void 0?null:n)}function Fc(e,t,a,n){var r=St();n=n===void 0?null:n;var o=r.memoizedState.inst;Ye!==null&&n!==null&&th(n,Ye.memoizedState.deps)?r.memoizedState=bl(t,o,a,n):(ce.flags|=e,r.memoizedState=bl(1|t,o,a,n))}function uv(e,t){Zu(8390656,8,e,t)}function sh(e,t){Fc(2048,8,e,t)}function Y_(e){ce.flags|=4;var t=ce.updateQueue;if(t===null)t=zc(),ce.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function cS(e){var t=St().memoizedState;return Y_({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function dS(e,t){return Fc(4,2,e,t)}function fS(e,t){return Fc(4,4,e,t)}function pS(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mS(e,t,a){a=a!=null?a.concat([e]):null,Fc(4,4,pS.bind(null,t,e),a)}function uh(){}function hS(e,t){var a=St();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&th(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function gS(e,t){var a=St();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&th(t,n[1]))return n[0];if(n=e(),co){mr(!0);try{e()}finally{mr(!1)}}return a.memoizedState=[n,t],n}function ch(e,t,a){return a===void 0||(Hn&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=r0(),ce.lanes|=e,Rr|=e,a)}function yS(e,t,a,n){return Aa(a,t)?a:vl.current!==null?(e=ch(e,a,n),Aa(e,t)||(Et=!0),e):(Hn&42)===0||(Hn&1073741824)!==0&&(Ce&261930)===0?(Et=!0,e.memoizedState=a):(e=r0(),ce.lanes|=e,Rr|=e,t)}function wS(e,t,a,n,r){var o=qe.p;qe.p=o!==0&&8>o?o:8;var l=ne.T,i={};ne.T=i,fh(e,!1,t,a);try{var s=r(),u=ne.S;if(u!==null&&u(i,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=W_(s,n);Mi(e,t,c,Ta(e))}else Mi(e,t,n,Ta(e))}catch(d){Mi(e,t,{then:function(){},status:"rejected",reason:d},Ta())}finally{qe.p=o,l!==null&&i.types!==null&&(l.types=i.types),ne.T=l}}function J_(){}function fm(e,t,a,n){if(e.tag!==5)throw Error(P(476));var r=xS(e).queue;wS(e,r,t,ao,a===null?J_:function(){return vS(e),a(n)})}function xS(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ao,baseState:ao,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:ao},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vS(e){var t=xS(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},Ta())}function dh(){return Gt($i)}function bS(){return St().memoizedState}function SS(){return St().memoizedState}function eO(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ta();e=br(a);var n=Sr(t,e,a);n!==null&&(pa(n,t,a),ki(n,t,a)),t={cache:Qm()},e.payload=t;return}t=t.return}}function tO(e,t,a){var n=Ta();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Hc(e)?IS(t,a):(a=$m(e,t,a,n),a!==null&&(pa(a,e,n),LS(a,t,n)))}function CS(e,t,a){var n=Ta();Mi(e,t,a,n)}function Mi(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hc(e))IS(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,i=o(l,a);if(r.hasEagerState=!0,r.eagerState=i,Aa(i,l))return Bc(e,t,r,0),at===null&&Nc(),!1}catch{}if(a=$m(e,t,r,n),a!==null)return pa(a,e,n),LS(a,t,n),!0}return!1}function fh(e,t,a,n){if(n={lane:2,revertLane:bh(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hc(e)){if(t)throw Error(P(479))}else t=$m(e,a,n,2),t!==null&&pa(t,e,2)}function Hc(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function IS(e,t){ml=hc=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function LS(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,cb(e,a)}}var ji={readContext:Gt,use:qc,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};ji.useEffectEvent=gt;var kS={readContext:Gt,use:qc,useCallback:function(e,t){return ea().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:uv,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Zu(4194308,4,pS.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Zu(4194308,4,e,t)},useInsertionEffect:function(e,t){Zu(4,2,e,t)},useMemo:function(e,t){var a=ea();t=t===void 0?null:t;var n=e();if(co){mr(!0);try{e()}finally{mr(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ea();if(a!==void 0){var r=a(t);if(co){mr(!0);try{a(t)}finally{mr(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=tO.bind(null,ce,e),[n.memoizedState,e]},useRef:function(e){var t=ea();return e={current:e},t.memoizedState=e},useState:function(e){e=cm(e);var t=e.queue,a=CS.bind(null,ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:uh,useDeferredValue:function(e,t){var a=ea();return ch(a,e,t)},useTransition:function(){var e=cm(!1);return e=wS.bind(null,ce,e.queue,!0,!1),ea().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=ce,r=ea();if(ke){if(a===void 0)throw Error(P(407));a=a()}else{if(a=t(),at===null)throw Error(P(349));(Ce&127)!==0||Jb(n,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,uv(tS.bind(null,n,o,e),[e]),n.flags|=2048,bl(9,{destroy:void 0},eS.bind(null,n,o,a,t),null),a},useId:function(){var e=ea(),t=at.identifierPrefix;if(ke){var a=fn,n=dn;a=(n&~(1<<32-ka(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=gc++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=X_++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:dh,useFormState:lv,useActionState:lv,useOptimistic:function(e){var t=ea();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=fh.bind(null,ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:lh,useCacheRefresh:function(){return ea().memoizedState=eO.bind(null,ce)},useEffectEvent:function(e){var t=ea(),a={impl:e};return t.memoizedState=a,function(){if((ze&2)!==0)throw Error(P(440));return a.impl.apply(void 0,arguments)}}},ph={readContext:Gt,use:qc,useCallback:hS,useContext:Gt,useEffect:sh,useImperativeHandle:mS,useInsertionEffect:dS,useLayoutEffect:fS,useMemo:gS,useReducer:Xu,useRef:uS,useState:function(){return Xu(jn)},useDebugValue:uh,useDeferredValue:function(e,t){var a=St();return yS(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Xu(jn)[0],t=St().memoizedState;return[typeof e=="boolean"?e:as(e),t]},useSyncExternalStore:Yb,useId:bS,useHostTransitionStatus:dh,useFormState:iv,useActionState:iv,useOptimistic:function(e,t){var a=St();return rS(a,Ye,e,t)},useMemoCache:lh,useCacheRefresh:SS};ph.useEffectEvent=cS;var TS={readContext:Gt,use:qc,useCallback:hS,useContext:Gt,useEffect:sh,useImperativeHandle:mS,useInsertionEffect:dS,useLayoutEffect:fS,useMemo:gS,useReducer:vp,useRef:uS,useState:function(){return vp(jn)},useDebugValue:uh,useDeferredValue:function(e,t){var a=St();return Ye===null?ch(a,e,t):yS(a,Ye.memoizedState,e,t)},useTransition:function(){var e=vp(jn)[0],t=St().memoizedState;return[typeof e=="boolean"?e:as(e),t]},useSyncExternalStore:Yb,useId:bS,useHostTransitionStatus:dh,useFormState:sv,useActionState:sv,useOptimistic:function(e,t){var a=St();return Ye!==null?rS(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:lh,useCacheRefresh:SS};TS.useEffectEvent=cS;function bp(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:ut({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var pm={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ta(),r=br(n);r.payload=t,a!=null&&(r.callback=a),t=Sr(e,r,n),t!==null&&(pa(t,e,n),ki(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ta(),r=br(n);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Sr(e,r,n),t!==null&&(pa(t,e,n),ki(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ta(),n=br(a);n.tag=2,t!=null&&(n.callback=t),t=Sr(e,n,a),t!==null&&(pa(t,e,a),ki(t,e,a))}};function cv(e,t,a,n,r,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,l):t.prototype&&t.prototype.isPureReactComponent?!Ui(a,n)||!Ui(r,o):!0}function dv(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&pm.enqueueReplaceState(t,t.state,null)}function fo(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=ut({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function AS(e){sc(e)}function MS(e){console.error(e)}function ES(e){sc(e)}function yc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function fv(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function mm(e,t,a){return a=br(a),a.tag=3,a.payload={element:null},a.callback=function(){yc(e,t)},a}function RS(e){return e=br(e),e.tag=3,e}function DS(e,t,a,n){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=n.value;e.payload=function(){return r(o)},e.callback=function(){fv(t,a,n)}}var l=a.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){fv(t,a,n),typeof r!="function"&&(Cr===null?Cr=new Set([this]):Cr.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})})}function aO(e,t,a,n,r){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ml(t,a,r,!0),a=Ma.current,a!==null){switch(a.tag){case 31:case 13:return ja===null?Sc():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,n===fc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Dp(e,n,r)),!1;case 22:return a.flags|=65536,n===fc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Dp(e,n,r)),!1}throw Error(P(435,a.tag))}return Dp(e,n,r),Sc(),!1}if(ke)return t=Ma.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==tm&&(e=Error(P(422),{cause:n}),qi(Fa(e,a)))):(n!==tm&&(t=Error(P(423),{cause:n}),qi(Fa(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=Fa(n,a),r=mm(e.stateNode,n,r),xp(e,r),yt!==4&&(yt=2)),!1;var o=Error(P(520),{cause:n});if(o=Fa(o,a),Di===null?Di=[o]:Di.push(o),yt!==4&&(yt=2),t===null)return!0;n=Fa(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=mm(a.stateNode,n,e),xp(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Cr===null||!Cr.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=RS(r),DS(r,e,a,n),xp(a,r),!1}a=a.return}while(a!==null);return!1}var mh=Error(P(461)),Et=!1;function Ht(e,t,a,n){t.child=e===null?$b(t,null,a,n):uo(t,e.child,a,n)}function pv(e,t,a,n,r){a=a.render;var o=t.ref;if("ref"in n){var l={};for(var i in n)i!=="ref"&&(l[i]=n[i])}else l=n;return so(t),n=ah(e,t,a,l,o,r),i=nh(),e!==null&&!Et?(rh(e,t,r),Vn(e,t,r)):(ke&&i&&Xm(t),t.flags|=1,Ht(e,t,n,r),t.child)}function mv(e,t,a,n,r){if(e===null){var o=a.type;return typeof o=="function"&&!Wm(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,_S(e,t,o,n,r)):(e=$u(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!hh(e,r)){var l=o.memoizedProps;if(a=a.compare,a=a!==null?a:Ui,a(l,n)&&e.ref===t.ref)return Vn(e,t,r)}return t.flags|=1,e=Un(o,n),e.ref=t.ref,e.return=t,t.child=e}function _S(e,t,a,n,r){if(e!==null){var o=e.memoizedProps;if(Ui(o,n)&&e.ref===t.ref)if(Et=!1,t.pendingProps=n=o,hh(e,r))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,Vn(e,t,r)}return hm(e,t,a,n,r)}function OS(e,t,a,n){var r=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~o}else n=0,t.child=null;return hv(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wu(t,o!==null?o.cachePool:null),o!==null?nv(t,o):sm(),Zb(t);else return n=t.lanes=536870912,hv(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(Wu(t,o.cachePool),nv(t,o),fr(t),t.memoizedState=null):(e!==null&&Wu(t,null),sm(),fr(t));return Ht(e,t,r,a),t.child}function vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hv(e,t,a,n,r){var o=Km();return o=o===null?null:{parent:Mt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Wu(t,null),sm(),Zb(t),e!==null&&Ml(e,t,n,!0),t.childLanes=r,null}function Qu(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gv(e,t,a){return uo(t,e.child,null,a),e=Qu(t,t.pendingProps),e.flags|=2,ba(t),t.memoizedState=null,e}function nO(e,t,a){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(n.mode==="hidden")return e=Qu(t,n),t.lanes=536870912,vi(null,e);if(um(t),(e=st)?(e=k0(e,Ha),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ar!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},a=zb(e),a.return=t,t.child=a,Vt=t,st=null)):e=null,e===null)throw Mr(t);return t.lanes=536870912,null}return Qu(t,n)}var o=e.memoizedState;if(o!==null){var l=o.dehydrated;if(um(t),r)if(t.flags&256)t.flags&=-257,t=gv(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(Et||Ml(e,t,a,!1),r=(a&e.childLanes)!==0,Et||r){if(n=at,n!==null&&(l=db(n,a),l!==0&&l!==o.retryLane))throw o.retryLane=l,go(e,l),pa(n,e,l),mh;Sc(),t=gv(e,t,a)}else e=o.treeContext,st=Va(l.nextSibling),Vt=t,ke=!0,vr=null,Ha=!1,e!==null&&Fb(t,e),t=Qu(t,n),t.flags|=4096;return t}return e=Un(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ku(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(P(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function hm(e,t,a,n,r){return so(t),a=ah(e,t,a,n,void 0,r),n=nh(),e!==null&&!Et?(rh(e,t,r),Vn(e,t,r)):(ke&&n&&Xm(t),t.flags|=1,Ht(e,t,a,r),t.child)}function yv(e,t,a,n,r,o){return so(t),t.updateQueue=null,a=Kb(t,n,a,r),Qb(e),n=nh(),e!==null&&!Et?(rh(e,t,o),Vn(e,t,o)):(ke&&n&&Xm(t),t.flags|=1,Ht(e,t,a,o),t.child)}function wv(e,t,a,n,r){if(so(t),t.stateNode===null){var o=ol,l=a.contextType;typeof l=="object"&&l!==null&&(o=Gt(l)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=pm,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},Jm(t),l=a.contextType,o.context=typeof l=="object"&&l!==null?Gt(l):ol,o.state=t.memoizedState,l=a.getDerivedStateFromProps,typeof l=="function"&&(bp(t,a,l,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(l=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),l!==o.state&&pm.enqueueReplaceState(o,o.state,null),Ai(t,n,o,r),Ti(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var i=t.memoizedProps,s=fo(a,i);o.props=s;var u=o.context,c=a.contextType;l=ol,typeof c=="object"&&c!==null&&(l=Gt(c));var d=a.getDerivedStateFromProps;c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(i||u!==l)&&dv(t,o,n,l),ur=!1;var f=t.memoizedState;o.state=f,Ai(t,n,o,r),Ti(),u=t.memoizedState,i||f!==u||ur?(typeof d=="function"&&(bp(t,a,d,n),u=t.memoizedState),(s=ur||cv(t,a,s,n,f,u,l))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),o.props=n,o.state=u,o.context=l,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,lm(e,t),l=t.memoizedProps,c=fo(a,l),o.props=c,d=t.pendingProps,f=o.context,u=a.contextType,s=ol,typeof u=="object"&&u!==null&&(s=Gt(u)),i=a.getDerivedStateFromProps,(u=typeof i=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==s)&&dv(t,o,n,s),ur=!1,f=t.memoizedState,o.state=f,Ai(t,n,o,r),Ti();var p=t.memoizedState;l!==d||f!==p||ur||e!==null&&e.dependencies!==null&&dc(e.dependencies)?(typeof i=="function"&&(bp(t,a,i,n),p=t.memoizedState),(c=ur||cv(t,a,c,n,f,p,s)||e!==null&&e.dependencies!==null&&dc(e.dependencies))?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=s,n=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,Ku(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=uo(t,e.child,null,r),t.child=uo(t,null,a,r)):Ht(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Vn(e,t,r),e}function xv(e,t,a,n){return io(),t.flags|=256,Ht(e,t,a,n),t.child}var Sp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cp(e){return{baseLanes:e,cachePool:jb()}}function Ip(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ca),e}function PS(e,t,a){var n=t.pendingProps,r=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),l&&(r=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(r?dr(t):fr(t),(e=st)?(e=k0(e,Ha),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ar!==null?{id:dn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},a=zb(e),a.return=t,t.child=a,Vt=t,st=null)):e=null,e===null)throw Mr(t);return Mm(e)?t.lanes=32:t.lanes=536870912,null}var i=n.children;return n=n.fallback,r?(fr(t),r=t.mode,i=wc({mode:"hidden",children:i},r),n=no(n,r,a,null),i.return=t,n.return=t,i.sibling=n,t.child=i,n=t.child,n.memoizedState=Cp(a),n.childLanes=Ip(e,l,a),t.memoizedState=Sp,vi(null,n)):(dr(t),gm(t,i))}var s=e.memoizedState;if(s!==null&&(i=s.dehydrated,i!==null)){if(o)t.flags&256?(dr(t),t.flags&=-257,t=Lp(e,t,a)):t.memoizedState!==null?(fr(t),t.child=e.child,t.flags|=128,t=null):(fr(t),i=n.fallback,r=t.mode,n=wc({mode:"visible",children:n.children},r),i=no(i,r,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,uo(t,e.child,null,a),n=t.child,n.memoizedState=Cp(a),n.childLanes=Ip(e,l,a),t.memoizedState=Sp,t=vi(null,n));else if(dr(t),Mm(i)){if(l=i.nextSibling&&i.nextSibling.dataset,l)var u=l.dgst;l=u,n=Error(P(419)),n.stack="",n.digest=l,qi({value:n,source:null,stack:null}),t=Lp(e,t,a)}else if(Et||Ml(e,t,a,!1),l=(a&e.childLanes)!==0,Et||l){if(l=at,l!==null&&(n=db(l,a),n!==0&&n!==s.retryLane))throw s.retryLane=n,go(e,n),pa(l,e,n),mh;Am(i)||Sc(),t=Lp(e,t,a)}else Am(i)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,st=Va(i.nextSibling),Vt=t,ke=!0,vr=null,Ha=!1,e!==null&&Fb(t,e),t=gm(t,n.children),t.flags|=4096);return t}return r?(fr(t),i=n.fallback,r=t.mode,s=e.child,u=s.sibling,n=Un(s,{mode:"hidden",children:n.children}),n.subtreeFlags=s.subtreeFlags&65011712,u!==null?i=Un(u,i):(i=no(i,r,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,vi(null,n),n=t.child,i=e.child.memoizedState,i===null?i=Cp(a):(r=i.cachePool,r!==null?(s=Mt._currentValue,r=r.parent!==s?{parent:s,pool:s}:r):r=jb(),i={baseLanes:i.baseLanes|a,cachePool:r}),n.memoizedState=i,n.childLanes=Ip(e,l,a),t.memoizedState=Sp,vi(e.child,n)):(dr(t),a=e.child,e=a.sibling,a=Un(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=a,t.memoizedState=null,a)}function gm(e,t){return t=wc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=Sa(22,e,null,t),e.lanes=0,e}function Lp(e,t,a){return uo(t,e.child,null,a),e=gm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vv(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),nm(e.return,t,a)}function kp(e,t,a,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:r,treeForkCount:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=n,l.tail=a,l.tailMode=r,l.treeForkCount=o)}function NS(e,t,a){var n=t.pendingProps,r=n.revealOrder,o=n.tail;n=n.children;var l=bt.current,i=(l&2)!==0;if(i?(l=l&1|2,t.flags|=128):l&=1,ot(bt,l),Ht(e,t,n,a),n=ke?zi:0,!i&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vv(e,a,t);else if(e.tag===19)vv(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&mc(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),kp(t,!1,r,a,o,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&mc(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}kp(t,!0,a,null,o,n);break;case"together":kp(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Vn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ml(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,a=Un(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Un(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function hh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dc(e)))}function rO(e,t,a){switch(t.tag){case 3:rc(t,t.stateNode.containerInfo),cr(t,Mt,e.memoizedState.cache),io();break;case 27:case 5:Vp(t);break;case 4:rc(t,t.stateNode.containerInfo);break;case 10:cr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,um(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(dr(t),t.flags|=128,null):(a&t.child.childLanes)!==0?PS(e,t,a):(dr(t),e=Vn(e,t,a),e!==null?e.sibling:null);dr(t);break;case 19:var r=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ml(e,t,a,!1),n=(a&t.childLanes)!==0),r){if(n)return NS(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ot(bt,bt.current),n)break;return null;case 22:return t.lanes=0,OS(e,t,a,t.pendingProps);case 24:cr(t,Mt,e.memoizedState.cache)}return Vn(e,t,a)}function BS(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!hh(e,a)&&(t.flags&128)===0)return Et=!1,rO(e,t,a);Et=(e.flags&131072)!==0}else Et=!1,ke&&(t.flags&1048576)!==0&&qb(t,zi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e=="function")Wm(e)?(n=fo(e,n),t.tag=1,t=wv(null,t,e,n,a)):(t.tag=0,t=hm(null,t,e,n,a));else{if(e!=null){var r=e.$$typeof;if(r===_m){t.tag=11,t=pv(null,t,e,n,a);break e}else if(r===Om){t.tag=14,t=mv(null,t,e,n,a);break e}}throw t=Hp(e)||e,Error(P(306,t,""))}}return t;case 0:return hm(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,r=fo(n,t.pendingProps),wv(e,t,n,r,a);case 3:e:{if(rc(t,t.stateNode.containerInfo),e===null)throw Error(P(387));n=t.pendingProps;var o=t.memoizedState;r=o.element,lm(e,t),Ai(t,n,null,a);var l=t.memoizedState;if(n=l.cache,cr(t,Mt,n),n!==o.cache&&rm(t,[Mt],a,!0),Ti(),n=l.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=xv(e,t,n,a);break e}else if(n!==r){r=Fa(Error(P(424)),t),qi(r),t=xv(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,st=Va(e.firstChild),Vt=t,ke=!0,vr=null,Ha=!0,a=$b(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(io(),n===r){t=Vn(e,t,a);break e}Ht(e,t,n,a)}t=t.child}return t;case 26:return Ku(e,t),e===null?(a=Hv(t.type,null,t.pendingProps,null))?t.memoizedState=a:ke||(a=t.type,e=t.pendingProps,n=kc(xr.current).createElement(a),n[jt]=t,n[ma]=e,$t(n,a,e),Ut(n),t.stateNode=n):t.memoizedState=Hv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Vp(t),e===null&&ke&&(n=t.stateNode=T0(t.type,t.pendingProps,xr.current),Vt=t,Ha=!0,r=st,_r(t.type)?(Em=r,st=Va(n.firstChild)):st=r),Ht(e,t,t.pendingProps.children,a),Ku(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((r=n=st)&&(n=DO(n,t.type,t.pendingProps,Ha),n!==null?(t.stateNode=n,Vt=t,st=Va(n.firstChild),Ha=!1,r=!0):r=!1),r||Mr(t)),Vp(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,n=o.children,km(r,o)?n=null:l!==null&&km(r,l)&&(t.flags|=32),t.memoizedState!==null&&(r=ah(e,t,Z_,null,null,a),$i._currentValue=r),Ku(e,t),Ht(e,t,n,a),t.child;case 6:return e===null&&ke&&((e=a=st)&&(a=_O(a,t.pendingProps,Ha),a!==null?(t.stateNode=a,Vt=t,st=null,e=!0):e=!1),e||Mr(t)),null;case 13:return PS(e,t,a);case 4:return rc(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=uo(t,null,n,a):Ht(e,t,n,a),t.child;case 11:return pv(e,t,t.type,t.pendingProps,a);case 7:return Ht(e,t,t.pendingProps,a),t.child;case 8:return Ht(e,t,t.pendingProps.children,a),t.child;case 12:return Ht(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,cr(t,t.type,n.value),Ht(e,t,n.children,a),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,so(t),r=Gt(r),n=n(r),t.flags|=1,Ht(e,t,n,a),t.child;case 14:return mv(e,t,t.type,t.pendingProps,a);case 15:return _S(e,t,t.type,t.pendingProps,a);case 19:return NS(e,t,a);case 31:return nO(e,t,a);case 22:return OS(e,t,a,t.pendingProps);case 24:return so(t),n=Gt(Mt),e===null?(r=Km(),r===null&&(r=at,o=Qm(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:n,cache:r},Jm(t),cr(t,Mt,r)):((e.lanes&a)!==0&&(lm(e,t),Ai(t,null,null,a),Ti()),r=e.memoizedState,o=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),cr(t,Mt,n)):(n=o.cache,cr(t,Mt,n),n!==r.cache&&rm(t,[Mt],a,!0))),Ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function Mn(e){e.flags|=4}function Tp(e,t,a,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(i0())e.flags|=8192;else throw oo=fc,Ym}else e.flags&=-16777217}function bv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t))if(i0())e.flags|=8192;else throw oo=fc,Ym}function Pu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?sb():536870912,e.lanes|=t,Sl|=t)}function pi(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function oO(e,t,a){var n=t.pendingProps;switch(Zm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zn(Mt),gl(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wo(t)?Mn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wp())),it(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(Mn(t),o!==null?(it(t),bv(t,o)):(it(t),Tp(t,r,null,n,a))):o?o!==e.memoizedState?(Mn(t),it(t),bv(t,o)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Mn(t),it(t),Tp(t,r,e,n,a)),null;case 27:if(oc(t),a=xr.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mn(t);else{if(!n){if(t.stateNode===null)throw Error(P(166));return it(t),null}e=mn.current,Wo(t)?Qx(t,e):(e=T0(r,n,a),t.stateNode=e,Mn(t))}return it(t),null;case 5:if(oc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mn(t);else{if(!n){if(t.stateNode===null)throw Error(P(166));return it(t),null}if(o=mn.current,Wo(t))Qx(t,o);else{var l=kc(xr.current);switch(o){case 1:o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=l.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?l.createElement(r,{is:n.is}):l.createElement(r)}}o[jt]=t,o[ma]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)o.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch($t(o,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Mn(t)}}return it(t),Tp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Mn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(e=xr.current,Wo(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=Vt,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[jt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||C0(e.nodeValue,a)),e||Mr(t,!0)}else e=kc(e).createTextNode(n),e[jt]=t,t.stateNode=e}return it(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Wo(t),a!==null){if(e===null){if(!n)throw Error(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[jt]=t}else io(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else a=wp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ba(t),t):(ba(t),null);if((t.flags&128)!==0)throw Error(P(558))}return it(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Wo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(P(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(P(317));r[jt]=t}else io(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=wp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ba(t),t):(ba(t),null)}return ba(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Pu(t,t.updateQueue),it(t),null);case 4:return gl(),e===null&&Sh(t.stateNode.containerInfo),it(t),null;case 10:return zn(t.type),it(t),null;case 19:if(zt(bt),n=t.memoizedState,n===null)return it(t),null;if(r=(t.flags&128)!==0,o=n.rendering,o===null)if(r)pi(n,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=mc(e),o!==null){for(t.flags|=128,pi(n,!1),e=o.updateQueue,t.updateQueue=e,Pu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ub(a,e),a=a.sibling;return ot(bt,bt.current&1|2),ke&&_n(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ia()>vc&&(t.flags|=128,r=!0,pi(n,!1),t.lanes=4194304)}else{if(!r)if(e=mc(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Pu(t,e),pi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!ke)return it(t),null}else 2*Ia()-n.renderingStartTime>vc&&a!==536870912&&(t.flags|=128,r=!0,pi(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ia(),e.sibling=null,a=bt.current,ot(bt,r?a&1|2:a&1),ke&&_n(t,n.treeForkCount),e):(it(t),null);case 22:case 23:return ba(t),eh(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),a=t.updateQueue,a!==null&&Pu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&zt(ro),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),zn(Mt),it(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function lO(e,t){switch(Zm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(Mt),gl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oc(t),null;case 31:if(t.memoizedState!==null){if(ba(t),t.alternate===null)throw Error(P(340));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ba(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(bt),null;case 4:return gl(),null;case 10:return zn(t.type),null;case 22:case 23:return ba(t),eh(),e!==null&&zt(ro),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(Mt),null;case 25:return null;default:return null}}function US(e,t){switch(Zm(t),t.tag){case 3:zn(Mt),gl();break;case 26:case 27:case 5:oc(t);break;case 4:gl();break;case 31:t.memoizedState!==null&&ba(t);break;case 13:ba(t);break;case 19:zt(bt);break;case 10:zn(t.type);break;case 22:case 23:ba(t),eh(),e!==null&&zt(ro);break;case 24:zn(Mt)}}function ns(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var o=a.create,l=a.inst;n=o(),l.destroy=n}a=a.next}while(a!==r)}}catch(i){Ge(t,t.return,i)}}function Er(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){var l=n.inst,i=l.destroy;if(i!==void 0){l.destroy=void 0,r=t;var s=a,u=i;try{u()}catch(c){Ge(r,s,c)}}}n=n.next}while(n!==o)}}catch(c){Ge(t,t.return,c)}}function zS(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Xb(t,a)}catch(n){Ge(e,e.return,n)}}}function qS(e,t,a){a.props=fo(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ge(e,t,n)}}function Ei(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){Ge(e,t,r)}}function pn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){Ge(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ge(e,t,r)}else a.current=null}function FS(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){Ge(e,e.return,r)}}function Ap(e,t,a){try{var n=e.stateNode;kO(n,e.type,a,t),n[ma]=t}catch(r){Ge(e,e.return,r)}}function HS(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_r(e.type)||e.tag===4}function Mp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HS(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.tag===27&&_r(e.type)||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 ym(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Nn));else if(n!==4&&(n===27&&_r(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ym(e,t,a),e=e.sibling;e!==null;)ym(e,t,a),e=e.sibling}function xc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&_r(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(xc(e,t,a),e=e.sibling;e!==null;)xc(e,t,a),e=e.sibling}function jS(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);$t(t,n,a),t[jt]=e,t[ma]=a}catch(o){Ge(e,e.return,o)}}var On=!1,At=!1,Ep=!1,Sv=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function iO(e,t){if(e=e.containerInfo,Im=Ec,e=Eb(e),Vm(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var l=0,i=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==a||r!==0&&d.nodeType!==3||(i=l+r),d!==o||n!==0&&d.nodeType!==3||(s=l+n),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===a&&++u===r&&(i=l),f===o&&++c===n&&(s=l),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}a=i===-1||s===-1?null:{start:i,end:s}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lm={focusedElem:e,selectionRange:a},Ec=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var m=fo(a.type,r);e=n.getSnapshotBeforeUpdate(m,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(x){Ge(a,a.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Tm(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tm(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(P(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=t.return}}function VS(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Rn(e,a),n&4&&ns(5,a);break;case 1:if(Rn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(l){Ge(a,a.return,l)}else{var r=fo(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Ge(a,a.return,l)}}n&64&&zS(a),n&512&&Ei(a,a.return);break;case 3:if(Rn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Xb(e,t)}catch(l){Ge(a,a.return,l)}}break;case 27:t===null&&n&4&&jS(a);case 26:case 5:Rn(e,a),t===null&&n&4&&FS(a),n&512&&Ei(a,a.return);break;case 12:Rn(e,a);break;case 31:Rn(e,a),n&4&&WS(e,a);break;case 13:Rn(e,a),n&4&&XS(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=gO.bind(null,a),OO(e,a))));break;case 22:if(n=a.memoizedState!==null||On,!n){t=t!==null&&t.memoizedState!==null||At,r=On;var o=At;On=n,(At=t)&&!o?Dn(e,a,(a.subtreeFlags&8772)!==0):Rn(e,a),On=r,At=o}break;case 30:break;default:Rn(e,a)}}function GS(e){var t=e.alternate;t!==null&&(e.alternate=null,GS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Um(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,da=!1;function En(e,t,a){for(a=a.child;a!==null;)$S(e,t,a),a=a.sibling}function $S(e,t,a){if(La&&typeof La.onCommitFiberUnmount=="function")try{La.onCommitFiberUnmount(Qi,a)}catch{}switch(a.tag){case 26:At||pn(a,t),En(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:At||pn(a,t);var n=ft,r=da;_r(a.type)&&(ft=a.stateNode,da=!1),En(e,t,a),Oi(a.stateNode),ft=n,da=r;break;case 5:At||pn(a,t);case 6:if(n=ft,r=da,ft=null,En(e,t,a),ft=n,da=r,ft!==null)if(da)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(a.stateNode)}catch(o){Ge(a,t,o)}else try{ft.removeChild(a.stateNode)}catch(o){Ge(a,t,o)}break;case 18:ft!==null&&(da?(e=ft,Bv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),kl(e)):Bv(ft,a.stateNode));break;case 4:n=ft,r=da,ft=a.stateNode.containerInfo,da=!0,En(e,t,a),ft=n,da=r;break;case 0:case 11:case 14:case 15:Er(2,a,t),At||Er(4,a,t),En(e,t,a);break;case 1:At||(pn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&qS(a,t,n)),En(e,t,a);break;case 21:En(e,t,a);break;case 22:At=(n=At)||a.memoizedState!==null,En(e,t,a),At=n;break;default:En(e,t,a)}}function WS(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{kl(e)}catch(a){Ge(t,t.return,a)}}}function XS(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{kl(e)}catch(a){Ge(t,t.return,a)}}function sO(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sv),t;default:throw Error(P(435,e.tag))}}function Nu(e,t){var a=sO(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var r=yO.bind(null,e,n);n.then(r,r)}})}function ua(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var r=a[n],o=e,l=t,i=l;e:for(;i!==null;){switch(i.tag){case 27:if(_r(i.type)){ft=i.stateNode,da=!1;break e}break;case 5:ft=i.stateNode,da=!1;break e;case 3:case 4:ft=i.stateNode.containerInfo,da=!0;break e}i=i.return}if(ft===null)throw Error(P(160));$S(o,l,r),ft=null,da=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ZS(t,e),t=t.sibling}var en=null;function ZS(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ua(t,e),ca(e),n&4&&(Er(3,e,e.return),ns(3,e),Er(5,e,e.return));break;case 1:ua(t,e),ca(e),n&512&&(At||a===null||pn(a,a.return)),n&64&&On&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var r=en;if(ua(t,e),ca(e),n&512&&(At||a===null||pn(a,a.return)),n&4){var o=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Ji]||o[jt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(n),r.head.insertBefore(o,r.querySelector("head > title"))),$t(o,n,a),o[jt]=e,Ut(o),n=o;break e;case"link":var l=Vv("link","href",r).get(n+(a.href||""));if(l){for(var i=0;i<l.length;i++)if(o=l[i],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){l.splice(i,1);break t}}o=r.createElement(n),$t(o,n,a),r.head.appendChild(o);break;case"meta":if(l=Vv("meta","content",r).get(n+(a.content||""))){for(i=0;i<l.length;i++)if(o=l[i],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){l.splice(i,1);break t}}o=r.createElement(n),$t(o,n,a),r.head.appendChild(o);break;default:throw Error(P(468,n))}o[jt]=e,Ut(o),n=o}e.stateNode=n}else Gv(r,e.type,e.stateNode);else e.stateNode=jv(r,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?Gv(r,e.type,e.stateNode):jv(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Ap(e,e.memoizedProps,a.memoizedProps)}break;case 27:ua(t,e),ca(e),n&512&&(At||a===null||pn(a,a.return)),a!==null&&n&4&&Ap(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ua(t,e),ca(e),n&512&&(At||a===null||pn(a,a.return)),e.flags&32){r=e.stateNode;try{wl(r,"")}catch(m){Ge(e,e.return,m)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,Ap(e,r,a!==null?a.memoizedProps:r)),n&1024&&(Ep=!0);break;case 6:if(ua(t,e),ca(e),n&4){if(e.stateNode===null)throw Error(P(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(m){Ge(e,e.return,m)}}break;case 3:if(ec=null,r=en,en=Tc(t.containerInfo),ua(t,e),en=r,ca(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{kl(t.containerInfo)}catch(m){Ge(e,e.return,m)}Ep&&(Ep=!1,QS(e));break;case 4:n=en,en=Tc(e.stateNode.containerInfo),ua(t,e),ca(e),en=n;break;case 12:ua(t,e),ca(e);break;case 31:ua(t,e),ca(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Nu(e,n)));break;case 13:ua(t,e),ca(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(jc=Ia()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Nu(e,n)));break;case 22:r=e.memoizedState!==null;var s=a!==null&&a.memoizedState!==null,u=On,c=At;if(On=u||r,At=c||s,ua(t,e),At=c,On=u,ca(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||s||On||At||to(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){s=a=t;try{if(o=s.stateNode,r)l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{i=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;i.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(m){Ge(s,s.return,m)}}}else if(t.tag===6){if(a===null){s=t;try{s.stateNode.nodeValue=r?"":s.memoizedProps}catch(m){Ge(s,s.return,m)}}}else if(t.tag===18){if(a===null){s=t;try{var p=s.stateNode;r?Uv(p,!0):Uv(s.stateNode,!1)}catch(m){Ge(s,s.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Nu(e,a))));break;case 19:ua(t,e),ca(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Nu(e,n)));break;case 30:break;case 21:break;default:ua(t,e),ca(e)}}function ca(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(HS(n)){a=n;break}n=n.return}if(a==null)throw Error(P(160));switch(a.tag){case 27:var r=a.stateNode,o=Mp(e);xc(e,o,r);break;case 5:var l=a.stateNode;a.flags&32&&(wl(l,""),a.flags&=-33);var i=Mp(e);xc(e,i,l);break;case 3:case 4:var s=a.stateNode.containerInfo,u=Mp(e);ym(e,u,s);break;default:throw Error(P(161))}}catch(c){Ge(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QS(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;QS(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Rn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)VS(e,t.alternate,t),t=t.sibling}function to(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Er(4,t,t.return),to(t);break;case 1:pn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&qS(t,t.return,a),to(t);break;case 27:Oi(t.stateNode);case 26:case 5:pn(t,t.return),to(t);break;case 22:t.memoizedState===null&&to(t);break;case 30:to(t);break;default:to(t)}e=e.sibling}}function Dn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,o=t,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dn(r,o,a),ns(4,o);break;case 1:if(Dn(r,o,a),n=o,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){Ge(n,n.return,u)}if(n=o,r=n.updateQueue,r!==null){var i=n.stateNode;try{var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)Wb(s[r],i)}catch(u){Ge(n,n.return,u)}}a&&l&64&&zS(o),Ei(o,o.return);break;case 27:jS(o);case 26:case 5:Dn(r,o,a),a&&n===null&&l&4&&FS(o),Ei(o,o.return);break;case 12:Dn(r,o,a);break;case 31:Dn(r,o,a),a&&l&4&&WS(r,o);break;case 13:Dn(r,o,a),a&&l&4&&XS(r,o);break;case 22:o.memoizedState===null&&Dn(r,o,a),Ei(o,o.return);break;case 30:break;default:Dn(r,o,a)}t=t.sibling}}function gh(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ts(a))}function yh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e))}function Ja(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)KS(e,t,a,n),t=t.sibling}function KS(e,t,a,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ja(e,t,a,n),r&2048&&ns(9,t);break;case 1:Ja(e,t,a,n);break;case 3:Ja(e,t,a,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e)));break;case 12:if(r&2048){Ja(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,l=o.id,i=o.onPostCommit;typeof i=="function"&&i(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Ge(t,t.return,s)}}else Ja(e,t,a,n);break;case 31:Ja(e,t,a,n);break;case 13:Ja(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,l=t.alternate,t.memoizedState!==null?o._visibility&2?Ja(e,t,a,n):Ri(e,t):o._visibility&2?Ja(e,t,a,n):(o._visibility|=2,Zo(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&gh(l,t);break;case 24:Ja(e,t,a,n),r&2048&&yh(t.alternate,t);break;default:Ja(e,t,a,n)}}function Zo(e,t,a,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,l=t,i=a,s=n,u=l.flags;switch(l.tag){case 0:case 11:case 15:Zo(o,l,i,s,r),ns(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Zo(o,l,i,s,r):Ri(o,l):(c._visibility|=2,Zo(o,l,i,s,r)),r&&u&2048&&gh(l.alternate,l);break;case 24:Zo(o,l,i,s,r),r&&u&2048&&yh(l.alternate,l);break;default:Zo(o,l,i,s,r)}t=t.sibling}}function Ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,r=n.flags;switch(n.tag){case 22:Ri(a,n),r&2048&&gh(n.alternate,n);break;case 24:Ri(a,n),r&2048&&yh(n.alternate,n);break;default:Ri(a,n)}t=t.sibling}}var bi=8192;function Xo(e,t,a){if(e.subtreeFlags&bi)for(e=e.child;e!==null;)YS(e,t,a),e=e.sibling}function YS(e,t,a){switch(e.tag){case 26:Xo(e,t,a),e.flags&bi&&e.memoizedState!==null&&$O(a,en,e.memoizedState,e.memoizedProps);break;case 5:Xo(e,t,a);break;case 3:case 4:var n=en;en=Tc(e.stateNode.containerInfo),Xo(e,t,a),en=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=bi,bi=16777216,Xo(e,t,a),bi=n):Xo(e,t,a));break;default:Xo(e,t,a)}}function JS(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Bt=n,t0(n,e)}JS(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)e0(e),e=e.sibling}function e0(e){switch(e.tag){case 0:case 11:case 15:mi(e),e.flags&2048&&Er(9,e,e.return);break;case 3:mi(e);break;case 12:mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yu(e)):mi(e);break;default:mi(e)}}function Yu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Bt=n,t0(n,e)}JS(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Er(8,t,t.return),Yu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yu(t));break;default:Yu(t)}e=e.sibling}}function t0(e,t){for(;Bt!==null;){var a=Bt;switch(a.tag){case 0:case 11:case 15:Er(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ts(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Bt=n;else e:for(a=e;Bt!==null;){n=Bt;var r=n.sibling,o=n.return;if(GS(n),n===a){Bt=null;break e}if(r!==null){r.return=o,Bt=r;break e}Bt=o}}}var uO={getCacheForType:function(e){var t=Gt(Mt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Mt).controller.signal}},cO=typeof WeakMap=="function"?WeakMap:Map,ze=0,at=null,xe=null,Ce=0,Ve=0,va=null,gr=!1,Rl=!1,wh=!1,Gn=0,yt=0,Rr=0,lo=0,xh=0,Ca=0,Sl=0,Di=null,fa=null,wm=!1,jc=0,a0=0,vc=1/0,bc=null,Cr=null,Dt=0,Ir=null,Cl=null,qn=0,xm=0,vm=null,n0=null,_i=0,bm=null;function Ta(){return(ze&2)!==0&&Ce!==0?Ce&-Ce:ne.T!==null?bh():fb()}function r0(){if(Ca===0)if((Ce&536870912)===0||ke){var e=ku;ku<<=1,(ku&3932160)===0&&(ku=262144),Ca=e}else Ca=536870912;return e=Ma.current,e!==null&&(e.flags|=32),Ca}function pa(e,t,a){(e===at&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Il(e,0),yr(e,Ce,Ca,!1)),Yi(e,a),((ze&2)===0||e!==at)&&(e===at&&((ze&2)===0&&(lo|=a),yt===4&&yr(e,Ce,Ca,!1)),gn(e))}function o0(e,t,a){if((ze&6)!==0)throw Error(P(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ki(e,t),r=n?pO(e,t):Rp(e,t,!0),o=n;do{if(r===0){Rl&&!n&&yr(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!dO(a)){r=Rp(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var i=e;r=Di;var s=i.current.memoizedState.isDehydrated;if(s&&(Il(i,l).flags|=256),l=Rp(i,l,!1),l!==2){if(wh&&!s){i.errorRecoveryDisabledLanes|=o,lo|=o,r=4;break e}o=fa,fa=r,o!==null&&(fa===null?fa=o:fa.push.apply(fa,o))}r=l}if(o=!1,r!==2)continue}}if(r===1){Il(e,0),yr(e,t,0,!0);break}e:{switch(n=e,o=r,o){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:yr(n,t,Ca,!gr);break e;case 2:fa=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(r=jc+300-Ia(),10<r)){if(yr(n,t,Ca,!gr),Dc(n,0,!0)!==0)break e;qn=t,n.timeoutHandle=L0(Cv.bind(null,n,a,fa,bc,wm,t,Ca,lo,Sl,gr,o,"Throttled",-0,0),r);break e}Cv(n,a,fa,bc,wm,t,Ca,lo,Sl,gr,o,null,-0,0)}}break}while(!0);gn(e)}function Cv(e,t,a,n,r,o,l,i,s,u,c,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},YS(t,o,d);var m=(o&62914560)===o?jc-Ia():(o&4194048)===o?a0-Ia():0;if(m=WO(d,m),m!==null){qn=o,e.cancelPendingCommit=m(Lv.bind(null,e,t,o,a,n,r,l,i,s,c,d,null,f,p)),yr(e,o,l,!u);return}}Lv(e,t,o,a,n,r,l,i,s)}function dO(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var r=a[n],o=r.getSnapshot;r=r.value;try{if(!Aa(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yr(e,t,a,n){t&=~xh,t&=~lo,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var o=31-ka(r),l=1<<o;n[o]=-1,r&=~l}a!==0&&ub(e,a,t)}function Vc(){return(ze&6)===0?(rs(0,!1),!1):!0}function vh(){if(xe!==null){if(Ve===0)var e=xe.return;else e=xe,Bn=yo=null,oh(e),pl=null,Fi=0,e=xe;for(;e!==null;)US(e.alternate,e),e=e.return;xe=null}}function Il(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,MO(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),qn=0,vh(),at=e,xe=a=Un(e.current,null),Ce=t,Ve=0,va=null,gr=!1,Rl=Ki(e,t),wh=!1,Sl=Ca=xh=lo=Rr=yt=0,fa=Di=null,wm=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-ka(n),o=1<<r;t|=e[r],n&=~o}return Gn=t,Nc(),a}function l0(e,t){ce=null,ne.H=ji,t===El||t===Uc?(t=tv(),Ve=3):t===Ym?(t=tv(),Ve=4):Ve=t===mh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,va=t,xe===null&&(yt=1,yc(e,Fa(t,e.current)))}function i0(){var e=Ma.current;return e===null?!0:(Ce&4194048)===Ce?ja===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===ja:!1}function s0(){var e=ne.H;return ne.H=ji,e===null?ji:e}function u0(){var e=ne.A;return ne.A=uO,e}function Sc(){yt=4,gr||(Ce&4194048)!==Ce&&Ma.current!==null||(Rl=!0),(Rr&134217727)===0&&(lo&134217727)===0||at===null||yr(at,Ce,Ca,!1)}function Rp(e,t,a){var n=ze;ze|=2;var r=s0(),o=u0();(at!==e||Ce!==t)&&(bc=null,Il(e,t)),t=!1;var l=yt;e:do try{if(Ve!==0&&xe!==null){var i=xe,s=va;switch(Ve){case 8:vh(),l=6;break e;case 3:case 2:case 9:case 6:Ma.current===null&&(t=!0);var u=Ve;if(Ve=0,va=null,sl(e,i,s,u),a&&Rl){l=0;break e}break;default:u=Ve,Ve=0,va=null,sl(e,i,s,u)}}fO(),l=yt;break}catch(c){l0(e,c)}while(!0);return t&&e.shellSuspendCounter++,Bn=yo=null,ze=n,ne.H=r,ne.A=o,xe===null&&(at=null,Ce=0,Nc()),l}function fO(){for(;xe!==null;)c0(xe)}function pO(e,t){var a=ze;ze|=2;var n=s0(),r=u0();at!==e||Ce!==t?(bc=null,vc=Ia()+500,Il(e,t)):Rl=Ki(e,t);e:do try{if(Ve!==0&&xe!==null){t=xe;var o=va;t:switch(Ve){case 1:Ve=0,va=null,sl(e,t,o,1);break;case 2:case 9:if(ev(o)){Ve=0,va=null,Iv(t);break}t=function(){Ve!==2&&Ve!==9||at!==e||(Ve=7),gn(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:ev(o)?(Ve=0,va=null,Iv(t)):(Ve=0,va=null,sl(e,t,o,7));break;case 5:var l=null;switch(xe.tag){case 26:l=xe.memoizedState;case 5:case 27:var i=xe;if(l?E0(l):i.stateNode.complete){Ve=0,va=null;var s=i.sibling;if(s!==null)xe=s;else{var u=i.return;u!==null?(xe=u,Gc(u)):xe=null}break t}}Ve=0,va=null,sl(e,t,o,5);break;case 6:Ve=0,va=null,sl(e,t,o,6);break;case 8:vh(),yt=6;break e;default:throw Error(P(462))}}mO();break}catch(c){l0(e,c)}while(!0);return Bn=yo=null,ne.H=n,ne.A=r,ze=a,xe!==null?0:(at=null,Ce=0,Nc(),yt)}function mO(){for(;xe!==null&&!BD();)c0(xe)}function c0(e){var t=BS(e.alternate,e,Gn);e.memoizedProps=e.pendingProps,t===null?Gc(e):xe=t}function Iv(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=yv(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=yv(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:oh(t);default:US(a,t),t=xe=Ub(t,Gn),t=BS(a,t,Gn)}e.memoizedProps=e.pendingProps,t===null?Gc(e):xe=t}function sl(e,t,a,n){Bn=yo=null,oh(t),pl=null,Fi=0;var r=t.return;try{if(aO(e,r,t,a,Ce)){yt=1,yc(e,Fa(a,e.current)),xe=null;return}}catch(o){if(r!==null)throw xe=r,o;yt=1,yc(e,Fa(a,e.current)),xe=null;return}t.flags&32768?(ke||n===1?e=!0:Rl||(Ce&536870912)!==0?e=!1:(gr=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ma.current,n!==null&&n.tag===13&&(n.flags|=16384))),d0(t,e)):Gc(t)}function Gc(e){var t=e;do{if((t.flags&32768)!==0){d0(t,gr);return}e=t.return;var a=oO(t.alternate,t,Gn);if(a!==null){xe=a;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);yt===0&&(yt=5)}function d0(e,t){do{var a=lO(e.alternate,e);if(a!==null){a.flags&=32767,xe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=a}while(e!==null);yt=6,xe=null}function Lv(e,t,a,n,r,o,l,i,s){e.cancelPendingCommit=null;do $c();while(Dt!==0);if((ze&6)!==0)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(o=t.lanes|t.childLanes,o|=Gm,WD(e,a,o,l,i,s),e===at&&(xe=at=null,Ce=0),Cl=t,Ir=e,qn=a,xm=o,vm=r,n0=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wO(lc,function(){return g0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=ne.T,ne.T=null,r=qe.p,qe.p=2,l=ze,ze|=4;try{iO(e,t,a)}finally{ze=l,qe.p=r,ne.T=n}}Dt=1,f0(),p0(),m0()}}function f0(){if(Dt===1){Dt=0;var e=Ir,t=Cl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=ne.T,ne.T=null;var n=qe.p;qe.p=2;var r=ze;ze|=4;try{ZS(t,e);var o=Lm,l=Eb(e.containerInfo),i=o.focusedElem,s=o.selectionRange;if(l!==i&&i&&i.ownerDocument&&Mb(i.ownerDocument.documentElement,i)){if(s!==null&&Vm(i)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in i)i.selectionStart=u,i.selectionEnd=Math.min(c,i.value.length);else{var d=i.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=i.textContent.length,x=Math.min(s.start,m),b=s.end===void 0?x:Math.min(s.end,m);!p.extend&&x>b&&(l=b,b=x,x=l);var y=Wx(i,x),w=Wx(i,b);if(y&&w&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==w.node||p.focusOffset!==w.offset)){var g=d.createRange();g.setStart(y.node,y.offset),p.removeAllRanges(),x>b?(p.addRange(g),p.extend(w.node,w.offset)):(g.setEnd(w.node,w.offset),p.addRange(g))}}}}for(d=[],p=i;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<d.length;i++){var v=d[i];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}Ec=!!Im,Lm=Im=null}finally{ze=r,qe.p=n,ne.T=a}}e.current=t,Dt=2}}function p0(){if(Dt===2){Dt=0;var e=Ir,t=Cl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=ne.T,ne.T=null;var n=qe.p;qe.p=2;var r=ze;ze|=4;try{VS(e,t.alternate,t)}finally{ze=r,qe.p=n,ne.T=a}}Dt=3}}function m0(){if(Dt===4||Dt===3){Dt=0,UD();var e=Ir,t=Cl,a=qn,n=n0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Dt=5:(Dt=0,Cl=Ir=null,h0(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Cr=null),Bm(a),t=t.stateNode,La&&typeof La.onCommitFiberRoot=="function")try{La.onCommitFiberRoot(Qi,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=ne.T,r=qe.p,qe.p=2,ne.T=null;try{for(var o=e.onRecoverableError,l=0;l<n.length;l++){var i=n[l];o(i.value,{componentStack:i.stack})}}finally{ne.T=t,qe.p=r}}(qn&3)!==0&&$c(),gn(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===bm?_i++:(_i=0,bm=e):_i=0,rs(0,!1)}}function h0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ts(t)))}function $c(){return f0(),p0(),m0(),g0()}function g0(){if(Dt!==5)return!1;var e=Ir,t=xm;xm=0;var a=Bm(qn),n=ne.T,r=qe.p;try{qe.p=32>a?32:a,ne.T=null,a=vm,vm=null;var o=Ir,l=qn;if(Dt=0,Cl=Ir=null,qn=0,(ze&6)!==0)throw Error(P(331));var i=ze;if(ze|=4,e0(o.current),KS(o,o.current,l,a),ze=i,rs(0,!1),La&&typeof La.onPostCommitFiberRoot=="function")try{La.onPostCommitFiberRoot(Qi,o)}catch{}return!0}finally{qe.p=r,ne.T=n,h0(e,t)}}function kv(e,t,a){t=Fa(a,t),t=mm(e.stateNode,t,2),e=Sr(e,t,2),e!==null&&(Yi(e,2),gn(e))}function Ge(e,t,a){if(e.tag===3)kv(e,e,a);else for(;t!==null;){if(t.tag===3){kv(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Cr===null||!Cr.has(n))){e=Fa(a,e),a=RS(2),n=Sr(t,a,2),n!==null&&(DS(a,n,t,e),Yi(n,2),gn(n));break}}t=t.return}}function Dp(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new cO;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||(wh=!0,r.add(a),e=hO.bind(null,e,t,a),t.then(e,e))}function hO(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,at===e&&(Ce&a)===a&&(yt===4||yt===3&&(Ce&62914560)===Ce&&300>Ia()-jc?(ze&2)===0&&Il(e,0):xh|=a,Sl===Ce&&(Sl=0)),gn(e)}function y0(e,t){t===0&&(t=sb()),e=go(e,t),e!==null&&(Yi(e,t),gn(e))}function gO(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),y0(e,a)}function yO(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(P(314))}n!==null&&n.delete(t),y0(e,a)}function wO(e,t){return Pm(e,t)}var Cc=null,Qo=null,Sm=!1,Ic=!1,_p=!1,wr=0;function gn(e){e!==Qo&&e.next===null&&(Qo===null?Cc=Qo=e:Qo=Qo.next=e),Ic=!0,Sm||(Sm=!0,vO())}function rs(e,t){if(!_p&&Ic){_p=!0;do for(var a=!1,n=Cc;n!==null;){if(!t)if(e!==0){var r=n.pendingLanes;if(r===0)var o=0;else{var l=n.suspendedLanes,i=n.pingedLanes;o=(1<<31-ka(42|e)+1)-1,o&=r&~(l&~i),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Tv(n,o))}else o=Ce,o=Dc(n,n===at?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||Ki(n,o)||(a=!0,Tv(n,o));n=n.next}while(a);_p=!1}}function xO(){w0()}function w0(){Ic=Sm=!1;var e=0;wr!==0&&AO()&&(e=wr);for(var t=Ia(),a=null,n=Cc;n!==null;){var r=n.next,o=x0(n,t);o===0?(n.next=null,a===null?Cc=r:a.next=r,r===null&&(Qo=a)):(a=n,(e!==0||(o&3)!==0)&&(Ic=!0)),n=r}Dt!==0&&Dt!==5||rs(e,!1),wr!==0&&(wr=0)}function x0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var l=31-ka(o),i=1<<l,s=r[l];s===-1?((i&a)===0||(i&n)!==0)&&(r[l]=$D(i,t)):s<=t&&(e.expiredLanes|=i),o&=~i}if(t=at,a=Ce,a=Dc(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&sp(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ki(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&sp(n),Bm(a)){case 2:case 8:a=lb;break;case 32:a=lc;break;case 268435456:a=ib;break;default:a=lc}return n=v0.bind(null,e),a=Pm(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&sp(n),e.callbackPriority=2,e.callbackNode=null,2}function v0(e,t){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if($c()&&e.callbackNode!==a)return null;var n=Ce;return n=Dc(e,e===at?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(o0(e,n,t),x0(e,Ia()),e.callbackNode!=null&&e.callbackNode===a?v0.bind(null,e):null)}function Tv(e,t){if($c())return null;o0(e,t,!0)}function vO(){EO(function(){(ze&6)!==0?Pm(ob,xO):w0()})}function bh(){if(wr===0){var e=xl;e===0&&(e=Lu,Lu<<=1,(Lu&261888)===0&&(Lu=256)),wr=e}return wr}function Av(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ju(""+e)}function Mv(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function bO(e,t,a,n,r){if(t==="submit"&&a&&a.stateNode===r){var o=Av((r[ma]||null).action),l=n.submitter;l&&(t=(t=l[ma]||null)?Av(t.formAction):l.getAttribute("formAction"),t!==null&&(o=t,l=null));var i=new _c("action","action",null,n,r);e.push({event:i,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(wr!==0){var s=l?Mv(r,l):new FormData(r);fm(a,{pending:!0,data:s,method:r.method,action:o},null,s)}}else typeof o=="function"&&(i.preventDefault(),s=l?Mv(r,l):new FormData(r),fm(a,{pending:!0,data:s,method:r.method,action:o},o,s))},currentTarget:r}]})}}for(Bu=0;Bu<em.length;Bu++)Uu=em[Bu],Ev=Uu.toLowerCase(),Rv=Uu[0].toUpperCase()+Uu.slice(1),tn(Ev,"on"+Rv);var Uu,Ev,Rv,Bu;tn(Db,"onAnimationEnd");tn(_b,"onAnimationIteration");tn(Ob,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(z_,"onTransitionRun");tn(q_,"onTransitionStart");tn(F_,"onTransitionCancel");tn(Pb,"onTransitionEnd");yl("onMouseEnter",["mouseout","mouseover"]);yl("onMouseLeave",["mouseout","mouseover"]);yl("onPointerEnter",["pointerout","pointerover"]);yl("onPointerLeave",["pointerout","pointerover"]);po("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));po("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));po("onBeforeInput",["compositionend","keypress","textInput","paste"]);po("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));po("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));po("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),SO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function b0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],r=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var l=n.length-1;0<=l;l--){var i=n[l],s=i.instance,u=i.currentTarget;if(i=i.listener,s!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(c){sc(c)}r.currentTarget=null,o=s}else for(l=0;l<n.length;l++){if(i=n[l],s=i.instance,u=i.currentTarget,i=i.listener,s!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(c){sc(c)}r.currentTarget=null,o=s}}}}function we(e,t){var a=t[$p];a===void 0&&(a=t[$p]=new Set);var n=e+"__bubble";a.has(n)||(S0(t,e,2,!1),a.add(n))}function Op(e,t,a){var n=0;t&&(n|=4),S0(a,e,n,t)}var zu="_reactListening"+Math.random().toString(36).slice(2);function Sh(e){if(!e[zu]){e[zu]=!0,pb.forEach(function(a){a!=="selectionchange"&&(SO.has(a)||Op(a,!1,e),Op(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zu]||(t[zu]=!0,Op("selectionchange",!1,t))}}function S0(e,t,a,n){switch(P0(t)){case 2:var r=QO;break;case 8:r=KO;break;default:r=kh}a=r.bind(null,t,a,e),r=void 0,!Kp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Pp(e,t,a,n,r){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var l=n.tag;if(l===3||l===4){var i=n.stateNode.containerInfo;if(i===r)break;if(l===4)for(l=n.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===r)return;l=l.return}for(;i!==null;){if(l=Jo(i),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){n=o=l;continue e}i=i.parentNode}}n=n.return}bb(function(){var u=o,c=qm(a),d=[];e:{var f=Nb.get(e);if(f!==void 0){var p=_c,m=e;switch(e){case"keypress":if(Gu(a)===0)break e;case"keydown":case"keyup":p=y_;break;case"focusin":m="focus",p=pp;break;case"focusout":m="blur",p=pp;break;case"beforeblur":case"afterblur":p=pp;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Ux;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=o_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=v_;break;case Db:case _b:case Ob:p=s_;break;case Pb:p=S_;break;case"scroll":case"scrollend":p=n_;break;case"wheel":p=I_;break;case"copy":case"cut":case"paste":p=c_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=qx;break;case"toggle":case"beforetoggle":p=k_}var x=(t&4)!==0,b=!x&&(e==="scroll"||e==="scrollend"),y=x?f!==null?f+"Capture":null:f;x=[];for(var w=u,g;w!==null;){var v=w;if(g=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||g===null||y===null||(v=Ni(w,y),v!=null&&x.push(Gi(w,v,g))),b)break;w=w.return}0<x.length&&(f=new p(f,m,null,a,c),d.push({event:f,listeners:x}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&a!==Qp&&(m=a.relatedTarget||a.fromElement)&&(Jo(m)||m[Tl]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=a.relatedTarget||a.toElement,p=u,m=m?Jo(m):null,m!==null&&(b=Zi(m),x=m.tag,m!==b||x!==5&&x!==27&&x!==6)&&(m=null)):(p=null,m=u),p!==m)){if(x=Ux,v="onMouseLeave",y="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(x=qx,v="onPointerLeave",y="onPointerEnter",w="pointer"),b=p==null?f:xi(p),g=m==null?f:xi(m),f=new x(v,w+"leave",p,a,c),f.target=b,f.relatedTarget=g,v=null,Jo(c)===u&&(x=new x(y,w+"enter",m,a,c),x.target=g,x.relatedTarget=b,v=x),b=v,p&&m)t:{for(x=CO,y=p,w=m,g=0,v=y;v;v=x(v))g++;v=0;for(var M=w;M;M=x(M))v++;for(;0<g-v;)y=x(y),g--;for(;0<v-g;)w=x(w),v--;for(;g--;){if(y===w||w!==null&&y===w.alternate){x=y;break t}y=x(y),w=x(w)}x=null}else x=null;p!==null&&Dv(d,f,p,x,!1),m!==null&&b!==null&&Dv(d,b,m,x,!0)}}e:{if(f=u?xi(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=Vx;else if(jx(f))if(Tb)C=N_;else{C=O_;var A=__}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&zm(u.elementType)&&(C=Vx):C=P_;if(C&&(C=C(e,u))){kb(d,C,a,c);break e}A&&A(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&Zp(f,"number",f.value)}switch(A=u?xi(u):window,e){case"focusin":(jx(A)||A.contentEditable==="true")&&(al=A,Yp=u,Ii=null);break;case"focusout":Ii=Yp=al=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,Xx(d,a,c);break;case"selectionchange":if(U_)break;case"keydown":case"keyup":Xx(d,a,c)}var E;if(jm)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else tl?Ib(e,a)&&(_="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_="onCompositionStart");_&&(Cb&&a.locale!=="ko"&&(tl||_!=="onCompositionStart"?_==="onCompositionEnd"&&tl&&(E=Sb()):(hr=c,Fm="value"in hr?hr.value:hr.textContent,tl=!0)),A=Lc(u,_),0<A.length&&(_=new zx(_,e,null,a,c),d.push({event:_,listeners:A}),E?_.data=E:(E=Lb(a),E!==null&&(_.data=E)))),(E=A_?M_(e,a):E_(e,a))&&(_=Lc(u,"onBeforeInput"),0<_.length&&(A=new zx("onBeforeInput","beforeinput",null,a,c),d.push({event:A,listeners:_}),A.data=E)),bO(d,e,u,a,c)}b0(d,t)})}function Gi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Lc(e,t){for(var a=t+"Capture",n=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=Ni(e,a),r!=null&&n.unshift(Gi(e,r,o)),r=Ni(e,t),r!=null&&n.push(Gi(e,r,o))),e.tag===3)return n;e=e.return}return[]}function CO(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dv(e,t,a,n,r){for(var o=t._reactName,l=[];a!==null&&a!==n;){var i=a,s=i.alternate,u=i.stateNode;if(i=i.tag,s!==null&&s===n)break;i!==5&&i!==26&&i!==27||u===null||(s=u,r?(u=Ni(a,o),u!=null&&l.unshift(Gi(a,u,s))):r||(u=Ni(a,o),u!=null&&l.push(Gi(a,u,s)))),a=a.return}l.length!==0&&e.push({event:t,listeners:l})}var IO=/\r\n?/g,LO=/\u0000|\uFFFD/g;function _v(e){return(typeof e=="string"?e:""+e).replace(IO,`
|
|
9
|
-
`).replace(LO,"")}function C0(e,t){return t=_v(t),_v(e)===t}function Ke(e,t,a,n,r,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||wl(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&wl(e,""+n);break;case"className":Au(e,"class",n);break;case"tabIndex":Au(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Au(e,a,n);break;case"style":vb(e,n,o);break;case"data":if(t!=="object"){Au(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ju(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",r.name,r,null),Ke(e,t,"formEncType",r.formEncType,r,null),Ke(e,t,"formMethod",r.formMethod,r,null),Ke(e,t,"formTarget",r.formTarget,r,null)):(Ke(e,t,"encType",r.encType,r,null),Ke(e,t,"method",r.method,r,null),Ke(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ju(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Nn);break;case"onScroll":n!=null&&we("scroll",e);break;case"onScrollEnd":n!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(P(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(P(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=ju(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":we("beforetoggle",e),we("toggle",e),Hu(e,"popover",n);break;case"xlinkActuate":An(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":An(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":An(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":An(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":An(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":An(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":An(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":An(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":An(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Hu(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=t_.get(a)||a,Hu(e,a,n))}}function Cm(e,t,a,n,r,o){switch(a){case"style":vb(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(P(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(P(60));e.innerHTML=a}}break;case"children":typeof n=="string"?wl(e,n):(typeof n=="number"||typeof n=="bigint")&&wl(e,""+n);break;case"onScroll":n!=null&&we("scroll",e);break;case"onScrollEnd":n!=null&&we("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mb.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[ma]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof n=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,r);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Hu(e,a,n)}}}function $t(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var n=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];if(l!=null)switch(o){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ke(e,t,o,l,a,null)}}r&&Ke(e,t,"srcSet",a.srcSet,a,null),n&&Ke(e,t,"src",a.src,a,null);return;case"input":we("invalid",e);var i=o=l=r=null,s=null,u=null;for(n in a)if(a.hasOwnProperty(n)){var c=a[n];if(c!=null)switch(n){case"name":r=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":o=c;break;case"defaultValue":i=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(P(137,t));break;default:Ke(e,t,n,c,a,null)}}yb(e,o,i,s,u,l,r,!1);return;case"select":we("invalid",e),n=l=o=null;for(r in a)if(a.hasOwnProperty(r)&&(i=a[r],i!=null))switch(r){case"value":o=i;break;case"defaultValue":l=i;break;case"multiple":n=i;default:Ke(e,t,r,i,a,null)}t=o,a=l,e.multiple=!!n,t!=null?cl(e,!!n,t,!1):a!=null&&cl(e,!!n,a,!0);return;case"textarea":we("invalid",e),o=r=n=null;for(l in a)if(a.hasOwnProperty(l)&&(i=a[l],i!=null))switch(l){case"value":n=i;break;case"defaultValue":r=i;break;case"children":o=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(P(91));break;default:Ke(e,t,l,i,a,null)}xb(e,n,r,o);return;case"option":for(s in a)a.hasOwnProperty(s)&&(n=a[s],n!=null)&&(s==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Ke(e,t,s,n,a,null));return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(n=0;n<Vi.length;n++)we(Vi[n],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(n=a[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ke(e,t,u,n,a,null)}return;default:if(zm(t)){for(c in a)a.hasOwnProperty(c)&&(n=a[c],n!==void 0&&Cm(e,t,c,n,a,void 0));return}}for(i in a)a.hasOwnProperty(i)&&(n=a[i],n!=null&&Ke(e,t,i,n,a,null))}function kO(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,l=null,i=null,s=null,u=null,c=null;for(p in a){var d=a[p];if(a.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":s=d;default:n.hasOwnProperty(p)||Ke(e,t,p,null,n,d)}}for(var f in n){var p=n[f];if(d=a[f],n.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":o=p;break;case"name":r=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":l=p;break;case"defaultValue":i=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(P(137,t));break;default:p!==d&&Ke(e,t,f,p,n,d)}}Xp(e,l,i,s,u,c,o,r);return;case"select":p=l=i=f=null;for(o in a)if(s=a[o],a.hasOwnProperty(o)&&s!=null)switch(o){case"value":break;case"multiple":p=s;default:n.hasOwnProperty(o)||Ke(e,t,o,null,n,s)}for(r in n)if(o=n[r],s=a[r],n.hasOwnProperty(r)&&(o!=null||s!=null))switch(r){case"value":f=o;break;case"defaultValue":i=o;break;case"multiple":l=o;default:o!==s&&Ke(e,t,r,o,n,s)}t=i,a=l,n=p,f!=null?cl(e,!!a,f,!1):!!n!=!!a&&(t!=null?cl(e,!!a,t,!0):cl(e,!!a,a?[]:"",!1));return;case"textarea":p=f=null;for(i in a)if(r=a[i],a.hasOwnProperty(i)&&r!=null&&!n.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:Ke(e,t,i,null,n,r)}for(l in n)if(r=n[l],o=a[l],n.hasOwnProperty(l)&&(r!=null||o!=null))switch(l){case"value":f=r;break;case"defaultValue":p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(P(91));break;default:r!==o&&Ke(e,t,l,r,n,o)}wb(e,f,p);return;case"option":for(var m in a)f=a[m],a.hasOwnProperty(m)&&f!=null&&!n.hasOwnProperty(m)&&(m==="selected"?e.selected=!1:Ke(e,t,m,null,n,f));for(s in n)f=n[s],p=a[s],n.hasOwnProperty(s)&&f!==p&&(f!=null||p!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Ke(e,t,s,f,n,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in a)f=a[x],a.hasOwnProperty(x)&&f!=null&&!n.hasOwnProperty(x)&&Ke(e,t,x,null,n,f);for(u in n)if(f=n[u],p=a[u],n.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(P(137,t));break;default:Ke(e,t,u,f,n,p)}return;default:if(zm(t)){for(var b in a)f=a[b],a.hasOwnProperty(b)&&f!==void 0&&!n.hasOwnProperty(b)&&Cm(e,t,b,void 0,n,f);for(c in n)f=n[c],p=a[c],!n.hasOwnProperty(c)||f===p||f===void 0&&p===void 0||Cm(e,t,c,f,n,p);return}}for(var y in a)f=a[y],a.hasOwnProperty(y)&&f!=null&&!n.hasOwnProperty(y)&&Ke(e,t,y,null,n,f);for(d in n)f=n[d],p=a[d],!n.hasOwnProperty(d)||f===p||f==null&&p==null||Ke(e,t,d,f,n,p)}function Ov(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TO(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var r=a[n],o=r.transferSize,l=r.initiatorType,i=r.duration;if(o&&i&&Ov(l)){for(l=0,i=r.responseEnd,n+=1;n<a.length;n++){var s=a[n],u=s.startTime;if(u>i)break;var c=s.transferSize,d=s.initiatorType;c&&Ov(d)&&(s=s.responseEnd,l+=c*(s<i?1:(i-u)/(s-u)))}if(--n,t+=8*(o+l)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Im=null,Lm=null;function kc(e){return e.nodeType===9?e:e.ownerDocument}function Pv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function I0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function km(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Np=null;function AO(){var e=window.event;return e&&e.type==="popstate"?e===Np?!1:(Np=e,!0):(Np=null,!1)}var L0=typeof setTimeout=="function"?setTimeout:void 0,MO=typeof clearTimeout=="function"?clearTimeout:void 0,Nv=typeof Promise=="function"?Promise:void 0,EO=typeof queueMicrotask=="function"?queueMicrotask:typeof Nv<"u"?function(e){return Nv.resolve(null).then(e).catch(RO)}:L0;function RO(e){setTimeout(function(){throw e})}function _r(e){return e==="head"}function Bv(e,t){var a=t,n=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(r),kl(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Oi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Oi(a);for(var o=a.firstChild;o;){var l=o.nextSibling,i=o.nodeName;o[Ji]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=l}}else a==="body"&&Oi(e.ownerDocument.body);a=r}while(a);kl(t)}function Uv(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Tm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Tm(a),Um(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function DO(e,t,a,n){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ji])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Va(e.nextSibling),e===null)break}return null}function _O(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Va(e.nextSibling),e===null))return null;return e}function k0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Va(e.nextSibling),e===null))return null;return e}function Am(e){return e.data==="$?"||e.data==="$~"}function Mm(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function OO(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Va(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Em=null;function zv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Va(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function qv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function T0(e,t,a){switch(t=kc(a),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function Oi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Um(e)}var Ga=new Map,Fv=new Set;function Tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $n=qe.d;qe.d={f:PO,r:NO,D:BO,C:UO,L:zO,m:qO,X:HO,S:FO,M:jO};function PO(){var e=$n.f(),t=Vc();return e||t}function NO(e){var t=Al(e);t!==null&&t.tag===5&&t.type==="form"?vS(t):$n.r(e)}var Dl=typeof document>"u"?null:document;function A0(e,t,a){var n=Dl;if(n&&typeof t=="string"&&t){var r=qa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Fv.has(r)||(Fv.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),$t(t,"link",e),Ut(t),n.head.appendChild(t)))}}function BO(e){$n.D(e),A0("dns-prefetch",e,null)}function UO(e,t){$n.C(e,t),A0("preconnect",e,t)}function zO(e,t,a){$n.L(e,t,a);var n=Dl;if(n&&e&&t){var r='link[rel="preload"][as="'+qa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+qa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+qa(a.imageSizes)+'"]')):r+='[href="'+qa(e)+'"]';var o=r;switch(t){case"style":o=Ll(e);break;case"script":o=_l(e)}Ga.has(o)||(e=ut({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ga.set(o,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(os(o))||t==="script"&&n.querySelector(ls(o))||(t=n.createElement("link"),$t(t,"link",e),Ut(t),n.head.appendChild(t)))}}function qO(e,t){$n.m(e,t);var a=Dl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+qa(n)+'"][href="'+qa(e)+'"]',o=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=_l(e)}if(!Ga.has(o)&&(e=ut({rel:"modulepreload",href:e},t),Ga.set(o,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ls(o)))return}n=a.createElement("link"),$t(n,"link",e),Ut(n),a.head.appendChild(n)}}}function FO(e,t,a){$n.S(e,t,a);var n=Dl;if(n&&e){var r=ul(n).hoistableStyles,o=Ll(e);t=t||"default";var l=r.get(o);if(!l){var i={loading:0,preload:null};if(l=n.querySelector(os(o)))i.loading=5;else{e=ut({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ga.get(o))&&Ch(e,a);var s=l=n.createElement("link");Ut(s),$t(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){i.loading|=1}),s.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Ju(l,t,n)}l={type:"stylesheet",instance:l,count:1,state:i},r.set(o,l)}}}function HO(e,t){$n.X(e,t);var a=Dl;if(a&&e){var n=ul(a).hoistableScripts,r=_l(e),o=n.get(r);o||(o=a.querySelector(ls(r)),o||(e=ut({src:e,async:!0},t),(t=Ga.get(r))&&Ih(e,t),o=a.createElement("script"),Ut(o),$t(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function jO(e,t){$n.M(e,t);var a=Dl;if(a&&e){var n=ul(a).hoistableScripts,r=_l(e),o=n.get(r);o||(o=a.querySelector(ls(r)),o||(e=ut({src:e,async:!0,type:"module"},t),(t=Ga.get(r))&&Ih(e,t),o=a.createElement("script"),Ut(o),$t(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function Hv(e,t,a,n){var r=(r=xr.current)?Tc(r):null;if(!r)throw Error(P(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ll(a.href),a=ul(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ll(a.href);var o=ul(r).hoistableStyles,l=o.get(e);if(l||(r=r.ownerDocument||r,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,l),(o=r.querySelector(os(e)))&&!o._p&&(l.instance=o,l.state.loading=5),Ga.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ga.set(e,a),o||VO(r,e,a,l.state))),t&&n===null)throw Error(P(528,""));return l}if(t&&n!==null)throw Error(P(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_l(a),a=ul(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(P(444,e))}}function Ll(e){return'href="'+qa(e)+'"'}function os(e){return'link[rel="stylesheet"]['+e+"]"}function M0(e){return ut({},e,{"data-precedence":e.precedence,precedence:null})}function VO(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),$t(t,"link",a),Ut(t),e.head.appendChild(t))}function _l(e){return'[src="'+qa(e)+'"]'}function ls(e){return"script[async]"+e}function jv(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qa(a.href)+'"]');if(n)return t.instance=n,Ut(n),n;var r=ut({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ut(n),$t(n,"style",r),Ju(n,a.precedence,e),t.instance=n;case"stylesheet":r=Ll(a.href);var o=e.querySelector(os(r));if(o)return t.state.loading|=4,t.instance=o,Ut(o),o;n=M0(a),(r=Ga.get(r))&&Ch(n,r),o=(e.ownerDocument||e).createElement("link"),Ut(o);var l=o;return l._p=new Promise(function(i,s){l.onload=i,l.onerror=s}),$t(o,"link",n),t.state.loading|=4,Ju(o,a.precedence,e),t.instance=o;case"script":return o=_l(a.src),(r=e.querySelector(ls(o)))?(t.instance=r,Ut(r),r):(n=a,(r=Ga.get(o))&&(n=ut({},a),Ih(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ut(r),$t(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ju(n,a.precedence,e));return t.instance}function Ju(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,o=r,l=0;l<n.length;l++){var i=n[l];if(i.dataset.precedence===t)o=i;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ch(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ih(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ec=null;function Vv(e,t,a){if(ec===null){var n=new Map,r=ec=new Map;r.set(a,n)}else r=ec,n=r.get(a),n||(n=new Map,r.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Ji]||o[jt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var l=o.getAttribute(t)||"";l=e+l;var i=n.get(l);i?i.push(o):n.set(l,[o])}}return n}function Gv(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function GO(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function E0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $O(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Ll(n.href),o=t.querySelector(os(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ac.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Ut(o);return}o=t.ownerDocument||t,n=M0(n),(r=Ga.get(r))&&Ch(n,r),o=o.createElement("link"),Ut(o);var l=o;l._p=new Promise(function(i,s){l.onload=i,l.onerror=s}),$t(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ac.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Bp=0;function WO(e,t){return e.stylesheets&&e.count===0&&tc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&tc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Bp===0&&(Bp=62500*TO());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tc(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Bp?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function Ac(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mc=null;function tc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mc=new Map,t.forEach(XO,e),Mc=null,Ac.call(e))}function XO(e,t){if(!(t.state.loading&4)){var a=Mc.get(e);if(a)var n=a.get(null);else{a=new Map,Mc.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var l=r[o];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(a.set(l.dataset.precedence,l),n=l)}n&&a.set(null,n)}r=t.instance,l=r.getAttribute("data-precedence"),o=a.get(l)||n,o===n&&a.set(null,r),a.set(l,r),this.count++,n=Ac.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var $i={$$typeof:Pn,Provider:null,Consumer:null,_currentValue:ao,_currentValue2:ao,_threadCount:0};function ZO(e,t,a,n,r,o,l,i,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=up(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=up(0),this.hiddenUpdates=up(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function R0(e,t,a,n,r,o,l,i,s,u,c,d){return e=new ZO(e,t,a,l,s,u,c,d,i),t=1,o===!0&&(t|=24),o=Sa(3,null,null,t),e.current=o,o.stateNode=e,t=Qm(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},Jm(o),e}function D0(e){return e?(e=ol,e):ol}function _0(e,t,a,n,r,o){r=D0(r),n.context===null?n.context=r:n.pendingContext=r,n=br(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=Sr(e,n,t),a!==null&&(pa(a,e,t),ki(a,e,t))}function $v(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lh(e,t){$v(e,t),(e=e.alternate)&&$v(e,t)}function O0(e){if(e.tag===13||e.tag===31){var t=go(e,67108864);t!==null&&pa(t,e,67108864),Lh(e,67108864)}}function Wv(e){if(e.tag===13||e.tag===31){var t=Ta();t=Nm(t);var a=go(e,t);a!==null&&pa(a,e,t),Lh(e,t)}}var Ec=!0;function QO(e,t,a,n){var r=ne.T;ne.T=null;var o=qe.p;try{qe.p=2,kh(e,t,a,n)}finally{qe.p=o,ne.T=r}}function KO(e,t,a,n){var r=ne.T;ne.T=null;var o=qe.p;try{qe.p=8,kh(e,t,a,n)}finally{qe.p=o,ne.T=r}}function kh(e,t,a,n){if(Ec){var r=Rm(n);if(r===null)Pp(e,t,n,Rc,a),Xv(e,n);else if(JO(r,e,t,a,n))n.stopPropagation();else if(Xv(e,n),t&4&&-1<YO.indexOf(e)){for(;r!==null;){var o=Al(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var l=Jr(o.pendingLanes);if(l!==0){var i=o;for(i.pendingLanes|=2,i.entangledLanes|=2;l;){var s=1<<31-ka(l);i.entanglements[1]|=s,l&=~s}gn(o),(ze&6)===0&&(vc=Ia()+500,rs(0,!1))}}break;case 31:case 13:i=go(o,2),i!==null&&pa(i,o,2),Vc(),Lh(o,2)}if(o=Rm(n),o===null&&Pp(e,t,n,Rc,a),o===r)break;r=o}r!==null&&n.stopPropagation()}else Pp(e,t,n,null,a)}}function Rm(e){return e=qm(e),Th(e)}var Rc=null;function Th(e){if(Rc=null,e=Jo(e),e!==null){var t=Zi(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=eb(t),e!==null)return e;e=null}else if(a===31){if(e=tb(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rc=e,null}function P0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(zD()){case ob:return 2;case lb:return 8;case lc:case qD:return 32;case ib:return 268435456;default:return 32}default:return 32}}var Dm=!1,Lr=null,kr=null,Tr=null,Wi=new Map,Xi=new Map,pr=[],YO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Xv(e,t){switch(e){case"focusin":case"focusout":Lr=null;break;case"dragenter":case"dragleave":kr=null;break;case"mouseover":case"mouseout":Tr=null;break;case"pointerover":case"pointerout":Wi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xi.delete(t.pointerId)}}function hi(e,t,a,n,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Al(t),t!==null&&O0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function JO(e,t,a,n,r){switch(t){case"focusin":return Lr=hi(Lr,e,t,a,n,r),!0;case"dragenter":return kr=hi(kr,e,t,a,n,r),!0;case"mouseover":return Tr=hi(Tr,e,t,a,n,r),!0;case"pointerover":var o=r.pointerId;return Wi.set(o,hi(Wi.get(o)||null,e,t,a,n,r)),!0;case"gotpointercapture":return o=r.pointerId,Xi.set(o,hi(Xi.get(o)||null,e,t,a,n,r)),!0}return!1}function N0(e){var t=Jo(e.target);if(t!==null){var a=Zi(t);if(a!==null){if(t=a.tag,t===13){if(t=eb(a),t!==null){e.blockedOn=t,Rx(e.priority,function(){Wv(a)});return}}else if(t===31){if(t=tb(a),t!==null){e.blockedOn=t,Rx(e.priority,function(){Wv(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Rm(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Qp=n,a.target.dispatchEvent(n),Qp=null}else return t=Al(a),t!==null&&O0(t),e.blockedOn=a,!1;t.shift()}return!0}function Zv(e,t,a){ac(e)&&a.delete(t)}function eP(){Dm=!1,Lr!==null&&ac(Lr)&&(Lr=null),kr!==null&&ac(kr)&&(kr=null),Tr!==null&&ac(Tr)&&(Tr=null),Wi.forEach(Zv),Xi.forEach(Zv)}function qu(e,t){e.blockedOn===t&&(e.blockedOn=null,Dm||(Dm=!0,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,eP)))}var Fu=null;function Qv(e){Fu!==e&&(Fu=e,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(Th(n||a)===null)continue;break}var o=Al(a);o!==null&&(e.splice(t,3),t-=3,fm(o,{pending:!0,data:r,method:a.method,action:n},n,r))}}))}function kl(e){function t(s){return qu(s,e)}Lr!==null&&qu(Lr,e),kr!==null&&qu(kr,e),Tr!==null&&qu(Tr,e),Wi.forEach(t),Xi.forEach(t);for(var a=0;a<pr.length;a++){var n=pr[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<pr.length&&(a=pr[0],a.blockedOn===null);)N0(a),a.blockedOn===null&&pr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var r=a[n],o=a[n+1],l=r[ma]||null;if(typeof o=="function")l||Qv(a);else if(l){var i=null;if(o&&o.hasAttribute("formAction")){if(r=o,l=o[ma]||null)i=l.formAction;else if(Th(r)!==null)continue}else i=l.action;typeof i=="function"?a[n+1]=i:(a.splice(n,3),n-=3),Qv(a)}}}function B0(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(l){return r=l})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Ah(e){this._internalRoot=e}Wc.prototype.render=Ah.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var a=t.current,n=Ta();_0(a,n,e,t,null,null)};Wc.prototype.unmount=Ah.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_0(e.current,2,null,e,null,null),Vc(),t[Tl]=null}};function Wc(e){this._internalRoot=e}Wc.prototype.unstable_scheduleHydration=function(e){if(e){var t=fb();e={blockedOn:null,target:e,priority:t};for(var a=0;a<pr.length&&t!==0&&t<pr[a].priority;a++);pr.splice(a,0,e),a===0&&N0(e)}};var Kv=Yv.version;if(Kv!=="19.2.4")throw Error(P(527,Kv,"19.2.4"));qe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=DD(t),e=e!==null?ab(e):null,e=e===null?null:e.stateNode,e};var tP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ne,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(gi=__REACT_DEVTOOLS_GLOBAL_HOOK__,!gi.isDisabled&&gi.supportsFiber))try{Qi=gi.inject(tP),La=gi}catch{}var gi;Xc.createRoot=function(e,t){if(!Jv(e))throw Error(P(299));var a=!1,n="",r=AS,o=MS,l=ES;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=R0(e,1,!1,null,null,a,n,null,r,o,l,B0),e[Tl]=t.current,Sh(e),new Ah(t)};Xc.hydrateRoot=function(e,t,a){if(!Jv(e))throw Error(P(299));var n=!1,r="",o=AS,l=MS,i=ES,s=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(l=a.onCaughtError),a.onRecoverableError!==void 0&&(i=a.onRecoverableError),a.formState!==void 0&&(s=a.formState)),t=R0(e,1,!0,t,a??null,n,r,s,o,l,i,B0),t.context=D0(null),a=t.current,n=Ta(),n=Nm(n),r=br(n),r.callback=null,Sr(a,r,n),a=n,t.current.lanes=a,Yi(t,a),gn(t),e[Tl]=t.current,Sh(e),new Wc(t)};Xc.version="19.2.4"});var F0=Wt((Z9,q0)=>{"use strict";function z0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(z0)}catch(e){console.error(e)}}z0(),q0.exports=U0()});var Z0=Wt(Yc=>{"use strict";var bP=Symbol.for("react.transitional.element"),SP=Symbol.for("react.fragment");function X0(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var r in t)r!=="key"&&(a[r]=t[r])}else a=t;return t=a.ref,{$$typeof:bP,type:e,key:n,ref:t!==void 0?t:null,props:a}}Yc.Fragment=SP;Yc.jsx=X0;Yc.jsxs=X0});var ee=Wt((u8,Q0)=>{"use strict";Q0.exports=Z0()});function Y0(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=Y0(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function Jc(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=Y0(e))&&(n&&(n+=" "),n+=t);return n}var Dh=I(()=>{"use strict"});function _h(...e){return e.filter(Boolean).join(" ")}function J0(){return _h}var Oh=I(()=>{"use strict"});function BP(e){let t=[],a=-1;for(;++a<e.length;)t[a]=Nr(e[a]);return rd(n);function n(...r){let o=-1;for(;++o<t.length;)if(t[o].apply(this,r))return!0;return!1}}function UP(e){let t=e;return rd(a);function a(n){let r=n,o;for(o in e)if(r[o]!==t[o])return!1;return!0}}function zP(e){return rd(t);function t(a){return a&&a.type===e}}function rd(e){return t;function t(a,n,r){return!!(FP(a)&&e.call(this,a,typeof n=="number"?n:void 0,r||void 0))}}function qP(){return!0}function FP(e){return e!==null&&typeof e=="object"&&"type"in e}var Nr,IC=I(()=>{"use strict";Nr=(function(e){if(e==null)return qP;if(typeof e=="function")return rd(e);if(typeof e=="object")return Array.isArray(e)?BP(e):UP(e);if(typeof e=="string")return zP(e);throw new Error("Expected function, string, or object as test")})});var od=I(()=>{"use strict";IC()});function Is(e,t,a,n){let r;typeof t=="function"&&typeof a!="function"?(n=a,a=t):r=t;let o=Nr(r),l=n?-1:1;i(e,void 0,[])();function i(s,u,c){let d=s&&typeof s=="object"?s:{};if(typeof d.type=="string"){let p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=LC,m,x,b;if((!t||o(s,u,c[c.length-1]||void 0))&&(p=HP(a(s,c)),p[0]===bo))return p;if("children"in s&&s.children){let y=s;if(y.children&&p[0]!==So)for(x=(n?y.children.length:-1)+l,b=c.concat(y);x>-1&&x<y.children.length;){let w=y.children[x];if(m=i(w,x,b)(),m[0]===bo)return m;x=typeof m[1]=="number"?m[1]:x+l}}return p}}}function HP(e){return Array.isArray(e)?e:typeof e=="number"?[Zn,e]:e==null?LC:[e]}var LC,Zn,bo,So,kC=I(()=>{"use strict";od();LC=[],Zn=!0,bo=!1,So="skip"});var ld=I(()=>{"use strict";kC()});function Qn(e,t,a,n){let r,o,l;typeof t=="function"&&typeof a!="function"?(o=void 0,l=t,r=a):(o=t,l=a,r=n),Is(e,o,i,r);function i(s,u){let c=u[u.length-1],d=c?c.children.indexOf(s):void 0;return l(s,d,c)}}var TC=I(()=>{"use strict";ld();ld()});var id=I(()=>{"use strict";TC()});function EC({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:a=[],allowDataImages:n=!1,allowedProtocols:r=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500"}){let i=t.length&&!t.every(u=>u==="*"),s=a.length&&!a.every(u=>u==="*");if(!e&&(i||s))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return u=>{let c=$P(e,t,a,n,r,o,l);Qn(u,c)}}function AC(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function jP(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}function MC(e,t,a,n=!1,r=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!r)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return r&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){let c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}let l=AC(e,a);if(!l||GP.has(l.protocol)||!(VP.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;let s=jP(e);return l&&t.some(u=>{let c=AC(u,a);return!c||c.origin!==l.origin?!1:l.href.startsWith(c.href)})?s?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:s?l.pathname+l.search+l.hash:l.href:null}var VP,GP,Uh,$P,RC=I(()=>{"use strict";id();VP=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),GP=new Set(["javascript:","data:","file:","vbscript:"]);Uh=Symbol("node-seen"),$P=(e,t,a,n,r,o,l)=>{let i=(s,u,c)=>{if(s.type!=="element"||s[Uh])return Zn;if(s.tagName==="a"){let d=MC(s.properties.href,t,e,!1,!1,r);return d===null?(s[Uh]=!0,Qn(s,i),c&&typeof u=="number"&&(c.children[u]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(s.properties.href),class:l},children:[...s.children,{type:"text",value:" [blocked]"}]}),So):(s.properties.href=d,s.properties.target="_blank",s.properties.rel="noopener noreferrer",Zn)}if(s.tagName==="img"){let d=MC(s.properties.src,a,e,n,!0,r);return d===null?(s[Uh]=!0,Qn(s,i),c&&typeof u=="number"&&(c.children[u]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(s.properties.alt||"No description")+"]"}]}),So):(s.properties.src=d,Zn)}return Zn};return i}});function WP(){return e=>e}var DC,_C=I(()=>{"use strict";DC=WP});var OC,KP,Fh,zC=I(()=>{"use strict";OC=typeof self=="object"?self:globalThis,KP=(e,t)=>{let a=(r,o)=>(e.set(o,r),r),n=r=>{if(e.has(r))return e.get(r);let[o,l]=t[r];switch(o){case 0:case-1:return a(l,r);case 1:{let i=a([],r);for(let s of l)i.push(n(s));return i}case 2:{let i=a({},r);for(let[s,u]of l)i[n(s)]=n(u);return i}case 3:return a(new Date(l),r);case 4:{let{source:i,flags:s}=l;return a(new RegExp(i,s),r)}case 5:{let i=a(new Map,r);for(let[s,u]of l)i.set(n(s),n(u));return i}case 6:{let i=a(new Set,r);for(let s of l)i.add(n(s));return i}case 7:{let{name:i,message:s}=l;return a(new OC[i](s),r)}case 8:return a(BigInt(l),r);case"BigInt":return a(Object(BigInt(l)),r);case"ArrayBuffer":return a(new Uint8Array(l).buffer,l);case"DataView":{let{buffer:i}=new Uint8Array(l);return a(new DataView(i),l)}}return a(new OC[o](l),r)};return n},Fh=e=>KP(new Map,e)(0)});var Ul,YP,JP,Ls,ud,eN,Hh,qC=I(()=>{"use strict";Ul="",{toString:YP}={},{keys:JP}=Object,Ls=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let a=YP.call(e).slice(8,-1);switch(a){case"Array":return[1,Ul];case"Object":return[2,Ul];case"Date":return[3,Ul];case"RegExp":return[4,Ul];case"Map":return[5,Ul];case"Set":return[6,Ul];case"DataView":return[1,a]}return a.includes("Array")?[1,a]:a.includes("Error")?[7,a]:[2,a]},ud=([e,t])=>e===0&&(t==="function"||t==="symbol"),eN=(e,t,a,n)=>{let r=(l,i)=>{let s=n.push(l)-1;return a.set(i,s),s},o=l=>{if(a.has(l))return a.get(l);let[i,s]=Ls(l);switch(i){case 0:{let c=l;switch(s){case"bigint":i=8,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return r([-1],l)}return r([i,c],l)}case 1:{if(s){let f=l;return s==="DataView"?f=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(f=new Uint8Array(l)),r([s,[...f]],l)}let c=[],d=r([i,c],l);for(let f of l)c.push(o(f));return d}case 2:{if(s)switch(s){case"BigInt":return r([s,l.toString()],l);case"Boolean":case"Number":case"String":return r([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());let c=[],d=r([i,c],l);for(let f of JP(l))(e||!ud(Ls(l[f])))&&c.push([o(f),o(l[f])]);return d}case 3:return r([i,l.toISOString()],l);case 4:{let{source:c,flags:d}=l;return r([i,{source:c,flags:d}],l)}case 5:{let c=[],d=r([i,c],l);for(let[f,p]of l)(e||!(ud(Ls(f))||ud(Ls(p))))&&c.push([o(f),o(p)]);return d}case 6:{let c=[],d=r([i,c],l);for(let f of l)(e||!ud(Ls(f)))&&c.push(o(f));return d}}let{message:u}=l;return r([i,{name:s,message:u}],l)};return o},Hh=(e,{json:t,lossy:a}={})=>{let n=[];return eN(!(t||a),!!t,new Map,n)(e),n}});var Br,cd=I(()=>{"use strict";zC();qC();Br=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Fh(Hh(e,t)):structuredClone(e):(e,t)=>Fh(Hh(e,t))});function FC(e){return t;function t(a){let n=a&&a.position&&a.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function ks(e){let t=zl(e),a=dd(e);if(t&&a)return{start:t,end:a}}var dd,zl,HC=I(()=>{"use strict";dd=FC("end"),zl=FC("start")});var Ts=I(()=>{"use strict";HC()});var Co,jh,jC=I(()=>{"use strict";Co=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],jh={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Co,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Co],h2:[["className","sr-only"]],img:[...Co,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Co,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Co],table:[...Co],ul:[...Co,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]}});function Vh(e,t){let a={type:"root",children:[]},n={schema:t?{...jh,...t}:jh,stack:[]},r=$C(n,e);return r&&(Array.isArray(r)?r.length===1?a=r[0]:a.children=r:a=r),a}function $C(e,t){if(t&&typeof t=="object"){let a=t;switch(typeof a.type=="string"?a.type:""){case"comment":return tN(e,a);case"doctype":return aN(e,a);case"element":return nN(e,a);case"root":return rN(e,a);case"text":return oN(e,a);default:}}}function tN(e,t){if(e.schema.allowComments){let a=typeof t.value=="string"?t.value:"",n=a.indexOf("-->"),o={type:"comment",value:n<0?a:a.slice(0,n)};return As(o,t),o}}function aN(e,t){if(e.schema.allowDoctypes){let a={type:"doctype"};return As(a,t),a}}function nN(e,t){let a=typeof t.tagName=="string"?t.tagName:"";e.stack.push(a);let n=WC(e,t.children),r=lN(e,t.properties);e.stack.pop();let o=!1;if(a&&a!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(a))&&(o=!0,e.schema.ancestors&&Ur.call(e.schema.ancestors,a))){let i=e.schema.ancestors[a],s=-1;for(o=!1;++s<i.length;)e.stack.includes(i[s])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(a)?n:void 0;let l={type:"element",tagName:a,properties:r,children:n};return As(l,t),l}function rN(e,t){let n={type:"root",children:WC(e,t.children)};return As(n,t),n}function oN(e,t){let n={type:"text",value:typeof t.value=="string"?t.value:""};return As(n,t),n}function WC(e,t){let a=[];if(Array.isArray(t)){let n=t,r=-1;for(;++r<n.length;){let o=$C(e,n[r]);o&&(Array.isArray(o)?a.push(...o):a.push(o))}}return a}function lN(e,t){let a=e.stack[e.stack.length-1],n=e.schema.attributes,r=e.schema.required,o=n&&Ur.call(n,a)?n[a]:void 0,l=n&&Ur.call(n,"*")?n["*"]:void 0,i=t&&typeof t=="object"?t:{},s={},u;for(u in i)if(Ur.call(i,u)){let c=i[u],d=VC(e,GC(o,u),u,c);d==null&&(d=VC(e,GC(l,u),u,c)),d!=null&&(s[u]=d)}if(r&&Ur.call(r,a)){let c=r[a];for(u in c)Ur.call(c,u)&&!Ur.call(s,u)&&(s[u]=c[u])}return s}function VC(e,t,a,n){return t?Array.isArray(n)?iN(e,t,a,n):XC(e,t,a,n):void 0}function iN(e,t,a,n){let r=-1,o=[];for(;++r<n.length;){let l=XC(e,t,a,n[r]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function XC(e,t,a,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&sN(e,a,n)){if(typeof t=="object"&&t.length>1){let r=!1,o=0;for(;++o<t.length;){let l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(n))){r=!0;break}}else if(l===n){r=!0;break}}if(!r)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(a)?e.schema.clobberPrefix+n:n}}function sN(e,t,a){let n=e.schema.protocols&&Ur.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;let r=String(a),o=r.indexOf(":"),l=r.indexOf("?"),i=r.indexOf("#"),s=r.indexOf("/");if(o<0||s>-1&&o>s||l>-1&&o>l||i>-1&&o>i)return!0;let u=-1;for(;++u<n.length;){let c=n[u];if(o===c.length&&r.slice(0,c.length)===c)return!0}return!1}function As(e,t){let a=ks(t);t.data&&(e.data=Br(t.data)),a&&(e.position=a)}function GC(e,t){let a,n=-1;if(e)for(;++n<e.length;){let r=e[n],o=typeof r=="string"?r:r[0];if(o===t)return r;o==="data*"&&(a=r)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return a}var Ur,ZC=I(()=>{"use strict";cd();Ts();jC();Ur={}.hasOwnProperty});var QC=I(()=>{"use strict";ZC()});function fd(e){return function(t){return Vh(t,e)}}var KC=I(()=>{"use strict";QC()});var YC=I(()=>{"use strict";KC()});function Gh(e,t){let a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,r=a.indexOf(t);for(;r!==-1;)n++,r=a.indexOf(t,r+t.length);return n}var JC=I(()=>{"use strict"});function Io(e){return e!==null&&(e<32||e===127)}function G(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}function zr(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}var Ot,wt,eI,Ms,tI,aI,Lo,wn,Me=I(()=>{"use strict";Ot=zr(/[A-Za-z]/),wt=zr(/[\dA-Za-z]/),eI=zr(/[#-'*+\--9=?A-Z^-~]/);Ms=zr(/\d/),tI=zr(/[\dA-Fa-f]/),aI=zr(/[!-/:-@[-`{-~]/);Lo=zr(/\p{P}|\p{S}/u),wn=zr(/\s/)});function $h(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var nI=I(()=>{"use strict"});function Wh(e,t,a){let r=Nr((a||{}).ignore||[]),o=uN(t),l=-1;for(;++l<o.length;)Is(e,"text",i);function i(u,c){let d=-1,f;for(;++d<c.length;){let p=c[d],m=f?f.children:void 0;if(r(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return s(u,c)}function s(u,c){let d=c[c.length-1],f=o[l][0],p=o[l][1],m=0,b=d.children.indexOf(u),y=!1,w=[];f.lastIndex=0;let g=f.exec(u.value);for(;g;){let v=g.index,M={index:g.index,input:g.input,stack:[...c,u]},C=p(...g,M);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=v+1:(m!==v&&w.push({type:"text",value:u.value.slice(m,v)}),Array.isArray(C)?w.push(...C):C&&w.push(C),m=v+g[0].length,y=!0),!f.global)break;g=f.exec(u.value)}return y?(m<u.value.length&&w.push({type:"text",value:u.value.slice(m)}),d.children.splice(b,1,...w)):w=[u],b+w.length}}function uN(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let a=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<a.length;){let r=a[n];t.push([cN(r[0]),dN(r[1])])}return t}function cN(e){return typeof e=="string"?new RegExp($h(e),"g"):e}function dN(e){return typeof e=="function"?e:function(){return e}}var rI=I(()=>{"use strict";nI();ld();od()});var oI=I(()=>{"use strict";rI()});function Kh(){return{transforms:[yN],enter:{literalAutolink:fN,literalAutolinkEmail:Qh,literalAutolinkHttp:Qh,literalAutolinkWww:Qh},exit:{literalAutolink:gN,literalAutolinkEmail:hN,literalAutolinkHttp:pN,literalAutolinkWww:mN}}}function Yh(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xh,notInConstruct:Zh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xh,notInConstruct:Zh},{character:":",before:"[ps]",after:"\\/",inConstruct:Xh,notInConstruct:Zh}]}}function fN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qh(e){this.config.enter.autolinkProtocol.call(this,e)}function pN(e){this.config.exit.autolinkProtocol.call(this,e)}function mN(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function hN(e){this.config.exit.autolinkEmail.call(this,e)}function gN(e){this.exit(e)}function yN(e){Wh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wN],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,xN]],{ignore:["link","linkReference"]})}function wN(e,t,a,n,r){let o="";if(!lI(r)||(/^w/i.test(t)&&(a=t+a,t="",o="http://"),!vN(a)))return!1;let l=bN(a+n);if(!l[0])return!1;let i={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[i,{type:"text",value:l[1]}]:i}function xN(e,t,a,n){return!lI(n,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function vN(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function bN(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],n=a.indexOf(")"),r=Gh(e,"("),o=Gh(e,")");for(;n!==-1&&r>o;)e+=a.slice(0,n+1),a=a.slice(n+1),n=a.indexOf(")"),o++;return[e,a]}function lI(e,t){let a=e.input.charCodeAt(e.index-1);return(e.index===0||wn(a)||Lo(a))&&(!t||a!==47)}var Xh,Zh,iI=I(()=>{"use strict";JC();Me();oI();Xh="phrasing",Zh=["autolink","link","image","label"]});var sI=I(()=>{"use strict";iI()});function Zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ql=I(()=>{"use strict"});function SN(){this.buffer()}function CN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function IN(){this.buffer()}function LN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kN(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Zt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function TN(e){this.exit(e)}function AN(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Zt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function MN(e){this.exit(e)}function EN(){return"["}function uI(e,t,a,n){let r=a.createTracker(n),o=r.move("[^"),l=a.enter("footnoteReference"),i=a.enter("reference");return o+=r.move(a.safe(a.associationId(e),{after:"]",before:o})),i(),l(),o+=r.move("]"),o}function Jh(){return{enter:{gfmFootnoteCallString:SN,gfmFootnoteCall:CN,gfmFootnoteDefinitionLabelString:IN,gfmFootnoteDefinition:LN},exit:{gfmFootnoteCallString:kN,gfmFootnoteCall:TN,gfmFootnoteDefinitionLabelString:AN,gfmFootnoteDefinition:MN}}}function eg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:uI},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(n,r,o,l){let i=o.createTracker(l),s=i.move("[^"),u=o.enter("footnoteDefinition"),c=o.enter("label");return s+=i.move(o.safe(o.associationId(n),{before:s,after:"]"})),c(),s+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),s+=i.move((t?`
|
|
10
|
-
`:" ")+o.indentLines(o.containerFlow(n,i.current()),t?
|
|
11
|
-
`)}function
|
|
12
|
-
`&&
|
|
13
|
-
`}var
|
|
8
|
+
`+n.stack}}var Zp=Object.prototype.hasOwnProperty,zm=Ot.unstable_scheduleCallback,pp=Ot.unstable_cancelCallback,o_=Ot.unstable_shouldYield,l_=Ot.unstable_requestPaint,Ca=Ot.unstable_now,i_=Ot.unstable_getCurrentPriorityLevel,pb=Ot.unstable_ImmediatePriority,mb=Ot.unstable_UserBlockingPriority,uc=Ot.unstable_NormalPriority,s_=Ot.unstable_LowPriority,hb=Ot.unstable_IdlePriority,u_=Ot.log,c_=Ot.unstable_setDisableYieldValue,es=null,ka=null;function hr(e){if(typeof u_=="function"&&c_(e),ka&&typeof ka.setStrictMode=="function")try{ka.setStrictMode(es,e)}catch{}}var La=Math.clz32?Math.clz32:p_,d_=Math.log,f_=Math.LN2;function p_(e){return e>>>=0,e===0?32:31-(d_(e)/f_|0)|0}var Au=256,Mu=262144,Eu=4194304;function eo(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Pc(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var i=n&134217727;return i!==0?(n=i&~o,n!==0?r=eo(n):(l&=i,l!==0?r=eo(l):a||(a=i&~e,a!==0&&(r=eo(a))))):(i=n&~o,i!==0?r=eo(i):l!==0?r=eo(l):a||(a=n&~e,a!==0&&(r=eo(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function ts(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function m_(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gb(){var e=Eu;return Eu<<=1,(Eu&62914560)===0&&(Eu=4194304),e}function mp(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function as(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function h_(e,t,a,n,r,o){var l=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(a=l&~a;0<a;){var c=31-La(a),d=1<<c;i[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var p=f[c];p!==null&&(p.lane&=-536870913)}a&=~d}n!==0&&yb(e,n,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(l&~t))}function yb(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-La(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function wb(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-La(a),r=1<<n;r&t|e[n]&t&&(e[n]|=t),a&=~r}}function xb(e,t){var a=t&-t;return a=(a&42)!==0?1:qm(a),(a&(e.suspendedLanes|t))!==0?0:a}function qm(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hm(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vb(){var e=ze.p;return e!==0?e:(e=window.event,e===void 0?32:j0(e.type))}function Fx(e,t){var a=ze.p;try{return ze.p=e,t()}finally{ze.p=a}}var _r=Math.random().toString(36).slice(2),jt="__reactFiber$"+_r,ma="__reactProps$"+_r,Ml="__reactContainer$"+_r,Qp="__reactEvents$"+_r,g_="__reactListeners$"+_r,y_="__reactHandles$"+_r,zx="__reactResources$"+_r,ns="__reactMarker$"+_r;function jm(e){delete e[jt],delete e[ma],delete e[Qp],delete e[g_],delete e[y_]}function tl(e){var t=e[jt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ml]||a[jt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Xv(e);e!==null;){if(a=e[jt])return a;e=Xv(e)}return t}e=a,a=e.parentNode}return null}function El(e){if(e=e[jt]||e[Ml]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ii(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function dl(e){var t=e[zx];return t||(t=e[zx]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ft(e){e[ns]=!0}var bb=new Set,Sb={};function mo(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(Sb[e]=t,e=0;e<t.length;e++)bb.add(t[e])}var w_=RegExp("^[: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]*$"),qx={},Hx={};function x_(e){return Zp.call(Hx,e)?!0:Zp.call(qx,e)?!1:w_.test(e)?Hx[e]=!0:(qx[e]=!0,!1)}function Gu(e,t,a){if(x_(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ru(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Mn(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Ua(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ib(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v_(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(l){a=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(l){a=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yp(e){if(!e._valueTracker){var t=Ib(e)?"checked":"value";e._valueTracker=v_(e,t,""+e[t])}}function Cb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Ib(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function cc(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}}var b_=/[\n"\\]/g;function qa(e){return e.replace(b_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jp(e,t,a,n,r,o,l,i){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ua(t)):e.value!==""+Ua(t)&&(e.value=""+Ua(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?em(e,l,Ua(t)):a!=null?em(e,l,Ua(a)):n!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+Ua(i):e.removeAttribute("name")}function kb(e,t,a,n,r,o,l,i){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Yp(e);return}a=a!=null?""+Ua(a):"",t=t!=null?""+Ua(t):a,i||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=i?e.checked:!!n,e.defaultChecked=!!n,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Yp(e)}function em(e,t,a){t==="number"&&cc(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fl(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ua(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Lb(e,t,a){if(t!=null&&(t=""+Ua(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ua(a):""}function Tb(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(P(92));if(Si(n)){if(1<n.length)throw Error(P(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ua(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Yp(e)}function vl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var S_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function jx(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||S_.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ab(e,t,a){if(t!=null&&typeof t!="object")throw Error(P(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&a[r]!==n&&jx(e,r,n)}else for(var o in t)t.hasOwnProperty(o)&&jx(e,o,t[o])}function Vm(e){if(e.indexOf("-")===-1)return!1;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 I_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),C_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $u(e){return C_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bn(){}var tm=null;function Gm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var al=null,pl=null;function Vx(e){var t=El(e);if(t&&(e=t.stateNode)){var a=e[ma]||null;e:switch(e=t.stateNode,t.type){case"input":if(Jp(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+qa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var r=n[ma]||null;if(!r)throw Error(P(90));Jp(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Cb(n)}break e;case"textarea":Lb(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&fl(e,!!a.multiple,t,!1)}}}var hp=!1;function Mb(e,t,a){if(hp)return e(t,a);hp=!0;try{var n=e(t);return n}finally{if(hp=!1,(al!==null||pl!==null)&&(Wc(),al&&(t=al,e=pl,pl=al=null,Vx(t),e)))for(t=0;t<e.length;t++)Vx(e[t])}}function zi(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ma]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(P(231,t,typeof a));return a}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),am=!1;if(Hn)try{Xo={},Object.defineProperty(Xo,"passive",{get:function(){am=!0}}),window.addEventListener("test",Xo,Xo),window.removeEventListener("test",Xo,Xo)}catch{am=!1}var Xo,gr=null,$m=null,Wu=null;function Eb(){if(Wu)return Wu;var e,t=$m,a=t.length,n,r="value"in gr?gr.value:gr.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var l=a-e;for(n=1;n<=l&&t[a-n]===r[o-n];n++);return Wu=r.slice(e,1<n?1-n:void 0)}function Xu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Du(){return!0}function Gx(){return!1}function ha(e){function t(a,n,r,o,l){this._reactName=a,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(a=e[i],this[i]=a?a(o):o[i]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Du:Gx,this.isPropagationStopped=Gx,this}return ut(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Du)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Du)},persist:function(){},isPersistent:Du}),t}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nc=ha(ho),rs=ut({},ho,{view:0,detail:0}),k_=ha(rs),gp,yp,hi,Bc=ut({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hi&&(hi&&e.type==="mousemove"?(gp=e.screenX-hi.screenX,yp=e.screenY-hi.screenY):yp=gp=0,hi=e),gp)},movementY:function(e){return"movementY"in e?e.movementY:yp}}),$x=ha(Bc),L_=ut({},Bc,{dataTransfer:0}),T_=ha(L_),A_=ut({},rs,{relatedTarget:0}),wp=ha(A_),M_=ut({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),E_=ha(M_),R_=ut({},ho,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),D_=ha(R_),__=ut({},ho,{data:0}),Wx=ha(__),O_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},P_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},N_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N_[e])?!!t[e]:!1}function Wm(){return B_}var U_=ut({},rs,{key:function(e){if(e.key){var t=O_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?P_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wm,charCode:function(e){return e.type==="keypress"?Xu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),F_=ha(U_),z_=ut({},Bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xx=ha(z_),q_=ut({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wm}),H_=ha(q_),j_=ut({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),V_=ha(j_),G_=ut({},Bc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),$_=ha(G_),W_=ut({},ho,{newState:0,oldState:0}),X_=ha(W_),K_=[9,13,27,32],Xm=Hn&&"CompositionEvent"in window,Li=null;Hn&&"documentMode"in document&&(Li=document.documentMode);var Z_=Hn&&"TextEvent"in window&&!Li,Rb=Hn&&(!Xm||Li&&8<Li&&11>=Li),Kx=" ",Zx=!1;function Db(e,t){switch(e){case"keyup":return K_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _b(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nl=!1;function Q_(e,t){switch(e){case"compositionend":return _b(t);case"keypress":return t.which!==32?null:(Zx=!0,Kx);case"textInput":return e=t.data,e===Kx&&Zx?null:e;default:return null}}function Y_(e,t){if(nl)return e==="compositionend"||!Xm&&Db(e,t)?(e=Eb(),Wu=$m=gr=null,nl=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rb&&t.locale!=="ko"?null:t.data;default:return null}}var J_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!J_[e.type]:t==="textarea"}function Ob(e,t,a,n){al?pl?pl.push(n):pl=[n]:al=n,t=Ac(t,"onChange"),0<t.length&&(a=new Nc("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Ti=null,qi=null;function eO(e){M0(e,0)}function Uc(e){var t=Ii(e);if(Cb(t))return e}function Yx(e,t){if(e==="change")return t}var Pb=!1;Hn&&(Hn?(Ou="oninput"in document,Ou||(xp=document.createElement("div"),xp.setAttribute("oninput","return;"),Ou=typeof xp.oninput=="function"),_u=Ou):_u=!1,Pb=_u&&(!document.documentMode||9<document.documentMode));var _u,Ou,xp;function Jx(){Ti&&(Ti.detachEvent("onpropertychange",Nb),qi=Ti=null)}function Nb(e){if(e.propertyName==="value"&&Uc(qi)){var t=[];Ob(t,qi,e,Gm(e)),Mb(eO,t)}}function tO(e,t,a){e==="focusin"?(Jx(),Ti=t,qi=a,Ti.attachEvent("onpropertychange",Nb)):e==="focusout"&&Jx()}function aO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uc(qi)}function nO(e,t){if(e==="click")return Uc(t)}function rO(e,t){if(e==="input"||e==="change")return Uc(t)}function oO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Aa=typeof Object.is=="function"?Object.is:oO;function Hi(e,t){if(Aa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var r=a[n];if(!Zp.call(t,r)||!Aa(e[r],t[r]))return!1}return!0}function ev(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tv(e,t){var a=ev(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ev(a)}}function Bb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ub(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=cc(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=cc(e.document)}return t}function Km(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")}var lO=Hn&&"documentMode"in document&&11>=document.documentMode,rl=null,nm=null,Ai=null,rm=!1;function av(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rm||rl==null||rl!==cc(n)||(n=rl,"selectionStart"in n&&Km(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ai&&Hi(Ai,n)||(Ai=n,n=Ac(nm,"onSelect"),0<n.length&&(t=new Nc("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=rl)))}function Yr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ol={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionrun:Yr("Transition","TransitionRun"),transitionstart:Yr("Transition","TransitionStart"),transitioncancel:Yr("Transition","TransitionCancel"),transitionend:Yr("Transition","TransitionEnd")},vp={},Fb={};Hn&&(Fb=document.createElement("div").style,"AnimationEvent"in window||(delete ol.animationend.animation,delete ol.animationiteration.animation,delete ol.animationstart.animation),"TransitionEvent"in window||delete ol.transitionend.transition);function go(e){if(vp[e])return vp[e];if(!ol[e])return e;var t=ol[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Fb)return vp[e]=t[a];return e}var zb=go("animationend"),qb=go("animationiteration"),Hb=go("animationstart"),iO=go("transitionrun"),sO=go("transitionstart"),uO=go("transitioncancel"),jb=go("transitionend"),Vb=new Map,om="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");om.push("scrollEnd");function an(e,t){Vb.set(e,t),mo(t,[e])}var dc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ba=[],ll=0,Zm=0;function Fc(){for(var e=ll,t=Zm=ll=0;t<e;){var a=Ba[t];Ba[t++]=null;var n=Ba[t];Ba[t++]=null;var r=Ba[t];Ba[t++]=null;var o=Ba[t];if(Ba[t++]=null,n!==null&&r!==null){var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}o!==0&&Gb(a,r,o)}}function zc(e,t,a,n){Ba[ll++]=e,Ba[ll++]=t,Ba[ll++]=a,Ba[ll++]=n,Zm|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Qm(e,t,a,n){return zc(e,t,a,n),fc(e)}function yo(e,t){return zc(e,null,null,t),fc(e)}function Gb(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-La(a),e=o.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=a|536870912),o):null}function fc(e){if(50<Bi)throw Bi=0,Lm=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var il={};function cO(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sa(e,t,a,n){return new cO(e,t,a,n)}function Ym(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,t){var a=e.alternate;return a===null?(a=Sa(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function $b(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ku(e,t,a,n,r,o){var l=0;if(n=e,typeof e=="function")Ym(e)&&(l=1);else if(typeof e=="string")l=pP(e,a,hn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $p:return e=Sa(31,a,t,r),e.elementType=$p,e.lanes=o,e;case Jo:return ro(a.children,r,o,t);case db:l=8,r|=24;break;case jp:return e=Sa(12,a,t,r|2),e.elementType=jp,e.lanes=o,e;case Vp:return e=Sa(13,a,t,r),e.elementType=Vp,e.lanes=o,e;case Gp:return e=Sa(19,a,t,r),e.elementType=Gp,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nn:l=10;break e;case fb:l=9;break e;case Um:l=11;break e;case Fm:l=14;break e;case ur:l=16,n=null;break e}l=29,a=Error(P(130,e===null?"null":typeof e,"")),n=null}return t=Sa(l,a,t,r),t.elementType=e,t.type=n,t.lanes=o,t}function ro(e,t,a,n){return e=Sa(7,e,n,t),e.lanes=a,e}function bp(e,t,a){return e=Sa(6,e,null,t),e.lanes=a,e}function Wb(e){var t=Sa(18,null,null,0);return t.stateNode=e,t}function Sp(e,t,a){return t=Sa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var nv=new WeakMap;function Ha(e,t){if(typeof e=="object"&&e!==null){var a=nv.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ux(t)},nv.set(e,t),t)}return{value:e,source:t,stack:Ux(t)}}var sl=[],ul=0,pc=null,ji=0,Fa=[],za=0,Mr=null,fn=1,pn="";function On(e,t){sl[ul++]=ji,sl[ul++]=pc,pc=e,ji=t}function Xb(e,t,a){Fa[za++]=fn,Fa[za++]=pn,Fa[za++]=Mr,Mr=e;var n=fn;e=pn;var r=32-La(n)-1;n&=~(1<<r),a+=1;var o=32-La(t)+r;if(30<o){var l=r-r%5;o=(n&(1<<l)-1).toString(32),n>>=l,r-=l,fn=1<<32-La(t)+r|a<<r|n,pn=o+e}else fn=1<<o|a<<r|n,pn=e}function Jm(e){e.return!==null&&(On(e,1),Xb(e,1,0))}function eh(e){for(;e===pc;)pc=sl[--ul],sl[ul]=null,ji=sl[--ul],sl[ul]=null;for(;e===Mr;)Mr=Fa[--za],Fa[za]=null,pn=Fa[--za],Fa[za]=null,fn=Fa[--za],Fa[za]=null}function Kb(e,t){Fa[za++]=fn,Fa[za++]=pn,Fa[za++]=Mr,fn=t.id,pn=t.overflow,Mr=e}var Vt=null,st=null,Te=!1,br=null,ja=!1,lm=Error(P(519));function Er(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vi(Ha(t,e)),lm}function rv(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[jt]=e,t[ma]=n,a){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(a=0;a<Xi.length;a++)xe(Xi[a],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),kb(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Tb(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||R0(t.textContent,a)?(n.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),n.onScroll!=null&&xe("scroll",t),n.onScrollEnd!=null&&xe("scrollend",t),n.onClick!=null&&(t.onclick=Bn),t=!0):t=!1,t||Er(e,!0)}function ov(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:ja=!1;return;case 27:case 3:ja=!0;return;default:Vt=Vt.return}}function Ko(e){if(e!==Vt)return!1;if(!Te)return ov(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rm(e.type,e.memoizedProps)),a=!a),a&&st&&Er(e),ov(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));st=Wv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));st=Wv(e)}else t===27?(t=st,Or(e.type)?(e=Pm,Pm=null,st=e):st=t):st=Vt?Ga(e.stateNode.nextSibling):null;return!0}function so(){st=Vt=null,Te=!1}function Ip(){var e=br;return e!==null&&(fa===null?fa=e:fa.push.apply(fa,e),br=null),e}function Vi(e){br===null?br=[e]:br.push(e)}var im=gn(null),wo=null,Un=null;function dr(e,t,a){ot(im,t._currentValue),t._currentValue=a}function zn(e){e._currentValue=im.current,zt(im)}function sm(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function um(e,t,a,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var l=r.child;o=o.firstContext;e:for(;o!==null;){var i=o;o=r;for(var s=0;s<t.length;s++)if(i.context===t[s]){o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),sm(o.return,a,e),n||(l=null);break e}o=i.next}}else if(r.tag===18){if(l=r.return,l===null)throw Error(P(341));l.lanes|=a,o=l.alternate,o!==null&&(o.lanes|=a),sm(l,a,e),l=null}else l=r.child;if(l!==null)l.return=r;else for(l=r;l!==null;){if(l===e){l=null;break}if(r=l.sibling,r!==null){r.return=l.return,l=r;break}l=l.return}r=l}}function Rl(e,t,a,n){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var l=r.alternate;if(l===null)throw Error(P(387));if(l=l.memoizedProps,l!==null){var i=r.type;Aa(r.pendingProps.value,l.value)||(e!==null?e.push(i):e=[i])}}else if(r===lc.current){if(l=r.alternate,l===null)throw Error(P(387));l.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zi):e=[Zi])}r=r.return}e!==null&&um(t,e,a,n),t.flags|=262144}function mc(e){for(e=e.firstContext;e!==null;){if(!Aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function uo(e){wo=e,Un=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Zb(wo,e)}function Pu(e,t){return wo===null&&uo(e),Zb(e,t)}function Zb(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Un===null){if(e===null)throw Error(P(308));Un=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Un=Un.next=t;return a}var dO=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},fO=Ot.unstable_scheduleCallback,pO=Ot.unstable_NormalPriority,Et={$$typeof:Nn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function th(){return{controller:new dO,data:new Map,refCount:0}}function os(e){e.refCount--,e.refCount===0&&fO(pO,function(){e.controller.abort()})}var Mi=null,cm=0,bl=0,ml=null;function mO(e,t){if(Mi===null){var a=Mi=[];cm=0,bl=Lh(),ml={status:"pending",value:void 0,then:function(n){a.push(n)}}}return cm++,t.then(lv,lv),t}function lv(){if(--cm===0&&Mi!==null){ml!==null&&(ml.status="fulfilled");var e=Mi;Mi=null,bl=0,ml=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hO(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),n}var iv=re.S;re.S=function(e,t){c0=Ca(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mO(e,t),iv!==null&&iv(e,t)};var oo=gn(null);function ah(){var e=oo.current;return e!==null?e:at.pooledCache}function Zu(e,t){t===null?ot(oo,oo.current):ot(oo,t.pool)}function Qb(){var e=ah();return e===null?null:{parent:Et._currentValue,pool:e}}var Dl=Error(P(460)),nh=Error(P(474)),qc=Error(P(542)),hc={then:function(){}};function sv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yb(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Bn,Bn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cv(e),e;default:if(typeof t.status=="string")t.then(Bn,Bn);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cv(e),e}throw lo=t,Dl}}function to(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(lo=a,Dl):a}}var lo=null;function uv(){if(lo===null)throw Error(P(459));var e=lo;return lo=null,e}function cv(e){if(e===Dl||e===qc)throw Error(P(483))}var hl=null,Gi=0;function Nu(e){var t=Gi;return Gi+=1,hl===null&&(hl=[]),Yb(hl,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bu(e,t){throw t.$$typeof===t_?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jb(e){function t(y,w){if(e){var g=y.deletions;g===null?(y.deletions=[w],y.flags|=16):g.push(w)}}function a(y,w){if(!e)return null;for(;w!==null;)t(y,w),w=w.sibling;return null}function n(y){for(var w=new Map;y!==null;)y.key!==null?w.set(y.key,y):w.set(y.index,y),y=y.sibling;return w}function r(y,w){return y=Fn(y,w),y.index=0,y.sibling=null,y}function o(y,w,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<w?(y.flags|=67108866,w):g):(y.flags|=67108866,w)):(y.flags|=1048576,w)}function l(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function i(y,w,g,v){return w===null||w.tag!==6?(w=bp(g,y.mode,v),w.return=y,w):(w=r(w,g),w.return=y,w)}function s(y,w,g,v){var M=g.type;return M===Jo?c(y,w,g.props.children,v,g.key):w!==null&&(w.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ur&&to(M)===w.type)?(w=r(w,g.props),gi(w,g),w.return=y,w):(w=Ku(g.type,g.key,g.props,null,y.mode,v),gi(w,g),w.return=y,w)}function u(y,w,g,v){return w===null||w.tag!==4||w.stateNode.containerInfo!==g.containerInfo||w.stateNode.implementation!==g.implementation?(w=Sp(g,y.mode,v),w.return=y,w):(w=r(w,g.children||[]),w.return=y,w)}function c(y,w,g,v,M){return w===null||w.tag!==7?(w=ro(g,y.mode,v,M),w.return=y,w):(w=r(w,g),w.return=y,w)}function d(y,w,g){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=bp(""+w,y.mode,g),w.return=y,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Tu:return g=Ku(w.type,w.key,w.props,null,y.mode,g),gi(g,w),g.return=y,g;case bi:return w=Sp(w,y.mode,g),w.return=y,w;case ur:return w=to(w),d(y,w,g)}if(Si(w)||mi(w))return w=ro(w,y.mode,g,null),w.return=y,w;if(typeof w.then=="function")return d(y,Nu(w),g);if(w.$$typeof===Nn)return d(y,Pu(y,w),g);Bu(y,w)}return null}function f(y,w,g,v){var M=w!==null?w.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return M!==null?null:i(y,w,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Tu:return g.key===M?s(y,w,g,v):null;case bi:return g.key===M?u(y,w,g,v):null;case ur:return g=to(g),f(y,w,g,v)}if(Si(g)||mi(g))return M!==null?null:c(y,w,g,v,null);if(typeof g.then=="function")return f(y,w,Nu(g),v);if(g.$$typeof===Nn)return f(y,w,Pu(y,g),v);Bu(y,g)}return null}function p(y,w,g,v,M){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return y=y.get(g)||null,i(w,y,""+v,M);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Tu:return y=y.get(v.key===null?g:v.key)||null,s(w,y,v,M);case bi:return y=y.get(v.key===null?g:v.key)||null,u(w,y,v,M);case ur:return v=to(v),p(y,w,g,v,M)}if(Si(v)||mi(v))return y=y.get(g)||null,c(w,y,v,M,null);if(typeof v.then=="function")return p(y,w,g,Nu(v),M);if(v.$$typeof===Nn)return p(y,w,g,Pu(w,v),M);Bu(w,v)}return null}function m(y,w,g,v){for(var M=null,I=null,A=w,E=w=0,_=null;A!==null&&E<g.length;E++){A.index>E?(_=A,A=null):_=A.sibling;var L=f(y,A,g[E],v);if(L===null){A===null&&(A=_);break}e&&A&&L.alternate===null&&t(y,A),w=o(L,w,E),I===null?M=L:I.sibling=L,I=L,A=_}if(E===g.length)return a(y,A),Te&&On(y,E),M;if(A===null){for(;E<g.length;E++)A=d(y,g[E],v),A!==null&&(w=o(A,w,E),I===null?M=A:I.sibling=A,I=A);return Te&&On(y,E),M}for(A=n(A);E<g.length;E++)_=p(A,y,E,g[E],v),_!==null&&(e&&_.alternate!==null&&A.delete(_.key===null?E:_.key),w=o(_,w,E),I===null?M=_:I.sibling=_,I=_);return e&&A.forEach(function(W){return t(y,W)}),Te&&On(y,E),M}function x(y,w,g,v){if(g==null)throw Error(P(151));for(var M=null,I=null,A=w,E=w=0,_=null,L=g.next();A!==null&&!L.done;E++,L=g.next()){A.index>E?(_=A,A=null):_=A.sibling;var W=f(y,A,L.value,v);if(W===null){A===null&&(A=_);break}e&&A&&W.alternate===null&&t(y,A),w=o(W,w,E),I===null?M=W:I.sibling=W,I=W,A=_}if(L.done)return a(y,A),Te&&On(y,E),M;if(A===null){for(;!L.done;E++,L=g.next())L=d(y,L.value,v),L!==null&&(w=o(L,w,E),I===null?M=L:I.sibling=L,I=L);return Te&&On(y,E),M}for(A=n(A);!L.done;E++,L=g.next())L=p(A,y,E,L.value,v),L!==null&&(e&&L.alternate!==null&&A.delete(L.key===null?E:L.key),w=o(L,w,E),I===null?M=L:I.sibling=L,I=L);return e&&A.forEach(function(U){return t(y,U)}),Te&&On(y,E),M}function b(y,w,g,v){if(typeof g=="object"&&g!==null&&g.type===Jo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Tu:e:{for(var M=g.key;w!==null;){if(w.key===M){if(M=g.type,M===Jo){if(w.tag===7){a(y,w.sibling),v=r(w,g.props.children),v.return=y,y=v;break e}}else if(w.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ur&&to(M)===w.type){a(y,w.sibling),v=r(w,g.props),gi(v,g),v.return=y,y=v;break e}a(y,w);break}else t(y,w);w=w.sibling}g.type===Jo?(v=ro(g.props.children,y.mode,v,g.key),v.return=y,y=v):(v=Ku(g.type,g.key,g.props,null,y.mode,v),gi(v,g),v.return=y,y=v)}return l(y);case bi:e:{for(M=g.key;w!==null;){if(w.key===M)if(w.tag===4&&w.stateNode.containerInfo===g.containerInfo&&w.stateNode.implementation===g.implementation){a(y,w.sibling),v=r(w,g.children||[]),v.return=y,y=v;break e}else{a(y,w);break}else t(y,w);w=w.sibling}v=Sp(g,y.mode,v),v.return=y,y=v}return l(y);case ur:return g=to(g),b(y,w,g,v)}if(Si(g))return m(y,w,g,v);if(mi(g)){if(M=mi(g),typeof M!="function")throw Error(P(150));return g=M.call(g),x(y,w,g,v)}if(typeof g.then=="function")return b(y,w,Nu(g),v);if(g.$$typeof===Nn)return b(y,w,Pu(y,g),v);Bu(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,w!==null&&w.tag===6?(a(y,w.sibling),v=r(w,g),v.return=y,y=v):(a(y,w),v=bp(g,y.mode,v),v.return=y,y=v),l(y)):a(y,w)}return function(y,w,g,v){try{Gi=0;var M=b(y,w,g,v);return hl=null,M}catch(A){if(A===Dl||A===qc)throw A;var I=Sa(29,A,null,y.mode);return I.lanes=v,I.return=y,I}}}var co=Jb(!0),eS=Jb(!1),cr=!1;function rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ir(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Fe&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=fc(e),Gb(e,null,a),t}return zc(e,n,t,a),fc(e)}function Ei(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,wb(e,a)}}function Cp(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var l={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=l:o=o.next=l,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var fm=!1;function Ri(){if(fm){var e=ml;if(e!==null)throw e}}function Di(e,t,a,n){fm=!1;var r=e.updateQueue;cr=!1;var o=r.firstBaseUpdate,l=r.lastBaseUpdate,i=r.shared.pending;if(i!==null){r.shared.pending=null;var s=i,u=s.next;s.next=null,l===null?o=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,i=c.lastBaseUpdate,i!==l&&(i===null?c.firstBaseUpdate=u:i.next=u,c.lastBaseUpdate=s))}if(o!==null){var d=r.baseState;l=0,c=u=s=null,i=o;do{var f=i.lane&-536870913,p=f!==i.lane;if(p?(Ce&f)===f:(n&f)===f){f!==0&&f===bl&&(fm=!0),c!==null&&(c=c.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var m=e,x=i;f=t;var b=a;switch(x.tag){case 1:if(m=x.payload,typeof m=="function"){d=m.call(b,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,f=typeof m=="function"?m.call(b,d,f):m,f==null)break e;d=ut({},d,f);break e;case 2:cr=!0}}f=i.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[f]:p.push(f))}else p={lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=p,s=d):c=c.next=p,l|=f;if(i=i.next,i===null){if(i=r.shared.pending,i===null)break;p=i,i=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);c===null&&(s=d),r.baseState=s,r.firstBaseUpdate=u,r.lastBaseUpdate=c,o===null&&(r.shared.lanes=0),Dr|=l,e.lanes=l,e.memoizedState=d}}function tS(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function aS(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)tS(a[e],t)}var Sl=gn(null),gc=gn(0);function dv(e,t){e=$n,ot(gc,e),ot(Sl,t),$n=e|t.baseLanes}function pm(){ot(gc,$n),ot(Sl,Sl.current)}function oh(){$n=gc.current,zt(Sl),zt(gc)}var Ma=gn(null),Va=null;function fr(e){var t=e.alternate;ot(St,St.current&1),ot(Ma,e),Va===null&&(t===null||Sl.current!==null||t.memoizedState!==null)&&(Va=e)}function mm(e){ot(St,St.current),ot(Ma,e),Va===null&&(Va=e)}function nS(e){e.tag===22?(ot(St,St.current),ot(Ma,e),Va===null&&(Va=e)):pr(e)}function pr(){ot(St,St.current),ot(Ma,Ma.current)}function ba(e){zt(Ma),Va===e&&(Va=null),zt(St)}var St=gn(0);function yc(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||_m(a)||Om(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 jn=0,de=null,Ye=null,At=null,wc=!1,gl=!1,fo=!1,xc=0,$i=0,yl=null,gO=0;function gt(){throw Error(P(321))}function lh(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Aa(e[a],t[a]))return!1;return!0}function ih(e,t,a,n,r,o){return jn=o,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?OS:wh,fo=!1,o=a(n,r),fo=!1,gl&&(o=oS(t,a,n,r)),rS(e),o}function rS(e){re.H=Wi;var t=Ye!==null&&Ye.next!==null;if(jn=0,At=Ye=de=null,wc=!1,$i=0,yl=null,t)throw Error(P(300));e===null||Rt||(e=e.dependencies,e!==null&&mc(e)&&(Rt=!0))}function oS(e,t,a,n){de=e;var r=0;do{if(gl&&(yl=null),$i=0,gl=!1,25<=r)throw Error(P(301));if(r+=1,At=Ye=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}re.H=PS,o=t(a,n)}while(gl);return o}function yO(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?ls(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(de.flags|=1024),t}function sh(){var e=xc!==0;return xc=0,e}function uh(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function ch(e){if(wc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wc=!1}jn=0,At=Ye=de=null,gl=!1,$i=xc=0,yl=null}function ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?de.memoizedState=At=e:At=At.next=e,At}function It(){if(Ye===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=At===null?de.memoizedState:At.next;if(t!==null)At=t,Ye=e;else{if(e===null)throw de.alternate===null?Error(P(467)):Error(P(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},At===null?de.memoizedState=At=e:At=At.next=e}return At}function Hc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ls(e){var t=$i;return $i+=1,yl===null&&(yl=[]),e=Yb(yl,e,t),t=de,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?OS:wh),e}function jc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ls(e);if(e.$$typeof===Nn)return Gt(e)}throw Error(P(438,String(e)))}function dh(e){var t=null,a=de.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=de.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Hc(),de.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=a_;return t.index++,a}function Vn(e,t){return typeof t=="function"?t(e):t}function Qu(e){var t=It();return fh(t,Ye,e)}function fh(e,t,a){var n=e.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=a;var r=e.baseQueue,o=n.pending;if(o!==null){if(r!==null){var l=r.next;r.next=o.next,o.next=l}t.baseQueue=r=o,n.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var i=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ce&d)===d:(jn&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===bl&&(c=!0);else if((jn&f)===f){u=u.next,f===bl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=d,l=o):s=s.next=d,de.lanes|=f,Dr|=f;d=u.action,fo&&a(o,d),o=u.hasEagerState?u.eagerState:a(o,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(i=s=f,l=o):s=s.next=f,de.lanes|=d,Dr|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=o:s.next=i,!Aa(o,e.memoizedState)&&(Rt=!0,c&&(a=ml,a!==null)))throw a;e.memoizedState=o,e.baseState=l,e.baseQueue=s,n.lastRenderedState=o}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function kp(e){var t=It(),a=t.queue;if(a===null)throw Error(P(311));a.lastRenderedReducer=e;var n=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var l=r=r.next;do o=e(o,l.action),l=l.next;while(l!==r);Aa(o,t.memoizedState)||(Rt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function lS(e,t,a){var n=de,r=It(),o=Te;if(o){if(a===void 0)throw Error(P(407));a=a()}else a=t();var l=!Aa((Ye||r).memoizedState,a);if(l&&(r.memoizedState=a,Rt=!0),r=r.queue,ph(uS.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||At!==null&&At.memoizedState.tag&1){if(n.flags|=2048,Il(9,{destroy:void 0},sS.bind(null,n,r,a,t),null),at===null)throw Error(P(349));o||(jn&127)!==0||iS(n,t,a)}return a}function iS(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=de.updateQueue,t===null?(t=Hc(),de.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function sS(e,t,a,n){t.value=a,t.getSnapshot=n,cS(t)&&dS(e)}function uS(e,t,a){return a(function(){cS(t)&&dS(e)})}function cS(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Aa(e,a)}catch{return!0}}function dS(e){var t=yo(e,2);t!==null&&pa(t,e,2)}function hm(e){var t=ea();if(typeof e=="function"){var a=e;if(e=a(),fo){hr(!0);try{a()}finally{hr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:e},t}function fS(e,t,a,n){return e.baseState=a,fh(e,Ye,typeof n=="function"?n:Vn)}function wO(e,t,a,n,r){if(Gc(e))throw Error(P(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){o.listeners.push(l)}};re.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,pS(t,o)):(o.next=a.next,t.pending=a.next=o)}}function pS(e,t){var a=t.action,n=t.payload,r=e.state;if(t.isTransition){var o=re.T,l={};re.T=l;try{var i=a(r,n),s=re.S;s!==null&&s(l,i),fv(e,t,i)}catch(u){gm(e,t,u)}finally{o!==null&&l.types!==null&&(o.types=l.types),re.T=o}}else try{o=a(r,n),fv(e,t,o)}catch(u){gm(e,t,u)}}function fv(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){pv(e,t,n)},function(n){return gm(e,t,n)}):pv(e,t,a)}function pv(e,t,a){t.status="fulfilled",t.value=a,mS(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,pS(e,a)))}function gm(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,mS(t),t=t.next;while(t!==n)}e.action=null}function mS(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hS(e,t){return t}function mv(e,t){if(Te){var a=at.formState;if(a!==null){e:{var n=de;if(Te){if(st){t:{for(var r=st,o=ja;r.nodeType!==8;){if(!o){r=null;break t}if(r=Ga(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){st=Ga(r.nextSibling),n=r.data==="F!";break e}}Er(n)}n=!1}n&&(t=a[0])}}return a=ea(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hS,lastRenderedState:t},a.queue=n,a=RS.bind(null,de,n),n.dispatch=a,n=hm(!1),o=yh.bind(null,de,!1,n.queue),n=ea(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,a=wO.bind(null,de,r,o,a),r.dispatch=a,n.memoizedState=e,[t,a,!1]}function hv(e){var t=It();return gS(t,Ye,e)}function gS(e,t,a){if(t=fh(e,t,hS)[0],e=Qu(Vn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=ls(t)}catch(l){throw l===Dl?qc:l}else n=t;t=It();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(de.flags|=2048,Il(9,{destroy:void 0},xO.bind(null,r,a),null)),[n,o,e]}function xO(e,t){e.action=t}function gv(e){var t=It(),a=Ye;if(a!==null)return gS(t,a,e);It(),t=t.memoizedState,a=It();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Il(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=de.updateQueue,t===null&&(t=Hc(),de.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function yS(){return It().memoizedState}function Yu(e,t,a,n){var r=ea();de.flags|=e,r.memoizedState=Il(1|t,{destroy:void 0},a,n===void 0?null:n)}function Vc(e,t,a,n){var r=It();n=n===void 0?null:n;var o=r.memoizedState.inst;Ye!==null&&n!==null&&lh(n,Ye.memoizedState.deps)?r.memoizedState=Il(t,o,a,n):(de.flags|=e,r.memoizedState=Il(1|t,o,a,n))}function yv(e,t){Yu(8390656,8,e,t)}function ph(e,t){Vc(2048,8,e,t)}function vO(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Hc(),de.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function wS(e){var t=It().memoizedState;return vO({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function xS(e,t){return Vc(4,2,e,t)}function vS(e,t){return Vc(4,4,e,t)}function bS(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function SS(e,t,a){a=a!=null?a.concat([e]):null,Vc(4,4,bS.bind(null,t,e),a)}function mh(){}function IS(e,t){var a=It();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&lh(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function CS(e,t){var a=It();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&lh(t,n[1]))return n[0];if(n=e(),fo){hr(!0);try{e()}finally{hr(!1)}}return a.memoizedState=[n,t],n}function hh(e,t,a){return a===void 0||(jn&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=f0(),de.lanes|=e,Dr|=e,a)}function kS(e,t,a,n){return Aa(a,t)?a:Sl.current!==null?(e=hh(e,a,n),Aa(e,t)||(Rt=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(Ce&261930)===0?(Rt=!0,e.memoizedState=a):(e=f0(),de.lanes|=e,Dr|=e,t)}function LS(e,t,a,n,r){var o=ze.p;ze.p=o!==0&&8>o?o:8;var l=re.T,i={};re.T=i,yh(e,!1,t,a);try{var s=r(),u=re.S;if(u!==null&&u(i,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=hO(s,n);_i(e,t,c,Ta(e))}else _i(e,t,n,Ta(e))}catch(d){_i(e,t,{then:function(){},status:"rejected",reason:d},Ta())}finally{ze.p=o,l!==null&&i.types!==null&&(l.types=i.types),re.T=l}}function bO(){}function ym(e,t,a,n){if(e.tag!==5)throw Error(P(476));var r=TS(e).queue;LS(e,r,t,no,a===null?bO:function(){return AS(e),a(n)})}function TS(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:no,baseState:no,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:no},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function AS(e){var t=TS(e);t.next===null&&(t=e.alternate.memoizedState),_i(e,t.next.queue,{},Ta())}function gh(){return Gt(Zi)}function MS(){return It().memoizedState}function ES(){return It().memoizedState}function SO(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ta();e=Sr(a);var n=Ir(t,e,a);n!==null&&(pa(n,t,a),Ei(n,t,a)),t={cache:th()},e.payload=t;return}t=t.return}}function IO(e,t,a){var n=Ta();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Gc(e)?DS(t,a):(a=Qm(e,t,a,n),a!==null&&(pa(a,e,n),_S(a,t,n)))}function RS(e,t,a){var n=Ta();_i(e,t,a,n)}function _i(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Gc(e))DS(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,i=o(l,a);if(r.hasEagerState=!0,r.eagerState=i,Aa(i,l))return zc(e,t,r,0),at===null&&Fc(),!1}catch{}if(a=Qm(e,t,r,n),a!==null)return pa(a,e,n),_S(a,t,n),!0}return!1}function yh(e,t,a,n){if(n={lane:2,revertLane:Lh(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gc(e)){if(t)throw Error(P(479))}else t=Qm(e,a,n,2),t!==null&&pa(t,e,2)}function Gc(e){var t=e.alternate;return e===de||t!==null&&t===de}function DS(e,t){gl=wc=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function _S(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,wb(e,a)}}var Wi={readContext:Gt,use:jc,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Wi.useEffectEvent=gt;var OS={readContext:Gt,use:jc,useCallback:function(e,t){return ea().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:yv,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Yu(4194308,4,bS.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Yu(4194308,4,e,t)},useInsertionEffect:function(e,t){Yu(4,2,e,t)},useMemo:function(e,t){var a=ea();t=t===void 0?null:t;var n=e();if(fo){hr(!0);try{e()}finally{hr(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ea();if(a!==void 0){var r=a(t);if(fo){hr(!0);try{a(t)}finally{hr(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=IO.bind(null,de,e),[n.memoizedState,e]},useRef:function(e){var t=ea();return e={current:e},t.memoizedState=e},useState:function(e){e=hm(e);var t=e.queue,a=RS.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:mh,useDeferredValue:function(e,t){var a=ea();return hh(a,e,t)},useTransition:function(){var e=hm(!1);return e=LS.bind(null,de,e.queue,!0,!1),ea().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=de,r=ea();if(Te){if(a===void 0)throw Error(P(407));a=a()}else{if(a=t(),at===null)throw Error(P(349));(Ce&127)!==0||iS(n,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,yv(uS.bind(null,n,o,e),[e]),n.flags|=2048,Il(9,{destroy:void 0},sS.bind(null,n,o,a,t),null),a},useId:function(){var e=ea(),t=at.identifierPrefix;if(Te){var a=pn,n=fn;a=(n&~(1<<32-La(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=xc++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=gO++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gh,useFormState:mv,useActionState:mv,useOptimistic:function(e){var t=ea();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=yh.bind(null,de,!0,a),a.dispatch=t,[e,t]},useMemoCache:dh,useCacheRefresh:function(){return ea().memoizedState=SO.bind(null,de)},useEffectEvent:function(e){var t=ea(),a={impl:e};return t.memoizedState=a,function(){if((Fe&2)!==0)throw Error(P(440));return a.impl.apply(void 0,arguments)}}},wh={readContext:Gt,use:jc,useCallback:IS,useContext:Gt,useEffect:ph,useImperativeHandle:SS,useInsertionEffect:xS,useLayoutEffect:vS,useMemo:CS,useReducer:Qu,useRef:yS,useState:function(){return Qu(Vn)},useDebugValue:mh,useDeferredValue:function(e,t){var a=It();return kS(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Qu(Vn)[0],t=It().memoizedState;return[typeof e=="boolean"?e:ls(e),t]},useSyncExternalStore:lS,useId:MS,useHostTransitionStatus:gh,useFormState:hv,useActionState:hv,useOptimistic:function(e,t){var a=It();return fS(a,Ye,e,t)},useMemoCache:dh,useCacheRefresh:ES};wh.useEffectEvent=wS;var PS={readContext:Gt,use:jc,useCallback:IS,useContext:Gt,useEffect:ph,useImperativeHandle:SS,useInsertionEffect:xS,useLayoutEffect:vS,useMemo:CS,useReducer:kp,useRef:yS,useState:function(){return kp(Vn)},useDebugValue:mh,useDeferredValue:function(e,t){var a=It();return Ye===null?hh(a,e,t):kS(a,Ye.memoizedState,e,t)},useTransition:function(){var e=kp(Vn)[0],t=It().memoizedState;return[typeof e=="boolean"?e:ls(e),t]},useSyncExternalStore:lS,useId:MS,useHostTransitionStatus:gh,useFormState:gv,useActionState:gv,useOptimistic:function(e,t){var a=It();return Ye!==null?fS(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:dh,useCacheRefresh:ES};PS.useEffectEvent=wS;function Lp(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:ut({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var wm={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ta(),r=Sr(n);r.payload=t,a!=null&&(r.callback=a),t=Ir(e,r,n),t!==null&&(pa(t,e,n),Ei(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ta(),r=Sr(n);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ir(e,r,n),t!==null&&(pa(t,e,n),Ei(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ta(),n=Sr(a);n.tag=2,t!=null&&(n.callback=t),t=Ir(e,n,a),t!==null&&(pa(t,e,a),Ei(t,e,a))}};function wv(e,t,a,n,r,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,l):t.prototype&&t.prototype.isPureReactComponent?!Hi(a,n)||!Hi(r,o):!0}function xv(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&wm.enqueueReplaceState(t,t.state,null)}function po(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=ut({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function NS(e){dc(e)}function BS(e){console.error(e)}function US(e){dc(e)}function vc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function vv(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function xm(e,t,a){return a=Sr(a),a.tag=3,a.payload={element:null},a.callback=function(){vc(e,t)},a}function FS(e){return e=Sr(e),e.tag=3,e}function zS(e,t,a,n){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=n.value;e.payload=function(){return r(o)},e.callback=function(){vv(t,a,n)}}var l=a.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){vv(t,a,n),typeof r!="function"&&(Cr===null?Cr=new Set([this]):Cr.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})})}function CO(e,t,a,n,r){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Rl(t,a,r,!0),a=Ma.current,a!==null){switch(a.tag){case 31:case 13:return Va===null?kc():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,n===hc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Bp(e,n,r)),!1;case 22:return a.flags|=65536,n===hc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Bp(e,n,r)),!1}throw Error(P(435,a.tag))}return Bp(e,n,r),kc(),!1}if(Te)return t=Ma.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==lm&&(e=Error(P(422),{cause:n}),Vi(Ha(e,a)))):(n!==lm&&(t=Error(P(423),{cause:n}),Vi(Ha(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=Ha(n,a),r=xm(e.stateNode,n,r),Cp(e,r),yt!==4&&(yt=2)),!1;var o=Error(P(520),{cause:n});if(o=Ha(o,a),Ni===null?Ni=[o]:Ni.push(o),yt!==4&&(yt=2),t===null)return!0;n=Ha(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=xm(a.stateNode,n,e),Cp(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Cr===null||!Cr.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=FS(r),zS(r,e,a,n),Cp(a,r),!1}a=a.return}while(a!==null);return!1}var xh=Error(P(461)),Rt=!1;function Ht(e,t,a,n){t.child=e===null?eS(t,null,a,n):co(t,e.child,a,n)}function bv(e,t,a,n,r){a=a.render;var o=t.ref;if("ref"in n){var l={};for(var i in n)i!=="ref"&&(l[i]=n[i])}else l=n;return uo(t),n=ih(e,t,a,l,o,r),i=sh(),e!==null&&!Rt?(uh(e,t,r),Gn(e,t,r)):(Te&&i&&Jm(t),t.flags|=1,Ht(e,t,n,r),t.child)}function Sv(e,t,a,n,r){if(e===null){var o=a.type;return typeof o=="function"&&!Ym(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,qS(e,t,o,n,r)):(e=Ku(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!vh(e,r)){var l=o.memoizedProps;if(a=a.compare,a=a!==null?a:Hi,a(l,n)&&e.ref===t.ref)return Gn(e,t,r)}return t.flags|=1,e=Fn(o,n),e.ref=t.ref,e.return=t,t.child=e}function qS(e,t,a,n,r){if(e!==null){var o=e.memoizedProps;if(Hi(o,n)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=n=o,vh(e,r))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,Gn(e,t,r)}return vm(e,t,a,n,r)}function HS(e,t,a,n){var r=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~o}else n=0,t.child=null;return Iv(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zu(t,o!==null?o.cachePool:null),o!==null?dv(t,o):pm(),nS(t);else return n=t.lanes=536870912,Iv(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(Zu(t,o.cachePool),dv(t,o),pr(t),t.memoizedState=null):(e!==null&&Zu(t,null),pm(),pr(t));return Ht(e,t,r,a),t.child}function Ci(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Iv(e,t,a,n,r){var o=ah();return o=o===null?null:{parent:Et._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Zu(t,null),pm(),nS(t),e!==null&&Rl(e,t,n,!0),t.childLanes=r,null}function Ju(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Cv(e,t,a){return co(t,e.child,null,a),e=Ju(t,t.pendingProps),e.flags|=2,ba(t),t.memoizedState=null,e}function kO(e,t,a){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(n.mode==="hidden")return e=Ju(t,n),t.lanes=536870912,Ci(null,e);if(mm(t),(e=st)?(e=O0(e,ja),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mr!==null?{id:fn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},a=Wb(e),a.return=t,t.child=a,Vt=t,st=null)):e=null,e===null)throw Er(t);return t.lanes=536870912,null}return Ju(t,n)}var o=e.memoizedState;if(o!==null){var l=o.dehydrated;if(mm(t),r)if(t.flags&256)t.flags&=-257,t=Cv(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(Rt||Rl(e,t,a,!1),r=(a&e.childLanes)!==0,Rt||r){if(n=at,n!==null&&(l=xb(n,a),l!==0&&l!==o.retryLane))throw o.retryLane=l,yo(e,l),pa(n,e,l),xh;kc(),t=Cv(e,t,a)}else e=o.treeContext,st=Ga(l.nextSibling),Vt=t,Te=!0,br=null,ja=!1,e!==null&&Kb(t,e),t=Ju(t,n),t.flags|=4096;return t}return e=Fn(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ec(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(P(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function vm(e,t,a,n,r){return uo(t),a=ih(e,t,a,n,void 0,r),n=sh(),e!==null&&!Rt?(uh(e,t,r),Gn(e,t,r)):(Te&&n&&Jm(t),t.flags|=1,Ht(e,t,a,r),t.child)}function kv(e,t,a,n,r,o){return uo(t),t.updateQueue=null,a=oS(t,n,a,r),rS(e),n=sh(),e!==null&&!Rt?(uh(e,t,o),Gn(e,t,o)):(Te&&n&&Jm(t),t.flags|=1,Ht(e,t,a,o),t.child)}function Lv(e,t,a,n,r){if(uo(t),t.stateNode===null){var o=il,l=a.contextType;typeof l=="object"&&l!==null&&(o=Gt(l)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=wm,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},rh(t),l=a.contextType,o.context=typeof l=="object"&&l!==null?Gt(l):il,o.state=t.memoizedState,l=a.getDerivedStateFromProps,typeof l=="function"&&(Lp(t,a,l,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(l=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),l!==o.state&&wm.enqueueReplaceState(o,o.state,null),Di(t,n,o,r),Ri(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var i=t.memoizedProps,s=po(a,i);o.props=s;var u=o.context,c=a.contextType;l=il,typeof c=="object"&&c!==null&&(l=Gt(c));var d=a.getDerivedStateFromProps;c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(i||u!==l)&&xv(t,o,n,l),cr=!1;var f=t.memoizedState;o.state=f,Di(t,n,o,r),Ri(),u=t.memoizedState,i||f!==u||cr?(typeof d=="function"&&(Lp(t,a,d,n),u=t.memoizedState),(s=cr||wv(t,a,s,n,f,u,l))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),o.props=n,o.state=u,o.context=l,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,dm(e,t),l=t.memoizedProps,c=po(a,l),o.props=c,d=t.pendingProps,f=o.context,u=a.contextType,s=il,typeof u=="object"&&u!==null&&(s=Gt(u)),i=a.getDerivedStateFromProps,(u=typeof i=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==s)&&xv(t,o,n,s),cr=!1,f=t.memoizedState,o.state=f,Di(t,n,o,r),Ri();var p=t.memoizedState;l!==d||f!==p||cr||e!==null&&e.dependencies!==null&&mc(e.dependencies)?(typeof i=="function"&&(Lp(t,a,i,n),p=t.memoizedState),(c=cr||wv(t,a,c,n,f,p,s)||e!==null&&e.dependencies!==null&&mc(e.dependencies))?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=s,n=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,ec(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=co(t,e.child,null,r),t.child=co(t,null,a,r)):Ht(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Gn(e,t,r),e}function Tv(e,t,a,n){return so(),t.flags|=256,Ht(e,t,a,n),t.child}var Tp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ap(e){return{baseLanes:e,cachePool:Qb()}}function Mp(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ia),e}function jS(e,t,a){var n=t.pendingProps,r=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),l&&(r=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?fr(t):pr(t),(e=st)?(e=O0(e,ja),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mr!==null?{id:fn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},a=Wb(e),a.return=t,t.child=a,Vt=t,st=null)):e=null,e===null)throw Er(t);return Om(e)?t.lanes=32:t.lanes=536870912,null}var i=n.children;return n=n.fallback,r?(pr(t),r=t.mode,i=bc({mode:"hidden",children:i},r),n=ro(n,r,a,null),i.return=t,n.return=t,i.sibling=n,t.child=i,n=t.child,n.memoizedState=Ap(a),n.childLanes=Mp(e,l,a),t.memoizedState=Tp,Ci(null,n)):(fr(t),bm(t,i))}var s=e.memoizedState;if(s!==null&&(i=s.dehydrated,i!==null)){if(o)t.flags&256?(fr(t),t.flags&=-257,t=Ep(e,t,a)):t.memoizedState!==null?(pr(t),t.child=e.child,t.flags|=128,t=null):(pr(t),i=n.fallback,r=t.mode,n=bc({mode:"visible",children:n.children},r),i=ro(i,r,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,co(t,e.child,null,a),n=t.child,n.memoizedState=Ap(a),n.childLanes=Mp(e,l,a),t.memoizedState=Tp,t=Ci(null,n));else if(fr(t),Om(i)){if(l=i.nextSibling&&i.nextSibling.dataset,l)var u=l.dgst;l=u,n=Error(P(419)),n.stack="",n.digest=l,Vi({value:n,source:null,stack:null}),t=Ep(e,t,a)}else if(Rt||Rl(e,t,a,!1),l=(a&e.childLanes)!==0,Rt||l){if(l=at,l!==null&&(n=xb(l,a),n!==0&&n!==s.retryLane))throw s.retryLane=n,yo(e,n),pa(l,e,n),xh;_m(i)||kc(),t=Ep(e,t,a)}else _m(i)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,st=Ga(i.nextSibling),Vt=t,Te=!0,br=null,ja=!1,e!==null&&Kb(t,e),t=bm(t,n.children),t.flags|=4096);return t}return r?(pr(t),i=n.fallback,r=t.mode,s=e.child,u=s.sibling,n=Fn(s,{mode:"hidden",children:n.children}),n.subtreeFlags=s.subtreeFlags&65011712,u!==null?i=Fn(u,i):(i=ro(i,r,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,Ci(null,n),n=t.child,i=e.child.memoizedState,i===null?i=Ap(a):(r=i.cachePool,r!==null?(s=Et._currentValue,r=r.parent!==s?{parent:s,pool:s}:r):r=Qb(),i={baseLanes:i.baseLanes|a,cachePool:r}),n.memoizedState=i,n.childLanes=Mp(e,l,a),t.memoizedState=Tp,Ci(e.child,n)):(fr(t),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=a,t.memoizedState=null,a)}function bm(e,t){return t=bc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=Sa(22,e,null,t),e.lanes=0,e}function Ep(e,t,a){return co(t,e.child,null,a),e=bm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Av(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sm(e.return,t,a)}function Rp(e,t,a,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:r,treeForkCount:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=n,l.tail=a,l.tailMode=r,l.treeForkCount=o)}function VS(e,t,a){var n=t.pendingProps,r=n.revealOrder,o=n.tail;n=n.children;var l=St.current,i=(l&2)!==0;if(i?(l=l&1|2,t.flags|=128):l&=1,ot(St,l),Ht(e,t,n,a),n=Te?ji:0,!i&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Av(e,a,t);else if(e.tag===19)Av(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&yc(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Rp(t,!1,r,a,o,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&yc(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Rp(t,!0,a,null,o,n);break;case"together":Rp(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Gn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Dr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Rl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,a=Fn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function vh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mc(e)))}function LO(e,t,a){switch(t.tag){case 3:ic(t,t.stateNode.containerInfo),dr(t,Et,e.memoizedState.cache),so();break;case 27:case 5:Kp(t);break;case 4:ic(t,t.stateNode.containerInfo);break;case 10:dr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mm(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(fr(t),t.flags|=128,null):(a&t.child.childLanes)!==0?jS(e,t,a):(fr(t),e=Gn(e,t,a),e!==null?e.sibling:null);fr(t);break;case 19:var r=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Rl(e,t,a,!1),n=(a&t.childLanes)!==0),r){if(n)return VS(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ot(St,St.current),n)break;return null;case 22:return t.lanes=0,HS(e,t,a,t.pendingProps);case 24:dr(t,Et,e.memoizedState.cache)}return Gn(e,t,a)}function GS(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!vh(e,a)&&(t.flags&128)===0)return Rt=!1,LO(e,t,a);Rt=(e.flags&131072)!==0}else Rt=!1,Te&&(t.flags&1048576)!==0&&Xb(t,ji,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=to(t.elementType),t.type=e,typeof e=="function")Ym(e)?(n=po(e,n),t.tag=1,t=Lv(null,t,e,n,a)):(t.tag=0,t=vm(null,t,e,n,a));else{if(e!=null){var r=e.$$typeof;if(r===Um){t.tag=11,t=bv(null,t,e,n,a);break e}else if(r===Fm){t.tag=14,t=Sv(null,t,e,n,a);break e}}throw t=Wp(e)||e,Error(P(306,t,""))}}return t;case 0:return vm(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,r=po(n,t.pendingProps),Lv(e,t,n,r,a);case 3:e:{if(ic(t,t.stateNode.containerInfo),e===null)throw Error(P(387));n=t.pendingProps;var o=t.memoizedState;r=o.element,dm(e,t),Di(t,n,null,a);var l=t.memoizedState;if(n=l.cache,dr(t,Et,n),n!==o.cache&&um(t,[Et],a,!0),Ri(),n=l.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Tv(e,t,n,a);break e}else if(n!==r){r=Ha(Error(P(424)),t),Vi(r),t=Tv(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,st=Ga(e.firstChild),Vt=t,Te=!0,br=null,ja=!0,a=eS(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(so(),n===r){t=Gn(e,t,a);break e}Ht(e,t,n,a)}t=t.child}return t;case 26:return ec(e,t),e===null?(a=Zv(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,n=Mc(vr.current).createElement(a),n[jt]=t,n[ma]=e,$t(n,a,e),Ft(n),t.stateNode=n):t.memoizedState=Zv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kp(t),e===null&&Te&&(n=t.stateNode=P0(t.type,t.pendingProps,vr.current),Vt=t,ja=!0,r=st,Or(t.type)?(Pm=r,st=Ga(n.firstChild)):st=r),Ht(e,t,t.pendingProps.children,a),ec(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=n=st)&&(n=eP(n,t.type,t.pendingProps,ja),n!==null?(t.stateNode=n,Vt=t,st=Ga(n.firstChild),ja=!1,r=!0):r=!1),r||Er(t)),Kp(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,n=o.children,Rm(r,o)?n=null:l!==null&&Rm(r,l)&&(t.flags|=32),t.memoizedState!==null&&(r=ih(e,t,yO,null,null,a),Zi._currentValue=r),ec(e,t),Ht(e,t,n,a),t.child;case 6:return e===null&&Te&&((e=a=st)&&(a=tP(a,t.pendingProps,ja),a!==null?(t.stateNode=a,Vt=t,st=null,e=!0):e=!1),e||Er(t)),null;case 13:return jS(e,t,a);case 4:return ic(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=co(t,null,n,a):Ht(e,t,n,a),t.child;case 11:return bv(e,t,t.type,t.pendingProps,a);case 7:return Ht(e,t,t.pendingProps,a),t.child;case 8:return Ht(e,t,t.pendingProps.children,a),t.child;case 12:return Ht(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,dr(t,t.type,n.value),Ht(e,t,n.children,a),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,uo(t),r=Gt(r),n=n(r),t.flags|=1,Ht(e,t,n,a),t.child;case 14:return Sv(e,t,t.type,t.pendingProps,a);case 15:return qS(e,t,t.type,t.pendingProps,a);case 19:return VS(e,t,a);case 31:return kO(e,t,a);case 22:return HS(e,t,a,t.pendingProps);case 24:return uo(t),n=Gt(Et),e===null?(r=ah(),r===null&&(r=at,o=th(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:n,cache:r},rh(t),dr(t,Et,r)):((e.lanes&a)!==0&&(dm(e,t),Di(t,null,null,a),Ri()),r=e.memoizedState,o=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),dr(t,Et,n)):(n=o.cache,dr(t,Et,n),n!==r.cache&&um(t,[Et],a,!0))),Ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function En(e){e.flags|=4}function Dp(e,t,a,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(h0())e.flags|=8192;else throw lo=hc,nh}else e.flags&=-16777217}function Mv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!U0(t))if(h0())e.flags|=8192;else throw lo=hc,nh}function Uu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gb():536870912,e.lanes|=t,Cl|=t)}function yi(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function TO(e,t,a){var n=t.pendingProps;switch(eh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zn(Et),wl(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ko(t)?En(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ip())),it(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(En(t),o!==null?(it(t),Mv(t,o)):(it(t),Dp(t,r,null,n,a))):o?o!==e.memoizedState?(En(t),it(t),Mv(t,o)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&En(t),it(t),Dp(t,r,e,n,a)),null;case 27:if(sc(t),a=vr.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&En(t);else{if(!n){if(t.stateNode===null)throw Error(P(166));return it(t),null}e=hn.current,Ko(t)?rv(t,e):(e=P0(r,n,a),t.stateNode=e,En(t))}return it(t),null;case 5:if(sc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&En(t);else{if(!n){if(t.stateNode===null)throw Error(P(166));return it(t),null}if(o=hn.current,Ko(t))rv(t,o);else{var l=Mc(vr.current);switch(o){case 1:o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=l.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?l.createElement(r,{is:n.is}):l.createElement(r)}}o[jt]=t,o[ma]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)o.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch($t(o,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&En(t)}}return it(t),Dp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&En(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(e=vr.current,Ko(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=Vt,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[jt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||R0(e.nodeValue,a)),e||Er(t,!0)}else e=Mc(e).createTextNode(n),e[jt]=t,t.stateNode=e}return it(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ko(t),a!==null){if(e===null){if(!n)throw Error(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[jt]=t}else so(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else a=Ip(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ba(t),t):(ba(t),null);if((t.flags&128)!==0)throw Error(P(558))}return it(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ko(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(P(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(P(317));r[jt]=t}else so(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=Ip(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ba(t),t):(ba(t),null)}return ba(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Uu(t,t.updateQueue),it(t),null);case 4:return wl(),e===null&&Th(t.stateNode.containerInfo),it(t),null;case 10:return zn(t.type),it(t),null;case 19:if(zt(St),n=t.memoizedState,n===null)return it(t),null;if(r=(t.flags&128)!==0,o=n.rendering,o===null)if(r)yi(n,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=yc(e),o!==null){for(t.flags|=128,yi(n,!1),e=o.updateQueue,t.updateQueue=e,Uu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)$b(a,e),a=a.sibling;return ot(St,St.current&1|2),Te&&On(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ca()>Ic&&(t.flags|=128,r=!0,yi(n,!1),t.lanes=4194304)}else{if(!r)if(e=yc(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Uu(t,e),yi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Te)return it(t),null}else 2*Ca()-n.renderingStartTime>Ic&&a!==536870912&&(t.flags|=128,r=!0,yi(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ca(),e.sibling=null,a=St.current,ot(St,r?a&1|2:a&1),Te&&On(t,n.treeForkCount),e):(it(t),null);case 22:case 23:return ba(t),oh(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),a=t.updateQueue,a!==null&&Uu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&zt(oo),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),zn(Et),it(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function AO(e,t){switch(eh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(Et),wl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return sc(t),null;case 31:if(t.memoizedState!==null){if(ba(t),t.alternate===null)throw Error(P(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ba(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));so()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(St),null;case 4:return wl(),null;case 10:return zn(t.type),null;case 22:case 23:return ba(t),oh(),e!==null&&zt(oo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(Et),null;case 25:return null;default:return null}}function $S(e,t){switch(eh(t),t.tag){case 3:zn(Et),wl();break;case 26:case 27:case 5:sc(t);break;case 4:wl();break;case 31:t.memoizedState!==null&&ba(t);break;case 13:ba(t);break;case 19:zt(St);break;case 10:zn(t.type);break;case 22:case 23:ba(t),oh(),e!==null&&zt(oo);break;case 24:zn(Et)}}function is(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var o=a.create,l=a.inst;n=o(),l.destroy=n}a=a.next}while(a!==r)}}catch(i){Ge(t,t.return,i)}}function Rr(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){var l=n.inst,i=l.destroy;if(i!==void 0){l.destroy=void 0,r=t;var s=a,u=i;try{u()}catch(c){Ge(r,s,c)}}}n=n.next}while(n!==o)}}catch(c){Ge(t,t.return,c)}}function WS(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{aS(t,a)}catch(n){Ge(e,e.return,n)}}}function XS(e,t,a){a.props=po(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ge(e,t,n)}}function Oi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){Ge(e,t,r)}}function mn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){Ge(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ge(e,t,r)}else a.current=null}function KS(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){Ge(e,e.return,r)}}function _p(e,t,a){try{var n=e.stateNode;XO(n,e.type,a,t),n[ma]=t}catch(r){Ge(e,e.return,r)}}function ZS(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Or(e.type)||e.tag===4}function Op(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZS(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.tag===27&&Or(e.type)||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 Sm(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Bn));else if(n!==4&&(n===27&&Or(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sm(e,t,a),e=e.sibling;e!==null;)Sm(e,t,a),e=e.sibling}function Sc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Or(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Sc(e,t,a),e=e.sibling;e!==null;)Sc(e,t,a),e=e.sibling}function QS(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);$t(t,n,a),t[jt]=e,t[ma]=a}catch(o){Ge(e,e.return,o)}}var Pn=!1,Mt=!1,Pp=!1,Ev=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function MO(e,t){if(e=e.containerInfo,Mm=_c,e=Ub(e),Km(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var l=0,i=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==a||r!==0&&d.nodeType!==3||(i=l+r),d!==o||n!==0&&d.nodeType!==3||(s=l+n),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===a&&++u===r&&(i=l),f===o&&++c===n&&(s=l),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}a=i===-1||s===-1?null:{start:i,end:s}}else a=null}a=a||{start:0,end:0}}else a=null;for(Em={focusedElem:e,selectionRange:a},_c=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var m=po(a.type,r);e=n.getSnapshotBeforeUpdate(m,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(x){Ge(a,a.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Dm(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dm(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(P(163))}if(e=t.sibling,e!==null){e.return=t.return,Ut=e;break}Ut=t.return}}function YS(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(e,a),n&4&&is(5,a);break;case 1:if(Dn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(l){Ge(a,a.return,l)}else{var r=po(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Ge(a,a.return,l)}}n&64&&WS(a),n&512&&Oi(a,a.return);break;case 3:if(Dn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{aS(e,t)}catch(l){Ge(a,a.return,l)}}break;case 27:t===null&&n&4&&QS(a);case 26:case 5:Dn(e,a),t===null&&n&4&&KS(a),n&512&&Oi(a,a.return);break;case 12:Dn(e,a);break;case 31:Dn(e,a),n&4&&t0(e,a);break;case 13:Dn(e,a),n&4&&a0(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=UO.bind(null,a),aP(e,a))));break;case 22:if(n=a.memoizedState!==null||Pn,!n){t=t!==null&&t.memoizedState!==null||Mt,r=Pn;var o=Mt;Pn=n,(Mt=t)&&!o?_n(e,a,(a.subtreeFlags&8772)!==0):Dn(e,a),Pn=r,Mt=o}break;case 30:break;default:Dn(e,a)}}function JS(e){var t=e.alternate;t!==null&&(e.alternate=null,JS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jm(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,da=!1;function Rn(e,t,a){for(a=a.child;a!==null;)e0(e,t,a),a=a.sibling}function e0(e,t,a){if(ka&&typeof ka.onCommitFiberUnmount=="function")try{ka.onCommitFiberUnmount(es,a)}catch{}switch(a.tag){case 26:Mt||mn(a,t),Rn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Mt||mn(a,t);var n=ft,r=da;Or(a.type)&&(ft=a.stateNode,da=!1),Rn(e,t,a),Ui(a.stateNode),ft=n,da=r;break;case 5:Mt||mn(a,t);case 6:if(n=ft,r=da,ft=null,Rn(e,t,a),ft=n,da=r,ft!==null)if(da)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(a.stateNode)}catch(o){Ge(a,t,o)}else try{ft.removeChild(a.stateNode)}catch(o){Ge(a,t,o)}break;case 18:ft!==null&&(da?(e=ft,Gv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Al(e)):Gv(ft,a.stateNode));break;case 4:n=ft,r=da,ft=a.stateNode.containerInfo,da=!0,Rn(e,t,a),ft=n,da=r;break;case 0:case 11:case 14:case 15:Rr(2,a,t),Mt||Rr(4,a,t),Rn(e,t,a);break;case 1:Mt||(mn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&XS(a,t,n)),Rn(e,t,a);break;case 21:Rn(e,t,a);break;case 22:Mt=(n=Mt)||a.memoizedState!==null,Rn(e,t,a),Mt=n;break;default:Rn(e,t,a)}}function t0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Al(e)}catch(a){Ge(t,t.return,a)}}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Al(e)}catch(a){Ge(t,t.return,a)}}function EO(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ev),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ev),t;default:throw Error(P(435,e.tag))}}function Fu(e,t){var a=EO(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var r=FO.bind(null,e,n);n.then(r,r)}})}function ua(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var r=a[n],o=e,l=t,i=l;e:for(;i!==null;){switch(i.tag){case 27:if(Or(i.type)){ft=i.stateNode,da=!1;break e}break;case 5:ft=i.stateNode,da=!1;break e;case 3:case 4:ft=i.stateNode.containerInfo,da=!0;break e}i=i.return}if(ft===null)throw Error(P(160));e0(o,l,r),ft=null,da=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)n0(t,e),t=t.sibling}var tn=null;function n0(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ua(t,e),ca(e),n&4&&(Rr(3,e,e.return),is(3,e),Rr(5,e,e.return));break;case 1:ua(t,e),ca(e),n&512&&(Mt||a===null||mn(a,a.return)),n&64&&Pn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var r=tn;if(ua(t,e),ca(e),n&512&&(Mt||a===null||mn(a,a.return)),n&4){var o=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":o=r.getElementsByTagName("title")[0],(!o||o[ns]||o[jt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(n),r.head.insertBefore(o,r.querySelector("head > title"))),$t(o,n,a),o[jt]=e,Ft(o),n=o;break e;case"link":var l=Yv("link","href",r).get(n+(a.href||""));if(l){for(var i=0;i<l.length;i++)if(o=l[i],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){l.splice(i,1);break t}}o=r.createElement(n),$t(o,n,a),r.head.appendChild(o);break;case"meta":if(l=Yv("meta","content",r).get(n+(a.content||""))){for(i=0;i<l.length;i++)if(o=l[i],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){l.splice(i,1);break t}}o=r.createElement(n),$t(o,n,a),r.head.appendChild(o);break;default:throw Error(P(468,n))}o[jt]=e,Ft(o),n=o}e.stateNode=n}else Jv(r,e.type,e.stateNode);else e.stateNode=Qv(r,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?Jv(r,e.type,e.stateNode):Qv(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&_p(e,e.memoizedProps,a.memoizedProps)}break;case 27:ua(t,e),ca(e),n&512&&(Mt||a===null||mn(a,a.return)),a!==null&&n&4&&_p(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ua(t,e),ca(e),n&512&&(Mt||a===null||mn(a,a.return)),e.flags&32){r=e.stateNode;try{vl(r,"")}catch(m){Ge(e,e.return,m)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,_p(e,r,a!==null?a.memoizedProps:r)),n&1024&&(Pp=!0);break;case 6:if(ua(t,e),ca(e),n&4){if(e.stateNode===null)throw Error(P(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(m){Ge(e,e.return,m)}}break;case 3:if(nc=null,r=tn,tn=Ec(t.containerInfo),ua(t,e),tn=r,ca(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Al(t.containerInfo)}catch(m){Ge(e,e.return,m)}Pp&&(Pp=!1,r0(e));break;case 4:n=tn,tn=Ec(e.stateNode.containerInfo),ua(t,e),ca(e),tn=n;break;case 12:ua(t,e),ca(e);break;case 31:ua(t,e),ca(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fu(e,n)));break;case 13:ua(t,e),ca(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&($c=Ca()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fu(e,n)));break;case 22:r=e.memoizedState!==null;var s=a!==null&&a.memoizedState!==null,u=Pn,c=Mt;if(Pn=u||r,Mt=c||s,ua(t,e),Mt=c,Pn=u,ca(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||s||Pn||Mt||ao(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){s=a=t;try{if(o=s.stateNode,r)l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{i=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;i.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(m){Ge(s,s.return,m)}}}else if(t.tag===6){if(a===null){s=t;try{s.stateNode.nodeValue=r?"":s.memoizedProps}catch(m){Ge(s,s.return,m)}}}else if(t.tag===18){if(a===null){s=t;try{var p=s.stateNode;r?$v(p,!0):$v(s.stateNode,!1)}catch(m){Ge(s,s.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Fu(e,a))));break;case 19:ua(t,e),ca(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fu(e,n)));break;case 30:break;case 21:break;default:ua(t,e),ca(e)}}function ca(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(ZS(n)){a=n;break}n=n.return}if(a==null)throw Error(P(160));switch(a.tag){case 27:var r=a.stateNode,o=Op(e);Sc(e,o,r);break;case 5:var l=a.stateNode;a.flags&32&&(vl(l,""),a.flags&=-33);var i=Op(e);Sc(e,i,l);break;case 3:case 4:var s=a.stateNode.containerInfo,u=Op(e);Sm(e,u,s);break;default:throw Error(P(161))}}catch(c){Ge(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;r0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)YS(e,t.alternate,t),t=t.sibling}function ao(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rr(4,t,t.return),ao(t);break;case 1:mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&XS(t,t.return,a),ao(t);break;case 27:Ui(t.stateNode);case 26:case 5:mn(t,t.return),ao(t);break;case 22:t.memoizedState===null&&ao(t);break;case 30:ao(t);break;default:ao(t)}e=e.sibling}}function _n(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,o=t,l=o.flags;switch(o.tag){case 0:case 11:case 15:_n(r,o,a),is(4,o);break;case 1:if(_n(r,o,a),n=o,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){Ge(n,n.return,u)}if(n=o,r=n.updateQueue,r!==null){var i=n.stateNode;try{var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)tS(s[r],i)}catch(u){Ge(n,n.return,u)}}a&&l&64&&WS(o),Oi(o,o.return);break;case 27:QS(o);case 26:case 5:_n(r,o,a),a&&n===null&&l&4&&KS(o),Oi(o,o.return);break;case 12:_n(r,o,a);break;case 31:_n(r,o,a),a&&l&4&&t0(r,o);break;case 13:_n(r,o,a),a&&l&4&&a0(r,o);break;case 22:o.memoizedState===null&&_n(r,o,a),Oi(o,o.return);break;case 30:break;default:_n(r,o,a)}t=t.sibling}}function bh(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&os(a))}function Sh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&os(e))}function en(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)o0(e,t,a,n),t=t.sibling}function o0(e,t,a,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:en(e,t,a,n),r&2048&&is(9,t);break;case 1:en(e,t,a,n);break;case 3:en(e,t,a,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&os(e)));break;case 12:if(r&2048){en(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,l=o.id,i=o.onPostCommit;typeof i=="function"&&i(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Ge(t,t.return,s)}}else en(e,t,a,n);break;case 31:en(e,t,a,n);break;case 13:en(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,l=t.alternate,t.memoizedState!==null?o._visibility&2?en(e,t,a,n):Pi(e,t):o._visibility&2?en(e,t,a,n):(o._visibility|=2,Qo(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&bh(l,t);break;case 24:en(e,t,a,n),r&2048&&Sh(t.alternate,t);break;default:en(e,t,a,n)}}function Qo(e,t,a,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,l=t,i=a,s=n,u=l.flags;switch(l.tag){case 0:case 11:case 15:Qo(o,l,i,s,r),is(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Qo(o,l,i,s,r):Pi(o,l):(c._visibility|=2,Qo(o,l,i,s,r)),r&&u&2048&&bh(l.alternate,l);break;case 24:Qo(o,l,i,s,r),r&&u&2048&&Sh(l.alternate,l);break;default:Qo(o,l,i,s,r)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,r=n.flags;switch(n.tag){case 22:Pi(a,n),r&2048&&bh(n.alternate,n);break;case 24:Pi(a,n),r&2048&&Sh(n.alternate,n);break;default:Pi(a,n)}t=t.sibling}}var ki=8192;function Zo(e,t,a){if(e.subtreeFlags&ki)for(e=e.child;e!==null;)l0(e,t,a),e=e.sibling}function l0(e,t,a){switch(e.tag){case 26:Zo(e,t,a),e.flags&ki&&e.memoizedState!==null&&mP(a,tn,e.memoizedState,e.memoizedProps);break;case 5:Zo(e,t,a);break;case 3:case 4:var n=tn;tn=Ec(e.stateNode.containerInfo),Zo(e,t,a),tn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ki,ki=16777216,Zo(e,t,a),ki=n):Zo(e,t,a));break;default:Zo(e,t,a)}}function i0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function wi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ut=n,u0(n,e)}i0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)s0(e),e=e.sibling}function s0(e){switch(e.tag){case 0:case 11:case 15:wi(e),e.flags&2048&&Rr(9,e,e.return);break;case 3:wi(e);break;case 12:wi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,tc(e)):wi(e);break;default:wi(e)}}function tc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ut=n,u0(n,e)}i0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rr(8,t,t.return),tc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,tc(t));break;default:tc(t)}e=e.sibling}}function u0(e,t){for(;Ut!==null;){var a=Ut;switch(a.tag){case 0:case 11:case 15:Rr(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:os(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Ut=n;else e:for(a=e;Ut!==null;){n=Ut;var r=n.sibling,o=n.return;if(JS(n),n===a){Ut=null;break e}if(r!==null){r.return=o,Ut=r;break e}Ut=o}}}var RO={getCacheForType:function(e){var t=Gt(Et),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Et).controller.signal}},DO=typeof WeakMap=="function"?WeakMap:Map,Fe=0,at=null,ve=null,Ce=0,Ve=0,va=null,yr=!1,_l=!1,Ih=!1,$n=0,yt=0,Dr=0,io=0,Ch=0,Ia=0,Cl=0,Ni=null,fa=null,Im=!1,$c=0,c0=0,Ic=1/0,Cc=null,Cr=null,_t=0,kr=null,kl=null,qn=0,Cm=0,km=null,d0=null,Bi=0,Lm=null;function Ta(){return(Fe&2)!==0&&Ce!==0?Ce&-Ce:re.T!==null?Lh():vb()}function f0(){if(Ia===0)if((Ce&536870912)===0||Te){var e=Mu;Mu<<=1,(Mu&3932160)===0&&(Mu=262144),Ia=e}else Ia=536870912;return e=Ma.current,e!==null&&(e.flags|=32),Ia}function pa(e,t,a){(e===at&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(Ll(e,0),wr(e,Ce,Ia,!1)),as(e,a),((Fe&2)===0||e!==at)&&(e===at&&((Fe&2)===0&&(io|=a),yt===4&&wr(e,Ce,Ia,!1)),yn(e))}function p0(e,t,a){if((Fe&6)!==0)throw Error(P(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ts(e,t),r=n?PO(e,t):Np(e,t,!0),o=n;do{if(r===0){_l&&!n&&wr(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!_O(a)){r=Np(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var i=e;r=Ni;var s=i.current.memoizedState.isDehydrated;if(s&&(Ll(i,l).flags|=256),l=Np(i,l,!1),l!==2){if(Ih&&!s){i.errorRecoveryDisabledLanes|=o,io|=o,r=4;break e}o=fa,fa=r,o!==null&&(fa===null?fa=o:fa.push.apply(fa,o))}r=l}if(o=!1,r!==2)continue}}if(r===1){Ll(e,0),wr(e,t,0,!0);break}e:{switch(n=e,o=r,o){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:wr(n,t,Ia,!yr);break e;case 2:fa=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(r=$c+300-Ca(),10<r)){if(wr(n,t,Ia,!yr),Pc(n,0,!0)!==0)break e;qn=t,n.timeoutHandle=_0(Rv.bind(null,n,a,fa,Cc,Im,t,Ia,io,Cl,yr,o,"Throttled",-0,0),r);break e}Rv(n,a,fa,Cc,Im,t,Ia,io,Cl,yr,o,null,-0,0)}}break}while(!0);yn(e)}function Rv(e,t,a,n,r,o,l,i,s,u,c,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},l0(t,o,d);var m=(o&62914560)===o?$c-Ca():(o&4194048)===o?c0-Ca():0;if(m=hP(d,m),m!==null){qn=o,e.cancelPendingCommit=m(_v.bind(null,e,t,o,a,n,r,l,i,s,c,d,null,f,p)),wr(e,o,l,!u);return}}_v(e,t,o,a,n,r,l,i,s)}function _O(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var r=a[n],o=r.getSnapshot;r=r.value;try{if(!Aa(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wr(e,t,a,n){t&=~Ch,t&=~io,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var o=31-La(r),l=1<<o;n[o]=-1,r&=~l}a!==0&&yb(e,a,t)}function Wc(){return(Fe&6)===0?(ss(0,!1),!1):!0}function kh(){if(ve!==null){if(Ve===0)var e=ve.return;else e=ve,Un=wo=null,ch(e),hl=null,Gi=0,e=ve;for(;e!==null;)$S(e.alternate,e),e=e.return;ve=null}}function Ll(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,QO(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),qn=0,kh(),at=e,ve=a=Fn(e.current,null),Ce=t,Ve=0,va=null,yr=!1,_l=ts(e,t),Ih=!1,Cl=Ia=Ch=io=Dr=yt=0,fa=Ni=null,Im=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-La(n),o=1<<r;t|=e[r],n&=~o}return $n=t,Fc(),a}function m0(e,t){de=null,re.H=Wi,t===Dl||t===qc?(t=uv(),Ve=3):t===nh?(t=uv(),Ve=4):Ve=t===xh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,va=t,ve===null&&(yt=1,vc(e,Ha(t,e.current)))}function h0(){var e=Ma.current;return e===null?!0:(Ce&4194048)===Ce?Va===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===Va:!1}function g0(){var e=re.H;return re.H=Wi,e===null?Wi:e}function y0(){var e=re.A;return re.A=RO,e}function kc(){yt=4,yr||(Ce&4194048)!==Ce&&Ma.current!==null||(_l=!0),(Dr&134217727)===0&&(io&134217727)===0||at===null||wr(at,Ce,Ia,!1)}function Np(e,t,a){var n=Fe;Fe|=2;var r=g0(),o=y0();(at!==e||Ce!==t)&&(Cc=null,Ll(e,t)),t=!1;var l=yt;e:do try{if(Ve!==0&&ve!==null){var i=ve,s=va;switch(Ve){case 8:kh(),l=6;break e;case 3:case 2:case 9:case 6:Ma.current===null&&(t=!0);var u=Ve;if(Ve=0,va=null,cl(e,i,s,u),a&&_l){l=0;break e}break;default:u=Ve,Ve=0,va=null,cl(e,i,s,u)}}OO(),l=yt;break}catch(c){m0(e,c)}while(!0);return t&&e.shellSuspendCounter++,Un=wo=null,Fe=n,re.H=r,re.A=o,ve===null&&(at=null,Ce=0,Fc()),l}function OO(){for(;ve!==null;)w0(ve)}function PO(e,t){var a=Fe;Fe|=2;var n=g0(),r=y0();at!==e||Ce!==t?(Cc=null,Ic=Ca()+500,Ll(e,t)):_l=ts(e,t);e:do try{if(Ve!==0&&ve!==null){t=ve;var o=va;t:switch(Ve){case 1:Ve=0,va=null,cl(e,t,o,1);break;case 2:case 9:if(sv(o)){Ve=0,va=null,Dv(t);break}t=function(){Ve!==2&&Ve!==9||at!==e||(Ve=7),yn(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:sv(o)?(Ve=0,va=null,Dv(t)):(Ve=0,va=null,cl(e,t,o,7));break;case 5:var l=null;switch(ve.tag){case 26:l=ve.memoizedState;case 5:case 27:var i=ve;if(l?U0(l):i.stateNode.complete){Ve=0,va=null;var s=i.sibling;if(s!==null)ve=s;else{var u=i.return;u!==null?(ve=u,Xc(u)):ve=null}break t}}Ve=0,va=null,cl(e,t,o,5);break;case 6:Ve=0,va=null,cl(e,t,o,6);break;case 8:kh(),yt=6;break e;default:throw Error(P(462))}}NO();break}catch(c){m0(e,c)}while(!0);return Un=wo=null,re.H=n,re.A=r,Fe=a,ve!==null?0:(at=null,Ce=0,Fc(),yt)}function NO(){for(;ve!==null&&!o_();)w0(ve)}function w0(e){var t=GS(e.alternate,e,$n);e.memoizedProps=e.pendingProps,t===null?Xc(e):ve=t}function Dv(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=kv(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=kv(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:ch(t);default:$S(a,t),t=ve=$b(t,$n),t=GS(a,t,$n)}e.memoizedProps=e.pendingProps,t===null?Xc(e):ve=t}function cl(e,t,a,n){Un=wo=null,ch(t),hl=null,Gi=0;var r=t.return;try{if(CO(e,r,t,a,Ce)){yt=1,vc(e,Ha(a,e.current)),ve=null;return}}catch(o){if(r!==null)throw ve=r,o;yt=1,vc(e,Ha(a,e.current)),ve=null;return}t.flags&32768?(Te||n===1?e=!0:_l||(Ce&536870912)!==0?e=!1:(yr=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ma.current,n!==null&&n.tag===13&&(n.flags|=16384))),x0(t,e)):Xc(t)}function Xc(e){var t=e;do{if((t.flags&32768)!==0){x0(t,yr);return}e=t.return;var a=TO(t.alternate,t,$n);if(a!==null){ve=a;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);yt===0&&(yt=5)}function x0(e,t){do{var a=AO(e.alternate,e);if(a!==null){a.flags&=32767,ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=a}while(e!==null);yt=6,ve=null}function _v(e,t,a,n,r,o,l,i,s){e.cancelPendingCommit=null;do Kc();while(_t!==0);if((Fe&6)!==0)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(o=t.lanes|t.childLanes,o|=Zm,h_(e,a,o,l,i,s),e===at&&(ve=at=null,Ce=0),kl=t,kr=e,qn=a,Cm=o,km=r,d0=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zO(uc,function(){return C0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=re.T,re.T=null,r=ze.p,ze.p=2,l=Fe,Fe|=4;try{MO(e,t,a)}finally{Fe=l,ze.p=r,re.T=n}}_t=1,v0(),b0(),S0()}}function v0(){if(_t===1){_t=0;var e=kr,t=kl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null;var n=ze.p;ze.p=2;var r=Fe;Fe|=4;try{n0(t,e);var o=Em,l=Ub(e.containerInfo),i=o.focusedElem,s=o.selectionRange;if(l!==i&&i&&i.ownerDocument&&Bb(i.ownerDocument.documentElement,i)){if(s!==null&&Km(i)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in i)i.selectionStart=u,i.selectionEnd=Math.min(c,i.value.length);else{var d=i.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=i.textContent.length,x=Math.min(s.start,m),b=s.end===void 0?x:Math.min(s.end,m);!p.extend&&x>b&&(l=b,b=x,x=l);var y=tv(i,x),w=tv(i,b);if(y&&w&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==w.node||p.focusOffset!==w.offset)){var g=d.createRange();g.setStart(y.node,y.offset),p.removeAllRanges(),x>b?(p.addRange(g),p.extend(w.node,w.offset)):(g.setEnd(w.node,w.offset),p.addRange(g))}}}}for(d=[],p=i;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<d.length;i++){var v=d[i];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}_c=!!Mm,Em=Mm=null}finally{Fe=r,ze.p=n,re.T=a}}e.current=t,_t=2}}function b0(){if(_t===2){_t=0;var e=kr,t=kl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=re.T,re.T=null;var n=ze.p;ze.p=2;var r=Fe;Fe|=4;try{YS(e,t.alternate,t)}finally{Fe=r,ze.p=n,re.T=a}}_t=3}}function S0(){if(_t===4||_t===3){_t=0,l_();var e=kr,t=kl,a=qn,n=d0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?_t=5:(_t=0,kl=kr=null,I0(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Cr=null),Hm(a),t=t.stateNode,ka&&typeof ka.onCommitFiberRoot=="function")try{ka.onCommitFiberRoot(es,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=re.T,r=ze.p,ze.p=2,re.T=null;try{for(var o=e.onRecoverableError,l=0;l<n.length;l++){var i=n[l];o(i.value,{componentStack:i.stack})}}finally{re.T=t,ze.p=r}}(qn&3)!==0&&Kc(),yn(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Lm?Bi++:(Bi=0,Lm=e):Bi=0,ss(0,!1)}}function I0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,os(t)))}function Kc(){return v0(),b0(),S0(),C0()}function C0(){if(_t!==5)return!1;var e=kr,t=Cm;Cm=0;var a=Hm(qn),n=re.T,r=ze.p;try{ze.p=32>a?32:a,re.T=null,a=km,km=null;var o=kr,l=qn;if(_t=0,kl=kr=null,qn=0,(Fe&6)!==0)throw Error(P(331));var i=Fe;if(Fe|=4,s0(o.current),o0(o,o.current,l,a),Fe=i,ss(0,!1),ka&&typeof ka.onPostCommitFiberRoot=="function")try{ka.onPostCommitFiberRoot(es,o)}catch{}return!0}finally{ze.p=r,re.T=n,I0(e,t)}}function Ov(e,t,a){t=Ha(a,t),t=xm(e.stateNode,t,2),e=Ir(e,t,2),e!==null&&(as(e,2),yn(e))}function Ge(e,t,a){if(e.tag===3)Ov(e,e,a);else for(;t!==null;){if(t.tag===3){Ov(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Cr===null||!Cr.has(n))){e=Ha(a,e),a=FS(2),n=Ir(t,a,2),n!==null&&(zS(a,n,t,e),as(n,2),yn(n));break}}t=t.return}}function Bp(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new DO;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||(Ih=!0,r.add(a),e=BO.bind(null,e,t,a),t.then(e,e))}function BO(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,at===e&&(Ce&a)===a&&(yt===4||yt===3&&(Ce&62914560)===Ce&&300>Ca()-$c?(Fe&2)===0&&Ll(e,0):Ch|=a,Cl===Ce&&(Cl=0)),yn(e)}function k0(e,t){t===0&&(t=gb()),e=yo(e,t),e!==null&&(as(e,t),yn(e))}function UO(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),k0(e,a)}function FO(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(P(314))}n!==null&&n.delete(t),k0(e,a)}function zO(e,t){return zm(e,t)}var Lc=null,Yo=null,Tm=!1,Tc=!1,Up=!1,xr=0;function yn(e){e!==Yo&&e.next===null&&(Yo===null?Lc=Yo=e:Yo=Yo.next=e),Tc=!0,Tm||(Tm=!0,HO())}function ss(e,t){if(!Up&&Tc){Up=!0;do for(var a=!1,n=Lc;n!==null;){if(!t)if(e!==0){var r=n.pendingLanes;if(r===0)var o=0;else{var l=n.suspendedLanes,i=n.pingedLanes;o=(1<<31-La(42|e)+1)-1,o&=r&~(l&~i),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Pv(n,o))}else o=Ce,o=Pc(n,n===at?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||ts(n,o)||(a=!0,Pv(n,o));n=n.next}while(a);Up=!1}}function qO(){L0()}function L0(){Tc=Tm=!1;var e=0;xr!==0&&ZO()&&(e=xr);for(var t=Ca(),a=null,n=Lc;n!==null;){var r=n.next,o=T0(n,t);o===0?(n.next=null,a===null?Lc=r:a.next=r,r===null&&(Yo=a)):(a=n,(e!==0||(o&3)!==0)&&(Tc=!0)),n=r}_t!==0&&_t!==5||ss(e,!1),xr!==0&&(xr=0)}function T0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var l=31-La(o),i=1<<l,s=r[l];s===-1?((i&a)===0||(i&n)!==0)&&(r[l]=m_(i,t)):s<=t&&(e.expiredLanes|=i),o&=~i}if(t=at,a=Ce,a=Pc(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&pp(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ts(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&pp(n),Hm(a)){case 2:case 8:a=mb;break;case 32:a=uc;break;case 268435456:a=hb;break;default:a=uc}return n=A0.bind(null,e),a=zm(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&pp(n),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(_t!==0&&_t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Kc()&&e.callbackNode!==a)return null;var n=Ce;return n=Pc(e,e===at?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(p0(e,n,t),T0(e,Ca()),e.callbackNode!=null&&e.callbackNode===a?A0.bind(null,e):null)}function Pv(e,t){if(Kc())return null;p0(e,t,!0)}function HO(){YO(function(){(Fe&6)!==0?zm(pb,qO):L0()})}function Lh(){if(xr===0){var e=bl;e===0&&(e=Au,Au<<=1,(Au&261888)===0&&(Au=256)),xr=e}return xr}function Nv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$u(""+e)}function Bv(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function jO(e,t,a,n,r){if(t==="submit"&&a&&a.stateNode===r){var o=Nv((r[ma]||null).action),l=n.submitter;l&&(t=(t=l[ma]||null)?Nv(t.formAction):l.getAttribute("formAction"),t!==null&&(o=t,l=null));var i=new Nc("action","action",null,n,r);e.push({event:i,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(xr!==0){var s=l?Bv(r,l):new FormData(r);ym(a,{pending:!0,data:s,method:r.method,action:o},null,s)}}else typeof o=="function"&&(i.preventDefault(),s=l?Bv(r,l):new FormData(r),ym(a,{pending:!0,data:s,method:r.method,action:o},o,s))},currentTarget:r}]})}}for(zu=0;zu<om.length;zu++)qu=om[zu],Uv=qu.toLowerCase(),Fv=qu[0].toUpperCase()+qu.slice(1),an(Uv,"on"+Fv);var qu,Uv,Fv,zu;an(zb,"onAnimationEnd");an(qb,"onAnimationIteration");an(Hb,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(iO,"onTransitionRun");an(sO,"onTransitionStart");an(uO,"onTransitionCancel");an(jb,"onTransitionEnd");xl("onMouseEnter",["mouseout","mouseover"]);xl("onMouseLeave",["mouseout","mouseover"]);xl("onPointerEnter",["pointerout","pointerover"]);xl("onPointerLeave",["pointerout","pointerover"]);mo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));mo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mo("onBeforeInput",["compositionend","keypress","textInput","paste"]);mo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),VO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xi));function M0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],r=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var l=n.length-1;0<=l;l--){var i=n[l],s=i.instance,u=i.currentTarget;if(i=i.listener,s!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(c){dc(c)}r.currentTarget=null,o=s}else for(l=0;l<n.length;l++){if(i=n[l],s=i.instance,u=i.currentTarget,i=i.listener,s!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(c){dc(c)}r.currentTarget=null,o=s}}}}function xe(e,t){var a=t[Qp];a===void 0&&(a=t[Qp]=new Set);var n=e+"__bubble";a.has(n)||(E0(t,e,2,!1),a.add(n))}function Fp(e,t,a){var n=0;t&&(n|=4),E0(a,e,n,t)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function Th(e){if(!e[Hu]){e[Hu]=!0,bb.forEach(function(a){a!=="selectionchange"&&(VO.has(a)||Fp(a,!1,e),Fp(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hu]||(t[Hu]=!0,Fp("selectionchange",!1,t))}}function E0(e,t,a,n){switch(j0(t)){case 2:var r=wP;break;case 8:r=xP;break;default:r=Rh}a=r.bind(null,t,a,e),r=void 0,!am||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function zp(e,t,a,n,r){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var l=n.tag;if(l===3||l===4){var i=n.stateNode.containerInfo;if(i===r)break;if(l===4)for(l=n.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===r)return;l=l.return}for(;i!==null;){if(l=tl(i),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){n=o=l;continue e}i=i.parentNode}}n=n.return}Mb(function(){var u=o,c=Gm(a),d=[];e:{var f=Vb.get(e);if(f!==void 0){var p=Nc,m=e;switch(e){case"keypress":if(Xu(a)===0)break e;case"keydown":case"keyup":p=F_;break;case"focusin":m="focus",p=wp;break;case"focusout":m="blur",p=wp;break;case"beforeblur":case"afterblur":p=wp;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=$x;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=T_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=H_;break;case zb:case qb:case Hb:p=E_;break;case jb:p=V_;break;case"scroll":case"scrollend":p=k_;break;case"wheel":p=$_;break;case"copy":case"cut":case"paste":p=D_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xx;break;case"toggle":case"beforetoggle":p=X_}var x=(t&4)!==0,b=!x&&(e==="scroll"||e==="scrollend"),y=x?f!==null?f+"Capture":null:f;x=[];for(var w=u,g;w!==null;){var v=w;if(g=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||g===null||y===null||(v=zi(w,y),v!=null&&x.push(Ki(w,v,g))),b)break;w=w.return}0<x.length&&(f=new p(f,m,null,a,c),d.push({event:f,listeners:x}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&a!==tm&&(m=a.relatedTarget||a.fromElement)&&(tl(m)||m[Ml]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=a.relatedTarget||a.toElement,p=u,m=m?tl(m):null,m!==null&&(b=Ji(m),x=m.tag,m!==b||x!==5&&x!==27&&x!==6)&&(m=null)):(p=null,m=u),p!==m)){if(x=$x,v="onMouseLeave",y="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(x=Xx,v="onPointerLeave",y="onPointerEnter",w="pointer"),b=p==null?f:Ii(p),g=m==null?f:Ii(m),f=new x(v,w+"leave",p,a,c),f.target=b,f.relatedTarget=g,v=null,tl(c)===u&&(x=new x(y,w+"enter",m,a,c),x.target=g,x.relatedTarget=b,v=x),b=v,p&&m)t:{for(x=GO,y=p,w=m,g=0,v=y;v;v=x(v))g++;v=0;for(var M=w;M;M=x(M))v++;for(;0<g-v;)y=x(y),g--;for(;0<v-g;)w=x(w),v--;for(;g--;){if(y===w||w!==null&&y===w.alternate){x=y;break t}y=x(y),w=x(w)}x=null}else x=null;p!==null&&zv(d,f,p,x,!1),m!==null&&b!==null&&zv(d,b,m,x,!0)}}e:{if(f=u?Ii(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var I=Yx;else if(Qx(f))if(Pb)I=rO;else{I=aO;var A=tO}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Vm(u.elementType)&&(I=Yx):I=nO;if(I&&(I=I(e,u))){Ob(d,I,a,c);break e}A&&A(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&em(f,"number",f.value)}switch(A=u?Ii(u):window,e){case"focusin":(Qx(A)||A.contentEditable==="true")&&(rl=A,nm=u,Ai=null);break;case"focusout":Ai=nm=rl=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,av(d,a,c);break;case"selectionchange":if(lO)break;case"keydown":case"keyup":av(d,a,c)}var E;if(Xm)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else nl?Db(e,a)&&(_="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_="onCompositionStart");_&&(Rb&&a.locale!=="ko"&&(nl||_!=="onCompositionStart"?_==="onCompositionEnd"&&nl&&(E=Eb()):(gr=c,$m="value"in gr?gr.value:gr.textContent,nl=!0)),A=Ac(u,_),0<A.length&&(_=new Wx(_,e,null,a,c),d.push({event:_,listeners:A}),E?_.data=E:(E=_b(a),E!==null&&(_.data=E)))),(E=Z_?Q_(e,a):Y_(e,a))&&(_=Ac(u,"onBeforeInput"),0<_.length&&(A=new Wx("onBeforeInput","beforeinput",null,a,c),d.push({event:A,listeners:_}),A.data=E)),jO(d,e,u,a,c)}M0(d,t)})}function Ki(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ac(e,t){for(var a=t+"Capture",n=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=zi(e,a),r!=null&&n.unshift(Ki(e,r,o)),r=zi(e,t),r!=null&&n.push(Ki(e,r,o))),e.tag===3)return n;e=e.return}return[]}function GO(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zv(e,t,a,n,r){for(var o=t._reactName,l=[];a!==null&&a!==n;){var i=a,s=i.alternate,u=i.stateNode;if(i=i.tag,s!==null&&s===n)break;i!==5&&i!==26&&i!==27||u===null||(s=u,r?(u=zi(a,o),u!=null&&l.unshift(Ki(a,u,s))):r||(u=zi(a,o),u!=null&&l.push(Ki(a,u,s)))),a=a.return}l.length!==0&&e.push({event:t,listeners:l})}var $O=/\r\n?/g,WO=/\u0000|\uFFFD/g;function qv(e){return(typeof e=="string"?e:""+e).replace($O,`
|
|
9
|
+
`).replace(WO,"")}function R0(e,t){return t=qv(t),qv(e)===t}function Qe(e,t,a,n,r,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||vl(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&vl(e,""+n);break;case"className":Ru(e,"class",n);break;case"tabIndex":Ru(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ru(e,a,n);break;case"style":Ab(e,n,o);break;case"data":if(t!=="object"){Ru(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=$u(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Qe(e,t,"name",r.name,r,null),Qe(e,t,"formEncType",r.formEncType,r,null),Qe(e,t,"formMethod",r.formMethod,r,null),Qe(e,t,"formTarget",r.formTarget,r,null)):(Qe(e,t,"encType",r.encType,r,null),Qe(e,t,"method",r.method,r,null),Qe(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=$u(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Bn);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(P(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(P(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=$u(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Gu(e,"popover",n);break;case"xlinkActuate":Mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Mn(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Mn(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Mn(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Mn(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Gu(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=I_.get(a)||a,Gu(e,a,n))}}function Am(e,t,a,n,r,o){switch(a){case"style":Ab(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(P(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(P(60));e.innerHTML=a}}break;case"children":typeof n=="string"?vl(e,n):(typeof n=="number"||typeof n=="bigint")&&vl(e,""+n);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sb.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[ma]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof n=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,r);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Gu(e,a,n)}}}function $t(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var n=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];if(l!=null)switch(o){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Qe(e,t,o,l,a,null)}}r&&Qe(e,t,"srcSet",a.srcSet,a,null),n&&Qe(e,t,"src",a.src,a,null);return;case"input":xe("invalid",e);var i=o=l=r=null,s=null,u=null;for(n in a)if(a.hasOwnProperty(n)){var c=a[n];if(c!=null)switch(n){case"name":r=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":o=c;break;case"defaultValue":i=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(P(137,t));break;default:Qe(e,t,n,c,a,null)}}kb(e,o,i,s,u,l,r,!1);return;case"select":xe("invalid",e),n=l=o=null;for(r in a)if(a.hasOwnProperty(r)&&(i=a[r],i!=null))switch(r){case"value":o=i;break;case"defaultValue":l=i;break;case"multiple":n=i;default:Qe(e,t,r,i,a,null)}t=o,a=l,e.multiple=!!n,t!=null?fl(e,!!n,t,!1):a!=null&&fl(e,!!n,a,!0);return;case"textarea":xe("invalid",e),o=r=n=null;for(l in a)if(a.hasOwnProperty(l)&&(i=a[l],i!=null))switch(l){case"value":n=i;break;case"defaultValue":r=i;break;case"children":o=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(P(91));break;default:Qe(e,t,l,i,a,null)}Tb(e,n,r,o);return;case"option":for(s in a)a.hasOwnProperty(s)&&(n=a[s],n!=null)&&(s==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Qe(e,t,s,n,a,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(n=0;n<Xi.length;n++)xe(Xi[n],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in a)if(a.hasOwnProperty(u)&&(n=a[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Qe(e,t,u,n,a,null)}return;default:if(Vm(t)){for(c in a)a.hasOwnProperty(c)&&(n=a[c],n!==void 0&&Am(e,t,c,n,a,void 0));return}}for(i in a)a.hasOwnProperty(i)&&(n=a[i],n!=null&&Qe(e,t,i,n,a,null))}function XO(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,l=null,i=null,s=null,u=null,c=null;for(p in a){var d=a[p];if(a.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":s=d;default:n.hasOwnProperty(p)||Qe(e,t,p,null,n,d)}}for(var f in n){var p=n[f];if(d=a[f],n.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":o=p;break;case"name":r=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":l=p;break;case"defaultValue":i=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(P(137,t));break;default:p!==d&&Qe(e,t,f,p,n,d)}}Jp(e,l,i,s,u,c,o,r);return;case"select":p=l=i=f=null;for(o in a)if(s=a[o],a.hasOwnProperty(o)&&s!=null)switch(o){case"value":break;case"multiple":p=s;default:n.hasOwnProperty(o)||Qe(e,t,o,null,n,s)}for(r in n)if(o=n[r],s=a[r],n.hasOwnProperty(r)&&(o!=null||s!=null))switch(r){case"value":f=o;break;case"defaultValue":i=o;break;case"multiple":l=o;default:o!==s&&Qe(e,t,r,o,n,s)}t=i,a=l,n=p,f!=null?fl(e,!!a,f,!1):!!n!=!!a&&(t!=null?fl(e,!!a,t,!0):fl(e,!!a,a?[]:"",!1));return;case"textarea":p=f=null;for(i in a)if(r=a[i],a.hasOwnProperty(i)&&r!=null&&!n.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:Qe(e,t,i,null,n,r)}for(l in n)if(r=n[l],o=a[l],n.hasOwnProperty(l)&&(r!=null||o!=null))switch(l){case"value":f=r;break;case"defaultValue":p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(P(91));break;default:r!==o&&Qe(e,t,l,r,n,o)}Lb(e,f,p);return;case"option":for(var m in a)f=a[m],a.hasOwnProperty(m)&&f!=null&&!n.hasOwnProperty(m)&&(m==="selected"?e.selected=!1:Qe(e,t,m,null,n,f));for(s in n)f=n[s],p=a[s],n.hasOwnProperty(s)&&f!==p&&(f!=null||p!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Qe(e,t,s,f,n,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in a)f=a[x],a.hasOwnProperty(x)&&f!=null&&!n.hasOwnProperty(x)&&Qe(e,t,x,null,n,f);for(u in n)if(f=n[u],p=a[u],n.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(P(137,t));break;default:Qe(e,t,u,f,n,p)}return;default:if(Vm(t)){for(var b in a)f=a[b],a.hasOwnProperty(b)&&f!==void 0&&!n.hasOwnProperty(b)&&Am(e,t,b,void 0,n,f);for(c in n)f=n[c],p=a[c],!n.hasOwnProperty(c)||f===p||f===void 0&&p===void 0||Am(e,t,c,f,n,p);return}}for(var y in a)f=a[y],a.hasOwnProperty(y)&&f!=null&&!n.hasOwnProperty(y)&&Qe(e,t,y,null,n,f);for(d in n)f=n[d],p=a[d],!n.hasOwnProperty(d)||f===p||f==null&&p==null||Qe(e,t,d,f,n,p)}function Hv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function KO(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var r=a[n],o=r.transferSize,l=r.initiatorType,i=r.duration;if(o&&i&&Hv(l)){for(l=0,i=r.responseEnd,n+=1;n<a.length;n++){var s=a[n],u=s.startTime;if(u>i)break;var c=s.transferSize,d=s.initiatorType;c&&Hv(d)&&(s=s.responseEnd,l+=c*(s<i?1:(i-u)/(s-u)))}if(--n,t+=8*(o+l)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Mm=null,Em=null;function Mc(e){return e.nodeType===9?e:e.ownerDocument}function jv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function D0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qp=null;function ZO(){var e=window.event;return e&&e.type==="popstate"?e===qp?!1:(qp=e,!0):(qp=null,!1)}var _0=typeof setTimeout=="function"?setTimeout:void 0,QO=typeof clearTimeout=="function"?clearTimeout:void 0,Vv=typeof Promise=="function"?Promise:void 0,YO=typeof queueMicrotask=="function"?queueMicrotask:typeof Vv<"u"?function(e){return Vv.resolve(null).then(e).catch(JO)}:_0;function JO(e){setTimeout(function(){throw e})}function Or(e){return e==="head"}function Gv(e,t){var a=t,n=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(r),Al(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ui(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ui(a);for(var o=a.firstChild;o;){var l=o.nextSibling,i=o.nodeName;o[ns]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=l}}else a==="body"&&Ui(e.ownerDocument.body);a=r}while(a);Al(t)}function $v(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Dm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Dm(a),jm(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function eP(e,t,a,n){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Ga(e.nextSibling),e===null)break}return null}function tP(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ga(e.nextSibling),e===null))return null;return e}function O0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ga(e.nextSibling),e===null))return null;return e}function _m(e){return e.data==="$?"||e.data==="$~"}function Om(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aP(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ga(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Pm=null;function Wv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ga(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Xv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function P0(e,t,a){switch(t=Mc(a),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jm(e)}var $a=new Map,Kv=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Wn=ze.d;ze.d={f:nP,r:rP,D:oP,C:lP,L:iP,m:sP,X:cP,S:uP,M:dP};function nP(){var e=Wn.f(),t=Wc();return e||t}function rP(e){var t=El(e);t!==null&&t.tag===5&&t.type==="form"?AS(t):Wn.r(e)}var Ol=typeof document>"u"?null:document;function N0(e,t,a){var n=Ol;if(n&&typeof t=="string"&&t){var r=qa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Kv.has(r)||(Kv.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),$t(t,"link",e),Ft(t),n.head.appendChild(t)))}}function oP(e){Wn.D(e),N0("dns-prefetch",e,null)}function lP(e,t){Wn.C(e,t),N0("preconnect",e,t)}function iP(e,t,a){Wn.L(e,t,a);var n=Ol;if(n&&e&&t){var r='link[rel="preload"][as="'+qa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+qa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+qa(a.imageSizes)+'"]')):r+='[href="'+qa(e)+'"]';var o=r;switch(t){case"style":o=Tl(e);break;case"script":o=Pl(e)}$a.has(o)||(e=ut({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),$a.set(o,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(us(o))||t==="script"&&n.querySelector(cs(o))||(t=n.createElement("link"),$t(t,"link",e),Ft(t),n.head.appendChild(t)))}}function sP(e,t){Wn.m(e,t);var a=Ol;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+qa(n)+'"][href="'+qa(e)+'"]',o=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Pl(e)}if(!$a.has(o)&&(e=ut({rel:"modulepreload",href:e},t),$a.set(o,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(cs(o)))return}n=a.createElement("link"),$t(n,"link",e),Ft(n),a.head.appendChild(n)}}}function uP(e,t,a){Wn.S(e,t,a);var n=Ol;if(n&&e){var r=dl(n).hoistableStyles,o=Tl(e);t=t||"default";var l=r.get(o);if(!l){var i={loading:0,preload:null};if(l=n.querySelector(us(o)))i.loading=5;else{e=ut({rel:"stylesheet",href:e,"data-precedence":t},a),(a=$a.get(o))&&Ah(e,a);var s=l=n.createElement("link");Ft(s),$t(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){i.loading|=1}),s.addEventListener("error",function(){i.loading|=2}),i.loading|=4,ac(l,t,n)}l={type:"stylesheet",instance:l,count:1,state:i},r.set(o,l)}}}function cP(e,t){Wn.X(e,t);var a=Ol;if(a&&e){var n=dl(a).hoistableScripts,r=Pl(e),o=n.get(r);o||(o=a.querySelector(cs(r)),o||(e=ut({src:e,async:!0},t),(t=$a.get(r))&&Mh(e,t),o=a.createElement("script"),Ft(o),$t(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function dP(e,t){Wn.M(e,t);var a=Ol;if(a&&e){var n=dl(a).hoistableScripts,r=Pl(e),o=n.get(r);o||(o=a.querySelector(cs(r)),o||(e=ut({src:e,async:!0,type:"module"},t),(t=$a.get(r))&&Mh(e,t),o=a.createElement("script"),Ft(o),$t(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function Zv(e,t,a,n){var r=(r=vr.current)?Ec(r):null;if(!r)throw Error(P(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Tl(a.href),a=dl(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Tl(a.href);var o=dl(r).hoistableStyles,l=o.get(e);if(l||(r=r.ownerDocument||r,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,l),(o=r.querySelector(us(e)))&&!o._p&&(l.instance=o,l.state.loading=5),$a.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},$a.set(e,a),o||fP(r,e,a,l.state))),t&&n===null)throw Error(P(528,""));return l}if(t&&n!==null)throw Error(P(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pl(a),a=dl(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(P(444,e))}}function Tl(e){return'href="'+qa(e)+'"'}function us(e){return'link[rel="stylesheet"]['+e+"]"}function B0(e){return ut({},e,{"data-precedence":e.precedence,precedence:null})}function fP(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),$t(t,"link",a),Ft(t),e.head.appendChild(t))}function Pl(e){return'[src="'+qa(e)+'"]'}function cs(e){return"script[async]"+e}function Qv(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+qa(a.href)+'"]');if(n)return t.instance=n,Ft(n),n;var r=ut({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ft(n),$t(n,"style",r),ac(n,a.precedence,e),t.instance=n;case"stylesheet":r=Tl(a.href);var o=e.querySelector(us(r));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;n=B0(a),(r=$a.get(r))&&Ah(n,r),o=(e.ownerDocument||e).createElement("link"),Ft(o);var l=o;return l._p=new Promise(function(i,s){l.onload=i,l.onerror=s}),$t(o,"link",n),t.state.loading|=4,ac(o,a.precedence,e),t.instance=o;case"script":return o=Pl(a.src),(r=e.querySelector(cs(o)))?(t.instance=r,Ft(r),r):(n=a,(r=$a.get(o))&&(n=ut({},a),Mh(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ft(r),$t(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,ac(n,a.precedence,e));return t.instance}function ac(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,o=r,l=0;l<n.length;l++){var i=n[l];if(i.dataset.precedence===t)o=i;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ah(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var nc=null;function Yv(e,t,a){if(nc===null){var n=new Map,r=nc=new Map;r.set(a,n)}else r=nc,n=r.get(a),n||(n=new Map,r.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[ns]||o[jt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var l=o.getAttribute(t)||"";l=e+l;var i=n.get(l);i?i.push(o):n.set(l,[o])}}return n}function Jv(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function pP(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function U0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mP(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Tl(n.href),o=t.querySelector(us(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Rc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Ft(o);return}o=t.ownerDocument||t,n=B0(n),(r=$a.get(r))&&Ah(n,r),o=o.createElement("link"),Ft(o);var l=o;l._p=new Promise(function(i,s){l.onload=i,l.onerror=s}),$t(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Rc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Hp=0;function hP(e,t){return e.stylesheets&&e.count===0&&rc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&rc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Hp===0&&(Hp=62500*KO());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rc(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Hp?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function Rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Dc=null;function rc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Dc=new Map,t.forEach(gP,e),Dc=null,Rc.call(e))}function gP(e,t){if(!(t.state.loading&4)){var a=Dc.get(e);if(a)var n=a.get(null);else{a=new Map,Dc.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var l=r[o];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(a.set(l.dataset.precedence,l),n=l)}n&&a.set(null,n)}r=t.instance,l=r.getAttribute("data-precedence"),o=a.get(l)||n,o===n&&a.set(null,r),a.set(l,r),this.count++,n=Rc.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Zi={$$typeof:Nn,Provider:null,Consumer:null,_currentValue:no,_currentValue2:no,_threadCount:0};function yP(e,t,a,n,r,o,l,i,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mp(0),this.hiddenUpdates=mp(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function F0(e,t,a,n,r,o,l,i,s,u,c,d){return e=new yP(e,t,a,l,s,u,c,d,i),t=1,o===!0&&(t|=24),o=Sa(3,null,null,t),e.current=o,o.stateNode=e,t=th(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},rh(o),e}function z0(e){return e?(e=il,e):il}function q0(e,t,a,n,r,o){r=z0(r),n.context===null?n.context=r:n.pendingContext=r,n=Sr(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=Ir(e,n,t),a!==null&&(pa(a,e,t),Ei(a,e,t))}function eb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Eh(e,t){eb(e,t),(e=e.alternate)&&eb(e,t)}function H0(e){if(e.tag===13||e.tag===31){var t=yo(e,67108864);t!==null&&pa(t,e,67108864),Eh(e,67108864)}}function tb(e){if(e.tag===13||e.tag===31){var t=Ta();t=qm(t);var a=yo(e,t);a!==null&&pa(a,e,t),Eh(e,t)}}var _c=!0;function wP(e,t,a,n){var r=re.T;re.T=null;var o=ze.p;try{ze.p=2,Rh(e,t,a,n)}finally{ze.p=o,re.T=r}}function xP(e,t,a,n){var r=re.T;re.T=null;var o=ze.p;try{ze.p=8,Rh(e,t,a,n)}finally{ze.p=o,re.T=r}}function Rh(e,t,a,n){if(_c){var r=Nm(n);if(r===null)zp(e,t,n,Oc,a),ab(e,n);else if(bP(r,e,t,a,n))n.stopPropagation();else if(ab(e,n),t&4&&-1<vP.indexOf(e)){for(;r!==null;){var o=El(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var l=eo(o.pendingLanes);if(l!==0){var i=o;for(i.pendingLanes|=2,i.entangledLanes|=2;l;){var s=1<<31-La(l);i.entanglements[1]|=s,l&=~s}yn(o),(Fe&6)===0&&(Ic=Ca()+500,ss(0,!1))}}break;case 31:case 13:i=yo(o,2),i!==null&&pa(i,o,2),Wc(),Eh(o,2)}if(o=Nm(n),o===null&&zp(e,t,n,Oc,a),o===r)break;r=o}r!==null&&n.stopPropagation()}else zp(e,t,n,null,a)}}function Nm(e){return e=Gm(e),Dh(e)}var Oc=null;function Dh(e){if(Oc=null,e=tl(e),e!==null){var t=Ji(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=sb(t),e!==null)return e;e=null}else if(a===31){if(e=ub(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Oc=e,null}function j0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(i_()){case pb:return 2;case mb:return 8;case uc:case s_:return 32;case hb:return 268435456;default:return 32}default:return 32}}var Bm=!1,Lr=null,Tr=null,Ar=null,Qi=new Map,Yi=new Map,mr=[],vP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ab(e,t){switch(e){case"focusin":case"focusout":Lr=null;break;case"dragenter":case"dragleave":Tr=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":Qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yi.delete(t.pointerId)}}function xi(e,t,a,n,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[r]},t!==null&&(t=El(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function bP(e,t,a,n,r){switch(t){case"focusin":return Lr=xi(Lr,e,t,a,n,r),!0;case"dragenter":return Tr=xi(Tr,e,t,a,n,r),!0;case"mouseover":return Ar=xi(Ar,e,t,a,n,r),!0;case"pointerover":var o=r.pointerId;return Qi.set(o,xi(Qi.get(o)||null,e,t,a,n,r)),!0;case"gotpointercapture":return o=r.pointerId,Yi.set(o,xi(Yi.get(o)||null,e,t,a,n,r)),!0}return!1}function V0(e){var t=tl(e.target);if(t!==null){var a=Ji(t);if(a!==null){if(t=a.tag,t===13){if(t=sb(a),t!==null){e.blockedOn=t,Fx(e.priority,function(){tb(a)});return}}else if(t===31){if(t=ub(a),t!==null){e.blockedOn=t,Fx(e.priority,function(){tb(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function oc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nm(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);tm=n,a.target.dispatchEvent(n),tm=null}else return t=El(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function nb(e,t,a){oc(e)&&a.delete(t)}function SP(){Bm=!1,Lr!==null&&oc(Lr)&&(Lr=null),Tr!==null&&oc(Tr)&&(Tr=null),Ar!==null&&oc(Ar)&&(Ar=null),Qi.forEach(nb),Yi.forEach(nb)}function ju(e,t){e.blockedOn===t&&(e.blockedOn=null,Bm||(Bm=!0,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,SP)))}var Vu=null;function rb(e){Vu!==e&&(Vu=e,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,function(){Vu===e&&(Vu=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(Dh(n||a)===null)continue;break}var o=El(a);o!==null&&(e.splice(t,3),t-=3,ym(o,{pending:!0,data:r,method:a.method,action:n},n,r))}}))}function Al(e){function t(s){return ju(s,e)}Lr!==null&&ju(Lr,e),Tr!==null&&ju(Tr,e),Ar!==null&&ju(Ar,e),Qi.forEach(t),Yi.forEach(t);for(var a=0;a<mr.length;a++){var n=mr[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<mr.length&&(a=mr[0],a.blockedOn===null);)V0(a),a.blockedOn===null&&mr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var r=a[n],o=a[n+1],l=r[ma]||null;if(typeof o=="function")l||rb(a);else if(l){var i=null;if(o&&o.hasAttribute("formAction")){if(r=o,l=o[ma]||null)i=l.formAction;else if(Dh(r)!==null)continue}else i=l.action;typeof i=="function"?a[n+1]=i:(a.splice(n,3),n-=3),rb(a)}}}function G0(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(l){return r=l})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function _h(e){this._internalRoot=e}Zc.prototype.render=_h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var a=t.current,n=Ta();q0(a,n,e,t,null,null)};Zc.prototype.unmount=_h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;q0(e.current,2,null,e,null,null),Wc(),t[Ml]=null}};function Zc(e){this._internalRoot=e}Zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=vb();e={blockedOn:null,target:e,priority:t};for(var a=0;a<mr.length&&t!==0&&t<mr[a].priority;a++);mr.splice(a,0,e),a===0&&V0(e)}};var ob=lb.version;if(ob!=="19.2.4")throw Error(P(527,ob,"19.2.4"));ze.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=e_(t),e=e!==null?cb(e):null,e=e===null?null:e.stateNode,e};var IP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(vi=__REACT_DEVTOOLS_GLOBAL_HOOK__,!vi.isDisabled&&vi.supportsFiber))try{es=vi.inject(IP),ka=vi}catch{}var vi;Qc.createRoot=function(e,t){if(!ib(e))throw Error(P(299));var a=!1,n="",r=NS,o=BS,l=US;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=F0(e,1,!1,null,null,a,n,null,r,o,l,G0),e[Ml]=t.current,Th(e),new _h(t)};Qc.hydrateRoot=function(e,t,a){if(!ib(e))throw Error(P(299));var n=!1,r="",o=NS,l=BS,i=US,s=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(l=a.onCaughtError),a.onRecoverableError!==void 0&&(i=a.onRecoverableError),a.formState!==void 0&&(s=a.formState)),t=F0(e,1,!0,t,a??null,n,r,s,o,l,i,G0),t.context=z0(null),a=t.current,n=Ta(),n=qm(n),r=Sr(n),r.callback=null,Ir(a,r,n),a=n,t.current.lanes=a,as(t,a),yn(t),e[Ml]=t.current,Th(e),new Zc(t)};Qc.version="19.2.4"});var K0=Wt((Fj,X0)=>{"use strict";function W0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(W0)}catch(e){console.error(e)}}W0(),X0.exports=$0()});var SI=Wt(nd=>{"use strict";var LN=Symbol.for("react.transitional.element"),TN=Symbol.for("react.fragment");function bI(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var r in t)r!=="key"&&(a[r]=t[r])}else a=t;return t=a.ref,{$$typeof:LN,type:e,key:n,ref:t!==void 0?t:null,props:a}}nd.Fragment=TN;nd.jsx=bI;nd.jsxs=bI});var te=Wt((wV,II)=>{"use strict";II.exports=SI()});function kI(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=kI(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function rd(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=kI(e))&&(n&&(n+=" "),n+=t);return n}var Gh=C(()=>{"use strict"});function $h(...e){return e.filter(Boolean).join(" ")}function LI(){return $h}var Wh=C(()=>{"use strict"});function HN(e){let t=[],a=-1;for(;++a<e.length;)t[a]=Br(e[a]);return ud(n);function n(...r){let o=-1;for(;++o<t.length;)if(t[o].apply(this,r))return!0;return!1}}function jN(e){let t=e;return ud(a);function a(n){let r=n,o;for(o in e)if(r[o]!==t[o])return!1;return!0}}function VN(e){return ud(t);function t(a){return a&&a.type===e}}function ud(e){return t;function t(a,n,r){return!!($N(a)&&e.call(this,a,typeof n=="number"?n:void 0,r||void 0))}}function GN(){return!0}function $N(e){return e!==null&&typeof e=="object"&&"type"in e}var Br,QI=C(()=>{"use strict";Br=(function(e){if(e==null)return GN;if(typeof e=="function")return ud(e);if(typeof e=="object")return Array.isArray(e)?HN(e):jN(e);if(typeof e=="string")return VN(e);throw new Error("Expected function, string, or object as test")})});var cd=C(()=>{"use strict";QI()});function As(e,t,a,n){let r;typeof t=="function"&&typeof a!="function"?(n=a,a=t):r=t;let o=Br(r),l=n?-1:1;i(e,void 0,[])();function i(s,u,c){let d=s&&typeof s=="object"?s:{};if(typeof d.type=="string"){let p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(s.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=YI,m,x,b;if((!t||o(s,u,c[c.length-1]||void 0))&&(p=WN(a(s,c)),p[0]===Io))return p;if("children"in s&&s.children){let y=s;if(y.children&&p[0]!==Co)for(x=(n?y.children.length:-1)+l,b=c.concat(y);x>-1&&x<y.children.length;){let w=y.children[x];if(m=i(w,x,b)(),m[0]===Io)return m;x=typeof m[1]=="number"?m[1]:x+l}}return p}}}function WN(e){return Array.isArray(e)?e:typeof e=="number"?[Zn,e]:e==null?YI:[e]}var YI,Zn,Io,Co,JI=C(()=>{"use strict";cd();YI=[],Zn=!0,Io=!1,Co="skip"});var dd=C(()=>{"use strict";JI()});function Qn(e,t,a,n){let r,o,l;typeof t=="function"&&typeof a!="function"?(o=void 0,l=t,r=a):(o=t,l=a,r=n),As(e,o,i,r);function i(s,u){let c=u[u.length-1],d=c?c.children.indexOf(s):void 0;return l(s,d,c)}}var eC=C(()=>{"use strict";dd();dd()});var fd=C(()=>{"use strict";eC()});function nC({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:a=[],allowDataImages:n=!1,allowedProtocols:r=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500"}){let i=t.length&&!t.every(u=>u==="*"),s=a.length&&!a.every(u=>u==="*");if(!e&&(i||s))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return u=>{let c=QN(e,t,a,n,r,o,l);Qn(u,c)}}function tC(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function XN(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}function aC(e,t,a,n=!1,r=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!r)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return r&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){let c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}let l=tC(e,a);if(!l||ZN.has(l.protocol)||!(KN.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;let s=XN(e);return l&&t.some(u=>{let c=tC(u,a);return!c||c.origin!==l.origin?!1:l.href.startsWith(c.href)})?s?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:s?l.pathname+l.search+l.hash:l.href:null}var KN,ZN,Qh,QN,rC=C(()=>{"use strict";fd();KN=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),ZN=new Set(["javascript:","data:","file:","vbscript:"]);Qh=Symbol("node-seen"),QN=(e,t,a,n,r,o,l)=>{let i=(s,u,c)=>{if(s.type!=="element"||s[Qh])return Zn;if(s.tagName==="a"){let d=aC(s.properties.href,t,e,!1,!1,r);return d===null?(s[Qh]=!0,Qn(s,i),c&&typeof u=="number"&&(c.children[u]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(s.properties.href),class:l},children:[...s.children,{type:"text",value:" [blocked]"}]}),Co):(s.properties.href=d,s.properties.target="_blank",s.properties.rel="noopener noreferrer",Zn)}if(s.tagName==="img"){let d=aC(s.properties.src,a,e,n,!0,r);return d===null?(s[Qh]=!0,Qn(s,i),c&&typeof u=="number"&&(c.children[u]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(s.properties.alt||"No description")+"]"}]}),Co):(s.properties.src=d,Zn)}return Zn};return i}});function YN(){return e=>e}var oC,lC=C(()=>{"use strict";oC=YN});var iC,a3,eg,fC=C(()=>{"use strict";iC=typeof self=="object"?self:globalThis,a3=(e,t)=>{let a=(r,o)=>(e.set(o,r),r),n=r=>{if(e.has(r))return e.get(r);let[o,l]=t[r];switch(o){case 0:case-1:return a(l,r);case 1:{let i=a([],r);for(let s of l)i.push(n(s));return i}case 2:{let i=a({},r);for(let[s,u]of l)i[n(s)]=n(u);return i}case 3:return a(new Date(l),r);case 4:{let{source:i,flags:s}=l;return a(new RegExp(i,s),r)}case 5:{let i=a(new Map,r);for(let[s,u]of l)i.set(n(s),n(u));return i}case 6:{let i=a(new Set,r);for(let s of l)i.add(n(s));return i}case 7:{let{name:i,message:s}=l;return a(new iC[i](s),r)}case 8:return a(BigInt(l),r);case"BigInt":return a(Object(BigInt(l)),r);case"ArrayBuffer":return a(new Uint8Array(l).buffer,l);case"DataView":{let{buffer:i}=new Uint8Array(l);return a(new DataView(i),l)}}return a(new iC[o](l),r)};return n},eg=e=>a3(new Map,e)(0)});var ql,n3,r3,Ms,md,o3,tg,pC=C(()=>{"use strict";ql="",{toString:n3}={},{keys:r3}=Object,Ms=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let a=n3.call(e).slice(8,-1);switch(a){case"Array":return[1,ql];case"Object":return[2,ql];case"Date":return[3,ql];case"RegExp":return[4,ql];case"Map":return[5,ql];case"Set":return[6,ql];case"DataView":return[1,a]}return a.includes("Array")?[1,a]:a.includes("Error")?[7,a]:[2,a]},md=([e,t])=>e===0&&(t==="function"||t==="symbol"),o3=(e,t,a,n)=>{let r=(l,i)=>{let s=n.push(l)-1;return a.set(i,s),s},o=l=>{if(a.has(l))return a.get(l);let[i,s]=Ms(l);switch(i){case 0:{let c=l;switch(s){case"bigint":i=8,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return r([-1],l)}return r([i,c],l)}case 1:{if(s){let f=l;return s==="DataView"?f=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(f=new Uint8Array(l)),r([s,[...f]],l)}let c=[],d=r([i,c],l);for(let f of l)c.push(o(f));return d}case 2:{if(s)switch(s){case"BigInt":return r([s,l.toString()],l);case"Boolean":case"Number":case"String":return r([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());let c=[],d=r([i,c],l);for(let f of r3(l))(e||!md(Ms(l[f])))&&c.push([o(f),o(l[f])]);return d}case 3:return r([i,l.toISOString()],l);case 4:{let{source:c,flags:d}=l;return r([i,{source:c,flags:d}],l)}case 5:{let c=[],d=r([i,c],l);for(let[f,p]of l)(e||!(md(Ms(f))||md(Ms(p))))&&c.push([o(f),o(p)]);return d}case 6:{let c=[],d=r([i,c],l);for(let f of l)(e||!md(Ms(f)))&&c.push(o(f));return d}}let{message:u}=l;return r([i,{name:s,message:u}],l)};return o},tg=(e,{json:t,lossy:a}={})=>{let n=[];return o3(!(t||a),!!t,new Map,n)(e),n}});var Ur,hd=C(()=>{"use strict";fC();pC();Ur=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?eg(tg(e,t)):structuredClone(e):(e,t)=>eg(tg(e,t))});function mC(e){return t;function t(a){let n=a&&a.position&&a.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Es(e){let t=Hl(e),a=gd(e);if(t&&a)return{start:t,end:a}}var gd,Hl,hC=C(()=>{"use strict";gd=mC("end"),Hl=mC("start")});var Rs=C(()=>{"use strict";hC()});var ko,ag,gC=C(()=>{"use strict";ko=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ag={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ko,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ko],h2:[["className","sr-only"]],img:[...ko,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ko,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ko],table:[...ko],ul:[...ko,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]}});function ng(e,t){let a={type:"root",children:[]},n={schema:t?{...ag,...t}:ag,stack:[]},r=xC(n,e);return r&&(Array.isArray(r)?r.length===1?a=r[0]:a.children=r:a=r),a}function xC(e,t){if(t&&typeof t=="object"){let a=t;switch(typeof a.type=="string"?a.type:""){case"comment":return l3(e,a);case"doctype":return i3(e,a);case"element":return s3(e,a);case"root":return u3(e,a);case"text":return c3(e,a);default:}}}function l3(e,t){if(e.schema.allowComments){let a=typeof t.value=="string"?t.value:"",n=a.indexOf("-->"),o={type:"comment",value:n<0?a:a.slice(0,n)};return Ds(o,t),o}}function i3(e,t){if(e.schema.allowDoctypes){let a={type:"doctype"};return Ds(a,t),a}}function s3(e,t){let a=typeof t.tagName=="string"?t.tagName:"";e.stack.push(a);let n=vC(e,t.children),r=d3(e,t.properties);e.stack.pop();let o=!1;if(a&&a!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(a))&&(o=!0,e.schema.ancestors&&Fr.call(e.schema.ancestors,a))){let i=e.schema.ancestors[a],s=-1;for(o=!1;++s<i.length;)e.stack.includes(i[s])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(a)?n:void 0;let l={type:"element",tagName:a,properties:r,children:n};return Ds(l,t),l}function u3(e,t){let n={type:"root",children:vC(e,t.children)};return Ds(n,t),n}function c3(e,t){let n={type:"text",value:typeof t.value=="string"?t.value:""};return Ds(n,t),n}function vC(e,t){let a=[];if(Array.isArray(t)){let n=t,r=-1;for(;++r<n.length;){let o=xC(e,n[r]);o&&(Array.isArray(o)?a.push(...o):a.push(o))}}return a}function d3(e,t){let a=e.stack[e.stack.length-1],n=e.schema.attributes,r=e.schema.required,o=n&&Fr.call(n,a)?n[a]:void 0,l=n&&Fr.call(n,"*")?n["*"]:void 0,i=t&&typeof t=="object"?t:{},s={},u;for(u in i)if(Fr.call(i,u)){let c=i[u],d=yC(e,wC(o,u),u,c);d==null&&(d=yC(e,wC(l,u),u,c)),d!=null&&(s[u]=d)}if(r&&Fr.call(r,a)){let c=r[a];for(u in c)Fr.call(c,u)&&!Fr.call(s,u)&&(s[u]=c[u])}return s}function yC(e,t,a,n){return t?Array.isArray(n)?f3(e,t,a,n):bC(e,t,a,n):void 0}function f3(e,t,a,n){let r=-1,o=[];for(;++r<n.length;){let l=bC(e,t,a,n[r]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function bC(e,t,a,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&p3(e,a,n)){if(typeof t=="object"&&t.length>1){let r=!1,o=0;for(;++o<t.length;){let l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(n))){r=!0;break}}else if(l===n){r=!0;break}}if(!r)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(a)?e.schema.clobberPrefix+n:n}}function p3(e,t,a){let n=e.schema.protocols&&Fr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;let r=String(a),o=r.indexOf(":"),l=r.indexOf("?"),i=r.indexOf("#"),s=r.indexOf("/");if(o<0||s>-1&&o>s||l>-1&&o>l||i>-1&&o>i)return!0;let u=-1;for(;++u<n.length;){let c=n[u];if(o===c.length&&r.slice(0,c.length)===c)return!0}return!1}function Ds(e,t){let a=Es(t);t.data&&(e.data=Ur(t.data)),a&&(e.position=a)}function wC(e,t){let a,n=-1;if(e)for(;++n<e.length;){let r=e[n],o=typeof r=="string"?r:r[0];if(o===t)return r;o==="data*"&&(a=r)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return a}var Fr,SC=C(()=>{"use strict";hd();Rs();gC();Fr={}.hasOwnProperty});var IC=C(()=>{"use strict";SC()});function yd(e){return function(t){return ng(t,e)}}var CC=C(()=>{"use strict";IC()});var kC=C(()=>{"use strict";CC()});function rg(e,t){let a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,r=a.indexOf(t);for(;r!==-1;)n++,r=a.indexOf(t,r+t.length);return n}var LC=C(()=>{"use strict"});function Lo(e){return e!==null&&(e<32||e===127)}function G(e){return e!==null&&e<-2}function ge(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}function zr(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}var Pt,wt,TC,_s,AC,MC,To,xn,Ee=C(()=>{"use strict";Pt=zr(/[A-Za-z]/),wt=zr(/[\dA-Za-z]/),TC=zr(/[#-'*+\--9=?A-Z^-~]/);_s=zr(/\d/),AC=zr(/[\dA-Fa-f]/),MC=zr(/[!-/:-@[-`{-~]/);To=zr(/\p{P}|\p{S}/u),xn=zr(/\s/)});function og(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var EC=C(()=>{"use strict"});function lg(e,t,a){let r=Br((a||{}).ignore||[]),o=m3(t),l=-1;for(;++l<o.length;)As(e,"text",i);function i(u,c){let d=-1,f;for(;++d<c.length;){let p=c[d],m=f?f.children:void 0;if(r(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return s(u,c)}function s(u,c){let d=c[c.length-1],f=o[l][0],p=o[l][1],m=0,b=d.children.indexOf(u),y=!1,w=[];f.lastIndex=0;let g=f.exec(u.value);for(;g;){let v=g.index,M={index:g.index,input:g.input,stack:[...c,u]},I=p(...g,M);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?f.lastIndex=v+1:(m!==v&&w.push({type:"text",value:u.value.slice(m,v)}),Array.isArray(I)?w.push(...I):I&&w.push(I),m=v+g[0].length,y=!0),!f.global)break;g=f.exec(u.value)}return y?(m<u.value.length&&w.push({type:"text",value:u.value.slice(m)}),d.children.splice(b,1,...w)):w=[u],b+w.length}}function m3(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let a=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<a.length;){let r=a[n];t.push([h3(r[0]),g3(r[1])])}return t}function h3(e){return typeof e=="string"?new RegExp(og(e),"g"):e}function g3(e){return typeof e=="function"?e:function(){return e}}var RC=C(()=>{"use strict";EC();dd();cd()});var DC=C(()=>{"use strict";RC()});function cg(){return{transforms:[S3],enter:{literalAutolink:y3,literalAutolinkEmail:ug,literalAutolinkHttp:ug,literalAutolinkWww:ug},exit:{literalAutolink:b3,literalAutolinkEmail:v3,literalAutolinkHttp:w3,literalAutolinkWww:x3}}}function dg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ig,notInConstruct:sg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ig,notInConstruct:sg},{character:":",before:"[ps]",after:"\\/",inConstruct:ig,notInConstruct:sg}]}}function y3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ug(e){this.config.enter.autolinkProtocol.call(this,e)}function w3(e){this.config.exit.autolinkProtocol.call(this,e)}function x3(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function v3(e){this.config.exit.autolinkEmail.call(this,e)}function b3(e){this.exit(e)}function S3(e){lg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,I3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,C3]],{ignore:["link","linkReference"]})}function I3(e,t,a,n,r){let o="";if(!_C(r)||(/^w/i.test(t)&&(a=t+a,t="",o="http://"),!k3(a)))return!1;let l=L3(a+n);if(!l[0])return!1;let i={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[i,{type:"text",value:l[1]}]:i}function C3(e,t,a,n){return!_C(n,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function k3(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function L3(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],n=a.indexOf(")"),r=rg(e,"("),o=rg(e,")");for(;n!==-1&&r>o;)e+=a.slice(0,n+1),a=a.slice(n+1),n=a.indexOf(")"),o++;return[e,a]}function _C(e,t){let a=e.input.charCodeAt(e.index-1);return(e.index===0||xn(a)||To(a))&&(!t||a!==47)}var ig,sg,OC=C(()=>{"use strict";LC();Ee();DC();ig="phrasing",sg=["autolink","link","image","label"]});var PC=C(()=>{"use strict";OC()});function Kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var jl=C(()=>{"use strict"});function T3(){this.buffer()}function A3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function M3(){this.buffer()}function E3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function R3(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function D3(e){this.exit(e)}function _3(e){let t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),a.label=t}function O3(e){this.exit(e)}function P3(){return"["}function NC(e,t,a,n){let r=a.createTracker(n),o=r.move("[^"),l=a.enter("footnoteReference"),i=a.enter("reference");return o+=r.move(a.safe(a.associationId(e),{after:"]",before:o})),i(),l(),o+=r.move("]"),o}function fg(){return{enter:{gfmFootnoteCallString:T3,gfmFootnoteCall:A3,gfmFootnoteDefinitionLabelString:M3,gfmFootnoteDefinition:E3},exit:{gfmFootnoteCallString:R3,gfmFootnoteCall:D3,gfmFootnoteDefinitionLabelString:_3,gfmFootnoteDefinition:O3}}}function pg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:NC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(n,r,o,l){let i=o.createTracker(l),s=i.move("[^"),u=o.enter("footnoteDefinition"),c=o.enter("label");return s+=i.move(o.safe(o.associationId(n),{before:s,after:"]"})),c(),s+=i.move("]:"),n.children&&n.children.length>0&&(i.shift(4),s+=i.move((t?`
|
|
10
|
+
`:" ")+o.indentLines(o.containerFlow(n,i.current()),t?BC:N3))),u(),s}}function N3(e,t,a){return t===0?e:BC(e,t,a)}function BC(e,t,a){return(a?"":" ")+e}var UC=C(()=>{"use strict";jl();NC.peek=P3});var FC=C(()=>{"use strict";UC()});function mg(){return{canContainEols:["delete"],enter:{strikethrough:U3},exit:{strikethrough:F3}}}function hg(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:B3}],handlers:{delete:zC}}}function U3(e){this.enter({type:"delete",children:[]},e)}function F3(e){this.exit(e)}function zC(e,t,a,n){let r=a.createTracker(n),o=a.enter("strikethrough"),l=r.move("~~");return l+=a.containerPhrasing(e,{...r.current(),before:l,after:"~"}),l+=r.move("~~"),o(),l}function z3(){return"~"}var B3,qC=C(()=>{"use strict";B3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];zC.peek=z3});var HC=C(()=>{"use strict";qC()});function q3(e){return e.length}function VC(e,t){let a=t||{},n=(a.align||[]).concat(),r=a.stringLength||q3,o=[],l=[],i=[],s=[],u=0,c=-1;for(;++c<e.length;){let x=[],b=[],y=-1;for(e[c].length>u&&(u=e[c].length);++y<e[c].length;){let w=H3(e[c][y]);if(a.alignDelimiters!==!1){let g=r(w);b[y]=g,(s[y]===void 0||g>s[y])&&(s[y]=g)}x.push(w)}l[c]=x,i[c]=b}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)o[d]=jC(n[d]);else{let x=jC(n);for(;++d<u;)o[d]=x}d=-1;let f=[],p=[];for(;++d<u;){let x=o[d],b="",y="";x===99?(b=":",y=":"):x===108?b=":":x===114&&(y=":");let w=a.alignDelimiters===!1?1:Math.max(1,s[d]-b.length-y.length),g=b+"-".repeat(w)+y;a.alignDelimiters!==!1&&(w=b.length+w+y.length,w>s[d]&&(s[d]=w),p[d]=w),f[d]=g}l.splice(1,0,f),i.splice(1,0,p),c=-1;let m=[];for(;++c<l.length;){let x=l[c],b=i[c];d=-1;let y=[];for(;++d<u;){let w=x[d]||"",g="",v="";if(a.alignDelimiters!==!1){let M=s[d]-(b[d]||0),I=o[d];I===114?g=" ".repeat(M):I===99?M%2?(g=" ".repeat(M/2+.5),v=" ".repeat(M/2-.5)):(g=" ".repeat(M/2),v=g):v=" ".repeat(M)}a.delimiterStart!==!1&&!d&&y.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&w==="")&&(a.delimiterStart!==!1||d)&&y.push(" "),a.alignDelimiters!==!1&&y.push(g),y.push(w),a.alignDelimiters!==!1&&y.push(v),a.padding!==!1&&y.push(" "),(a.delimiterEnd!==!1||d!==u-1)&&y.push("|")}m.push(a.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
11
|
+
`)}function H3(e){return e==null?"":String(e)}function jC(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var GC=C(()=>{"use strict"});function $C(e,t,a,n){let r=a.enter("blockquote"),o=a.createTracker(n);o.move("> "),o.shift(2);let l=a.indentLines(a.containerFlow(e,o.current()),j3);return r(),l}function j3(e,t,a){return">"+(a?"":" ")+e}var WC=C(()=>{"use strict"});function KC(e,t){return XC(e,t.inConstruct,!0)&&!XC(e,t.notInConstruct,!1)}function XC(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}var ZC=C(()=>{"use strict"});function gg(e,t,a,n){let r=-1;for(;++r<a.unsafe.length;)if(a.unsafe[r].character===`
|
|
12
|
+
`&&KC(a.stack,a.unsafe[r]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
13
|
+
`}var QC=C(()=>{"use strict";ZC()});function YC(e,t){let a=String(e),n=a.indexOf(t),r=n,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===r?++o>l&&(l=o):o=1,r=n+t.length,n=a.indexOf(t,r);return l}var JC=C(()=>{"use strict"});function ek(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var tk=C(()=>{"use strict"});function ak(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var nk=C(()=>{"use strict"});function rk(e,t,a,n){let r=ak(a),o=e.value||"",l=r==="`"?"GraveAccent":"Tilde";if(ek(e,a)){let d=a.enter("codeIndented"),f=a.indentLines(o,V3);return d(),f}let i=a.createTracker(n),s=r.repeat(Math.max(YC(o,r)+1,3)),u=a.enter("codeFenced"),c=i.move(s);if(e.lang){let d=a.enter(`codeFencedLang${l}`);c+=i.move(a.safe(e.lang,{before:c,after:" ",encode:["`"],...i.current()})),d()}if(e.lang&&e.meta){let d=a.enter(`codeFencedMeta${l}`);c+=i.move(" "),c+=i.move(a.safe(e.meta,{before:c,after:`
|
|
14
14
|
`,encode:["`"],...i.current()})),d()}return c+=i.move(`
|
|
15
15
|
`),o&&(c+=i.move(o+`
|
|
16
|
-
`)),c+=i.move(s),u(),c}function
|
|
17
|
-
`,...s.current()}))),i(),e.title&&(i=a.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(a.safe(e.title,{before:u,after:r,...s.current()})),u+=s.move(r),i()),l(),u}var
|
|
16
|
+
`)),c+=i.move(s),u(),c}function V3(e,t,a){return(a?"":" ")+e}var ok=C(()=>{"use strict";JC();tk();nk()});function Vl(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var wd=C(()=>{"use strict"});function lk(e,t,a,n){let r=Vl(a),o=r==='"'?"Quote":"Apostrophe",l=a.enter("definition"),i=a.enter("label"),s=a.createTracker(n),u=s.move("[");return u+=s.move(a.safe(a.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),i(),!e.url||/[\0- \u007F]/.test(e.url)?(i=a.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(a.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(i=a.enter("destinationRaw"),u+=s.move(a.safe(e.url,{before:u,after:e.title?" ":`
|
|
17
|
+
`,...s.current()}))),i(),e.title&&(i=a.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(a.safe(e.title,{before:u,after:r,...s.current()})),u+=s.move(r),i()),l(),u}var ik=C(()=>{"use strict";wd()});function sk(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var uk=C(()=>{"use strict"});function qr(e){return"&#x"+e.toString(16).toUpperCase()+";"}var xd=C(()=>{"use strict"});function Yn(e){if(e===null||ge(e)||xn(e))return 1;if(To(e))return 2}var vd=C(()=>{"use strict";Ee()});function Gl(e,t,a){let n=Yn(e),r=Yn(t);return n===void 0?r===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var yg=C(()=>{"use strict";vd()});function wg(e,t,a,n){let r=sk(a),o=a.enter("emphasis"),l=a.createTracker(n),i=l.move(r),s=l.move(a.containerPhrasing(e,{after:r,before:i,...l.current()})),u=s.charCodeAt(0),c=Gl(n.before.charCodeAt(n.before.length-1),u,r);c.inside&&(s=qr(u)+s.slice(1));let d=s.charCodeAt(s.length-1),f=Gl(n.after.charCodeAt(0),d,r);f.inside&&(s=s.slice(0,-1)+qr(d));let p=l.move(r);return o(),a.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},i+s+p}function G3(e,t,a){return a.options.emphasis||"*"}var ck=C(()=>{"use strict";uk();xd();yg();wg.peek=G3});function Ao(e,t){let a=t||$3,n=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,r=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return fk(e,n,r)}function fk(e,t,a){if(W3(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return dk(e.children,t,a)}return Array.isArray(e)?dk(e,t,a):""}function dk(e,t,a){let n=[],r=-1;for(;++r<e.length;)n[r]=fk(e[r],t,a);return n.join("")}function W3(e){return!!(e&&typeof e=="object")}var $3,pk=C(()=>{"use strict";$3={}});var bd=C(()=>{"use strict";pk()});function mk(e,t){let a=!1;return Qn(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return a=!0,Io}),!!((!e.depth||e.depth<3)&&Ao(e)&&(t.options.setext||a))}var hk=C(()=>{"use strict";fd();bd()});function gk(e,t,a,n){let r=Math.max(Math.min(6,e.depth||1),1),o=a.createTracker(n);if(mk(e,a)){let c=a.enter("headingSetext"),d=a.enter("phrasing"),f=a.containerPhrasing(e,{...o.current(),before:`
|
|
18
18
|
`,after:`
|
|
19
19
|
`});return d(),c(),f+`
|
|
20
20
|
`+(r===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
21
21
|
`))+1))}let l="#".repeat(r),i=a.enter("headingAtx"),s=a.enter("phrasing");o.move(l+" ");let u=a.containerPhrasing(e,{before:"# ",after:`
|
|
22
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=qr(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,a.options.closeAtx&&(u+=" "+l),s(),i(),u}var VI=I(()=>{"use strict";md();HI()});function lg(e){return e.value||""}function jN(){return"<"}var GI=I(()=>{"use strict";lg.peek=jN});function ig(e,t,a,n){let r=Fl(a),o=r==='"'?"Quote":"Apostrophe",l=a.enter("image"),i=a.enter("label"),s=a.createTracker(n),u=s.move("![");return u+=s.move(a.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),i(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(i=a.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(a.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(i=a.enter("destinationRaw"),u+=s.move(a.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),i(),e.title&&(i=a.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(a.safe(e.title,{before:u,after:r,...s.current()})),u+=s.move(r),i()),u+=s.move(")"),l(),u}function VN(){return"!"}var $I=I(()=>{"use strict";pd();ig.peek=VN});function sg(e,t,a,n){let r=e.referenceType,o=a.enter("imageReference"),l=a.enter("label"),i=a.createTracker(n),s=i.move("!["),u=a.safe(e.alt,{before:s,after:"]",...i.current()});s+=i.move(u+"]["),l();let c=a.stack;a.stack=[],l=a.enter("reference");let d=a.safe(a.associationId(e),{before:s,after:"]",...i.current()});return l(),a.stack=c,o(),r==="full"||!u||u!==d?s+=i.move(d+"]"):r==="shortcut"?s=s.slice(0,-1):s+=i.move("]"),s}function GN(){return"!"}var WI=I(()=>{"use strict";sg.peek=GN});function ug(e,t,a){let n=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<a.unsafe.length;){let l=a.unsafe[o],i=a.compilePattern(l),s;if(l.atBreak)for(;s=i.exec(n);){let u=s.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(s.index+1)}}return r+n+r}function $N(){return"`"}var XI=I(()=>{"use strict";ug.peek=$N});function cg(e,t){let a=ko(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var ZI=I(()=>{"use strict";gd()});function dg(e,t,a,n){let r=Fl(a),o=r==='"'?"Quote":"Apostrophe",l=a.createTracker(n),i,s;if(cg(e,a)){let c=a.stack;a.stack=[],i=a.enter("autolink");let d=l.move("<");return d+=l.move(a.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),i(),a.stack=c,d}i=a.enter("link"),s=a.enter("label");let u=l.move("[");return u+=l.move(a.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=a.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(a.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=a.enter("destinationRaw"),u+=l.move(a.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=a.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(a.safe(e.title,{before:u,after:r,...l.current()})),u+=l.move(r),s()),u+=l.move(")"),i(),u}function WN(e,t,a){return cg(e,a)?"<":"["}var QI=I(()=>{"use strict";pd();ZI();dg.peek=WN});function fg(e,t,a,n){let r=e.referenceType,o=a.enter("linkReference"),l=a.enter("label"),i=a.createTracker(n),s=i.move("["),u=a.containerPhrasing(e,{before:s,after:"]",...i.current()});s+=i.move(u+"]["),l();let c=a.stack;a.stack=[],l=a.enter("reference");let d=a.safe(a.associationId(e),{before:s,after:"]",...i.current()});return l(),a.stack=c,o(),r==="full"||!u||u!==d?s+=i.move(d+"]"):r==="shortcut"?s=s.slice(0,-1):s+=i.move("]"),s}function XN(){return"["}var KI=I(()=>{"use strict";fg.peek=XN});function jl(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var yd=I(()=>{"use strict"});function YI(e){let t=jl(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}var JI=I(()=>{"use strict";yd()});function e1(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var t1=I(()=>{"use strict"});function wd(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var pg=I(()=>{"use strict"});function a1(e,t,a,n){let r=a.enter("list"),o=a.bulletCurrent,l=e.ordered?e1(a):jl(a),i=e.ordered?l==="."?")":".":YI(a),s=t&&a.bulletLastUsed?l===a.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&c&&(!c.children||!c.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(s=!0),wd(a)===l&&c){let d=-1;for(;++d<e.children.length;){let f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=i),a.bulletCurrent=l;let u=a.containerFlow(e,n);return a.bulletLastUsed=l,a.bulletCurrent=o,r(),u}var n1=I(()=>{"use strict";yd();JI();t1();pg()});function r1(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var o1=I(()=>{"use strict"});function l1(e,t,a,n){let r=r1(a),o=a.bulletCurrent||jl(a);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);let i=a.createTracker(n);i.move(o+" ".repeat(l-o.length)),i.shift(l);let s=a.enter("listItem"),u=a.indentLines(a.containerFlow(e,i.current()),c);return s(),u;function c(d,f,p){return f?(p?"":" ".repeat(l))+d:(p?o:o+" ".repeat(l-o.length))+d}}var i1=I(()=>{"use strict";yd();o1()});function s1(e,t,a,n){let r=a.enter("paragraph"),o=a.enter("phrasing"),l=a.containerPhrasing(e,n);return o(),r(),l}var u1=I(()=>{"use strict"});var mg,c1=I(()=>{"use strict";od();mg=Nr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var d1=I(()=>{"use strict";c1()});function f1(e,t,a,n){return(e.children.some(function(l){return mg(l)})?a.containerPhrasing:a.containerFlow).call(a,e,n)}var p1=I(()=>{"use strict";d1()});function m1(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var h1=I(()=>{"use strict"});function hg(e,t,a,n){let r=m1(a),o=a.enter("strong"),l=a.createTracker(n),i=l.move(r+r),s=l.move(a.containerPhrasing(e,{after:r,before:i,...l.current()})),u=s.charCodeAt(0),c=Hl(n.before.charCodeAt(n.before.length-1),u,r);c.inside&&(s=qr(u)+s.slice(1));let d=s.charCodeAt(s.length-1),f=Hl(n.after.charCodeAt(0),d,r);f.inside&&(s=s.slice(0,-1)+qr(d));let p=l.move(r+r);return o(),a.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},i+s+p}function ZN(e,t,a){return a.options.strong||"*"}var g1=I(()=>{"use strict";h1();md();rg();hg.peek=ZN});function y1(e,t,a,n){return a.safe(e.value,n)}var w1=I(()=>{"use strict"});function x1(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var v1=I(()=>{"use strict"});function b1(e,t,a){let n=(wd(a)+(a.options.ruleSpaces?" ":"")).repeat(x1(a));return a.options.ruleSpaces?n.slice(0,-1):n}var S1=I(()=>{"use strict";v1();pg()});var Es,C1=I(()=>{"use strict";vI();II();DI();OI();BI();VI();GI();$I();WI();XI();QI();KI();n1();i1();u1();p1();g1();w1();S1();Es={blockquote:xI,break:ng,code:RI,definition:_I,emphasis:og,hardBreak:ng,heading:jI,html:lg,image:ig,imageReference:sg,inlineCode:ug,link:dg,linkReference:fg,list:a1,listItem:l1,paragraph:s1,root:f1,strong:hg,text:y1,thematicBreak:b1}});function Vl(e){let t="&"+e+";";I1.innerHTML=t;let a=I1.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}var I1,xd=I(()=>{"use strict";I1=document.createElement("i")});function vd(e,t){let a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"\uFFFD":String.fromCodePoint(a)}var gg=I(()=>{"use strict"});function L1(e){return e.replace(QN,KN)}function KN(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){let r=a.charCodeAt(1),o=r===120||r===88;return vd(a.slice(o?2:1),o?16:10)}return Vl(a)||e}var QN,k1=I(()=>{"use strict";xd();gg();QN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var yg=I(()=>{"use strict";C1()});function xg(){return{enter:{table:YN,tableData:T1,tableHeader:T1,tableRow:e3},exit:{codeText:t3,table:JN,tableData:wg,tableHeader:wg,tableRow:wg}}}function YN(e){let t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function JN(e){this.exit(e),this.data.inTable=void 0}function e3(e){this.enter({type:"tableRow",children:[]},e)}function wg(e){this.exit(e)}function T1(e){this.enter({type:"tableCell",children:[]},e)}function t3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,a3));let a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function a3(e,t){return t==="|"?t:e}function vg(e){let t=e||{},a=t.tableCellPadding,n=t.tablePipeAlign,r=t.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
22
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=qr(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,a.options.closeAtx&&(u+=" "+l),s(),i(),u}var yk=C(()=>{"use strict";xd();hk()});function xg(e){return e.value||""}function X3(){return"<"}var wk=C(()=>{"use strict";xg.peek=X3});function vg(e,t,a,n){let r=Vl(a),o=r==='"'?"Quote":"Apostrophe",l=a.enter("image"),i=a.enter("label"),s=a.createTracker(n),u=s.move("![");return u+=s.move(a.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),i(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(i=a.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(a.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(i=a.enter("destinationRaw"),u+=s.move(a.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),i(),e.title&&(i=a.enter(`title${o}`),u+=s.move(" "+r),u+=s.move(a.safe(e.title,{before:u,after:r,...s.current()})),u+=s.move(r),i()),u+=s.move(")"),l(),u}function K3(){return"!"}var xk=C(()=>{"use strict";wd();vg.peek=K3});function bg(e,t,a,n){let r=e.referenceType,o=a.enter("imageReference"),l=a.enter("label"),i=a.createTracker(n),s=i.move("!["),u=a.safe(e.alt,{before:s,after:"]",...i.current()});s+=i.move(u+"]["),l();let c=a.stack;a.stack=[],l=a.enter("reference");let d=a.safe(a.associationId(e),{before:s,after:"]",...i.current()});return l(),a.stack=c,o(),r==="full"||!u||u!==d?s+=i.move(d+"]"):r==="shortcut"?s=s.slice(0,-1):s+=i.move("]"),s}function Z3(){return"!"}var vk=C(()=>{"use strict";bg.peek=Z3});function Sg(e,t,a){let n=e.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o<a.unsafe.length;){let l=a.unsafe[o],i=a.compilePattern(l),s;if(l.atBreak)for(;s=i.exec(n);){let u=s.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(s.index+1)}}return r+n+r}function Q3(){return"`"}var bk=C(()=>{"use strict";Sg.peek=Q3});function Ig(e,t){let a=Ao(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var Sk=C(()=>{"use strict";bd()});function Cg(e,t,a,n){let r=Vl(a),o=r==='"'?"Quote":"Apostrophe",l=a.createTracker(n),i,s;if(Ig(e,a)){let c=a.stack;a.stack=[],i=a.enter("autolink");let d=l.move("<");return d+=l.move(a.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),i(),a.stack=c,d}i=a.enter("link"),s=a.enter("label");let u=l.move("[");return u+=l.move(a.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=a.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(a.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=a.enter("destinationRaw"),u+=l.move(a.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=a.enter(`title${o}`),u+=l.move(" "+r),u+=l.move(a.safe(e.title,{before:u,after:r,...l.current()})),u+=l.move(r),s()),u+=l.move(")"),i(),u}function Y3(e,t,a){return Ig(e,a)?"<":"["}var Ik=C(()=>{"use strict";wd();Sk();Cg.peek=Y3});function kg(e,t,a,n){let r=e.referenceType,o=a.enter("linkReference"),l=a.enter("label"),i=a.createTracker(n),s=i.move("["),u=a.containerPhrasing(e,{before:s,after:"]",...i.current()});s+=i.move(u+"]["),l();let c=a.stack;a.stack=[],l=a.enter("reference");let d=a.safe(a.associationId(e),{before:s,after:"]",...i.current()});return l(),a.stack=c,o(),r==="full"||!u||u!==d?s+=i.move(d+"]"):r==="shortcut"?s=s.slice(0,-1):s+=i.move("]"),s}function J3(){return"["}var Ck=C(()=>{"use strict";kg.peek=J3});function $l(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var Sd=C(()=>{"use strict"});function kk(e){let t=$l(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}var Lk=C(()=>{"use strict";Sd()});function Tk(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var Ak=C(()=>{"use strict"});function Id(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var Lg=C(()=>{"use strict"});function Mk(e,t,a,n){let r=a.enter("list"),o=a.bulletCurrent,l=e.ordered?Tk(a):$l(a),i=e.ordered?l==="."?")":".":kk(a),s=t&&a.bulletLastUsed?l===a.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&c&&(!c.children||!c.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(s=!0),Id(a)===l&&c){let d=-1;for(;++d<e.children.length;){let f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=i),a.bulletCurrent=l;let u=a.containerFlow(e,n);return a.bulletLastUsed=l,a.bulletCurrent=o,r(),u}var Ek=C(()=>{"use strict";Sd();Lk();Ak();Lg()});function Rk(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var Dk=C(()=>{"use strict"});function _k(e,t,a,n){let r=Rk(a),o=a.bulletCurrent||$l(a);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);let i=a.createTracker(n);i.move(o+" ".repeat(l-o.length)),i.shift(l);let s=a.enter("listItem"),u=a.indentLines(a.containerFlow(e,i.current()),c);return s(),u;function c(d,f,p){return f?(p?"":" ".repeat(l))+d:(p?o:o+" ".repeat(l-o.length))+d}}var Ok=C(()=>{"use strict";Sd();Dk()});function Pk(e,t,a,n){let r=a.enter("paragraph"),o=a.enter("phrasing"),l=a.containerPhrasing(e,n);return o(),r(),l}var Nk=C(()=>{"use strict"});var Tg,Bk=C(()=>{"use strict";cd();Tg=Br(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var Uk=C(()=>{"use strict";Bk()});function Fk(e,t,a,n){return(e.children.some(function(l){return Tg(l)})?a.containerPhrasing:a.containerFlow).call(a,e,n)}var zk=C(()=>{"use strict";Uk()});function qk(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var Hk=C(()=>{"use strict"});function Ag(e,t,a,n){let r=qk(a),o=a.enter("strong"),l=a.createTracker(n),i=l.move(r+r),s=l.move(a.containerPhrasing(e,{after:r,before:i,...l.current()})),u=s.charCodeAt(0),c=Gl(n.before.charCodeAt(n.before.length-1),u,r);c.inside&&(s=qr(u)+s.slice(1));let d=s.charCodeAt(s.length-1),f=Gl(n.after.charCodeAt(0),d,r);f.inside&&(s=s.slice(0,-1)+qr(d));let p=l.move(r+r);return o(),a.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},i+s+p}function eB(e,t,a){return a.options.strong||"*"}var jk=C(()=>{"use strict";Hk();xd();yg();Ag.peek=eB});function Vk(e,t,a,n){return a.safe(e.value,n)}var Gk=C(()=>{"use strict"});function $k(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var Wk=C(()=>{"use strict"});function Xk(e,t,a){let n=(Id(a)+(a.options.ruleSpaces?" ":"")).repeat($k(a));return a.options.ruleSpaces?n.slice(0,-1):n}var Kk=C(()=>{"use strict";Wk();Lg()});var Os,Zk=C(()=>{"use strict";WC();QC();ok();ik();ck();yk();wk();xk();vk();bk();Ik();Ck();Ek();Ok();Nk();zk();jk();Gk();Kk();Os={blockquote:$C,break:gg,code:rk,definition:lk,emphasis:wg,hardBreak:gg,heading:gk,html:xg,image:vg,imageReference:bg,inlineCode:Sg,link:Cg,linkReference:kg,list:Mk,listItem:_k,paragraph:Pk,root:Fk,strong:Ag,text:Vk,thematicBreak:Xk}});function Wl(e){let t="&"+e+";";Qk.innerHTML=t;let a=Qk.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}var Qk,Cd=C(()=>{"use strict";Qk=document.createElement("i")});function kd(e,t){let a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"\uFFFD":String.fromCodePoint(a)}var Mg=C(()=>{"use strict"});function Yk(e){return e.replace(tB,aB)}function aB(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){let r=a.charCodeAt(1),o=r===120||r===88;return kd(a.slice(o?2:1),o?16:10)}return Wl(a)||e}var tB,Jk=C(()=>{"use strict";Cd();Mg();tB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});var Eg=C(()=>{"use strict";Zk()});function Dg(){return{enter:{table:nB,tableData:e1,tableHeader:e1,tableRow:oB},exit:{codeText:lB,table:rB,tableData:Rg,tableHeader:Rg,tableRow:Rg}}}function nB(e){let t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function rB(e){this.exit(e),this.data.inTable=void 0}function oB(e){this.enter({type:"tableRow",children:[]},e)}function Rg(e){this.exit(e)}function e1(e){this.enter({type:"tableCell",children:[]},e)}function lB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iB));let a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function iB(e,t){return t==="|"?t:e}function _g(e){let t=e||{},a=t.tableCellPadding,n=t.tablePipeAlign,r=t.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
23
23
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:l,tableCell:s,tableRow:i}};function l(p,m,x,b){return u(c(p,x,b),p.align)}function i(p,m,x,b){let y=d(p,x,b),w=u([y]);return w.slice(0,w.indexOf(`
|
|
24
|
-
`))}function s(p,m,x,b){let y=x.enter("tableCell"),w=x.enter("phrasing"),g=x.containerPhrasing(p,{...b,before:o,after:o});return w(),y(),g}function u(p,m){return yI(p,{align:m,alignDelimiters:n,padding:a,stringLength:r})}function c(p,m,x){let b=p.children,y=-1,w=[],g=m.enter("table");for(;++y<b.length;)w[y]=d(b[y],m,x);return g(),w}function d(p,m,x){let b=p.children,y=-1,w=[],g=m.enter("tableRow");for(;++y<b.length;)w[y]=s(b[y],p,m,x);return g(),w}function f(p,m,x){let b=Es.inlineCode(p,m,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}var A1=I(()=>{"use strict";wI();yg()});var M1=I(()=>{"use strict";A1()});function bg(){return{exit:{taskListCheckValueChecked:E1,taskListCheckValueUnchecked:E1,paragraph:n3}}}function Sg(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:r3}}}function E1(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function n3(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let a=this.stack[this.stack.length-1];a.type;let n=a.children[0];if(n&&n.type==="text"){let r=t.children,o=-1,l;for(;++o<r.length;){let i=r[o];if(i.type==="paragraph"){l=i;break}}l===a&&(n.value=n.value.slice(1),n.value.length===0?a.children.shift():a.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,a.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function r3(e,t,a,n){let r=e.children[0],o=typeof e.checked=="boolean"&&r&&r.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",i=a.createTracker(n);o&&i.move(l);let s=Es.listItem(e,t,a,{...n,...i.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(c){return c+l}}var R1=I(()=>{"use strict";yg()});var D1=I(()=>{"use strict";R1()});function Cg(){return[Kh(),Jh(),tg(),xg(),bg()]}function Ig(e){return{extensions:[Yh(),eg(e),ag(),vg(e),Sg()]}}var _1=I(()=>{"use strict";sI();fI();hI();M1();D1()});var O1=I(()=>{"use strict";_1()});function Ct(e,t,a,n){let r=e.length,o=0,l;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,a=a>0?a:0,n.length<1e4)l=Array.from(n),l.unshift(t,a),e.splice(...l);else for(a&&e.splice(t,a);o<n.length;)l=n.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function aa(e,t){return e.length>0?(Ct(e,e.length,0,t),e):t}var Yn=I(()=>{"use strict"});function bd(e){let t={},a=-1;for(;++a<e.length;)o3(t,e[a]);return t}function o3(e,t){let a;for(a in t){let r=(P1.call(e,a)?e[a]:void 0)||(e[a]={}),o=t[a],l;if(o)for(l in o){P1.call(r,l)||(r[l]=[]);let i=o[l];l3(r[l],Array.isArray(i)?i:i?[i]:[])}}}function l3(e,t){let a=-1,n=[];for(;++a<t.length;)(t[a].add==="after"?e:n).push(t[a]);Ct(e,0,0,n)}var P1,Lg=I(()=>{"use strict";Yn();P1={}.hasOwnProperty});function Tg(){return{text:xn}}function u3(e,t,a){let n=this,r,o;return l;function l(d){return!kg(d)||!j1.call(n,n.previous)||Ag(n.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(d))}function i(d){return kg(d)?(e.consume(d),i):d===64?(e.consume(d),s):a(d)}function s(d){return d===46?e.check(s3,c,u)(d):d===45||d===95||wt(d)?(o=!0,e.consume(d),s):c(d)}function u(d){return e.consume(d),r=!0,s}function c(d){return o&&r&&Ot(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):a(d)}}function c3(e,t,a){let n=this;return r;function r(l){return l!==87&&l!==119||!F1.call(n,n.previous)||Ag(n.events)?a(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(i3,e.attempt(N1,e.attempt(B1,o),a),a)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function d3(e,t,a){let n=this,r="",o=!1;return l;function l(d){return(d===72||d===104)&&H1.call(n,n.previous)&&!Ag(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),e.consume(d),i):a(d)}function i(d){if(Ot(d)&&r.length<5)return r+=String.fromCodePoint(d),e.consume(d),i;if(d===58){let f=r.toLowerCase();if(f==="http"||f==="https")return e.consume(d),s}return a(d)}function s(d){return d===47?(e.consume(d),o?u:(o=!0,s)):a(d)}function u(d){return d===null||Io(d)||he(d)||wn(d)||Lo(d)?a(d):e.attempt(N1,e.attempt(B1,c),a)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function f3(e,t,a){let n=0;return r;function r(l){return(l===87||l===119)&&n<3?(n++,e.consume(l),r):l===46&&n===3?(e.consume(l),o):a(l)}function o(l){return l===null?a(l):t(l)}}function p3(e,t,a){let n,r,o;return l;function l(u){return u===46||u===95?e.check(U1,s,i)(u):u===null||he(u)||wn(u)||u!==45&&Lo(u)?s(u):(o=!0,e.consume(u),l)}function i(u){return u===95?n=!0:(r=n,n=void 0),e.consume(u),l}function s(u){return r||n||!o?a(u):t(u)}}function m3(e,t){let a=0,n=0;return r;function r(l){return l===40?(a++,e.consume(l),r):l===41&&n<a?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(U1,t,o)(l):l===null||he(l)||wn(l)?t(l):(e.consume(l),r)}function o(l){return l===41&&n++,e.consume(l),r}}function h3(e,t,a){return n;function n(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===63||i===95||i===126?(e.consume(i),n):i===38?(e.consume(i),o):i===93?(e.consume(i),r):i===60||i===null||he(i)||wn(i)?t(i):a(i)}function r(i){return i===null||i===40||i===91||he(i)||wn(i)?t(i):n(i)}function o(i){return Ot(i)?l(i):a(i)}function l(i){return i===59?(e.consume(i),n):Ot(i)?(e.consume(i),l):a(i)}}function g3(e,t,a){return n;function n(o){return e.consume(o),r}function r(o){return wt(o)?a(o):t(o)}}function F1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function H1(e){return!Ot(e)}function j1(e){return!(e===47||kg(e))}function kg(e){return e===43||e===45||e===46||e===95||wt(e)}function Ag(e){let t=e.length,a=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){a=!0;break}if(n._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}var i3,N1,B1,U1,s3,z1,q1,Jn,xn,To,V1=I(()=>{"use strict";Me();i3={tokenize:f3,partial:!0},N1={tokenize:p3,partial:!0},B1={tokenize:m3,partial:!0},U1={tokenize:h3,partial:!0},s3={tokenize:g3,partial:!0},z1={name:"wwwAutolink",tokenize:c3,previous:F1},q1={name:"protocolAutolink",tokenize:d3,previous:H1},Jn={name:"emailAutolink",tokenize:u3,previous:j1},xn={};To=48;for(;To<123;)xn[To]=Jn,To++,To===58?To=65:To===91&&(To=97);xn[43]=Jn;xn[45]=Jn;xn[46]=Jn;xn[95]=Jn;xn[72]=[Jn,q1];xn[104]=[Jn,q1];xn[87]=[Jn,z1];xn[119]=[Jn,z1]});function Wa(e){let t=[],a=-1,n=0,r=0;for(;++a<e.length;){let o=e.charCodeAt(a),l="";if(o===37&&wt(e.charCodeAt(a+1))&&wt(e.charCodeAt(a+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){let i=e.charCodeAt(a+1);o<56320&&i>56319&&i<57344?(l=String.fromCharCode(o,i),r=1):l="\uFFFD"}else l=String.fromCharCode(o);l&&(t.push(e.slice(n,a),encodeURIComponent(l)),n=a+r+1,l=""),r&&(a+=r,r=0)}return t.join("")+e.slice(n)}var Ao=I(()=>{"use strict";Me()});var G1=I(()=>{"use strict";V1()});function Fr(e,t,a){let n=[],r=-1;for(;++r<e.length;){let o=e[r].resolveAll;o&&!n.includes(o)&&(t=o(t,a),n.push(o))}return t}var Rs=I(()=>{"use strict"});function y3(e,t){let a=-1,n,r,o,l,i,s,u,c;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(n=a;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[n][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[a][1].start};$1(d,-s),$1(f,s),l={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[a][1].start}},r={type:s>1?"strong":"emphasis",start:{...l.start},end:{...i.end}},e[n][1].end={...l.start},e[a][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=aa(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=aa(u,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=aa(u,Fr(t.parser.constructs.insideSpan.null,e.slice(n+1,a),t)),u=aa(u,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[a][1].end.offset-e[a][1].start.offset?(c=2,u=aa(u,[["enter",e[a][1],t],["exit",e[a][1],t]])):c=0,Ct(e,n-1,a-n+3,u),a=n+u.length-c-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function w3(e,t){let a=this.parser.constructs.attentionMarkers.null,n=this.previous,r=Kn(n),o;return l;function l(s){return o=s,e.enter("attentionSequence"),i(s)}function i(s){if(s===o)return e.consume(s),i;let u=e.exit("attentionSequence"),c=Kn(s),d=!c||c===2&&r||a.includes(s),f=!r||r===2&&c||a.includes(n);return u._open=!!(o===42?d:d&&(r||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(s)}}function $1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ds,W1=I(()=>{"use strict";Yn();hd();Rs();Ds={name:"attention",resolveAll:y3,tokenize:w3}});function x3(e,t,a){let n=0;return r;function r(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Ot(p)?(e.consume(p),l):p===64?a(p):u(p)}function l(p){return p===43||p===45||p===46||wt(p)?(n=1,i(p)):u(p)}function i(p){return p===58?(e.consume(p),n=0,s):(p===43||p===45||p===46||wt(p))&&n++<32?(e.consume(p),i):(n=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Io(p)?a(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),c):eI(p)?(e.consume(p),u):a(p)}function c(p){return wt(p)?d(p):a(p)}function d(p){return p===46?(e.consume(p),n=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||wt(p))&&n++<63){let m=p===45?f:d;return e.consume(p),m}return a(p)}}var Mg,X1=I(()=>{"use strict";Me();Mg={name:"autolink",tokenize:x3}});function Q(e,t,a,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return l;function l(s){return Y(s)?(e.enter(a),i(s)):t(s)}function i(s){return Y(s)&&o++<r?(e.consume(s),i):(e.exit(a),t(s))}}var It=I(()=>{"use strict";Me()});function v3(e,t,a){return n;function n(o){return Y(o)?Q(e,r,"linePrefix")(o):r(o)}function r(o){return o===null||G(o)?t(o):a(o)}}var vn,Sd=I(()=>{"use strict";It();Me();vn={partial:!0,tokenize:v3}});function b3(e,t,a){let n=this;return r;function r(l){if(l===62){let i=n.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return a(l)}function o(l){return Y(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function S3(e,t,a){let n=this;return r;function r(l){return Y(l)?Q(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Cd,t,a)(l)}}function C3(e){e.exit("blockQuote")}var Cd,Z1=I(()=>{"use strict";It();Me();Cd={continuation:{tokenize:S3},exit:C3,name:"blockQuote",tokenize:b3}});function I3(e,t,a){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r}function r(o){return aI(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(o)}}var Id,Q1=I(()=>{"use strict";Me();Id={name:"characterEscape",tokenize:I3}});function L3(e,t,a){let n=this,r=0,o,l;return i;function i(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),s}function s(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=wt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=tI,c):(e.enter("characterReferenceValue"),o=7,l=Ms,c(d))}function c(d){if(d===59&&r){let f=e.exit("characterReferenceValue");return l===wt&&!Vl(n.sliceSerialize(f))?a(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&r++<o?(e.consume(d),c):a(d)}}var Ld,K1=I(()=>{"use strict";xd();Me();Ld={name:"characterReference",tokenize:L3}});function k3(e,t,a){let n=this,r={partial:!0,tokenize:M},o=0,l=0,i;return s;function s(C){return u(C)}function u(C){let A=n.events[n.events.length-1];return o=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,i=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(C)}function c(C){return C===i?(l++,e.consume(C),c):l<3?a(C):(e.exit("codeFencedFenceSequence"),Y(C)?Q(e,d,"whitespace")(C):d(C))}function d(C){return C===null||G(C)?(e.exit("codeFencedFence"),n.interrupt?t(C):e.check(Y1,x,v)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||G(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):Y(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(C)):C===96&&C===i?a(C):(e.consume(C),f)}function p(C){return C===null||G(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||G(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===i?a(C):(e.consume(C),m)}function x(C){return e.attempt(r,v,b)(C)}function b(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&Y(C)?Q(e,w,"linePrefix",o+1)(C):w(C)}function w(C){return C===null||G(C)?e.check(Y1,x,v)(C):(e.enter("codeFlowValue"),g(C))}function g(C){return C===null||G(C)?(e.exit("codeFlowValue"),w(C)):(e.consume(C),g)}function v(C){return e.exit("codeFenced"),t(C)}function M(C,A,E){let _=0;return k;function k(F){return C.enter("lineEnding"),C.consume(F),C.exit("lineEnding"),W}function W(F){return C.enter("codeFencedFence"),Y(F)?Q(C,U,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):U(F)}function U(F){return F===i?(C.enter("codeFencedFenceSequence"),R(F)):E(F)}function R(F){return F===i?(_++,C.consume(F),R):_>=l?(C.exit("codeFencedFenceSequence"),Y(F)?Q(C,B,"whitespace")(F):B(F)):E(F)}function B(F){return F===null||G(F)?(C.exit("codeFencedFence"),A(F)):E(F)}}}function T3(e,t,a){let n=this;return r;function r(l){return l===null?a(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return n.parser.lazy[n.now().line]?a(l):t(l)}}var Y1,kd,J1=I(()=>{"use strict";It();Me();Y1={partial:!0,tokenize:T3},kd={concrete:!0,name:"codeFenced",tokenize:k3}});function M3(e,t,a){let n=this;return r;function r(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):a(u)}function l(u){return u===null?s(u):G(u)?e.attempt(A3,l,s)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||G(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),i)}function s(u){return e.exit("codeIndented"),t(u)}}function E3(e,t,a){let n=this;return r;function r(l){return n.parser.lazy[n.now().line]?a(l):G(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r):Q(e,o,"linePrefix",5)(l)}function o(l){let i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):G(l)?r(l):a(l)}}var _s,A3,eL=I(()=>{"use strict";It();Me();_s={name:"codeIndented",tokenize:M3},A3={partial:!0,tokenize:E3}});function R3(e){let t=e.length-4,a=3,n,r;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=a;++n<t;)if(e[n][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(n=a-1,t++;++n<=t;)r===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(r=n):(n===t||e[n][1].type==="lineEnding")&&(e[r][1].type="codeTextData",n!==r+2&&(e[r][1].end=e[n-1][1].end,e.splice(r+2,n-r-2),t-=n-r-2,n=r+2),r=void 0);return e}function D3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _3(e,t,a){let n=this,r=0,o,l;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?a(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(l=e.enter("codeTextSequence"),o=0,d(f)):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||G(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",c(f))}}var Eg,tL=I(()=>{"use strict";Me();Eg={name:"codeText",previous:D3,resolve:R3,tokenize:_3}});function Os(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}var Td,aL=I(()=>{"use strict";Td=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){let n=a??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,a,n){let r=a||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Os(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Os(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Os(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let a=this.left.splice(t,Number.POSITIVE_INFINITY);Os(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Os(this.left,a.reverse())}}}});function Ad(e){let t={},a=-1,n,r,o,l,i,s,u,c=new Td(e);for(;++a<c.length;){for(;a in t;)a=t[a];if(n=c.get(a),a&&n[1].type==="chunkFlow"&&c.get(a-1)[1].type==="listItemPrefix"&&(s=n[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,O3(c,a)),a=t[a],u=!0);else if(n[1]._container){for(o=a,r=void 0;o--;)if(l=c.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),l[1].type="lineEnding",r=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,a),i.unshift(n),c.splice(r,a-r+1,i))}}return Ct(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function O3(e,t){let a=e.get(t)[1],n=e.get(t)[2],r=t-1,o=[],l=a._tokenizer;l||(l=n.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let i=l.events,s=[],u={},c,d,f=-1,p=a,m=0,x=0,b=[x];for(;p;){for(;e.get(++r)[1]!==p;);o.push(r),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),d&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=a;++f<i.length;)i[f][0]==="exit"&&i[f-1][0]==="enter"&&i[f][1].type===i[f-1][1].type&&i[f][1].start.line!==i[f][1].end.line&&(x=f+1,b.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),f=b.length;f--;){let y=i.slice(b[f],b[f+1]),w=o.pop();s.push([w,w+y.length-1]),e.splice(w,2,y)}for(s.reverse(),f=-1;++f<s.length;)u[m+s[f][0]]=m+s[f][1],m+=s[f][1]-s[f][0]-1;return u}var Rg=I(()=>{"use strict";Yn();aL()});function N3(e){return Ad(e),e}function B3(e,t){let a;return n;function n(i){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),r(i)}function r(i){return i===null?o(i):G(i)?e.check(P3,l,o)(i):(e.consume(i),r)}function o(i){return e.exit("chunkContent"),e.exit("content"),t(i)}function l(i){return e.consume(i),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,r}}function U3(e,t,a){let n=this;return r;function r(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||G(l))return a(l);let i=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):e.interrupt(n.parser.constructs.flow,a,t)(l)}}var Dg,P3,nL=I(()=>{"use strict";It();Me();Rg();Dg={resolve:N3,tokenize:B3},P3={partial:!0,tokenize:U3}});function Md(e,t,a,n,r,o,l,i,s){let u=s||Number.POSITIVE_INFINITY,c=0;return d;function d(y){return y===60?(e.enter(n),e.enter(r),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||Io(y)?a(y):(e.enter(n),e.enter(l),e.enter(i),e.enter("chunkString",{contentType:"string"}),x(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),e.exit(n),t):(e.enter(i),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(i),f(y)):y===null||y===60||G(y)?a(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function x(y){return!c&&(y===null||y===41||he(y))?(e.exit("chunkString"),e.exit(i),e.exit(l),e.exit(n),t(y)):c<u&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||Io(y)?a(y):(e.consume(y),y===92?b:x)}function b(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}var _g=I(()=>{"use strict";Me()});function Ed(e,t,a,n,r,o){let l=this,i=0,s;return u;function u(p){return e.enter(n),e.enter(r),e.consume(p),e.exit(r),e.enter(o),c}function c(p){return i>999||p===null||p===91||p===93&&!s||p===94&&!i&&"_hiddenFootnoteSupport"in l.parser.constructs?a(p):p===93?(e.exit(o),e.enter(r),e.consume(p),e.exit(r),e.exit(n),t):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||G(p)||i++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!Y(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),i++,d):d(p)}}var Og=I(()=>{"use strict";Me()});function Rd(e,t,a,n,r,o){let l;return i;function i(f){return f===34||f===39||f===40?(e.enter(n),e.enter(r),e.consume(f),e.exit(r),l=f===40?41:f,s):a(f)}function s(f){return f===l?(e.enter(r),e.consume(f),e.exit(r),e.exit(n),t):(e.enter(o),u(f))}function u(f){return f===l?(e.exit(o),s(l)):f===null?a(f):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===l||f===null||G(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===l||f===92?(e.consume(f),c):c(f)}}var Pg=I(()=>{"use strict";It();Me()});function Mo(e,t){let a;return n;function n(r){return G(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a=!0,n):Y(r)?Q(e,n,a?"linePrefix":"lineSuffix")(r):t(r)}}var Ng=I(()=>{"use strict";It();Me()});function q3(e,t,a){let n=this,r;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Ed.call(n,e,i,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function i(p){return r=Zt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):a(p)}function s(p){return he(p)?Mo(e,u)(p):u(p)}function u(p){return Md(e,c,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(z3,d,d)(p)}function d(p){return Y(p)?Q(e,f,"whitespace")(p):f(p)}function f(p){return p===null||G(p)?(e.exit("definition"),n.parser.defined.push(r),t(p)):a(p)}}function F3(e,t,a){return n;function n(i){return he(i)?Mo(e,r)(i):a(i)}function r(i){return Rd(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return Y(i)?Q(e,l,"whitespace")(i):l(i)}function l(i){return i===null||G(i)?t(i):a(i)}}var Bg,z3,rL=I(()=>{"use strict";_g();Og();It();Pg();Ng();Me();ql();Bg={name:"definition",tokenize:q3},z3={partial:!0,tokenize:F3}});function H3(e,t,a){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),r}function r(o){return G(o)?(e.exit("hardBreakEscape"),t(o)):a(o)}}var Ug,oL=I(()=>{"use strict";Me();Ug={name:"hardBreakEscape",tokenize:H3}});function j3(e,t){let a=e.length-2,n=3,r,o;return e[n][1].type==="whitespace"&&(n+=2),a-2>n&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(n===a-1||a-4>n&&e[a-2][1].type==="whitespace")&&(a-=n+1===a?2:4),a>n&&(r={type:"atxHeadingText",start:e[n][1].start,end:e[a][1].end},o={type:"chunkText",start:e[n][1].start,end:e[a][1].end,contentType:"text"},Ct(e,n,a-n+1,[["enter",r,t],["enter",o,t],["exit",o,t],["exit",r,t]])),e}function V3(e,t,a){let n=0;return r;function r(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&n++<6?(e.consume(c),l):c===null||he(c)?(e.exit("atxHeadingSequence"),i(c)):a(c)}function i(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||G(c)?(e.exit("atxHeading"),t(c)):Y(c)?Q(e,i,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),i(c))}function u(c){return c===null||c===35||he(c)?(e.exit("atxHeadingText"),i(c)):(e.consume(c),u)}}var zg,lL=I(()=>{"use strict";It();Me();Yn();zg={name:"headingAtx",resolve:j3,tokenize:V3}});var iL,qg,sL=I(()=>{"use strict";iL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qg=["pre","script","style","textarea"]});function W3(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function X3(e,t,a){let n=this,r,o,l,i,s;return u;function u(L){return c(L)}function c(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),o=!0,x):L===63?(e.consume(L),r=3,n.interrupt?t:S):Ot(L)?(e.consume(L),l=String.fromCharCode(L),b):a(L)}function f(L){return L===45?(e.consume(L),r=2,p):L===91?(e.consume(L),r=5,i=0,m):Ot(L)?(e.consume(L),r=4,n.interrupt?t:S):a(L)}function p(L){return L===45?(e.consume(L),n.interrupt?t:S):a(L)}function m(L){let Re="CDATA[";return L===Re.charCodeAt(i++)?(e.consume(L),i===Re.length?n.interrupt?t:U:m):a(L)}function x(L){return Ot(L)?(e.consume(L),l=String.fromCharCode(L),b):a(L)}function b(L){if(L===null||L===47||L===62||he(L)){let Re=L===47,le=l.toLowerCase();return!Re&&!o&&qg.includes(le)?(r=1,n.interrupt?t(L):U(L)):iL.includes(l.toLowerCase())?(r=6,Re?(e.consume(L),y):n.interrupt?t(L):U(L)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?a(L):o?w(L):g(L))}return L===45||wt(L)?(e.consume(L),l+=String.fromCharCode(L),b):a(L)}function y(L){return L===62?(e.consume(L),n.interrupt?t:U):a(L)}function w(L){return Y(L)?(e.consume(L),w):k(L)}function g(L){return L===47?(e.consume(L),k):L===58||L===95||Ot(L)?(e.consume(L),v):Y(L)?(e.consume(L),g):k(L)}function v(L){return L===45||L===46||L===58||L===95||wt(L)?(e.consume(L),v):M(L)}function M(L){return L===61?(e.consume(L),C):Y(L)?(e.consume(L),M):g(L)}function C(L){return L===null||L===60||L===61||L===62||L===96?a(L):L===34||L===39?(e.consume(L),s=L,A):Y(L)?(e.consume(L),C):E(L)}function A(L){return L===s?(e.consume(L),s=null,_):L===null||G(L)?a(L):(e.consume(L),A)}function E(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||he(L)?M(L):(e.consume(L),E)}function _(L){return L===47||L===62||Y(L)?g(L):a(L)}function k(L){return L===62?(e.consume(L),W):a(L)}function W(L){return L===null||G(L)?U(L):Y(L)?(e.consume(L),W):a(L)}function U(L){return L===45&&r===2?(e.consume(L),j):L===60&&r===1?(e.consume(L),K):L===62&&r===4?(e.consume(L),Be):L===63&&r===3?(e.consume(L),S):L===93&&r===5?(e.consume(L),He):G(L)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(G3,rt,R)(L)):L===null||G(L)?(e.exit("htmlFlowData"),R(L)):(e.consume(L),U)}function R(L){return e.check($3,B,rt)(L)}function B(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),F}function F(L){return L===null||G(L)?R(L):(e.enter("htmlFlowData"),U(L))}function j(L){return L===45?(e.consume(L),S):U(L)}function K(L){return L===47?(e.consume(L),l="",de):U(L)}function de(L){if(L===62){let Re=l.toLowerCase();return qg.includes(Re)?(e.consume(L),Be):U(L)}return Ot(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),de):U(L)}function He(L){return L===93?(e.consume(L),S):U(L)}function S(L){return L===62?(e.consume(L),Be):L===45&&r===2?(e.consume(L),S):U(L)}function Be(L){return L===null||G(L)?(e.exit("htmlFlowData"),rt(L)):(e.consume(L),Be)}function rt(L){return e.exit("htmlFlow"),t(L)}}function Z3(e,t,a){let n=this;return r;function r(l){return G(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):a(l)}function o(l){return n.parser.lazy[n.now().line]?a(l):t(l)}}function Q3(e,t,a){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(vn,t,a)}}var Fg,G3,$3,uL=I(()=>{"use strict";Me();sL();Sd();Fg={concrete:!0,name:"htmlFlow",resolveTo:W3,tokenize:X3},G3={partial:!0,tokenize:Q3},$3={partial:!0,tokenize:Z3}});function K3(e,t,a){let n=this,r,o,l;return i;function i(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),s}function s(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),M):S===63?(e.consume(S),g):Ot(S)?(e.consume(S),E):a(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),o=0,m):Ot(S)?(e.consume(S),w):a(S)}function c(S){return S===45?(e.consume(S),p):a(S)}function d(S){return S===null?a(S):S===45?(e.consume(S),f):G(S)?(l=d,K(S)):(e.consume(S),d)}function f(S){return S===45?(e.consume(S),p):d(S)}function p(S){return S===62?j(S):S===45?f(S):d(S)}function m(S){let Be="CDATA[";return S===Be.charCodeAt(o++)?(e.consume(S),o===Be.length?x:m):a(S)}function x(S){return S===null?a(S):S===93?(e.consume(S),b):G(S)?(l=x,K(S)):(e.consume(S),x)}function b(S){return S===93?(e.consume(S),y):x(S)}function y(S){return S===62?j(S):S===93?(e.consume(S),y):x(S)}function w(S){return S===null||S===62?j(S):G(S)?(l=w,K(S)):(e.consume(S),w)}function g(S){return S===null?a(S):S===63?(e.consume(S),v):G(S)?(l=g,K(S)):(e.consume(S),g)}function v(S){return S===62?j(S):g(S)}function M(S){return Ot(S)?(e.consume(S),C):a(S)}function C(S){return S===45||wt(S)?(e.consume(S),C):A(S)}function A(S){return G(S)?(l=A,K(S)):Y(S)?(e.consume(S),A):j(S)}function E(S){return S===45||wt(S)?(e.consume(S),E):S===47||S===62||he(S)?_(S):a(S)}function _(S){return S===47?(e.consume(S),j):S===58||S===95||Ot(S)?(e.consume(S),k):G(S)?(l=_,K(S)):Y(S)?(e.consume(S),_):j(S)}function k(S){return S===45||S===46||S===58||S===95||wt(S)?(e.consume(S),k):W(S)}function W(S){return S===61?(e.consume(S),U):G(S)?(l=W,K(S)):Y(S)?(e.consume(S),W):_(S)}function U(S){return S===null||S===60||S===61||S===62||S===96?a(S):S===34||S===39?(e.consume(S),r=S,R):G(S)?(l=U,K(S)):Y(S)?(e.consume(S),U):(e.consume(S),B)}function R(S){return S===r?(e.consume(S),r=void 0,F):S===null?a(S):G(S)?(l=R,K(S)):(e.consume(S),R)}function B(S){return S===null||S===34||S===39||S===60||S===61||S===96?a(S):S===47||S===62||he(S)?_(S):(e.consume(S),B)}function F(S){return S===47||S===62||he(S)?_(S):a(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):a(S)}function K(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),de}function de(S){return Y(S)?Q(e,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):He(S)}function He(S){return e.enter("htmlTextData"),l(S)}}var Hg,cL=I(()=>{"use strict";It();Me();Hg={name:"htmlText",tokenize:K3}});function tB(e){let t=-1,a=[];for(;++t<e.length;){let n=e[t][1];if(a.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let r=n.type==="labelImage"?4:2;n.type="data",t+=r}}return e.length!==a.length&&Ct(e,0,e.length,a),e}function aB(e,t){let a=e.length,n=0,r,o,l,i;for(;a--;)if(r=e[a][1],o){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[a][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(l){if(e[a][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(o=a,r.type!=="labelLink")){n=2;break}}else r.type==="labelEnd"&&(l=a);let s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[l-2][1].start}};return i=[["enter",s,t],["enter",u,t]],i=aa(i,e.slice(o+1,o+n+3)),i=aa(i,[["enter",c,t]]),i=aa(i,Fr(t.parser.constructs.insideSpan.null,e.slice(o+n+4,l-3),t)),i=aa(i,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),i=aa(i,e.slice(l+1)),i=aa(i,[["exit",s,t]]),Ct(e,o,e.length,i),e}function nB(e,t,a){let n=this,r=n.events.length,o,l;for(;r--;)if((n.events[r][1].type==="labelImage"||n.events[r][1].type==="labelLink")&&!n.events[r][1]._balanced){o=n.events[r][1];break}return i;function i(f){return o?o._inactive?d(f):(l=n.parser.defined.includes(Zt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),s):a(f)}function s(f){return f===40?e.attempt(Y3,c,l?c:d)(f):f===91?e.attempt(J3,c,l?u:d)(f):l?c(f):d(f)}function u(f){return e.attempt(eB,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,a(f)}}function rB(e,t,a){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),r}function r(d){return he(d)?Mo(e,o)(d):o(d)}function o(d){return d===41?c(d):Md(e,l,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return he(d)?Mo(e,s)(d):c(d)}function i(d){return a(d)}function s(d){return d===34||d===39||d===40?Rd(e,u,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return he(d)?Mo(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):a(d)}}function oB(e,t,a){let n=this;return r;function r(i){return Ed.call(n,e,o,l,"reference","referenceMarker","referenceString")(i)}function o(i){return n.parser.defined.includes(Zt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(i):a(i)}function l(i){return a(i)}}function lB(e,t,a){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r}function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):a(o)}}var Eo,Y3,J3,eB,Dd=I(()=>{"use strict";_g();Og();Pg();Ng();Me();Yn();ql();Rs();Eo={name:"labelEnd",resolveAll:tB,resolveTo:aB,tokenize:nB},Y3={tokenize:rB},J3={tokenize:oB},eB={tokenize:lB}});function iB(e,t,a){let n=this;return r;function r(i){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(i),e.exit("labelImageMarker"),o}function o(i){return i===91?(e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelImage"),l):a(i)}function l(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(i):t(i)}}var jg,dL=I(()=>{"use strict";Dd();jg={name:"labelStartImage",resolveAll:Eo.resolveAll,tokenize:iB}});function sB(e,t,a){let n=this;return r;function r(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(l):t(l)}}var Vg,fL=I(()=>{"use strict";Dd();Vg={name:"labelStartLink",resolveAll:Eo.resolveAll,tokenize:sB}});function uB(e,t){return a;function a(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Q(e,t,"linePrefix")}}var Ps,pL=I(()=>{"use strict";It();Ps={name:"lineEnding",tokenize:uB}});function cB(e,t,a){let n=0,r;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return r=u,i(u)}function i(u){return u===r?(e.enter("thematicBreakSequence"),s(u)):n>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):a(u)}function s(u){return u===r?(e.consume(u),n++,s):(e.exit("thematicBreakSequence"),Y(u)?Q(e,i,"whitespace")(u):i(u))}}var Ro,Gg=I(()=>{"use strict";It();Me();Ro={name:"thematicBreak",tokenize:cB}});function pB(e,t,a){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,l=0;return i;function i(p){let m=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Ms(p)){if(n.containerState.type||(n.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ro,a,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return a(p)}function s(p){return Ms(p)&&++l<10?(e.consume(p),s):(!n.interrupt||l<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):a(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(vn,n.interrupt?a:c,e.attempt(dB,f,d))}function c(p){return n.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return Y(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):a(p)}function f(p){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function mB(e,t,a){let n=this;return n.containerState._closeFlow=void 0,e.check(vn,r,o);function r(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Q(e,t,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!Y(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,l(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(fB,t,l)(i))}function l(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Q(e,e.attempt(Qt,t,a),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function hB(e,t,a){let n=this;return Q(e,r,"listItemIndent",n.containerState.size+1);function r(o){let l=n.events[n.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===n.containerState.size?t(o):a(o)}}function gB(e){e.exit(this.containerState.type)}function yB(e,t,a){let n=this;return Q(e,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){let l=n.events[n.events.length-1];return!Y(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):a(o)}}var Qt,dB,fB,mL=I(()=>{"use strict";It();Me();Sd();Gg();Qt={continuation:{tokenize:mB},exit:gB,name:"list",tokenize:pB},dB={partial:!0,tokenize:yB},fB={partial:!0,tokenize:hB}});function wB(e,t){let a=e.length,n,r,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){n=a;break}e[a][1].type==="paragraph"&&(r=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);let l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e}function xB(e,t,a){let n=this,r;return o;function o(u){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){d=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),r=u,l(u)):a(u)}function l(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===r?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),Y(u)?Q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):a(u)}}var _d,hL=I(()=>{"use strict";It();Me();_d={name:"setextUnderline",resolveTo:wB,tokenize:xB}});var Od=I(()=>{"use strict";W1();X1();Sd();Z1();Q1();K1();J1();eL();tL();nL();rL();oL();lL();uL();cL();Dd();dL();fL();pL();mL();hL();Gg()});function $g(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IB,continuation:{tokenize:LB},exit:kB}},text:{91:{name:"gfmFootnoteCall",tokenize:CB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:bB,resolveTo:SB}}}}function bB(e,t,a){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),l;for(;r--;){let s=n.events[r][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return i;function i(s){if(!l||!l._balanced)return a(s);let u=Zt(n.sliceSerialize({start:l.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?a(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function SB(e,t){let a=e.length,n;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){n=e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[a+1],e[a+2],["enter",r,t],e[a+3],e[a+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",i,t],["exit",i,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(a,e.length-a+1,...s),e}function CB(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,l;return i;function i(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),s}function s(d){return d!==94?a(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!l||d===null||d===91||he(d))return a(d);if(d===93){e.exit("chunkString");let f=e.exit("gfmFootnoteCallString");return r.includes(Zt(n.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(d)}return he(d)||(l=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function IB(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,l=0,i;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):a(m)}function c(m){if(l>999||m===93&&!i||m===null||m===91||he(m))return a(m);if(m===93){e.exit("chunkString");let x=e.exit("gfmFootnoteDefinitionLabelString");return o=Zt(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return he(m)||(i=!0),l++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),l++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),r.includes(o)||r.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):a(m)}function p(m){return t(m)}}function LB(e,t,a){return e.check(vn,t,e.attempt(vB,t,a))}function kB(e){e.exit("gfmFootnoteDefinition")}function TB(e,t,a){let n=this;return Q(e,r,"gfmFootnoteDefinitionIndent",5);function r(o){let l=n.events[n.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):a(o)}}var vB,gL=I(()=>{"use strict";Od();It();Me();ql();vB={tokenize:TB,partial:!0}});var yL=I(()=>{"use strict";gL()});function Wg(e){let a=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:r};return a==null&&(a=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(l,i){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},d={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},f=[["enter",c,i],["enter",l[u][1],i],["exit",l[u][1],i],["enter",d,i]],p=i.parser.constructs.insideSpan.null;p&&Ct(f,f.length,0,Fr(p,l.slice(u+1,s),i)),Ct(f,f.length,0,[["exit",d,i],["enter",l[s][1],i],["exit",l[s][1],i],["exit",c,i]]),Ct(l,u-1,s-u+3,f),s=u+f.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,i,s){let u=this.previous,c=this.events,d=0;return f;function f(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?s(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){let x=Kn(u);if(m===126)return d>1?s(m):(l.consume(m),d++,p);if(d<2&&!a)return s(m);let b=l.exit("strikethroughSequenceTemporary"),y=Kn(m);return b._open=!y||y===2&&!!x,b._close=!x||x===2&&!!y,i(m)}}}var wL=I(()=>{"use strict";Yn();hd();Rs()});var xL=I(()=>{"use strict";wL()});function AB(e,t,a,n){let r=0;if(!(a===0&&n.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=a,e.map[r][2].push(...n);return}r+=1}e.map.push([t,a,n])}}var Pd,vL=I(()=>{"use strict";Pd=class{constructor(){this.map=[]}add(t,a,n){AB(this,t,a,n)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let a=this.map.length,n=[];for(;a>0;)a-=1,n.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];n.push(t.slice()),t.length=0;let r=n.pop();for(;r;){for(let o of r)t.push(o);r=n.pop()}this.map.length=0}}});function bL(e,t){let a=!1,n=[];for(;t<e.length;){let r=e[t];if(a){if(r[0]==="enter")r[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return n}var SL=I(()=>{"use strict"});function Xg(){return{flow:{null:{name:"table",tokenize:MB,resolveAll:EB}}}}function MB(e,t,a){let n=this,r=0,o=0,l;return i;function i(k){let W=n.events.length-1;for(;W>-1;){let B=n.events[W][1].type;if(B==="lineEnding"||B==="linePrefix")W--;else break}let U=W>-1?n.events[W][1].type:null,R=U==="tableHead"||U==="tableRow"?C:s;return R===C&&n.parser.lazy[n.now().line]?a(k):R(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),c(k)}function c(k){return k===null?a(k):G(k)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):a(k):Y(k)?Q(e,c,"whitespace")(k):(o+=1,l&&(l=!1,r+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||he(k)?(e.exit("data"),c(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return n.interrupt=!1,n.parser.lazy[n.now().line]?a(k):(e.enter("tableDelimiterRow"),l=!1,Y(k)?Q(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?b(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),x):M(k)}function x(k){return Y(k)?Q(e,b,"whitespace")(k):b(k)}function b(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(o+=1,y(k)):k===null||G(k)?v(k):M(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),w(k)):M(k)}function w(k){return k===45?(e.consume(k),w):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(k))}function g(k){return Y(k)?Q(e,v,"whitespace")(k):v(k)}function v(k){return k===124?m(k):k===null||G(k)?!l||r!==o?M(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):M(k)}function M(k){return a(k)}function C(k){return e.enter("tableRow"),A(k)}function A(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),A):k===null||G(k)?(e.exit("tableRow"),t(k)):Y(k)?Q(e,A,"whitespace")(k):(e.enter("data"),E(k))}function E(k){return k===null||k===124||he(k)?(e.exit("data"),A(k)):(e.consume(k),k===92?_:E)}function _(k){return k===92||k===124?(e.consume(k),E):E(k)}}function EB(e,t){let a=-1,n=!0,r=0,o=[0,0,0,0],l=[0,0,0,0],i=!1,s=0,u,c,d,f=new Pd;for(;++a<e.length;){let p=e[a],m=p[1];p[0]==="enter"?m.type==="tableHead"?(i=!1,s!==0&&(CL(f,t,s,u,c),c=void 0,s=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(a,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,d=void 0,o=[0,0,0,0],l=[0,a+1,0,0],i&&(i=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(a,0,[["enter",c,t]])),r=m.type==="tableDelimiterRow"?2:c?3:1):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],d=Nd(f,t,o,r,void 0,d),o=[0,0,0,0]),l[2]=a)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(l[0]=l[1],d=Nd(f,t,o,r,void 0,d)),o=l,l=[o[1],a,0,0])):m.type==="tableHead"?(i=!0,s=a):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=a,o[1]!==0?(l[0]=l[1],d=Nd(f,t,o,r,a,d)):l[1]!==0&&(d=Nd(f,t,l,r,a,d)),r=0):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=a)}for(s!==0&&CL(f,t,s,u,c),f.consume(t.events),a=-1;++a<t.events.length;){let p=t.events[a];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=bL(t.events,a))}return e}function Nd(e,t,a,n,r,o){let l=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",i="tableContent";a[0]!==0&&(o.end=Object.assign({},Gl(t.events,a[0])),e.add(a[0],0,[["exit",o,t]]));let s=Gl(t.events,a[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(a[1],0,[["enter",o,t]]),a[2]!==0){let u=Gl(t.events,a[2]),c=Gl(t.events,a[3]),d={type:i,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(a[2],0,[["enter",d,t]]),n!==2){let f=t.events[a[2]],p=t.events[a[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",a[3]>a[2]+1){let m=a[2]+1,x=a[3]-a[2]-1;e.add(m,x,[])}}e.add(a[3]+1,0,[["exit",d,t]])}return r!==void 0&&(o.end=Object.assign({},Gl(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function CL(e,t,a,n,r){let o=[],l=Gl(t.events,a);r&&(r.end=Object.assign({},l),o.push(["exit",r,t])),n.end=Object.assign({},l),o.push(["exit",n,t]),e.add(a+1,0,o)}function Gl(e,t){let a=e[t],n=a[0]==="enter"?"start":"end";return a[1][n]}var IL=I(()=>{"use strict";It();Me();vL();SL()});var LL=I(()=>{"use strict";IL()});function Zg(){return{text:{91:RB}}}function DB(e,t,a){let n=this;return r;function r(s){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?a(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return he(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):a(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):a(s)}function i(s){return G(s)?t(s):Y(s)?e.check({tokenize:_B},t,a)(s):a(s)}}function _B(e,t,a){return Q(e,n,"whitespace");function n(r){return r===null?a(r):t(r)}}var RB,kL=I(()=>{"use strict";It();Me();RB={name:"tasklistCheck",tokenize:DB}});var TL=I(()=>{"use strict";kL()});function AL(e){return bd([Tg(),$g(),Wg(e),Xg(),Zg()])}var ML=I(()=>{"use strict";Lg();G1();yL();xL();LL();TL()});function Bd(e){let t=this,a=e||OB,n=t.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),l=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(AL(a)),o.push(Cg()),l.push(Ig(a))}var OB,EL=I(()=>{"use strict";O1();ML();OB={}});var RL=I(()=>{"use strict";EL()});var PB,NB,BB,DL,UB,zB,_L,NL,BL,qB,FB,HB,jB,VB,GB,$B,Do,UL,WB,XB,ZB,QB,KB,YB,OL,Hr,$l,JB,zL,zd,eU,qL,Kg,tU,aU,FL,nU,rU,oU,lU,iU,sU,uU,cU,dU,HL,fU,pU,mU,hU,gU,yU,Ud,wU,xU,vU,bU,SU,CU,IU,LU,kU,TU,PL,AU,jL,MU,EU,RU,DU,_U,OU,Qg,Ea,PU,NU,BU,VL,GL=I(()=>{"use strict";PB=Object.defineProperty,NB=Object.defineProperties,BB=Object.getOwnPropertyDescriptors,DL=Object.getOwnPropertySymbols,UB=Object.prototype.hasOwnProperty,zB=Object.prototype.propertyIsEnumerable,_L=(e,t,a)=>t in e?PB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,NL=(e,t)=>{for(var a in t||(t={}))UB.call(t,a)&&_L(e,a,t[a]);if(DL)for(var a of DL(t))zB.call(t,a)&&_L(e,a,t[a]);return e},BL=(e,t)=>NB(e,BB(t)),qB=/(\*\*)([^*]*\*?)$/,FB=/(__)([^_]*?)$/,HB=/(\*\*\*)([^*]*?)$/,jB=/(\*)([^*]*?)$/,VB=/(_)([^_]*?)$/,GB=/(`)([^`]*?)$/,$B=/(~~)([^~]*?)$/,Do=/^[\s_~*`]*$/,UL=/^[\s]*[-*+][\s]+$/,WB=/[\p{L}\p{N}_]/u,XB=/^```[^`\n]*```?$/,ZB=/^\*{4,}$/,QB=/(__)([^_]+)_$/,KB=/(~~)([^~]+)~$/,YB=/__/g,OL=/~~/g,Hr=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:WB.test(e)},$l=(e,t)=>{let a=!1;for(let n=0;n<t;n+=1)e[n]==="`"&&e[n+1]==="`"&&e[n+2]==="`"&&(a=!a,n+=2);return a},JB=(e,t)=>{let a=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")a+=1;else if(e[n]==="["&&(a-=1,a===0))return n;return-1},zL=(e,t)=>{let a=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")a+=1;else if(e[n]==="]"&&(a-=1,a===0))return n;return-1},zd=(e,t)=>{let a=!1,n=!1;for(let r=0;r<e.length&&r<t;r+=1){if(e[r]==="\\"&&e[r+1]==="$"){r+=1;continue}e[r]==="$"&&(e[r+1]==="$"?(n=!n,r+=1,a=!1):n||(a=!a))}return a||n},eU=(e,t)=>{for(let a=t;a<e.length;a+=1){if(e[a]===")")return!0;if(e[a]===`
|
|
25
|
-
`)return!1}return!1},
|
|
26
|
-
`)return!1}return!1},
|
|
24
|
+
`))}function s(p,m,x,b){let y=x.enter("tableCell"),w=x.enter("phrasing"),g=x.containerPhrasing(p,{...b,before:o,after:o});return w(),y(),g}function u(p,m){return VC(p,{align:m,alignDelimiters:n,padding:a,stringLength:r})}function c(p,m,x){let b=p.children,y=-1,w=[],g=m.enter("table");for(;++y<b.length;)w[y]=d(b[y],m,x);return g(),w}function d(p,m,x){let b=p.children,y=-1,w=[],g=m.enter("tableRow");for(;++y<b.length;)w[y]=s(b[y],p,m,x);return g(),w}function f(p,m,x){let b=Os.inlineCode(p,m,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}var t1=C(()=>{"use strict";GC();Eg()});var a1=C(()=>{"use strict";t1()});function Og(){return{exit:{taskListCheckValueChecked:n1,taskListCheckValueUnchecked:n1,paragraph:sB}}}function Pg(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uB}}}function n1(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function sB(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let a=this.stack[this.stack.length-1];a.type;let n=a.children[0];if(n&&n.type==="text"){let r=t.children,o=-1,l;for(;++o<r.length;){let i=r[o];if(i.type==="paragraph"){l=i;break}}l===a&&(n.value=n.value.slice(1),n.value.length===0?a.children.shift():a.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,a.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function uB(e,t,a,n){let r=e.children[0],o=typeof e.checked=="boolean"&&r&&r.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",i=a.createTracker(n);o&&i.move(l);let s=Os.listItem(e,t,a,{...n,...i.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(c){return c+l}}var r1=C(()=>{"use strict";Eg()});var o1=C(()=>{"use strict";r1()});function Ng(){return[cg(),fg(),mg(),Dg(),Og()]}function Bg(e){return{extensions:[dg(),pg(e),hg(),_g(e),Pg()]}}var l1=C(()=>{"use strict";PC();FC();HC();a1();o1()});var i1=C(()=>{"use strict";l1()});function Ct(e,t,a,n){let r=e.length,o=0,l;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,a=a>0?a:0,n.length<1e4)l=Array.from(n),l.unshift(t,a),e.splice(...l);else for(a&&e.splice(t,a);o<n.length;)l=n.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function aa(e,t){return e.length>0?(Ct(e,e.length,0,t),e):t}var Jn=C(()=>{"use strict"});function Ld(e){let t={},a=-1;for(;++a<e.length;)cB(t,e[a]);return t}function cB(e,t){let a;for(a in t){let r=(s1.call(e,a)?e[a]:void 0)||(e[a]={}),o=t[a],l;if(o)for(l in o){s1.call(r,l)||(r[l]=[]);let i=o[l];dB(r[l],Array.isArray(i)?i:i?[i]:[])}}}function dB(e,t){let a=-1,n=[];for(;++a<t.length;)(t[a].add==="after"?e:n).push(t[a]);Ct(e,0,0,n)}var s1,Ug=C(()=>{"use strict";Jn();s1={}.hasOwnProperty});function zg(){return{text:vn}}function mB(e,t,a){let n=this,r,o;return l;function l(d){return!Fg(d)||!g1.call(n,n.previous)||qg(n.events)?a(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(d))}function i(d){return Fg(d)?(e.consume(d),i):d===64?(e.consume(d),s):a(d)}function s(d){return d===46?e.check(pB,c,u)(d):d===45||d===95||wt(d)?(o=!0,e.consume(d),s):c(d)}function u(d){return e.consume(d),r=!0,s}function c(d){return o&&r&&Pt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):a(d)}}function hB(e,t,a){let n=this;return r;function r(l){return l!==87&&l!==119||!m1.call(n,n.previous)||qg(n.events)?a(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fB,e.attempt(u1,e.attempt(c1,o),a),a)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function gB(e,t,a){let n=this,r="",o=!1;return l;function l(d){return(d===72||d===104)&&h1.call(n,n.previous)&&!qg(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),e.consume(d),i):a(d)}function i(d){if(Pt(d)&&r.length<5)return r+=String.fromCodePoint(d),e.consume(d),i;if(d===58){let f=r.toLowerCase();if(f==="http"||f==="https")return e.consume(d),s}return a(d)}function s(d){return d===47?(e.consume(d),o?u:(o=!0,s)):a(d)}function u(d){return d===null||Lo(d)||ge(d)||xn(d)||To(d)?a(d):e.attempt(u1,e.attempt(c1,c),a)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function yB(e,t,a){let n=0;return r;function r(l){return(l===87||l===119)&&n<3?(n++,e.consume(l),r):l===46&&n===3?(e.consume(l),o):a(l)}function o(l){return l===null?a(l):t(l)}}function wB(e,t,a){let n,r,o;return l;function l(u){return u===46||u===95?e.check(d1,s,i)(u):u===null||ge(u)||xn(u)||u!==45&&To(u)?s(u):(o=!0,e.consume(u),l)}function i(u){return u===95?n=!0:(r=n,n=void 0),e.consume(u),l}function s(u){return r||n||!o?a(u):t(u)}}function xB(e,t){let a=0,n=0;return r;function r(l){return l===40?(a++,e.consume(l),r):l===41&&n<a?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(d1,t,o)(l):l===null||ge(l)||xn(l)?t(l):(e.consume(l),r)}function o(l){return l===41&&n++,e.consume(l),r}}function vB(e,t,a){return n;function n(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===63||i===95||i===126?(e.consume(i),n):i===38?(e.consume(i),o):i===93?(e.consume(i),r):i===60||i===null||ge(i)||xn(i)?t(i):a(i)}function r(i){return i===null||i===40||i===91||ge(i)||xn(i)?t(i):n(i)}function o(i){return Pt(i)?l(i):a(i)}function l(i){return i===59?(e.consume(i),n):Pt(i)?(e.consume(i),l):a(i)}}function bB(e,t,a){return n;function n(o){return e.consume(o),r}function r(o){return wt(o)?a(o):t(o)}}function m1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ge(e)}function h1(e){return!Pt(e)}function g1(e){return!(e===47||Fg(e))}function Fg(e){return e===43||e===45||e===46||e===95||wt(e)}function qg(e){let t=e.length,a=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){a=!0;break}if(n._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}var fB,u1,c1,d1,pB,f1,p1,er,vn,Mo,y1=C(()=>{"use strict";Ee();fB={tokenize:yB,partial:!0},u1={tokenize:wB,partial:!0},c1={tokenize:xB,partial:!0},d1={tokenize:vB,partial:!0},pB={tokenize:bB,partial:!0},f1={name:"wwwAutolink",tokenize:hB,previous:m1},p1={name:"protocolAutolink",tokenize:gB,previous:h1},er={name:"emailAutolink",tokenize:mB,previous:g1},vn={};Mo=48;for(;Mo<123;)vn[Mo]=er,Mo++,Mo===58?Mo=65:Mo===91&&(Mo=97);vn[43]=er;vn[45]=er;vn[46]=er;vn[95]=er;vn[72]=[er,p1];vn[104]=[er,p1];vn[87]=[er,f1];vn[119]=[er,f1]});function Xa(e){let t=[],a=-1,n=0,r=0;for(;++a<e.length;){let o=e.charCodeAt(a),l="";if(o===37&&wt(e.charCodeAt(a+1))&&wt(e.charCodeAt(a+2)))r=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){let i=e.charCodeAt(a+1);o<56320&&i>56319&&i<57344?(l=String.fromCharCode(o,i),r=1):l="\uFFFD"}else l=String.fromCharCode(o);l&&(t.push(e.slice(n,a),encodeURIComponent(l)),n=a+r+1,l=""),r&&(a+=r,r=0)}return t.join("")+e.slice(n)}var Eo=C(()=>{"use strict";Ee()});var w1=C(()=>{"use strict";y1()});function Hr(e,t,a){let n=[],r=-1;for(;++r<e.length;){let o=e[r].resolveAll;o&&!n.includes(o)&&(t=o(t,a),n.push(o))}return t}var Ps=C(()=>{"use strict"});function SB(e,t){let a=-1,n,r,o,l,i,s,u,c;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(n=a;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[n][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[a][1].start};x1(d,-s),x1(f,s),l={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[a][1].start}},r={type:s>1?"strong":"emphasis",start:{...l.start},end:{...i.end}},e[n][1].end={...l.start},e[a][1].start={...i.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=aa(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=aa(u,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=aa(u,Hr(t.parser.constructs.insideSpan.null,e.slice(n+1,a),t)),u=aa(u,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[a][1].end.offset-e[a][1].start.offset?(c=2,u=aa(u,[["enter",e[a][1],t],["exit",e[a][1],t]])):c=0,Ct(e,n-1,a-n+3,u),a=n+u.length-c-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function IB(e,t){let a=this.parser.constructs.attentionMarkers.null,n=this.previous,r=Yn(n),o;return l;function l(s){return o=s,e.enter("attentionSequence"),i(s)}function i(s){if(s===o)return e.consume(s),i;let u=e.exit("attentionSequence"),c=Yn(s),d=!c||c===2&&r||a.includes(s),f=!r||r===2&&c||a.includes(n);return u._open=!!(o===42?d:d&&(r||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(s)}}function x1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ns,v1=C(()=>{"use strict";Jn();vd();Ps();Ns={name:"attention",resolveAll:SB,tokenize:IB}});function CB(e,t,a){let n=0;return r;function r(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Pt(p)?(e.consume(p),l):p===64?a(p):u(p)}function l(p){return p===43||p===45||p===46||wt(p)?(n=1,i(p)):u(p)}function i(p){return p===58?(e.consume(p),n=0,s):(p===43||p===45||p===46||wt(p))&&n++<32?(e.consume(p),i):(n=0,u(p))}function s(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Lo(p)?a(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),c):TC(p)?(e.consume(p),u):a(p)}function c(p){return wt(p)?d(p):a(p)}function d(p){return p===46?(e.consume(p),n=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||wt(p))&&n++<63){let m=p===45?f:d;return e.consume(p),m}return a(p)}}var Hg,b1=C(()=>{"use strict";Ee();Hg={name:"autolink",tokenize:CB}});function Q(e,t,a,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return l;function l(s){return J(s)?(e.enter(a),i(s)):t(s)}function i(s){return J(s)&&o++<r?(e.consume(s),i):(e.exit(a),t(s))}}var kt=C(()=>{"use strict";Ee()});function kB(e,t,a){return n;function n(o){return J(o)?Q(e,r,"linePrefix")(o):r(o)}function r(o){return o===null||G(o)?t(o):a(o)}}var bn,Td=C(()=>{"use strict";kt();Ee();bn={partial:!0,tokenize:kB}});function LB(e,t,a){let n=this;return r;function r(l){if(l===62){let i=n.containerState;return i.open||(e.enter("blockQuote",{_container:!0}),i.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return a(l)}function o(l){return J(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function TB(e,t,a){let n=this;return r;function r(l){return J(l)?Q(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Ad,t,a)(l)}}function AB(e){e.exit("blockQuote")}var Ad,S1=C(()=>{"use strict";kt();Ee();Ad={continuation:{tokenize:TB},exit:AB,name:"blockQuote",tokenize:LB}});function MB(e,t,a){return n;function n(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),r}function r(o){return MC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(o)}}var Md,I1=C(()=>{"use strict";Ee();Md={name:"characterEscape",tokenize:MB}});function EB(e,t,a){let n=this,r=0,o,l;return i;function i(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),s}function s(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=wt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=AC,c):(e.enter("characterReferenceValue"),o=7,l=_s,c(d))}function c(d){if(d===59&&r){let f=e.exit("characterReferenceValue");return l===wt&&!Wl(n.sliceSerialize(f))?a(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&r++<o?(e.consume(d),c):a(d)}}var Ed,C1=C(()=>{"use strict";Cd();Ee();Ed={name:"characterReference",tokenize:EB}});function RB(e,t,a){let n=this,r={partial:!0,tokenize:M},o=0,l=0,i;return s;function s(I){return u(I)}function u(I){let A=n.events[n.events.length-1];return o=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,i=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(I)}function c(I){return I===i?(l++,e.consume(I),c):l<3?a(I):(e.exit("codeFencedFenceSequence"),J(I)?Q(e,d,"whitespace")(I):d(I))}function d(I){return I===null||G(I)?(e.exit("codeFencedFence"),n.interrupt?t(I):e.check(k1,x,v)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(I))}function f(I){return I===null||G(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(I)):J(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(I)):I===96&&I===i?a(I):(e.consume(I),f)}function p(I){return I===null||G(I)?d(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||G(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(I)):I===96&&I===i?a(I):(e.consume(I),m)}function x(I){return e.attempt(r,v,b)(I)}function b(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),y}function y(I){return o>0&&J(I)?Q(e,w,"linePrefix",o+1)(I):w(I)}function w(I){return I===null||G(I)?e.check(k1,x,v)(I):(e.enter("codeFlowValue"),g(I))}function g(I){return I===null||G(I)?(e.exit("codeFlowValue"),w(I)):(e.consume(I),g)}function v(I){return e.exit("codeFenced"),t(I)}function M(I,A,E){let _=0;return L;function L(q){return I.enter("lineEnding"),I.consume(q),I.exit("lineEnding"),W}function W(q){return I.enter("codeFencedFence"),J(q)?Q(I,U,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):U(q)}function U(q){return q===i?(I.enter("codeFencedFenceSequence"),R(q)):E(q)}function R(q){return q===i?(_++,I.consume(q),R):_>=l?(I.exit("codeFencedFenceSequence"),J(q)?Q(I,B,"whitespace")(q):B(q)):E(q)}function B(q){return q===null||G(q)?(I.exit("codeFencedFence"),A(q)):E(q)}}}function DB(e,t,a){let n=this;return r;function r(l){return l===null?a(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return n.parser.lazy[n.now().line]?a(l):t(l)}}var k1,Rd,L1=C(()=>{"use strict";kt();Ee();k1={partial:!0,tokenize:DB},Rd={concrete:!0,name:"codeFenced",tokenize:RB}});function OB(e,t,a){let n=this;return r;function r(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):a(u)}function l(u){return u===null?s(u):G(u)?e.attempt(_B,l,s)(u):(e.enter("codeFlowValue"),i(u))}function i(u){return u===null||G(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),i)}function s(u){return e.exit("codeIndented"),t(u)}}function PB(e,t,a){let n=this;return r;function r(l){return n.parser.lazy[n.now().line]?a(l):G(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r):Q(e,o,"linePrefix",5)(l)}function o(l){let i=n.events[n.events.length-1];return i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):G(l)?r(l):a(l)}}var Bs,_B,T1=C(()=>{"use strict";kt();Ee();Bs={name:"codeIndented",tokenize:OB},_B={partial:!0,tokenize:PB}});function NB(e){let t=e.length-4,a=3,n,r;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=a;++n<t;)if(e[n][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(n=a-1,t++;++n<=t;)r===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(r=n):(n===t||e[n][1].type==="lineEnding")&&(e[r][1].type="codeTextData",n!==r+2&&(e[r][1].end=e[n-1][1].end,e.splice(r+2,n-r-2),t-=n-r-2,n=r+2),r=void 0);return e}function BB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UB(e,t,a){let n=this,r=0,o,l;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?a(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(l=e.enter("codeTextSequence"),o=0,d(f)):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||G(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",c(f))}}var jg,A1=C(()=>{"use strict";Ee();jg={name:"codeText",previous:BB,resolve:NB,tokenize:UB}});function Us(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}var Dd,M1=C(()=>{"use strict";Dd=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){let n=a??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,a,n){let r=a||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Us(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Us(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Us(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let a=this.left.splice(t,Number.POSITIVE_INFINITY);Us(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Us(this.left,a.reverse())}}}});function _d(e){let t={},a=-1,n,r,o,l,i,s,u,c=new Dd(e);for(;++a<c.length;){for(;a in t;)a=t[a];if(n=c.get(a),a&&n[1].type==="chunkFlow"&&c.get(a-1)[1].type==="listItemPrefix"&&(s=n[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,FB(c,a)),a=t[a],u=!0);else if(n[1]._container){for(o=a,r=void 0;o--;)if(l=c.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),l[1].type="lineEnding",r=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,a),i.unshift(n),c.splice(r,a-r+1,i))}}return Ct(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function FB(e,t){let a=e.get(t)[1],n=e.get(t)[2],r=t-1,o=[],l=a._tokenizer;l||(l=n.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let i=l.events,s=[],u={},c,d,f=-1,p=a,m=0,x=0,b=[x];for(;p;){for(;e.get(++r)[1]!==p;);o.push(r),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),d&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=a;++f<i.length;)i[f][0]==="exit"&&i[f-1][0]==="enter"&&i[f][1].type===i[f-1][1].type&&i[f][1].start.line!==i[f][1].end.line&&(x=f+1,b.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):b.pop(),f=b.length;f--;){let y=i.slice(b[f],b[f+1]),w=o.pop();s.push([w,w+y.length-1]),e.splice(w,2,y)}for(s.reverse(),f=-1;++f<s.length;)u[m+s[f][0]]=m+s[f][1],m+=s[f][1]-s[f][0]-1;return u}var Vg=C(()=>{"use strict";Jn();M1()});function qB(e){return _d(e),e}function HB(e,t){let a;return n;function n(i){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),r(i)}function r(i){return i===null?o(i):G(i)?e.check(zB,l,o)(i):(e.consume(i),r)}function o(i){return e.exit("chunkContent"),e.exit("content"),t(i)}function l(i){return e.consume(i),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,r}}function jB(e,t,a){let n=this;return r;function r(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||G(l))return a(l);let i=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&i&&i[1].type==="linePrefix"&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):e.interrupt(n.parser.constructs.flow,a,t)(l)}}var Gg,zB,E1=C(()=>{"use strict";kt();Ee();Vg();Gg={resolve:qB,tokenize:HB},zB={partial:!0,tokenize:jB}});function Od(e,t,a,n,r,o,l,i,s){let u=s||Number.POSITIVE_INFINITY,c=0;return d;function d(y){return y===60?(e.enter(n),e.enter(r),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||Lo(y)?a(y):(e.enter(n),e.enter(l),e.enter(i),e.enter("chunkString",{contentType:"string"}),x(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),e.exit(n),t):(e.enter(i),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(i),f(y)):y===null||y===60||G(y)?a(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function x(y){return!c&&(y===null||y===41||ge(y))?(e.exit("chunkString"),e.exit(i),e.exit(l),e.exit(n),t(y)):c<u&&y===40?(e.consume(y),c++,x):y===41?(e.consume(y),c--,x):y===null||y===32||y===40||Lo(y)?a(y):(e.consume(y),y===92?b:x)}function b(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}var $g=C(()=>{"use strict";Ee()});function Pd(e,t,a,n,r,o){let l=this,i=0,s;return u;function u(p){return e.enter(n),e.enter(r),e.consume(p),e.exit(r),e.enter(o),c}function c(p){return i>999||p===null||p===91||p===93&&!s||p===94&&!i&&"_hiddenFootnoteSupport"in l.parser.constructs?a(p):p===93?(e.exit(o),e.enter(r),e.consume(p),e.exit(r),e.exit(n),t):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||G(p)||i++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!J(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),i++,d):d(p)}}var Wg=C(()=>{"use strict";Ee()});function Nd(e,t,a,n,r,o){let l;return i;function i(f){return f===34||f===39||f===40?(e.enter(n),e.enter(r),e.consume(f),e.exit(r),l=f===40?41:f,s):a(f)}function s(f){return f===l?(e.enter(r),e.consume(f),e.exit(r),e.exit(n),t):(e.enter(o),u(f))}function u(f){return f===l?(e.exit(o),s(l)):f===null?a(f):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===l||f===null||G(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===l||f===92?(e.consume(f),c):c(f)}}var Xg=C(()=>{"use strict";kt();Ee()});function Ro(e,t){let a;return n;function n(r){return G(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a=!0,n):J(r)?Q(e,n,a?"linePrefix":"lineSuffix")(r):t(r)}}var Kg=C(()=>{"use strict";kt();Ee()});function GB(e,t,a){let n=this,r;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Pd.call(n,e,i,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function i(p){return r=Kt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):a(p)}function s(p){return ge(p)?Ro(e,u)(p):u(p)}function u(p){return Od(e,c,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(VB,d,d)(p)}function d(p){return J(p)?Q(e,f,"whitespace")(p):f(p)}function f(p){return p===null||G(p)?(e.exit("definition"),n.parser.defined.push(r),t(p)):a(p)}}function $B(e,t,a){return n;function n(i){return ge(i)?Ro(e,r)(i):a(i)}function r(i){return Nd(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(i)}function o(i){return J(i)?Q(e,l,"whitespace")(i):l(i)}function l(i){return i===null||G(i)?t(i):a(i)}}var Zg,VB,R1=C(()=>{"use strict";$g();Wg();kt();Xg();Kg();Ee();jl();Zg={name:"definition",tokenize:GB},VB={partial:!0,tokenize:$B}});function WB(e,t,a){return n;function n(o){return e.enter("hardBreakEscape"),e.consume(o),r}function r(o){return G(o)?(e.exit("hardBreakEscape"),t(o)):a(o)}}var Qg,D1=C(()=>{"use strict";Ee();Qg={name:"hardBreakEscape",tokenize:WB}});function XB(e,t){let a=e.length-2,n=3,r,o;return e[n][1].type==="whitespace"&&(n+=2),a-2>n&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(n===a-1||a-4>n&&e[a-2][1].type==="whitespace")&&(a-=n+1===a?2:4),a>n&&(r={type:"atxHeadingText",start:e[n][1].start,end:e[a][1].end},o={type:"chunkText",start:e[n][1].start,end:e[a][1].end,contentType:"text"},Ct(e,n,a-n+1,[["enter",r,t],["enter",o,t],["exit",o,t],["exit",r,t]])),e}function KB(e,t,a){let n=0;return r;function r(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&n++<6?(e.consume(c),l):c===null||ge(c)?(e.exit("atxHeadingSequence"),i(c)):a(c)}function i(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||G(c)?(e.exit("atxHeading"),t(c)):J(c)?Q(e,i,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),i(c))}function u(c){return c===null||c===35||ge(c)?(e.exit("atxHeadingText"),i(c)):(e.consume(c),u)}}var Yg,_1=C(()=>{"use strict";kt();Ee();Jn();Yg={name:"headingAtx",resolve:XB,tokenize:KB}});var O1,Jg,P1=C(()=>{"use strict";O1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jg=["pre","script","style","textarea"]});function YB(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function JB(e,t,a){let n=this,r,o,l,i,s;return u;function u(k){return c(k)}function c(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),o=!0,x):k===63?(e.consume(k),r=3,n.interrupt?t:S):Pt(k)?(e.consume(k),l=String.fromCharCode(k),b):a(k)}function f(k){return k===45?(e.consume(k),r=2,p):k===91?(e.consume(k),r=5,i=0,m):Pt(k)?(e.consume(k),r=4,n.interrupt?t:S):a(k)}function p(k){return k===45?(e.consume(k),n.interrupt?t:S):a(k)}function m(k){let De="CDATA[";return k===De.charCodeAt(i++)?(e.consume(k),i===De.length?n.interrupt?t:U:m):a(k)}function x(k){return Pt(k)?(e.consume(k),l=String.fromCharCode(k),b):a(k)}function b(k){if(k===null||k===47||k===62||ge(k)){let De=k===47,ie=l.toLowerCase();return!De&&!o&&Jg.includes(ie)?(r=1,n.interrupt?t(k):U(k)):O1.includes(l.toLowerCase())?(r=6,De?(e.consume(k),y):n.interrupt?t(k):U(k)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?a(k):o?w(k):g(k))}return k===45||wt(k)?(e.consume(k),l+=String.fromCharCode(k),b):a(k)}function y(k){return k===62?(e.consume(k),n.interrupt?t:U):a(k)}function w(k){return J(k)?(e.consume(k),w):L(k)}function g(k){return k===47?(e.consume(k),L):k===58||k===95||Pt(k)?(e.consume(k),v):J(k)?(e.consume(k),g):L(k)}function v(k){return k===45||k===46||k===58||k===95||wt(k)?(e.consume(k),v):M(k)}function M(k){return k===61?(e.consume(k),I):J(k)?(e.consume(k),M):g(k)}function I(k){return k===null||k===60||k===61||k===62||k===96?a(k):k===34||k===39?(e.consume(k),s=k,A):J(k)?(e.consume(k),I):E(k)}function A(k){return k===s?(e.consume(k),s=null,_):k===null||G(k)?a(k):(e.consume(k),A)}function E(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ge(k)?M(k):(e.consume(k),E)}function _(k){return k===47||k===62||J(k)?g(k):a(k)}function L(k){return k===62?(e.consume(k),W):a(k)}function W(k){return k===null||G(k)?U(k):J(k)?(e.consume(k),W):a(k)}function U(k){return k===45&&r===2?(e.consume(k),j):k===60&&r===1?(e.consume(k),Y):k===62&&r===4?(e.consume(k),Be):k===63&&r===3?(e.consume(k),S):k===93&&r===5?(e.consume(k),He):G(k)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(ZB,rt,R)(k)):k===null||G(k)?(e.exit("htmlFlowData"),R(k)):(e.consume(k),U)}function R(k){return e.check(QB,B,rt)(k)}function B(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),q}function q(k){return k===null||G(k)?R(k):(e.enter("htmlFlowData"),U(k))}function j(k){return k===45?(e.consume(k),S):U(k)}function Y(k){return k===47?(e.consume(k),l="",fe):U(k)}function fe(k){if(k===62){let De=l.toLowerCase();return Jg.includes(De)?(e.consume(k),Be):U(k)}return Pt(k)&&l.length<8?(e.consume(k),l+=String.fromCharCode(k),fe):U(k)}function He(k){return k===93?(e.consume(k),S):U(k)}function S(k){return k===62?(e.consume(k),Be):k===45&&r===2?(e.consume(k),S):U(k)}function Be(k){return k===null||G(k)?(e.exit("htmlFlowData"),rt(k)):(e.consume(k),Be)}function rt(k){return e.exit("htmlFlow"),t(k)}}function eU(e,t,a){let n=this;return r;function r(l){return G(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):a(l)}function o(l){return n.parser.lazy[n.now().line]?a(l):t(l)}}function tU(e,t,a){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(bn,t,a)}}var ey,ZB,QB,N1=C(()=>{"use strict";Ee();P1();Td();ey={concrete:!0,name:"htmlFlow",resolveTo:YB,tokenize:JB},ZB={partial:!0,tokenize:tU},QB={partial:!0,tokenize:eU}});function aU(e,t,a){let n=this,r,o,l;return i;function i(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),s}function s(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),M):S===63?(e.consume(S),g):Pt(S)?(e.consume(S),E):a(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),o=0,m):Pt(S)?(e.consume(S),w):a(S)}function c(S){return S===45?(e.consume(S),p):a(S)}function d(S){return S===null?a(S):S===45?(e.consume(S),f):G(S)?(l=d,Y(S)):(e.consume(S),d)}function f(S){return S===45?(e.consume(S),p):d(S)}function p(S){return S===62?j(S):S===45?f(S):d(S)}function m(S){let Be="CDATA[";return S===Be.charCodeAt(o++)?(e.consume(S),o===Be.length?x:m):a(S)}function x(S){return S===null?a(S):S===93?(e.consume(S),b):G(S)?(l=x,Y(S)):(e.consume(S),x)}function b(S){return S===93?(e.consume(S),y):x(S)}function y(S){return S===62?j(S):S===93?(e.consume(S),y):x(S)}function w(S){return S===null||S===62?j(S):G(S)?(l=w,Y(S)):(e.consume(S),w)}function g(S){return S===null?a(S):S===63?(e.consume(S),v):G(S)?(l=g,Y(S)):(e.consume(S),g)}function v(S){return S===62?j(S):g(S)}function M(S){return Pt(S)?(e.consume(S),I):a(S)}function I(S){return S===45||wt(S)?(e.consume(S),I):A(S)}function A(S){return G(S)?(l=A,Y(S)):J(S)?(e.consume(S),A):j(S)}function E(S){return S===45||wt(S)?(e.consume(S),E):S===47||S===62||ge(S)?_(S):a(S)}function _(S){return S===47?(e.consume(S),j):S===58||S===95||Pt(S)?(e.consume(S),L):G(S)?(l=_,Y(S)):J(S)?(e.consume(S),_):j(S)}function L(S){return S===45||S===46||S===58||S===95||wt(S)?(e.consume(S),L):W(S)}function W(S){return S===61?(e.consume(S),U):G(S)?(l=W,Y(S)):J(S)?(e.consume(S),W):_(S)}function U(S){return S===null||S===60||S===61||S===62||S===96?a(S):S===34||S===39?(e.consume(S),r=S,R):G(S)?(l=U,Y(S)):J(S)?(e.consume(S),U):(e.consume(S),B)}function R(S){return S===r?(e.consume(S),r=void 0,q):S===null?a(S):G(S)?(l=R,Y(S)):(e.consume(S),R)}function B(S){return S===null||S===34||S===39||S===60||S===61||S===96?a(S):S===47||S===62||ge(S)?_(S):(e.consume(S),B)}function q(S){return S===47||S===62||ge(S)?_(S):a(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):a(S)}function Y(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),fe}function fe(S){return J(S)?Q(e,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):He(S)}function He(S){return e.enter("htmlTextData"),l(S)}}var ty,B1=C(()=>{"use strict";kt();Ee();ty={name:"htmlText",tokenize:aU}});function lU(e){let t=-1,a=[];for(;++t<e.length;){let n=e[t][1];if(a.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let r=n.type==="labelImage"?4:2;n.type="data",t+=r}}return e.length!==a.length&&Ct(e,0,e.length,a),e}function iU(e,t){let a=e.length,n=0,r,o,l,i;for(;a--;)if(r=e[a][1],o){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[a][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(l){if(e[a][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(o=a,r.type!=="labelLink")){n=2;break}}else r.type==="labelEnd"&&(l=a);let s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[o+n+2][1].end},end:{...e[l-2][1].start}};return i=[["enter",s,t],["enter",u,t]],i=aa(i,e.slice(o+1,o+n+3)),i=aa(i,[["enter",c,t]]),i=aa(i,Hr(t.parser.constructs.insideSpan.null,e.slice(o+n+4,l-3),t)),i=aa(i,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),i=aa(i,e.slice(l+1)),i=aa(i,[["exit",s,t]]),Ct(e,o,e.length,i),e}function sU(e,t,a){let n=this,r=n.events.length,o,l;for(;r--;)if((n.events[r][1].type==="labelImage"||n.events[r][1].type==="labelLink")&&!n.events[r][1]._balanced){o=n.events[r][1];break}return i;function i(f){return o?o._inactive?d(f):(l=n.parser.defined.includes(Kt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),s):a(f)}function s(f){return f===40?e.attempt(nU,c,l?c:d)(f):f===91?e.attempt(rU,c,l?u:d)(f):l?c(f):d(f)}function u(f){return e.attempt(oU,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,a(f)}}function uU(e,t,a){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),r}function r(d){return ge(d)?Ro(e,o)(d):o(d)}function o(d){return d===41?c(d):Od(e,l,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return ge(d)?Ro(e,s)(d):c(d)}function i(d){return a(d)}function s(d){return d===34||d===39||d===40?Nd(e,u,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ge(d)?Ro(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):a(d)}}function cU(e,t,a){let n=this;return r;function r(i){return Pd.call(n,e,o,l,"reference","referenceMarker","referenceString")(i)}function o(i){return n.parser.defined.includes(Kt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(i):a(i)}function l(i){return a(i)}}function dU(e,t,a){return n;function n(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),r}function r(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):a(o)}}var Do,nU,rU,oU,Bd=C(()=>{"use strict";$g();Wg();Xg();Kg();Ee();Jn();jl();Ps();Do={name:"labelEnd",resolveAll:lU,resolveTo:iU,tokenize:sU},nU={tokenize:uU},rU={tokenize:cU},oU={tokenize:dU}});function fU(e,t,a){let n=this;return r;function r(i){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(i),e.exit("labelImageMarker"),o}function o(i){return i===91?(e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelImage"),l):a(i)}function l(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(i):t(i)}}var ay,U1=C(()=>{"use strict";Bd();ay={name:"labelStartImage",resolveAll:Do.resolveAll,tokenize:fU}});function pU(e,t,a){let n=this;return r;function r(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?a(l):t(l)}}var ny,F1=C(()=>{"use strict";Bd();ny={name:"labelStartLink",resolveAll:Do.resolveAll,tokenize:pU}});function mU(e,t){return a;function a(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Q(e,t,"linePrefix")}}var Fs,z1=C(()=>{"use strict";kt();Fs={name:"lineEnding",tokenize:mU}});function hU(e,t,a){let n=0,r;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return r=u,i(u)}function i(u){return u===r?(e.enter("thematicBreakSequence"),s(u)):n>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):a(u)}function s(u){return u===r?(e.consume(u),n++,s):(e.exit("thematicBreakSequence"),J(u)?Q(e,i,"whitespace")(u):i(u))}}var _o,ry=C(()=>{"use strict";kt();Ee();_o={name:"thematicBreak",tokenize:hU}});function wU(e,t,a){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,l=0;return i;function i(p){let m=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:_s(p)){if(n.containerState.type||(n.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(_o,a,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return a(p)}function s(p){return _s(p)&&++l<10?(e.consume(p),s):(!n.interrupt||l<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):a(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(bn,n.interrupt?a:c,e.attempt(gU,f,d))}function c(p){return n.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):a(p)}function f(p){return n.containerState.size=o+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function xU(e,t,a){let n=this;return n.containerState._closeFlow=void 0,e.check(bn,r,o);function r(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Q(e,t,"listItemIndent",n.containerState.size+1)(i)}function o(i){return n.containerState.furtherBlankLines||!J(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,l(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(yU,t,l)(i))}function l(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Q(e,e.attempt(Zt,t,a),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}function vU(e,t,a){let n=this;return Q(e,r,"listItemIndent",n.containerState.size+1);function r(o){let l=n.events[n.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===n.containerState.size?t(o):a(o)}}function bU(e){e.exit(this.containerState.type)}function SU(e,t,a){let n=this;return Q(e,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){let l=n.events[n.events.length-1];return!J(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):a(o)}}var Zt,gU,yU,q1=C(()=>{"use strict";kt();Ee();Td();ry();Zt={continuation:{tokenize:xU},exit:bU,name:"list",tokenize:wU},gU={partial:!0,tokenize:SU},yU={partial:!0,tokenize:vU}});function IU(e,t){let a=e.length,n,r,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){n=a;break}e[a][1].type==="paragraph"&&(r=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);let l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e}function CU(e,t,a){let n=this,r;return o;function o(u){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){d=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),r=u,l(u)):a(u)}function l(u){return e.enter("setextHeadingLineSequence"),i(u)}function i(u){return u===r?(e.consume(u),i):(e.exit("setextHeadingLineSequence"),J(u)?Q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):a(u)}}var Ud,H1=C(()=>{"use strict";kt();Ee();Ud={name:"setextUnderline",resolveTo:IU,tokenize:CU}});var Fd=C(()=>{"use strict";v1();b1();Td();S1();I1();C1();L1();T1();A1();E1();R1();D1();_1();N1();B1();Bd();U1();F1();z1();q1();H1();ry()});function oy(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:MU,continuation:{tokenize:EU},exit:RU}},text:{91:{name:"gfmFootnoteCall",tokenize:AU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:LU,resolveTo:TU}}}}function LU(e,t,a){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),l;for(;r--;){let s=n.events[r][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return i;function i(s){if(!l||!l._balanced)return a(s);let u=Kt(n.sliceSerialize({start:l.end,end:n.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?a(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function TU(e,t){let a=e.length,n;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){n=e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[a+1],e[a+2],["enter",r,t],e[a+3],e[a+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",i,t],["exit",i,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(a,e.length-a+1,...s),e}function AU(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,l;return i;function i(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),s}function s(d){return d!==94?a(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!l||d===null||d===91||ge(d))return a(d);if(d===93){e.exit("chunkString");let f=e.exit("gfmFootnoteCallString");return r.includes(Kt(n.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(d)}return ge(d)||(l=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function MU(e,t,a){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,l=0,i;return s;function s(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):a(m)}function c(m){if(l>999||m===93&&!i||m===null||m===91||ge(m))return a(m);if(m===93){e.exit("chunkString");let x=e.exit("gfmFootnoteDefinitionLabelString");return o=Kt(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ge(m)||(i=!0),l++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),l++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),r.includes(o)||r.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):a(m)}function p(m){return t(m)}}function EU(e,t,a){return e.check(bn,t,e.attempt(kU,t,a))}function RU(e){e.exit("gfmFootnoteDefinition")}function DU(e,t,a){let n=this;return Q(e,r,"gfmFootnoteDefinitionIndent",5);function r(o){let l=n.events[n.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):a(o)}}var kU,j1=C(()=>{"use strict";Fd();kt();Ee();jl();kU={tokenize:DU,partial:!0}});var V1=C(()=>{"use strict";j1()});function ly(e){let a=(e||{}).singleTilde,n={name:"strikethrough",tokenize:o,resolveAll:r};return a==null&&(a=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(l,i){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},d={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},f=[["enter",c,i],["enter",l[u][1],i],["exit",l[u][1],i],["enter",d,i]],p=i.parser.constructs.insideSpan.null;p&&Ct(f,f.length,0,Hr(p,l.slice(u+1,s),i)),Ct(f,f.length,0,[["exit",d,i],["enter",l[s][1],i],["exit",l[s][1],i],["exit",c,i]]),Ct(l,u-1,s-u+3,f),s=u+f.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,i,s){let u=this.previous,c=this.events,d=0;return f;function f(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?s(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){let x=Yn(u);if(m===126)return d>1?s(m):(l.consume(m),d++,p);if(d<2&&!a)return s(m);let b=l.exit("strikethroughSequenceTemporary"),y=Yn(m);return b._open=!y||y===2&&!!x,b._close=!x||x===2&&!!y,i(m)}}}var G1=C(()=>{"use strict";Jn();vd();Ps()});var $1=C(()=>{"use strict";G1()});function _U(e,t,a,n){let r=0;if(!(a===0&&n.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=a,e.map[r][2].push(...n);return}r+=1}e.map.push([t,a,n])}}var zd,W1=C(()=>{"use strict";zd=class{constructor(){this.map=[]}add(t,a,n){_U(this,t,a,n)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let a=this.map.length,n=[];for(;a>0;)a-=1,n.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];n.push(t.slice()),t.length=0;let r=n.pop();for(;r;){for(let o of r)t.push(o);r=n.pop()}this.map.length=0}}});function X1(e,t){let a=!1,n=[];for(;t<e.length;){let r=e[t];if(a){if(r[0]==="enter")r[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let o=n.length-1;n[o]=n[o]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return n}var K1=C(()=>{"use strict"});function iy(){return{flow:{null:{name:"table",tokenize:OU,resolveAll:PU}}}}function OU(e,t,a){let n=this,r=0,o=0,l;return i;function i(L){let W=n.events.length-1;for(;W>-1;){let B=n.events[W][1].type;if(B==="lineEnding"||B==="linePrefix")W--;else break}let U=W>-1?n.events[W][1].type:null,R=U==="tableHead"||U==="tableRow"?I:s;return R===I&&n.parser.lazy[n.now().line]?a(L):R(L)}function s(L){return e.enter("tableHead"),e.enter("tableRow"),u(L)}function u(L){return L===124||(l=!0,o+=1),c(L)}function c(L){return L===null?a(L):G(L)?o>1?(o=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),p):a(L):J(L)?Q(e,c,"whitespace")(L):(o+=1,l&&(l=!1,r+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),d(L)))}function d(L){return L===null||L===124||ge(L)?(e.exit("data"),c(L)):(e.consume(L),L===92?f:d)}function f(L){return L===92||L===124?(e.consume(L),d):d(L)}function p(L){return n.interrupt=!1,n.parser.lazy[n.now().line]?a(L):(e.enter("tableDelimiterRow"),l=!1,J(L)?Q(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):m(L))}function m(L){return L===45||L===58?b(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),x):M(L)}function x(L){return J(L)?Q(e,b,"whitespace")(L):b(L)}function b(L){return L===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),y):L===45?(o+=1,y(L)):L===null||G(L)?v(L):M(L)}function y(L){return L===45?(e.enter("tableDelimiterFiller"),w(L)):M(L)}function w(L){return L===45?(e.consume(L),w):L===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(L))}function g(L){return J(L)?Q(e,v,"whitespace")(L):v(L)}function v(L){return L===124?m(L):L===null||G(L)?!l||r!==o?M(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):M(L)}function M(L){return a(L)}function I(L){return e.enter("tableRow"),A(L)}function A(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),A):L===null||G(L)?(e.exit("tableRow"),t(L)):J(L)?Q(e,A,"whitespace")(L):(e.enter("data"),E(L))}function E(L){return L===null||L===124||ge(L)?(e.exit("data"),A(L)):(e.consume(L),L===92?_:E)}function _(L){return L===92||L===124?(e.consume(L),E):E(L)}}function PU(e,t){let a=-1,n=!0,r=0,o=[0,0,0,0],l=[0,0,0,0],i=!1,s=0,u,c,d,f=new zd;for(;++a<e.length;){let p=e[a],m=p[1];p[0]==="enter"?m.type==="tableHead"?(i=!1,s!==0&&(Z1(f,t,s,u,c),c=void 0,s=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(a,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,d=void 0,o=[0,0,0,0],l=[0,a+1,0,0],i&&(i=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(a,0,[["enter",c,t]])),r=m.type==="tableDelimiterRow"?2:c?3:1):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],d=qd(f,t,o,r,void 0,d),o=[0,0,0,0]),l[2]=a)):m.type==="tableCellDivider"&&(n?n=!1:(o[1]!==0&&(l[0]=l[1],d=qd(f,t,o,r,void 0,d)),o=l,l=[o[1],a,0,0])):m.type==="tableHead"?(i=!0,s=a):m.type==="tableRow"||m.type==="tableDelimiterRow"?(s=a,o[1]!==0?(l[0]=l[1],d=qd(f,t,o,r,a,d)):l[1]!==0&&(d=qd(f,t,l,r,a,d)),r=0):r&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=a)}for(s!==0&&Z1(f,t,s,u,c),f.consume(t.events),a=-1;++a<t.events.length;){let p=t.events[a];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=X1(t.events,a))}return e}function qd(e,t,a,n,r,o){let l=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",i="tableContent";a[0]!==0&&(o.end=Object.assign({},Xl(t.events,a[0])),e.add(a[0],0,[["exit",o,t]]));let s=Xl(t.events,a[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(a[1],0,[["enter",o,t]]),a[2]!==0){let u=Xl(t.events,a[2]),c=Xl(t.events,a[3]),d={type:i,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(a[2],0,[["enter",d,t]]),n!==2){let f=t.events[a[2]],p=t.events[a[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",a[3]>a[2]+1){let m=a[2]+1,x=a[3]-a[2]-1;e.add(m,x,[])}}e.add(a[3]+1,0,[["exit",d,t]])}return r!==void 0&&(o.end=Object.assign({},Xl(t.events,r)),e.add(r,0,[["exit",o,t]]),o=void 0),o}function Z1(e,t,a,n,r){let o=[],l=Xl(t.events,a);r&&(r.end=Object.assign({},l),o.push(["exit",r,t])),n.end=Object.assign({},l),o.push(["exit",n,t]),e.add(a+1,0,o)}function Xl(e,t){let a=e[t],n=a[0]==="enter"?"start":"end";return a[1][n]}var Q1=C(()=>{"use strict";kt();Ee();W1();K1()});var Y1=C(()=>{"use strict";Q1()});function sy(){return{text:{91:NU}}}function BU(e,t,a){let n=this;return r;function r(s){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?a(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return ge(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):a(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):a(s)}function i(s){return G(s)?t(s):J(s)?e.check({tokenize:UU},t,a)(s):a(s)}}function UU(e,t,a){return Q(e,n,"whitespace");function n(r){return r===null?a(r):t(r)}}var NU,J1=C(()=>{"use strict";kt();Ee();NU={name:"tasklistCheck",tokenize:BU}});var eL=C(()=>{"use strict";J1()});function tL(e){return Ld([zg(),oy(),ly(e),iy(),sy()])}var aL=C(()=>{"use strict";Ug();w1();V1();$1();Y1();eL()});function Hd(e){let t=this,a=e||FU,n=t.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),l=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(tL(a)),o.push(Ng()),l.push(Bg(a))}var FU,nL=C(()=>{"use strict";i1();aL();FU={}});var rL=C(()=>{"use strict";nL()});var zU,qU,HU,oL,jU,VU,lL,uL,cL,GU,$U,WU,XU,KU,ZU,QU,Oo,dL,YU,JU,e4,t4,a4,n4,iL,jr,Kl,r4,fL,Vd,o4,pL,cy,l4,i4,mL,s4,u4,c4,d4,f4,p4,m4,h4,g4,hL,y4,w4,x4,v4,b4,S4,jd,I4,C4,k4,L4,T4,A4,M4,E4,R4,D4,sL,_4,gL,O4,P4,N4,B4,U4,F4,uy,Da,z4,q4,H4,yL,wL=C(()=>{"use strict";zU=Object.defineProperty,qU=Object.defineProperties,HU=Object.getOwnPropertyDescriptors,oL=Object.getOwnPropertySymbols,jU=Object.prototype.hasOwnProperty,VU=Object.prototype.propertyIsEnumerable,lL=(e,t,a)=>t in e?zU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,uL=(e,t)=>{for(var a in t||(t={}))jU.call(t,a)&&lL(e,a,t[a]);if(oL)for(var a of oL(t))VU.call(t,a)&&lL(e,a,t[a]);return e},cL=(e,t)=>qU(e,HU(t)),GU=/(\*\*)([^*]*\*?)$/,$U=/(__)([^_]*?)$/,WU=/(\*\*\*)([^*]*?)$/,XU=/(\*)([^*]*?)$/,KU=/(_)([^_]*?)$/,ZU=/(`)([^`]*?)$/,QU=/(~~)([^~]*?)$/,Oo=/^[\s_~*`]*$/,dL=/^[\s]*[-*+][\s]+$/,YU=/[\p{L}\p{N}_]/u,JU=/^```[^`\n]*```?$/,e4=/^\*{4,}$/,t4=/(__)([^_]+)_$/,a4=/(~~)([^~]+)~$/,n4=/__/g,iL=/~~/g,jr=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:YU.test(e)},Kl=(e,t)=>{let a=!1;for(let n=0;n<t;n+=1)e[n]==="`"&&e[n+1]==="`"&&e[n+2]==="`"&&(a=!a,n+=2);return a},r4=(e,t)=>{let a=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")a+=1;else if(e[n]==="["&&(a-=1,a===0))return n;return-1},fL=(e,t)=>{let a=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")a+=1;else if(e[n]==="]"&&(a-=1,a===0))return n;return-1},Vd=(e,t)=>{let a=!1,n=!1;for(let r=0;r<e.length&&r<t;r+=1){if(e[r]==="\\"&&e[r+1]==="$"){r+=1;continue}e[r]==="$"&&(e[r+1]==="$"?(n=!n,r+=1,a=!1):n||(a=!a))}return a||n},o4=(e,t)=>{for(let a=t;a<e.length;a+=1){if(e[a]===")")return!0;if(e[a]===`
|
|
25
|
+
`)return!1}return!1},pL=(e,t)=>{for(let a=t-1;a>=0;a-=1){if(e[a]===")")return!1;if(e[a]==="(")return a>0&&e[a-1]==="]"?o4(e,t):!1;if(e[a]===`
|
|
26
|
+
`)return!1}return!1},cy=(e,t,a)=>{let n=0;for(let s=t-1;s>=0;s-=1)if(e[s]===`
|
|
27
27
|
`){n=s+1;break}let r=e.length;for(let s=t;s<e.length;s+=1)if(e[s]===`
|
|
28
|
-
`){r=s;break}let o=e.substring(n,r),l=0,i=!1;for(let s of o)if(s===a)l+=1;else if(s!==" "&&s!==" "){i=!0;break}return l>=3&&!i},
|
|
29
|
-
`){n=r+1;break}for(let r=n;r<t;r+=1)if(e[r]!==" "&&e[r]!==" ")return!1;return!0},
|
|
30
|
-
`),r=n===-1?0:n+1,o=e.substring(r,a);return
|
|
31
|
-
`)?!0:
|
|
32
|
-
`),r=n===-1?0:n+1,o=e.substring(r,a);return
|
|
33
|
-
`)?!0:
|
|
34
|
-
`;)t-=1;if(t<e.length){let a=e.slice(0,t),n=e.slice(t);return`${a}_${n}`}return`${e}_`},
|
|
35
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,
|
|
28
|
+
`){r=s;break}let o=e.substring(n,r),l=0,i=!1;for(let s of o)if(s===a)l+=1;else if(s!==" "&&s!==" "){i=!0;break}return l>=3&&!i},l4=(e,t,a)=>{if(a!==" "&&a!==" ")return!1;let n=0;for(let r=t-1;r>=0;r-=1)if(e[r]===`
|
|
29
|
+
`){n=r+1;break}for(let r=n;r<t;r+=1)if(e[r]!==" "&&e[r]!==" ")return!1;return!0},i4=(e,t,a,n)=>a==="\\"||e.includes("$")&&Vd(e,t)?!0:a!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(a==="*"||a&&n&&jr(a)&&jr(n)||l4(e,t,n)),mL=e=>{let t=0,a=e.length;for(let n=0;n<a;n+=1){if(e[n]!=="*")continue;let r=n>0?e[n-1]:"",o=n<a-1?e[n+1]:"";i4(e,n,r,o)||(t+=1)}return t},s4=(e,t,a,n)=>!!(a==="\\"||e.includes("$")&&Vd(e,t)||pL(e,t)||a==="_"||n==="_"||a&&n&&jr(a)&&jr(n)),u4=e=>{let t=0,a=e.length;for(let n=0;n<a;n+=1){if(e[n]!=="_")continue;let r=n>0?e[n-1]:"",o=n<a-1?e[n+1]:"";s4(e,n,r,o)||(t+=1)}return t},c4=e=>{let t=0,a=0;for(let n=0;n<e.length;n+=1)e[n]==="*"?a+=1:(a>=3&&(t+=Math.floor(a/3)),a=0);return a>=3&&(t+=Math.floor(a/3)),t},d4=(e,t,a)=>{if(!t||Oo.test(t))return!0;let n=e.substring(0,a).lastIndexOf(`
|
|
30
|
+
`),r=n===-1?0:n+1,o=e.substring(r,a);return dL.test(o)&&t.includes(`
|
|
31
|
+
`)?!0:cy(e,a,"*")},f4=e=>{let t=e.match(GU);if(!t)return e;let a=t[2],n=e.lastIndexOf(t[1]);return Kl(e,n)||d4(e,a,n)?e:(e.match(/\*\*/g)||[]).length%2===1?a.endsWith("*")?`${e}*`:`${e}**`:e},p4=(e,t,a)=>{if(!t||Oo.test(t))return!0;let n=e.substring(0,a).lastIndexOf(`
|
|
32
|
+
`),r=n===-1?0:n+1,o=e.substring(r,a);return dL.test(o)&&t.includes(`
|
|
33
|
+
`)?!0:cy(e,a,"_")},m4=e=>{let t=e.match($U);if(!t){let r=e.match(t4);if(r){let o=e.lastIndexOf(r[1]);if(!Kl(e,o)&&(e.match(n4)||[]).length%2===1)return`${e}_`}return e}let a=t[2],n=e.lastIndexOf(t[1]);return Kl(e,n)||p4(e,a,n)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},h4=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Vd(e,t)){let a=t>0?e[t-1]:"",n=t<e.length-1?e[t+1]:"";if(a&&n&&jr(a)&&jr(n))continue;return t}return-1},g4=e=>{if(!e.match(XU))return e;let t=h4(e);if(t===-1||Kl(e,t))return e;let a=e.substring(t+1);return!a||Oo.test(a)?e:mL(e)%2===1?`${e}*`:e},hL=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Vd(e,t)&&!pL(e,t)){let a=t>0?e[t-1]:"",n=t<e.length-1?e[t+1]:"";if(a&&n&&jr(a)&&jr(n))continue;return t}return-1},y4=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
34
|
+
`;)t-=1;if(t<e.length){let a=e.slice(0,t),n=e.slice(t);return`${a}_${n}`}return`${e}_`},w4=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let a=t.indexOf("**"),n=hL(t);return a!==-1&&n!==-1&&a<n?`${t}_**`:null},x4=e=>{if(!e.match(KU))return e;let t=hL(e);if(t===-1||Kl(e,t))return e;let a=e.substring(t+1);if(!a||Oo.test(a))return e;if(u4(e)%2===1){let n=w4(e);return n!==null?n:y4(e)}return e},v4=e=>{let t=(e.match(/\*\*/g)||[]).length,a=mL(e);return t%2===0&&a%2===0},b4=(e,t,a)=>!t||Oo.test(t)||Kl(e,a)?!0:cy(e,a,"*"),S4=e=>{if(e4.test(e))return e;let t=e.match(WU);if(!t)return e;let a=t[2],n=e.lastIndexOf(t[1]);return b4(e,a,n)?e:c4(e)%2===1?v4(e)?e:`${e}***`:e},jd=(e,t)=>{let a=!1,n=!1;for(let r=0;r<t;r+=1){if(e.substring(r,r+3)==="```"){n=!n,r+=2;continue}!n&&e[r]==="`"&&(a=!a)}return a||n},I4=(e,t)=>{let a=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",r=t>1&&e.substring(t-2,t+1)==="```";return a||n||r},C4=e=>{let t=0;for(let a=0;a<e.length;a+=1)e[a]==="`"&&!I4(e,a)&&(t+=1);return t},k4=e=>!e.match(JU)||e.includes(`
|
|
35
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,L4=e=>(e.match(/```/g)||[]).length%2===1,T4=e=>{let t=k4(e);if(t!==null)return t;let a=e.match(ZU);if(a&&!L4(e)){let n=a[2];if(!n||Oo.test(n))return e;if(C4(e)%2===1)return`${e}\``}return e},A4=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",M4=e=>{let t=0,a=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!A4(e,n)&&(a=!a),!a&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},E4=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
36
36
|
`,t)!==-1&&!e.endsWith(`
|
|
37
37
|
`)?`${e}
|
|
38
|
-
$$`:`${e}$$`},
|
|
39
|
-
`);if(t===-1)return e;let a=e.substring(t+1),n=e.substring(0,t),r=a.trim();if(
|
|
40
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(
|
|
41
|
-
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},OU=e=>{let t=e.match($B);if(t){let a=t[2];if(!a||Do.test(a))return e;if((e.match(OL)||[]).length%2===1)return`${e}~~`}else if(e.match(KB)&&(e.match(OL)||[]).length%2===1)return`${e}~`;return e},Qg=e=>e!==!1,Ea={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},PU=[{handler:{name:"setextHeadings",handle:_U,priority:Ea.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:jL,priority:Ea.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:yU,priority:Ea.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:iU,priority:Ea.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:uU,priority:Ea.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:dU,priority:Ea.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:mU,priority:Ea.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:SU,priority:Ea.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:OU,priority:Ea.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:kU,priority:Ea.KATEX},optionKey:"katex"}],NU=e=>{var t;let a=(t=e?.linkMode)!=null?t:"protocol";return PU.filter(({handler:n,optionKey:r})=>n.name==="links"?Qg(e?.links)||Qg(e?.images):Qg(e?.[r])).map(({handler:n,earlyReturn:r})=>n.name==="links"?{handler:BL(NL({},n),{handle:o=>jL(o,a)}),earlyReturn:a==="protocol"?r:void 0}:{handler:n,earlyReturn:r})},BU=(e,t)=>{var a;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,r=NU(t),o=((a=t?.handlers)!=null?a:[]).map(i=>{var s;return{handler:BL(NL({},i),{priority:(s=i.priority)!=null?s:Ea.DEFAULT}),earlyReturn:void 0}}),l=[...r,...o].sort((i,s)=>{var u,c;return((u=i.handler.priority)!=null?u:Ea.DEFAULT)-((c=s.handler.priority)!=null?c:Ea.DEFAULT)});for(let{handler:i,earlyReturn:s}of l)if(n=i.handle(n),s!=null&&s(n))return n;return n},VL=BU});function $L(e,t){let a=t||{};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}var WL=I(()=>{"use strict"});function qd(e,t){return((t||qU).jsx?zU:UU).test(e)}var UU,zU,qU,XL=I(()=>{"use strict";UU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qU={}});var ZL=I(()=>{"use strict";XL()});function Yg(e){return typeof e=="object"?e.type==="text"?QL(e.value):!1:QL(e)}function QL(e){return e.replace(FU,"")===""}var FU,KL=I(()=>{"use strict";FU=/[ \t\n\f\r]/g});var YL=I(()=>{"use strict";KL()});var er,Jg=I(()=>{"use strict";er=class{constructor(t,a,n){this.normal=a,this.property=t,n&&(this.space=n)}};er.prototype.normal={};er.prototype.property={};er.prototype.space=void 0});function ey(e,t){let a={},n={};for(let r of e)Object.assign(a,r.property),Object.assign(n,r.normal);return new er(a,n,t)}var JL=I(()=>{"use strict";Jg()});function Ns(e){return e.toLowerCase()}var ty=I(()=>{"use strict"});var qt,ay=I(()=>{"use strict";qt=class{constructor(t,a){this.attribute=a,this.property=t}};qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0});var Bs={};wu(Bs,{boolean:()=>ue,booleanish:()=>xt,commaOrSpaceSeparated:()=>ga,commaSeparated:()=>jr,number:()=>z,overloadedBoolean:()=>Fd,spaceSeparated:()=>$e});function _o(){return 2**++HU}var HU,ue,xt,Fd,z,$e,jr,ga,Us=I(()=>{"use strict";HU=0,ue=_o(),xt=_o(),Fd=_o(),z=_o(),$e=_o(),jr=_o(),ga=_o()});function ek(e,t,a){a&&(e[t]=a)}var ny,Oo,ry=I(()=>{"use strict";ay();Us();ny=Object.keys(Bs),Oo=class extends qt{constructor(t,a,n,r){let o=-1;if(super(t,a),ek(this,"space",r),typeof n=="number")for(;++o<ny.length;){let l=ny[o];ek(this,ny[o],(n&Bs[l])===Bs[l])}}};Oo.prototype.defined=!0});function Xa(e){let t={},a={};for(let[n,r]of Object.entries(e.properties)){let o=new Oo(n,e.transform(e.attributes||{},n),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),t[n]=o,a[Ns(n)]=n,a[Ns(o.attribute)]=n}return new er(t,a,e.space)}var Po=I(()=>{"use strict";ty();ry();Jg()});var oy,tk=I(()=>{"use strict";Po();Us();oy=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:$e,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:z,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:$e,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:xt,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function Hd(e,t){return t in e?e[t]:t}var ly=I(()=>{"use strict"});function jd(e,t){return Hd(e,t.toLowerCase())}var iy=I(()=>{"use strict";ly()});var ak,nk=I(()=>{"use strict";iy();Po();Us();ak=Xa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jr,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:$e,autoFocus:ue,autoPlay:ue,blocking:$e,capture:null,charSet:null,checked:ue,cite:null,className:$e,cols:z,colSpan:null,content:null,contentEditable:xt,controls:ue,controlsList:$e,coords:z|jr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:Fd,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:$e,height:z,hidden:Fd,high:z,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:$e,itemRef:$e,itemScope:ue,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:z,pattern:null,ping:$e,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:$e,required:ue,reversed:ue,rows:z,rowSpan:z,sandbox:$e,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:xt,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:jd})});var rk,ok=I(()=>{"use strict";ly();Po();Us();rk=Xa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ga,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:$e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:jr,g2:jr,glyphName:jr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:ga,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ga,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ga,rev:ga,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ga,requiredFeatures:ga,requiredFonts:ga,requiredFormats:ga,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:ga,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ga,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ga,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hd})});var sy,lk=I(()=>{"use strict";Po();sy=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var uy,ik=I(()=>{"use strict";Po();iy();uy=Xa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jd})});var cy,sk=I(()=>{"use strict";Po();cy=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var dy,uk=I(()=>{"use strict";dy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function fy(e,t){let a=Ns(t),n=t,r=qt;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&VU.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(ck,$U);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!ck.test(o)){let l=o.replace(jU,GU);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}r=Oo}return new r(n,t)}function GU(e){return"-"+e.toLowerCase()}function $U(e){return e.charAt(1).toUpperCase()}var jU,ck,VU,dk=I(()=>{"use strict";ry();ay();ty();jU=/[A-Z]/g,ck=/-[a-z]/g,VU=/^data[-\w.:]+$/i});var fk,Vd,pk=I(()=>{"use strict";JL();tk();nk();ok();lk();ik();sk();uk();dk();fk=ey([oy,ak,sy,uy,cy],"html"),Vd=ey([oy,rk,sy,uy,cy],"svg")});function mk(e){return e.join(" ").trim()}var hk=I(()=>{"use strict"});var bk=Wt((HQ,vk)=>{"use strict";var gk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,WU=/\n/g,XU=/^\s*/,ZU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QU=/^:\s*/,KU=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,YU=/^[;\s]*/,JU=/^\s+|\s+$/g,e4=`
|
|
42
|
-
`,yk="/",wk="*",No="",t4="comment",a4="declaration";function n4(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var a=1,n=1;function r(m){var x=m.match(WU);x&&(a+=x.length);var b=m.lastIndexOf(e4);n=~b?m.length-b:n+m.length}function o(){var m={line:a,column:n};return function(x){return x.position=new l(m),u(),x}}function l(m){this.start=m,this.end={line:a,column:n},this.source=t.source}l.prototype.content=e;function i(m){var x=new Error(t.source+":"+a+":"+n+": "+m);if(x.reason=m,x.filename=t.source,x.line=a,x.column=n,x.source=e,!t.silent)throw x}function s(m){var x=m.exec(e);if(x){var b=x[0];return r(b),e=e.slice(b.length),x}}function u(){s(XU)}function c(m){var x;for(m=m||[];x=d();)x!==!1&&m.push(x);return m}function d(){var m=o();if(!(yk!=e.charAt(0)||wk!=e.charAt(1))){for(var x=2;No!=e.charAt(x)&&(wk!=e.charAt(x)||yk!=e.charAt(x+1));)++x;if(x+=2,No===e.charAt(x-1))return i("End of comment missing");var b=e.slice(2,x-2);return n+=2,r(b),e=e.slice(x),n+=2,m({type:t4,comment:b})}}function f(){var m=o(),x=s(ZU);if(x){if(d(),!s(QU))return i("property missing ':'");var b=s(KU),y=m({type:a4,property:xk(x[0].replace(gk,No)),value:b?xk(b[0].replace(gk,No)):No});return s(YU),y}}function p(){var m=[];c(m);for(var x;x=f();)x!==!1&&(m.push(x),c(m));return m}return u(),p()}function xk(e){return e?e.replace(JU,No):No}vk.exports=n4});var Sk=Wt(zs=>{"use strict";var r4=zs&&zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zs,"__esModule",{value:!0});zs.default=l4;var o4=r4(bk());function l4(e,t){let a=null;if(!e||typeof e!="string")return a;let n=(0,o4.default)(e),r=typeof t=="function";return n.forEach(o=>{if(o.type!=="declaration")return;let{property:l,value:i}=o;r?t(l,i,o):i&&(a=a||{},a[l]=i)}),a}});var Ik=Wt(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.camelCase=void 0;var i4=/^--[a-zA-Z0-9_-]+$/,s4=/-([a-z])/g,u4=/^[^-]+$/,c4=/^-(webkit|moz|ms|o|khtml)-/,d4=/^-(ms)-/,f4=function(e){return!e||u4.test(e)||i4.test(e)},p4=function(e,t){return t.toUpperCase()},Ck=function(e,t){return"".concat(t,"-")},m4=function(e,t){return t===void 0&&(t={}),f4(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(d4,Ck):e=e.replace(c4,Ck),e.replace(s4,p4))};Gd.camelCase=m4});var kk=Wt((my,Lk)=>{"use strict";var h4=my&&my.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},g4=h4(Sk()),y4=Ik();function py(e,t){var a={};return!e||typeof e!="string"||(0,g4.default)(e,function(n,r){n&&r&&(a[(0,y4.camelCase)(n,t)]=r)}),a}py.default=py;Lk.exports=py});function Vr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tk(e.position):"start"in e||"end"in e?Tk(e):"line"in e||"column"in e?hy(e):""}function hy(e){return Ak(e&&e.line)+":"+Ak(e&&e.column)}function Tk(e){return hy(e&&e.start)+"-"+hy(e&&e.end)}function Ak(e){return e&&typeof e=="number"?e:1}var Mk=I(()=>{"use strict"});var gy=I(()=>{"use strict";Mk()});var Lt,Ek=I(()=>{"use strict";gy();Lt=class extends Error{constructor(t,a,n){super(),typeof a=="string"&&(n=a,a=void 0);let r="",o={},l=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof t=="string"?r=t:!o.cause&&t&&(l=!0,r=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof n=="string"){let s=n.indexOf(":");s===-1?o.ruleId=n:(o.source=n.slice(0,s),o.ruleId=n.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){let s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}let i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Vr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0});var yy=I(()=>{"use strict";Ek()});function xy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let a=t.filePath||void 0,n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=M4(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=A4(a,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vd:fk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=_k(r,e,void 0);return o&&typeof o!="string"?o:r.create(e,r.Fragment,{children:o||void 0},void 0)}function _k(e,t,a){if(t.type==="element")return S4(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return C4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return L4(e,t,a);if(t.type==="mdxjsEsm")return I4(e,t);if(t.type==="root")return k4(e,t,a);if(t.type==="text")return T4(e,t)}function S4(e,t,a){let n=e.schema,r=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Vd,e.schema=r),e.ancestors.push(t);let o=Pk(e,t.tagName,!1),l=E4(e,t),i=by(e,t);return v4.has(t.tagName)&&(i=i.filter(function(s){return typeof s=="string"?!Yg(s):!0})),Ok(e,l,o,t),vy(l,i),e.ancestors.pop(),e.schema=n,e.create(t,o,l,a)}function C4(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}qs(e,t.position)}function I4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qs(e,t.position)}function L4(e,t,a){let n=e.schema,r=n;t.name==="svg"&&n.space==="html"&&(r=Vd,e.schema=r),e.ancestors.push(t);let o=t.name===null?e.Fragment:Pk(e,t.name,!0),l=R4(e,t),i=by(e,t);return Ok(e,l,o,t),vy(l,i),e.ancestors.pop(),e.schema=n,e.create(t,o,l,a)}function k4(e,t,a){let n={};return vy(n,by(e,t)),e.create(t,e.Fragment,n,a)}function T4(e,t){return t.value}function Ok(e,t,a,n){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=n)}function vy(e,t){if(t.length>0){let a=t.length>1?t:t[0];a&&(e.children=a)}}function A4(e,t,a){return n;function n(r,o,l,i){let u=Array.isArray(l.children)?a:t;return i?u(o,l,i):u(o,l)}}function M4(e,t){return a;function a(n,r,o,l){let i=Array.isArray(o.children),s=zl(n);return t(r,o,l,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function E4(e,t){let a={},n,r;for(r in t.properties)if(r!=="children"&&wy.call(t.properties,r)){let o=D4(e,r,t.properties[r]);if(o){let[l,i]=o;e.tableCellAlignToStyle&&l==="align"&&typeof i=="string"&&b4.has(t.tagName)?n=i:a[l]=i}}if(n){let o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return a}function R4(e,t){let a={};for(let n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){let o=n.data.estree.body[0];o.type;let l=o.expression;l.type;let i=l.properties[0];i.type,Object.assign(a,e.evaluater.evaluateExpression(i.argument))}else qs(e,t.position);else{let r=n.name,o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){let i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else qs(e,t.position);else o=n.value===null?!0:n.value;a[r]=o}return a}function by(e,t){let a=[],n=-1,r=e.passKeys?new Map:w4;for(;++n<t.children.length;){let o=t.children[n],l;if(e.passKeys){let s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){let u=r.get(s)||0;l=s+"-"+u,r.set(s,u+1)}}let i=_k(e,o,l);i!==void 0&&a.push(i)}return a}function D4(e,t,a){let n=fy(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=n.commaSeparated?$L(a):mk(a)),n.property==="style"){let r=typeof a=="object"?a:_4(e,String(a));return e.stylePropertyNameCase==="css"&&(r=O4(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&n.space?dy[n.property]||n.property:n.attribute,a]}}function _4(e,t){try{return(0,Rk.default)(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};let n=a,r=new Lt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Dk+"#cannot-parse-style-attribute",r}}function Pk(e,t,a){let n;if(!a)n={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),o=-1,l;for(;++o<r.length;){let i=qd(r[o])?{type:"Identifier",name:r[o]}:{type:"Literal",value:r[o]};l=l?{type:"MemberExpression",object:l,property:i,computed:!!(o&&i.type==="Literal"),optional:!1}:i}n=l}else n=qd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){let r=n.value;return wy.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(n);qs(e)}function qs(e,t){let a=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Dk+"#cannot-handle-mdx-estrees-without-createevaluater",a}function O4(e){let t={},a;for(a in e)wy.call(e,a)&&(t[P4(a)]=e[a]);return t}function P4(e){let t=e.replace(x4,N4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function N4(e){return"-"+e.toLowerCase()}var Rk,wy,w4,x4,v4,b4,Dk,Nk=I(()=>{"use strict";WL();ZL();YL();pk();hk();Rk=q(kk(),1);Ts();yy();wy={}.hasOwnProperty,w4=new Map,x4=/[A-Z]/g,v4=new Set(["table","tbody","thead","tfoot","tr"]),b4=new Set(["td","th"]),Dk="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var Bk=I(()=>{"use strict";Nk()});function B4(e){let t=e.attempt(this.parser.constructs.contentInitial,n,r),a;return t;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Q(e,t,"linePrefix")}function r(i){return e.enter("paragraph"),o(i)}function o(i){let s=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=s),a=s,l(i)}function l(i){if(i===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(i);return}return G(i)?(e.consume(i),e.exit("chunkText"),o):(e.consume(i),l)}}var Uk,zk=I(()=>{"use strict";It();Me();Uk={tokenize:B4}});function U4(e){let t=this,a=[],n=0,r,o,l;return i;function i(g){if(n<a.length){let v=a[n];return t.containerState=v[1],e.attempt(v[0].continuation,s,u)(g)}return u(g)}function s(g){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&w();let v=t.events.length,M=v,C;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){C=t.events[M][1].end;break}y(n);let A=v;for(;A<t.events.length;)t.events[A][1].end={...C},A++;return Ct(t.events,M+1,0,t.events.slice(v)),t.events.length=A,u(g)}return i(g)}function u(g){if(n===a.length){if(!r)return f(g);if(r.currentConstruct&&r.currentConstruct.concrete)return m(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qk,c,d)(g)}function c(g){return r&&w(),y(n),f(g)}function d(g){return t.parser.lazy[t.now().line]=n!==a.length,l=t.now().offset,m(g)}function f(g){return t.containerState={},e.attempt(qk,p,m)(g)}function p(g){return n++,a.push([t.currentConstruct,t.containerState]),f(g)}function m(g){if(g===null){r&&w(),y(0),e.consume(g);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),x(g)}function x(g){if(g===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(g);return}return G(g)?(e.consume(g),b(e.exit("chunkFlow")),n=0,t.interrupt=void 0,i):(e.consume(g),x)}function b(g,v){let M=t.sliceStream(g);if(v&&M.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(M),t.parser.lazy[g.start.line]){let C=r.events.length;for(;C--;)if(r.events[C][1].start.offset<l&&(!r.events[C][1].end||r.events[C][1].end.offset>l))return;let A=t.events.length,E=A,_,k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(_){k=t.events[E][1].end;break}_=!0}for(y(n),C=A;C<t.events.length;)t.events[C][1].end={...k},C++;Ct(t.events,E+1,0,t.events.slice(A)),t.events.length=C}}function y(g){let v=a.length;for(;v-- >g;){let M=a[v];t.containerState=M[1],M[0].exit.call(t,e)}a.length=g}function w(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}function z4(e,t,a){return Q(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Fk,qk,Hk=I(()=>{"use strict";It();Me();Yn();Fk={tokenize:U4},qk={tokenize:z4}});function q4(e){let t=this,a=e.attempt(vn,n,e.attempt(this.parser.constructs.flowInitial,r,Q(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Dg,r)),"linePrefix")));return a;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,a}}var jk,Vk=I(()=>{"use strict";Od();It();jk={tokenize:q4}});function Xk(e){return{resolveAll:Zk(e==="text"?F4:void 0),tokenize:t};function t(a){let n=this,r=this.parser.constructs[e],o=a.attempt(r,l,i);return l;function l(c){return u(c)?o(c):i(c)}function i(c){if(c===null){a.consume(c);return}return a.enter("data"),a.consume(c),s}function s(c){return u(c)?(a.exit("data"),o(c)):(a.consume(c),s)}function u(c){if(c===null)return!0;let d=r[c],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function Zk(e){return t;function t(a,n){let r=-1,o;for(;++r<=a.length;)o===void 0?a[r]&&a[r][1].type==="data"&&(o=r,r++):(!a[r]||a[r][1].type!=="data")&&(r!==o+2&&(a[o][1].end=a[r-1][1].end,a.splice(o+2,r-o-2),r=o+2),o=void 0);return e?e(a,n):a}}function F4(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){let n=e[a-1][1],r=t.sliceStream(n),o=r.length,l=-1,i=0,s;for(;o--;){let u=r[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)i++,l--;if(l)break;l=-1}else if(u===-2)s=!0,i++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(i=0),i){let u={type:a===e.length||s||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:n.start._bufferIndex+l,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(a,0,["enter",u,t],["exit",u,t]),a+=2)}a++}return e}var Gk,$k,Wk,Sy=I(()=>{"use strict";Gk={resolveAll:Zk()},$k=Xk("string"),Wk=Xk("text")});var Cy={};wu(Cy,{attentionMarkers:()=>Z4,contentInitial:()=>j4,disable:()=>Q4,document:()=>H4,flow:()=>G4,flowInitial:()=>V4,insideSpan:()=>X4,string:()=>$4,text:()=>W4});var H4,j4,V4,G4,$4,W4,X4,Z4,Q4,Qk=I(()=>{"use strict";Od();Sy();H4={42:Qt,43:Qt,45:Qt,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,62:Cd},j4={91:Bg},V4={[-2]:_s,[-1]:_s,32:_s},G4={35:zg,42:Ro,45:[_d,Ro],60:Fg,61:_d,95:Ro,96:kd,126:kd},$4={38:Ld,92:Id},W4={[-5]:Ps,[-4]:Ps,[-3]:Ps,33:jg,38:Ld,42:Ds,60:[Mg,Hg],91:Vg,92:[Ug,Id],93:Eo,95:Ds,96:Eg},X4={null:[Ds,Gk]},Z4={null:[42,95]},Q4={null:[]}});function Kk(e,t,a){let n={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0},r={},o=[],l=[],i=[],s=!0,u={attempt:_(A),check:_(E),consume:v,enter:M,exit:C,interrupt:_(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:b,parser:e,previous:null,sliceSerialize:m,sliceStream:x,write:p},d=t.tokenize.call(c,u),f;return t.resolveAll&&o.push(t),c;function p(R){return l=aa(l,R),w(),l[l.length-1]!==null?[]:(k(t,0),c.events=Fr(o,c.events,c),c.events)}function m(R,B){return Y4(x(R),B)}function x(R){return K4(l,R)}function b(){let{_bufferIndex:R,_index:B,line:F,column:j,offset:K}=n;return{_bufferIndex:R,_index:B,line:F,column:j,offset:K}}function y(R){r[R.line]=R.column,U()}function w(){let R;for(;n._index<l.length;){let B=l[n._index];if(typeof B=="string")for(R=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===R&&n._bufferIndex<B.length;)g(B.charCodeAt(n._bufferIndex));else g(B)}}function g(R){s=void 0,f=R,d=d(R)}function v(R){G(R)?(n.line++,n.column=1,n.offset+=R===-3?2:1,U()):R!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===l[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=R,s=!0}function M(R,B){let F=B||{};return F.type=R,F.start=b(),c.events.push(["enter",F,c]),i.push(F),F}function C(R){let B=i.pop();return B.end=b(),c.events.push(["exit",B,c]),B}function A(R,B){k(R,B.from)}function E(R,B){B.restore()}function _(R,B){return F;function F(j,K,de){let He,S,Be,rt;return Array.isArray(j)?Re(j):"tokenize"in j?Re([j]):L(j);function L(fe){return me;function me(be){let De=be!==null&&fe[be],Se=be!==null&&fe.null,Ue=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return Re(Ue)(be)}}function Re(fe){return He=fe,S=0,fe.length===0?de:le(fe[S])}function le(fe){return me;function me(be){return rt=W(),Be=fe,fe.partial||(c.currentConstruct=fe),fe.name&&c.parser.constructs.disable.null.includes(fe.name)?kt(be):fe.tokenize.call(B?Object.assign(Object.create(c),B):c,u,ve,kt)(be)}}function ve(fe){return s=!0,R(Be,rt),K}function kt(fe){return s=!0,rt.restore(),++S<He.length?le(He[S]):de}}}function k(R,B){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Ct(c.events,B,c.events.length-B,R.resolve(c.events.slice(B),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function W(){let R=b(),B=c.previous,F=c.currentConstruct,j=c.events.length,K=Array.from(i);return{from:j,restore:de};function de(){n=R,c.previous=B,c.currentConstruct=F,c.events.length=j,i=K,U()}}function U(){n.line in r&&n.column<2&&(n.column=r[n.line],n.offset+=r[n.line]-1)}}function K4(e,t){let a=t.start._index,n=t.start._bufferIndex,r=t.end._index,o=t.end._bufferIndex,l;if(a===r)l=[e[a].slice(n,o)];else{if(l=e.slice(a,r),n>-1){let i=l[0];typeof i=="string"?l[0]=i.slice(n):l.shift()}o>0&&l.push(e[r].slice(0,o))}return l}function Y4(e,t){let a=-1,n=[],r;for(;++a<e.length;){let o=e[a],l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
38
|
+
$$`:`${e}$$`},R4=e=>M4(e)%2===0?e:E4(e),D4=(e,t,a)=>{if(e.substring(t+2).includes(")"))return null;let n=r4(e,t);if(n===-1||jd(e,n))return null;let r=n>0&&e[n-1]==="!",o=r?n-1:n,l=e.substring(0,o);if(r)return l;let i=e.substring(n+1,t);return a==="text-only"?`${l}${i}`:`${l}[${i}](streamdown:incomplete-link)`},sL=(e,t)=>{for(let a=0;a<=t;a++)if(e[a]==="["&&!jd(e,a)){if(a>0&&e[a-1]==="!")continue;let n=fL(e,a);if(n===-1)return a;if(n+1<e.length&&e[n+1]==="("){let r=e.indexOf(")",n+2);r!==-1&&(a=r)}}return-1},_4=(e,t,a)=>{let n=t>0&&e[t-1]==="!",r=n?t-1:t,o=e.substring(t+1);if(!o.includes("]")){let l=e.substring(0,r);if(n)return l;if(a==="text-only"){let i=sL(e,t);return i!==-1?e.substring(0,i)+e.substring(i+1):`${l}${o}`}return`${e}](streamdown:incomplete-link)`}if(fL(e,t)===-1){let l=e.substring(0,r);if(n)return l;if(a==="text-only"){let i=sL(e,t);if(i!==-1)return e.substring(0,i)+e.substring(i+1);let s=e.substring(t+1);return`${l}${s}`}return`${e}](streamdown:incomplete-link)`}return null},gL=(e,t="protocol")=>{let a=e.lastIndexOf("](");if(a!==-1&&!jd(e,a)){let n=D4(e,a,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!jd(e,n)){let r=_4(e,n,t);if(r!==null)return r}return e},O4=/^-{1,2}$/,P4=/^[\s]*-{1,2}[\s]+$/,N4=/^={1,2}$/,B4=/^[\s]*={1,2}[\s]+$/,U4=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
39
|
+
`);if(t===-1)return e;let a=e.substring(t+1),n=e.substring(0,t),r=a.trim();if(O4.test(r)&&!a.match(P4)){let o=n.split(`
|
|
40
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(N4.test(r)&&!a.match(B4)){let o=n.split(`
|
|
41
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},F4=e=>{let t=e.match(QU);if(t){let a=t[2];if(!a||Oo.test(a))return e;if((e.match(iL)||[]).length%2===1)return`${e}~~`}else if(e.match(a4)&&(e.match(iL)||[]).length%2===1)return`${e}~`;return e},uy=e=>e!==!1,Da={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},z4=[{handler:{name:"setextHeadings",handle:U4,priority:Da.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:gL,priority:Da.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:S4,priority:Da.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:f4,priority:Da.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:m4,priority:Da.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:g4,priority:Da.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:x4,priority:Da.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:T4,priority:Da.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:F4,priority:Da.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:R4,priority:Da.KATEX},optionKey:"katex"}],q4=e=>{var t;let a=(t=e?.linkMode)!=null?t:"protocol";return z4.filter(({handler:n,optionKey:r})=>n.name==="links"?uy(e?.links)||uy(e?.images):uy(e?.[r])).map(({handler:n,earlyReturn:r})=>n.name==="links"?{handler:cL(uL({},n),{handle:o=>gL(o,a)}),earlyReturn:a==="protocol"?r:void 0}:{handler:n,earlyReturn:r})},H4=(e,t)=>{var a;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,r=q4(t),o=((a=t?.handlers)!=null?a:[]).map(i=>{var s;return{handler:cL(uL({},i),{priority:(s=i.priority)!=null?s:Da.DEFAULT}),earlyReturn:void 0}}),l=[...r,...o].sort((i,s)=>{var u,c;return((u=i.handler.priority)!=null?u:Da.DEFAULT)-((c=s.handler.priority)!=null?c:Da.DEFAULT)});for(let{handler:i,earlyReturn:s}of l)if(n=i.handle(n),s!=null&&s(n))return n;return n},yL=H4});function xL(e,t){let a=t||{};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}var vL=C(()=>{"use strict"});function Gd(e,t){return((t||G4).jsx?V4:j4).test(e)}var j4,V4,G4,bL=C(()=>{"use strict";j4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G4={}});var SL=C(()=>{"use strict";bL()});function dy(e){return typeof e=="object"?e.type==="text"?IL(e.value):!1:IL(e)}function IL(e){return e.replace($4,"")===""}var $4,CL=C(()=>{"use strict";$4=/[ \t\n\f\r]/g});var kL=C(()=>{"use strict";CL()});var tr,fy=C(()=>{"use strict";tr=class{constructor(t,a,n){this.normal=a,this.property=t,n&&(this.space=n)}};tr.prototype.normal={};tr.prototype.property={};tr.prototype.space=void 0});function py(e,t){let a={},n={};for(let r of e)Object.assign(a,r.property),Object.assign(n,r.normal);return new tr(a,n,t)}var LL=C(()=>{"use strict";fy()});function zs(e){return e.toLowerCase()}var my=C(()=>{"use strict"});var qt,hy=C(()=>{"use strict";qt=class{constructor(t,a){this.attribute=a,this.property=t}};qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0});var qs={};bu(qs,{boolean:()=>ce,booleanish:()=>xt,commaOrSpaceSeparated:()=>ga,commaSeparated:()=>Vr,number:()=>F,overloadedBoolean:()=>$d,spaceSeparated:()=>$e});function Po(){return 2**++W4}var W4,ce,xt,$d,F,$e,Vr,ga,Hs=C(()=>{"use strict";W4=0,ce=Po(),xt=Po(),$d=Po(),F=Po(),$e=Po(),Vr=Po(),ga=Po()});function TL(e,t,a){a&&(e[t]=a)}var gy,No,yy=C(()=>{"use strict";hy();Hs();gy=Object.keys(qs),No=class extends qt{constructor(t,a,n,r){let o=-1;if(super(t,a),TL(this,"space",r),typeof n=="number")for(;++o<gy.length;){let l=gy[o];TL(this,gy[o],(n&qs[l])===qs[l])}}};No.prototype.defined=!0});function Ka(e){let t={},a={};for(let[n,r]of Object.entries(e.properties)){let o=new No(n,e.transform(e.attributes||{},n),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),t[n]=o,a[zs(n)]=n,a[zs(o.attribute)]=n}return new tr(t,a,e.space)}var Bo=C(()=>{"use strict";my();yy();fy()});var wy,AL=C(()=>{"use strict";Bo();Hs();wy=Ka({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:$e,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:F,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:$e,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:xt,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function Wd(e,t){return t in e?e[t]:t}var xy=C(()=>{"use strict"});function Xd(e,t){return Wd(e,t.toLowerCase())}var vy=C(()=>{"use strict";xy()});var ML,EL=C(()=>{"use strict";vy();Bo();Hs();ML=Ka({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vr,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:$e,autoFocus:ce,autoPlay:ce,blocking:$e,capture:null,charSet:null,checked:ce,cite:null,className:$e,cols:F,colSpan:null,content:null,contentEditable:xt,controls:ce,controlsList:$e,coords:F|Vr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:$d,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:$e,height:F,hidden:$d,high:F,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:$e,itemRef:$e,itemScope:ce,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ce,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:ce,muted:ce,name:null,nonce:null,noModule:ce,noValidate:ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ce,optimum:F,pattern:null,ping:$e,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:$e,required:ce,reversed:ce,rows:F,rowSpan:F,sandbox:$e,scope:null,scoped:ce,seamless:ce,selected:ce,shadowRootClonable:ce,shadowRootDelegatesFocus:ce,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:ce,useMap:null,value:xt,width:F,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ce,declare:ce,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:ce,noHref:ce,noShade:ce,noWrap:ce,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ce,disableRemotePlayback:ce,prefix:null,property:null,results:F,security:null,unselectable:null},space:"html",transform:Xd})});var RL,DL=C(()=>{"use strict";xy();Bo();Hs();RL=Ka({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ga,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:$e,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vr,g2:Vr,glyphName:Vr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:ga,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:F,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ga,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ga,rev:ga,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ga,requiredFeatures:ga,requiredFonts:ga,requiredFormats:ga,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:ga,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ga,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ga,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Wd})});var by,_L=C(()=>{"use strict";Bo();by=Ka({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var Sy,OL=C(()=>{"use strict";Bo();vy();Sy=Ka({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xd})});var Iy,PL=C(()=>{"use strict";Bo();Iy=Ka({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var Cy,NL=C(()=>{"use strict";Cy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function ky(e,t){let a=zs(t),n=t,r=qt;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&K4.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(BL,Q4);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!BL.test(o)){let l=o.replace(X4,Z4);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}r=No}return new r(n,t)}function Z4(e){return"-"+e.toLowerCase()}function Q4(e){return e.charAt(1).toUpperCase()}var X4,BL,K4,UL=C(()=>{"use strict";yy();hy();my();X4=/[A-Z]/g,BL=/-[a-z]/g,K4=/^data[-\w.:]+$/i});var FL,Kd,zL=C(()=>{"use strict";LL();AL();EL();DL();_L();OL();PL();NL();UL();FL=py([wy,ML,by,Sy,Iy],"html"),Kd=py([wy,RL,by,Sy,Iy],"svg")});function qL(e){return e.join(" ").trim()}var HL=C(()=>{"use strict"});var XL=Wt((QQ,WL)=>{"use strict";var jL=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Y4=/\n/g,J4=/^\s*/,eF=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tF=/^:\s*/,aF=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,nF=/^[;\s]*/,rF=/^\s+|\s+$/g,oF=`
|
|
42
|
+
`,VL="/",GL="*",Uo="",lF="comment",iF="declaration";function sF(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var a=1,n=1;function r(m){var x=m.match(Y4);x&&(a+=x.length);var b=m.lastIndexOf(oF);n=~b?m.length-b:n+m.length}function o(){var m={line:a,column:n};return function(x){return x.position=new l(m),u(),x}}function l(m){this.start=m,this.end={line:a,column:n},this.source=t.source}l.prototype.content=e;function i(m){var x=new Error(t.source+":"+a+":"+n+": "+m);if(x.reason=m,x.filename=t.source,x.line=a,x.column=n,x.source=e,!t.silent)throw x}function s(m){var x=m.exec(e);if(x){var b=x[0];return r(b),e=e.slice(b.length),x}}function u(){s(J4)}function c(m){var x;for(m=m||[];x=d();)x!==!1&&m.push(x);return m}function d(){var m=o();if(!(VL!=e.charAt(0)||GL!=e.charAt(1))){for(var x=2;Uo!=e.charAt(x)&&(GL!=e.charAt(x)||VL!=e.charAt(x+1));)++x;if(x+=2,Uo===e.charAt(x-1))return i("End of comment missing");var b=e.slice(2,x-2);return n+=2,r(b),e=e.slice(x),n+=2,m({type:lF,comment:b})}}function f(){var m=o(),x=s(eF);if(x){if(d(),!s(tF))return i("property missing ':'");var b=s(aF),y=m({type:iF,property:$L(x[0].replace(jL,Uo)),value:b?$L(b[0].replace(jL,Uo)):Uo});return s(nF),y}}function p(){var m=[];c(m);for(var x;x=f();)x!==!1&&(m.push(x),c(m));return m}return u(),p()}function $L(e){return e?e.replace(rF,Uo):Uo}WL.exports=sF});var KL=Wt(js=>{"use strict";var uF=js&&js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});js.default=dF;var cF=uF(XL());function dF(e,t){let a=null;if(!e||typeof e!="string")return a;let n=(0,cF.default)(e),r=typeof t=="function";return n.forEach(o=>{if(o.type!=="declaration")return;let{property:l,value:i}=o;r?t(l,i,o):i&&(a=a||{},a[l]=i)}),a}});var QL=Wt(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.camelCase=void 0;var fF=/^--[a-zA-Z0-9_-]+$/,pF=/-([a-z])/g,mF=/^[^-]+$/,hF=/^-(webkit|moz|ms|o|khtml)-/,gF=/^-(ms)-/,yF=function(e){return!e||mF.test(e)||fF.test(e)},wF=function(e,t){return t.toUpperCase()},ZL=function(e,t){return"".concat(t,"-")},xF=function(e,t){return t===void 0&&(t={}),yF(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(gF,ZL):e=e.replace(hF,ZL),e.replace(pF,wF))};Zd.camelCase=xF});var JL=Wt((Ty,YL)=>{"use strict";var vF=Ty&&Ty.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bF=vF(KL()),SF=QL();function Ly(e,t){var a={};return!e||typeof e!="string"||(0,bF.default)(e,function(n,r){n&&r&&(a[(0,SF.camelCase)(n,t)]=r)}),a}Ly.default=Ly;YL.exports=Ly});function Gr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?eT(e.position):"start"in e||"end"in e?eT(e):"line"in e||"column"in e?Ay(e):""}function Ay(e){return tT(e&&e.line)+":"+tT(e&&e.column)}function eT(e){return Ay(e&&e.start)+"-"+Ay(e&&e.end)}function tT(e){return e&&typeof e=="number"?e:1}var aT=C(()=>{"use strict"});var My=C(()=>{"use strict";aT()});var Lt,nT=C(()=>{"use strict";My();Lt=class extends Error{constructor(t,a,n){super(),typeof a=="string"&&(n=a,a=void 0);let r="",o={},l=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof t=="string"?r=t:!o.cause&&t&&(l=!0,r=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof n=="string"){let s=n.indexOf(":");s===-1?o.ruleId=n:(o.source=n.slice(0,s),o.ruleId=n.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){let s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}let i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Gr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0});var Ey=C(()=>{"use strict";nT()});function Dy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let a=t.filePath||void 0,n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=OF(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=_F(a,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kd:FL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=lT(r,e,void 0);return o&&typeof o!="string"?o:r.create(e,r.Fragment,{children:o||void 0},void 0)}function lT(e,t,a){if(t.type==="element")return TF(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return AF(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EF(e,t,a);if(t.type==="mdxjsEsm")return MF(e,t);if(t.type==="root")return RF(e,t,a);if(t.type==="text")return DF(e,t)}function TF(e,t,a){let n=e.schema,r=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Kd,e.schema=r),e.ancestors.push(t);let o=sT(e,t.tagName,!1),l=PF(e,t),i=Oy(e,t);return kF.has(t.tagName)&&(i=i.filter(function(s){return typeof s=="string"?!dy(s):!0})),iT(e,l,o,t),_y(l,i),e.ancestors.pop(),e.schema=n,e.create(t,o,l,a)}function AF(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Vs(e,t.position)}function MF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vs(e,t.position)}function EF(e,t,a){let n=e.schema,r=n;t.name==="svg"&&n.space==="html"&&(r=Kd,e.schema=r),e.ancestors.push(t);let o=t.name===null?e.Fragment:sT(e,t.name,!0),l=NF(e,t),i=Oy(e,t);return iT(e,l,o,t),_y(l,i),e.ancestors.pop(),e.schema=n,e.create(t,o,l,a)}function RF(e,t,a){let n={};return _y(n,Oy(e,t)),e.create(t,e.Fragment,n,a)}function DF(e,t){return t.value}function iT(e,t,a,n){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=n)}function _y(e,t){if(t.length>0){let a=t.length>1?t:t[0];a&&(e.children=a)}}function _F(e,t,a){return n;function n(r,o,l,i){let u=Array.isArray(l.children)?a:t;return i?u(o,l,i):u(o,l)}}function OF(e,t){return a;function a(n,r,o,l){let i=Array.isArray(o.children),s=Hl(n);return t(r,o,l,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function PF(e,t){let a={},n,r;for(r in t.properties)if(r!=="children"&&Ry.call(t.properties,r)){let o=BF(e,r,t.properties[r]);if(o){let[l,i]=o;e.tableCellAlignToStyle&&l==="align"&&typeof i=="string"&&LF.has(t.tagName)?n=i:a[l]=i}}if(n){let o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return a}function NF(e,t){let a={};for(let n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){let o=n.data.estree.body[0];o.type;let l=o.expression;l.type;let i=l.properties[0];i.type,Object.assign(a,e.evaluater.evaluateExpression(i.argument))}else Vs(e,t.position);else{let r=n.name,o;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){let i=n.value.data.estree.body[0];i.type,o=e.evaluater.evaluateExpression(i.expression)}else Vs(e,t.position);else o=n.value===null?!0:n.value;a[r]=o}return a}function Oy(e,t){let a=[],n=-1,r=e.passKeys?new Map:IF;for(;++n<t.children.length;){let o=t.children[n],l;if(e.passKeys){let s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){let u=r.get(s)||0;l=s+"-"+u,r.set(s,u+1)}}let i=lT(e,o,l);i!==void 0&&a.push(i)}return a}function BF(e,t,a){let n=ky(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=n.commaSeparated?xL(a):qL(a)),n.property==="style"){let r=typeof a=="object"?a:UF(e,String(a));return e.stylePropertyNameCase==="css"&&(r=FF(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&n.space?Cy[n.property]||n.property:n.attribute,a]}}function UF(e,t){try{return(0,rT.default)(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};let n=a,r=new Lt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=oT+"#cannot-parse-style-attribute",r}}function sT(e,t,a){let n;if(!a)n={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),o=-1,l;for(;++o<r.length;){let i=Gd(r[o])?{type:"Identifier",name:r[o]}:{type:"Literal",value:r[o]};l=l?{type:"MemberExpression",object:l,property:i,computed:!!(o&&i.type==="Literal"),optional:!1}:i}n=l}else n=Gd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){let r=n.value;return Ry.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(n);Vs(e)}function Vs(e,t){let a=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=oT+"#cannot-handle-mdx-estrees-without-createevaluater",a}function FF(e){let t={},a;for(a in e)Ry.call(e,a)&&(t[zF(a)]=e[a]);return t}function zF(e){let t=e.replace(CF,qF);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qF(e){return"-"+e.toLowerCase()}var rT,Ry,IF,CF,kF,LF,oT,uT=C(()=>{"use strict";vL();SL();kL();zL();HL();rT=z(JL(),1);Rs();Ey();Ry={}.hasOwnProperty,IF=new Map,CF=/[A-Z]/g,kF=new Set(["table","tbody","thead","tfoot","tr"]),LF=new Set(["td","th"]),oT="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var cT=C(()=>{"use strict";uT()});function HF(e){let t=e.attempt(this.parser.constructs.contentInitial,n,r),a;return t;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Q(e,t,"linePrefix")}function r(i){return e.enter("paragraph"),o(i)}function o(i){let s=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=s),a=s,l(i)}function l(i){if(i===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(i);return}return G(i)?(e.consume(i),e.exit("chunkText"),o):(e.consume(i),l)}}var dT,fT=C(()=>{"use strict";kt();Ee();dT={tokenize:HF}});function jF(e){let t=this,a=[],n=0,r,o,l;return i;function i(g){if(n<a.length){let v=a[n];return t.containerState=v[1],e.attempt(v[0].continuation,s,u)(g)}return u(g)}function s(g){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&w();let v=t.events.length,M=v,I;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){I=t.events[M][1].end;break}y(n);let A=v;for(;A<t.events.length;)t.events[A][1].end={...I},A++;return Ct(t.events,M+1,0,t.events.slice(v)),t.events.length=A,u(g)}return i(g)}function u(g){if(n===a.length){if(!r)return f(g);if(r.currentConstruct&&r.currentConstruct.concrete)return m(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pT,c,d)(g)}function c(g){return r&&w(),y(n),f(g)}function d(g){return t.parser.lazy[t.now().line]=n!==a.length,l=t.now().offset,m(g)}function f(g){return t.containerState={},e.attempt(pT,p,m)(g)}function p(g){return n++,a.push([t.currentConstruct,t.containerState]),f(g)}function m(g){if(g===null){r&&w(),y(0),e.consume(g);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),x(g)}function x(g){if(g===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(g);return}return G(g)?(e.consume(g),b(e.exit("chunkFlow")),n=0,t.interrupt=void 0,i):(e.consume(g),x)}function b(g,v){let M=t.sliceStream(g);if(v&&M.push(null),g.previous=o,o&&(o.next=g),o=g,r.defineSkip(g.start),r.write(M),t.parser.lazy[g.start.line]){let I=r.events.length;for(;I--;)if(r.events[I][1].start.offset<l&&(!r.events[I][1].end||r.events[I][1].end.offset>l))return;let A=t.events.length,E=A,_,L;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(_){L=t.events[E][1].end;break}_=!0}for(y(n),I=A;I<t.events.length;)t.events[I][1].end={...L},I++;Ct(t.events,E+1,0,t.events.slice(A)),t.events.length=I}}function y(g){let v=a.length;for(;v-- >g;){let M=a[v];t.containerState=M[1],M[0].exit.call(t,e)}a.length=g}function w(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}function VF(e,t,a){return Q(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var mT,pT,hT=C(()=>{"use strict";kt();Ee();Jn();mT={tokenize:jF},pT={tokenize:VF}});function GF(e){let t=this,a=e.attempt(bn,n,e.attempt(this.parser.constructs.flowInitial,r,Q(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Gg,r)),"linePrefix")));return a;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,a}}var gT,yT=C(()=>{"use strict";Fd();kt();gT={tokenize:GF}});function bT(e){return{resolveAll:ST(e==="text"?$F:void 0),tokenize:t};function t(a){let n=this,r=this.parser.constructs[e],o=a.attempt(r,l,i);return l;function l(c){return u(c)?o(c):i(c)}function i(c){if(c===null){a.consume(c);return}return a.enter("data"),a.consume(c),s}function s(c){return u(c)?(a.exit("data"),o(c)):(a.consume(c),s)}function u(c){if(c===null)return!0;let d=r[c],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function ST(e){return t;function t(a,n){let r=-1,o;for(;++r<=a.length;)o===void 0?a[r]&&a[r][1].type==="data"&&(o=r,r++):(!a[r]||a[r][1].type!=="data")&&(r!==o+2&&(a[o][1].end=a[r-1][1].end,a.splice(o+2,r-o-2),r=o+2),o=void 0);return e?e(a,n):a}}function $F(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){let n=e[a-1][1],r=t.sliceStream(n),o=r.length,l=-1,i=0,s;for(;o--;){let u=r[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)i++,l--;if(l)break;l=-1}else if(u===-2)s=!0,i++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(i=0),i){let u={type:a===e.length||s||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:n.start._bufferIndex+l,_index:n.start._index+o,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(a,0,["enter",u,t],["exit",u,t]),a+=2)}a++}return e}var wT,xT,vT,Py=C(()=>{"use strict";wT={resolveAll:ST()},xT=bT("string"),vT=bT("text")});var Ny={};bu(Ny,{attentionMarkers:()=>ez,contentInitial:()=>XF,disable:()=>tz,document:()=>WF,flow:()=>ZF,flowInitial:()=>KF,insideSpan:()=>JF,string:()=>QF,text:()=>YF});var WF,XF,KF,ZF,QF,YF,JF,ez,tz,IT=C(()=>{"use strict";Fd();Py();WF={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:Ad},XF={91:Zg},KF={[-2]:Bs,[-1]:Bs,32:Bs},ZF={35:Yg,42:_o,45:[Ud,_o],60:ey,61:Ud,95:_o,96:Rd,126:Rd},QF={38:Ed,92:Md},YF={[-5]:Fs,[-4]:Fs,[-3]:Fs,33:ay,38:Ed,42:Ns,60:[Hg,ty],91:ny,92:[Qg,Md],93:Do,95:Ns,96:jg},JF={null:[Ns,wT]},ez={null:[42,95]},tz={null:[]}});function CT(e,t,a){let n={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0},r={},o=[],l=[],i=[],s=!0,u={attempt:_(A),check:_(E),consume:v,enter:M,exit:I,interrupt:_(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:b,parser:e,previous:null,sliceSerialize:m,sliceStream:x,write:p},d=t.tokenize.call(c,u),f;return t.resolveAll&&o.push(t),c;function p(R){return l=aa(l,R),w(),l[l.length-1]!==null?[]:(L(t,0),c.events=Hr(o,c.events,c),c.events)}function m(R,B){return nz(x(R),B)}function x(R){return az(l,R)}function b(){let{_bufferIndex:R,_index:B,line:q,column:j,offset:Y}=n;return{_bufferIndex:R,_index:B,line:q,column:j,offset:Y}}function y(R){r[R.line]=R.column,U()}function w(){let R;for(;n._index<l.length;){let B=l[n._index];if(typeof B=="string")for(R=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===R&&n._bufferIndex<B.length;)g(B.charCodeAt(n._bufferIndex));else g(B)}}function g(R){s=void 0,f=R,d=d(R)}function v(R){G(R)?(n.line++,n.column=1,n.offset+=R===-3?2:1,U()):R!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===l[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=R,s=!0}function M(R,B){let q=B||{};return q.type=R,q.start=b(),c.events.push(["enter",q,c]),i.push(q),q}function I(R){let B=i.pop();return B.end=b(),c.events.push(["exit",B,c]),B}function A(R,B){L(R,B.from)}function E(R,B){B.restore()}function _(R,B){return q;function q(j,Y,fe){let He,S,Be,rt;return Array.isArray(j)?De(j):"tokenize"in j?De([j]):k(j);function k(pe){return he;function he(Se){let _e=Se!==null&&pe[Se],Ie=Se!==null&&pe.null,Ue=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return De(Ue)(Se)}}function De(pe){return He=pe,S=0,pe.length===0?fe:ie(pe[S])}function ie(pe){return he;function he(Se){return rt=W(),Be=pe,pe.partial||(c.currentConstruct=pe),pe.name&&c.parser.constructs.disable.null.includes(pe.name)?Tt(Se):pe.tokenize.call(B?Object.assign(Object.create(c),B):c,u,be,Tt)(Se)}}function be(pe){return s=!0,R(Be,rt),Y}function Tt(pe){return s=!0,rt.restore(),++S<He.length?ie(He[S]):fe}}}function L(R,B){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Ct(c.events,B,c.events.length-B,R.resolve(c.events.slice(B),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function W(){let R=b(),B=c.previous,q=c.currentConstruct,j=c.events.length,Y=Array.from(i);return{from:j,restore:fe};function fe(){n=R,c.previous=B,c.currentConstruct=q,c.events.length=j,i=Y,U()}}function U(){n.line in r&&n.column<2&&(n.column=r[n.line],n.offset+=r[n.line]-1)}}function az(e,t){let a=t.start._index,n=t.start._bufferIndex,r=t.end._index,o=t.end._bufferIndex,l;if(a===r)l=[e[a].slice(n,o)];else{if(l=e.slice(a,r),n>-1){let i=l[0];typeof i=="string"?l[0]=i.slice(n):l.shift()}o>0&&l.push(e[r].slice(0,o))}return l}function nz(e,t){let a=-1,n=[],r;for(;++a<e.length;){let o=e[a],l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
43
43
|
`;break}case-3:{l=`\r
|
|
44
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&r)continue;l=" ";break}default:l=String.fromCharCode(o)}r=o===-2,n.push(l)}return n.join("")}var Yk=I(()=>{"use strict";Me();Yn();Rs()});function Iy(e){let n={constructs:bd([Cy,...(e||{}).extensions||[]]),content:r(Uk),defined:[],document:r(Fk),flow:r(jk),lazy:{},string:r($k),text:r(Wk)};return n;function r(o){return l;function l(i){return Kk(n,o,i)}}}var Jk=I(()=>{"use strict";Lg();zk();Hk();Vk();Sy();Qk();Yk()});function Ly(e){for(;!Ad(e););return e}var eT=I(()=>{"use strict";Rg()});function ky(){let e=1,t="",a=!0,n;return r;function r(o,l,i){let s=[],u,c,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),d=0,t="",a&&(o.charCodeAt(0)===65279&&d++,a=void 0);d<o.length;){if(tT.lastIndex=d,u=tT.exec(o),f=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(f),!u){t=o.slice(d);break}if(p===10&&d===f&&n)s.push(-3),n=void 0;else switch(n&&(s.push(-5),n=void 0),d<f&&(s.push(o.slice(d,f)),e+=f-d),p){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return i&&(n&&s.push(-5),t&&s.push(t),s.push(null)),s}}var tT,aT=I(()=>{"use strict";tT=/[\0\t\n\r]/g});var nT=I(()=>{"use strict";Jk();eT();aT()});function Ty(e,t,a){return typeof t!="string"&&(a=t,t=void 0),J4(a)(Ly(Iy(a).document().write(ky()(e,t,!0))))}function J4(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(xa),autolinkProtocol:_,autolinkEmail:_,atxHeading:o($),blockQuote:o(be),characterEscape:_,characterReference:_,codeFenced:o(De),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(De,l),codeText:o(Se,l),codeTextData:_,data:_,codeFlowValue:_,definition:o(Ue),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Le),hardBreakEscape:o(re),hardBreakTrailing:o(re),htmlFlow:o(je,l),htmlFlowData:_,htmlText:o(je,l),htmlTextData:_,image:o(Nt),label:l,link:o(xa),listItem:o(oi),listItemValue:f,listOrdered:o(ia,d),listUnordered:o(ia),paragraph:o(jf),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o($),strong:o(qo),thematicBreak:o(Fo)},exit:{atxHeading:s(),atxHeadingSequence:M,autolink:s(),autolinkEmail:me,autolinkProtocol:fe,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ve,characterReference:kt,codeFenced:s(b),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:s(y),codeText:s(F),codeTextData:k,data:k,definition:s(),definitionDestinationString:v,definitionLabelString:w,definitionTitleString:g,emphasis:s(),hardBreakEscape:s(U),hardBreakTrailing:s(U),htmlFlow:s(R),htmlFlowData:k,htmlText:s(B),htmlTextData:k,image:s(K),label:He,labelText:de,lineEnding:W,link:s(j),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:Re,resourceDestinationString:S,resourceTitleString:Be,resource:rt,setextHeading:s(E),setextHeadingLineSequence:A,setextHeadingText:C,strong:s(),thematicBreak:s()}};lT(t,(e||{}).mdastExtensions||[]);let a={};return n;function n(O){let H={type:"root",children:[]},oe={stack:[H],tokenStack:[],config:t,enter:i,exit:u,buffer:l,resume:c,data:a},ye=[],Fe=-1;for(;++Fe<O.length;)if(O[Fe][1].type==="listOrdered"||O[Fe][1].type==="listUnordered")if(O[Fe][0]==="enter")ye.push(Fe);else{let sa=ye.pop();Fe=r(O,sa,Fe)}for(Fe=-1;++Fe<O.length;){let sa=t[O[Fe][0]];oT.call(sa,O[Fe][1].type)&&sa[O[Fe][1].type].call(Object.assign({sliceSerialize:O[Fe][2].sliceSerialize},oe),O[Fe][1])}if(oe.tokenStack.length>0){let sa=oe.tokenStack[oe.tokenStack.length-1];(sa[1]||rT).call(oe,void 0,sa[0])}for(H.position={start:Gr(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Gr(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)H=t.transforms[Fe](H)||H;return H}function r(O,H,oe){let ye=H-1,Fe=-1,sa=!1,Ln,Ya,N,ae;for(;++ye<=oe;){let J=O[ye];switch(J[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{J[0]==="enter"?Fe++:Fe--,ae=void 0;break}case"lineEndingBlank":{J[0]==="enter"&&(Ln&&!ae&&!Fe&&!N&&(N=ye),ae=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ae=void 0}if(!Fe&&J[0]==="enter"&&J[1].type==="listItemPrefix"||Fe===-1&&J[0]==="exit"&&(J[1].type==="listUnordered"||J[1].type==="listOrdered")){if(Ln){let mt=ye;for(Ya=void 0;mt--;){let Qe=O[mt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ya&&(O[Ya][1].type="lineEndingBlank",sa=!0),Qe[1].type="lineEnding",Ya=mt}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}N&&(!Ya||N<Ya)&&(Ln._spread=!0),Ln.end=Object.assign({},Ya?O[Ya][1].start:J[1].end),O.splice(Ya||ye,0,["exit",Ln,J[2]]),ye++,oe++}if(J[1].type==="listItemPrefix"){let mt={type:"listItem",_spread:!1,start:Object.assign({},J[1].start),end:void 0};Ln=mt,O.splice(ye,0,["enter",mt,J[2]]),ye++,oe++,N=void 0,ae=!0}}}return O[H][1]._spread=sa,oe}function o(O,H){return oe;function oe(ye){i.call(this,O(ye),ye),H&&H.call(this,ye)}}function l(){this.stack.push({type:"fragment",children:[]})}function i(O,H,oe){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([H,oe||void 0]),O.position={start:Gr(H.start),end:void 0}}function s(O){return H;function H(oe){O&&O.call(this,oe),u.call(this,oe)}}function u(O,H){let oe=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==O.type&&(H?H.call(this,O,ye[0]):(ye[1]||rT).call(this,O,ye[0]));else throw new Error("Cannot close `"+O.type+"` ("+Vr({start:O.start,end:O.end})+"): it\u2019s not open");oe.position.end=Gr(O.end)}function c(){return ko(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){let H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){let O=this.resume(),H=this.stack[this.stack.length-1];H.lang=O}function m(){let O=this.resume(),H=this.stack[this.stack.length-1];H.meta=O}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/(\r?\n|\r)$/g,"")}function w(O){let H=this.resume(),oe=this.stack[this.stack.length-1];oe.label=H,oe.identifier=Zt(this.sliceSerialize(O)).toLowerCase()}function g(){let O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function v(){let O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function M(O){let H=this.stack[this.stack.length-1];if(!H.depth){let oe=this.sliceSerialize(O).length;H.depth=oe}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function A(O){let H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function _(O){let oe=this.stack[this.stack.length-1].children,ye=oe[oe.length-1];(!ye||ye.type!=="text")&&(ye=hu(),ye.position={start:Gr(O.start),end:void 0},oe.push(ye)),this.stack.push(ye)}function k(O){let H=this.stack.pop();H.value+=this.sliceSerialize(O),H.position.end=Gr(O.end)}function W(O){let H=this.stack[this.stack.length-1];if(this.data.atHardBreak){let oe=H.children[H.children.length-1];oe.position.end=Gr(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(_.call(this,O),k.call(this,O))}function U(){this.data.atHardBreak=!0}function R(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function B(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function F(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function j(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function K(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function de(O){let H=this.sliceSerialize(O),oe=this.stack[this.stack.length-2];oe.label=L1(H),oe.identifier=Zt(H).toLowerCase()}function He(){let O=this.stack[this.stack.length-1],H=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){let ye=O.children;oe.children=ye}else oe.alt=H}function S(){let O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function Be(){let O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function rt(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function Re(O){let H=this.resume(),oe=this.stack[this.stack.length-1];oe.label=H,oe.identifier=Zt(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function le(O){this.data.characterReferenceType=O.type}function ve(O){let H=this.sliceSerialize(O),oe=this.data.characterReferenceType,ye;oe?(ye=vd(H,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Vl(H);let Fe=this.stack[this.stack.length-1];Fe.value+=ye}function kt(O){let H=this.stack.pop();H.position.end=Gr(O.end)}function fe(O){k.call(this,O);let H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(O)}function me(O){k.call(this,O);let H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(O)}function be(){return{type:"blockquote",children:[]}}function De(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function $(){return{type:"heading",depth:0,children:[]}}function re(){return{type:"break"}}function je(){return{type:"html",value:""}}function Nt(){return{type:"image",title:null,url:"",alt:null}}function xa(){return{type:"link",title:null,url:"",children:[]}}function ia(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function oi(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function jf(){return{type:"paragraph",children:[]}}function qo(){return{type:"strong",children:[]}}function hu(){return{type:"text",value:""}}function Fo(){return{type:"thematicBreak"}}}function Gr(e){return{line:e.line,column:e.column,offset:e.offset}}function lT(e,t){let a=-1;for(;++a<t.length;){let n=t[a];Array.isArray(n)?lT(e,n):ez(e,n)}}function ez(e,t){let a;for(a in t)if(oT.call(t,a))switch(a){case"canContainEols":{let n=t[a];n&&e[a].push(...n);break}case"transforms":{let n=t[a];n&&e[a].push(...n);break}case"enter":case"exit":{let n=t[a];n&&Object.assign(e[a],n);break}}}function rT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+") is still open")}var oT,iT=I(()=>{"use strict";gd();nT();gg();k1();ql();xd();gy();oT={}.hasOwnProperty});var sT=I(()=>{"use strict";iT()});function $d(e){let t=this;t.parser=a;function a(n){return Ty(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var uT=I(()=>{"use strict";sT()});var cT=I(()=>{"use strict";uT()});function dT(e,t){let a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}var fT=I(()=>{"use strict"});function pT(e,t){let a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
45
|
-
`}]}var
|
|
46
|
-
`:"",n={},r=t.lang?t.lang.split(/\s+/):[];r.length>0&&(n.className=["language-"+r[0]]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:a}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}var
|
|
44
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&r)continue;l=" ";break}default:l=String.fromCharCode(o)}r=o===-2,n.push(l)}return n.join("")}var kT=C(()=>{"use strict";Ee();Jn();Ps()});function By(e){let n={constructs:Ld([Ny,...(e||{}).extensions||[]]),content:r(dT),defined:[],document:r(mT),flow:r(gT),lazy:{},string:r(xT),text:r(vT)};return n;function r(o){return l;function l(i){return CT(n,o,i)}}}var LT=C(()=>{"use strict";Ug();fT();hT();yT();Py();IT();kT()});function Uy(e){for(;!_d(e););return e}var TT=C(()=>{"use strict";Vg()});function Fy(){let e=1,t="",a=!0,n;return r;function r(o,l,i){let s=[],u,c,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),d=0,t="",a&&(o.charCodeAt(0)===65279&&d++,a=void 0);d<o.length;){if(AT.lastIndex=d,u=AT.exec(o),f=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(f),!u){t=o.slice(d);break}if(p===10&&d===f&&n)s.push(-3),n=void 0;else switch(n&&(s.push(-5),n=void 0),d<f&&(s.push(o.slice(d,f)),e+=f-d),p){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return i&&(n&&s.push(-5),t&&s.push(t),s.push(null)),s}}var AT,MT=C(()=>{"use strict";AT=/[\0\t\n\r]/g});var ET=C(()=>{"use strict";LT();TT();MT()});function zy(e,t,a){return typeof t!="string"&&(a=t,t=void 0),rz(a)(Uy(By(a).document().write(Fy()(e,t,!0))))}function rz(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(xa),autolinkProtocol:_,autolinkEmail:_,atxHeading:o($),blockQuote:o(Se),characterEscape:_,characterReference:_,codeFenced:o(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(_e,l),codeText:o(Ie,l),codeTextData:_,data:_,codeFlowValue:_,definition:o(Ue),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Le),hardBreakEscape:o(oe),hardBreakTrailing:o(oe),htmlFlow:o(je,l),htmlFlowData:_,htmlText:o(je,l),htmlTextData:_,image:o(Bt),label:l,link:o(xa),listItem:o(ui),listItemValue:f,listOrdered:o(ia,d),listUnordered:o(ia),paragraph:o(Xf),reference:k,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o($),strong:o(Ho),thematicBreak:o(jo)},exit:{atxHeading:s(),atxHeadingSequence:M,autolink:s(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:s(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:be,characterReference:Tt,codeFenced:s(b),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:L,codeIndented:s(y),codeText:s(q),codeTextData:L,data:L,definition:s(),definitionDestinationString:v,definitionLabelString:w,definitionTitleString:g,emphasis:s(),hardBreakEscape:s(U),hardBreakTrailing:s(U),htmlFlow:s(R),htmlFlowData:L,htmlText:s(B),htmlTextData:L,image:s(Y),label:He,labelText:fe,lineEnding:W,link:s(j),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:De,resourceDestinationString:S,resourceTitleString:Be,resource:rt,setextHeading:s(E),setextHeadingLineSequence:A,setextHeadingText:I,strong:s(),thematicBreak:s()}};_T(t,(e||{}).mdastExtensions||[]);let a={};return n;function n(O){let H={type:"root",children:[]},le={stack:[H],tokenStack:[],config:t,enter:i,exit:u,buffer:l,resume:c,data:a},we=[],qe=-1;for(;++qe<O.length;)if(O[qe][1].type==="listOrdered"||O[qe][1].type==="listUnordered")if(O[qe][0]==="enter")we.push(qe);else{let sa=we.pop();qe=r(O,sa,qe)}for(qe=-1;++qe<O.length;){let sa=t[O[qe][0]];DT.call(sa,O[qe][1].type)&&sa[O[qe][1].type].call(Object.assign({sliceSerialize:O[qe][2].sliceSerialize},le),O[qe][1])}if(le.tokenStack.length>0){let sa=le.tokenStack[le.tokenStack.length-1];(sa[1]||RT).call(le,void 0,sa[0])}for(H.position={start:$r(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:$r(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)H=t.transforms[qe](H)||H;return H}function r(O,H,le){let we=H-1,qe=-1,sa=!1,Ln,Ja,N,ne;for(;++we<=le;){let ee=O[we];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?qe++:qe--,ne=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(Ln&&!ne&&!qe&&!N&&(N=we),ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ne=void 0}if(!qe&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||qe===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(Ln){let mt=we;for(Ja=void 0;mt--;){let Ze=O[mt];if(Ze[1].type==="lineEnding"||Ze[1].type==="lineEndingBlank"){if(Ze[0]==="exit")continue;Ja&&(O[Ja][1].type="lineEndingBlank",sa=!0),Ze[1].type="lineEnding",Ja=mt}else if(!(Ze[1].type==="linePrefix"||Ze[1].type==="blockQuotePrefix"||Ze[1].type==="blockQuotePrefixWhitespace"||Ze[1].type==="blockQuoteMarker"||Ze[1].type==="listItemIndent"))break}N&&(!Ja||N<Ja)&&(Ln._spread=!0),Ln.end=Object.assign({},Ja?O[Ja][1].start:ee[1].end),O.splice(Ja||we,0,["exit",Ln,ee[2]]),we++,le++}if(ee[1].type==="listItemPrefix"){let mt={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};Ln=mt,O.splice(we,0,["enter",mt,ee[2]]),we++,le++,N=void 0,ne=!0}}}return O[H][1]._spread=sa,le}function o(O,H){return le;function le(we){i.call(this,O(we),we),H&&H.call(this,we)}}function l(){this.stack.push({type:"fragment",children:[]})}function i(O,H,le){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([H,le||void 0]),O.position={start:$r(H.start),end:void 0}}function s(O){return H;function H(le){O&&O.call(this,le),u.call(this,le)}}function u(O,H){let le=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==O.type&&(H?H.call(this,O,we[0]):(we[1]||RT).call(this,O,we[0]));else throw new Error("Cannot close `"+O.type+"` ("+Gr({start:O.start,end:O.end})+"): it\u2019s not open");le.position.end=$r(O.end)}function c(){return Ao(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(O){if(this.data.expectingFirstListItemValue){let H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){let O=this.resume(),H=this.stack[this.stack.length-1];H.lang=O}function m(){let O=this.resume(),H=this.stack[this.stack.length-1];H.meta=O}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O.replace(/(\r?\n|\r)$/g,"")}function w(O){let H=this.resume(),le=this.stack[this.stack.length-1];le.label=H,le.identifier=Kt(this.sliceSerialize(O)).toLowerCase()}function g(){let O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function v(){let O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function M(O){let H=this.stack[this.stack.length-1];if(!H.depth){let le=this.sliceSerialize(O).length;H.depth=le}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function A(O){let H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function _(O){let le=this.stack[this.stack.length-1].children,we=le[le.length-1];(!we||we.type!=="text")&&(we=wu(),we.position={start:$r(O.start),end:void 0},le.push(we)),this.stack.push(we)}function L(O){let H=this.stack.pop();H.value+=this.sliceSerialize(O),H.position.end=$r(O.end)}function W(O){let H=this.stack[this.stack.length-1];if(this.data.atHardBreak){let le=H.children[H.children.length-1];le.position.end=$r(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(_.call(this,O),L.call(this,O))}function U(){this.data.atHardBreak=!0}function R(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function B(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function q(){let O=this.resume(),H=this.stack[this.stack.length-1];H.value=O}function j(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Y(){let O=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=H,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function fe(O){let H=this.sliceSerialize(O),le=this.stack[this.stack.length-2];le.label=Yk(H),le.identifier=Kt(H).toLowerCase()}function He(){let O=this.stack[this.stack.length-1],H=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){let we=O.children;le.children=we}else le.alt=H}function S(){let O=this.resume(),H=this.stack[this.stack.length-1];H.url=O}function Be(){let O=this.resume(),H=this.stack[this.stack.length-1];H.title=O}function rt(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function De(O){let H=this.resume(),le=this.stack[this.stack.length-1];le.label=H,le.identifier=Kt(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ie(O){this.data.characterReferenceType=O.type}function be(O){let H=this.sliceSerialize(O),le=this.data.characterReferenceType,we;le?(we=kd(H,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=Wl(H);let qe=this.stack[this.stack.length-1];qe.value+=we}function Tt(O){let H=this.stack.pop();H.position.end=$r(O.end)}function pe(O){L.call(this,O);let H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(O)}function he(O){L.call(this,O);let H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(O)}function Se(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function $(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function je(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function xa(){return{type:"link",title:null,url:"",children:[]}}function ia(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function ui(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Xf(){return{type:"paragraph",children:[]}}function Ho(){return{type:"strong",children:[]}}function wu(){return{type:"text",value:""}}function jo(){return{type:"thematicBreak"}}}function $r(e){return{line:e.line,column:e.column,offset:e.offset}}function _T(e,t){let a=-1;for(;++a<t.length;){let n=t[a];Array.isArray(n)?_T(e,n):oz(e,n)}}function oz(e,t){let a;for(a in t)if(DT.call(t,a))switch(a){case"canContainEols":{let n=t[a];n&&e[a].push(...n);break}case"transforms":{let n=t[a];n&&e[a].push(...n);break}case"enter":case"exit":{let n=t[a];n&&Object.assign(e[a],n);break}}}function RT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Gr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Gr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Gr({start:t.start,end:t.end})+") is still open")}var DT,OT=C(()=>{"use strict";bd();ET();Mg();Jk();jl();Cd();My();DT={}.hasOwnProperty});var PT=C(()=>{"use strict";OT()});function Qd(e){let t=this;t.parser=a;function a(n){return zy(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}var NT=C(()=>{"use strict";PT()});var BT=C(()=>{"use strict";NT()});function UT(e,t){let a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}var FT=C(()=>{"use strict"});function zT(e,t){let a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
45
|
+
`}]}var qT=C(()=>{"use strict"});function HT(e,t){let a=t.value?t.value+`
|
|
46
|
+
`:"",n={},r=t.lang?t.lang.split(/\s+/):[];r.length>0&&(n.className=["language-"+r[0]]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:a}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}var jT=C(()=>{"use strict"});function VT(e,t){let a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var GT=C(()=>{"use strict"});function $T(e,t){let a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var WT=C(()=>{"use strict"});function XT(e,t){let a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),r=Xa(n.toLowerCase()),o=e.footnoteOrder.indexOf(n),l,i=e.footnoteCounts.get(n);i===void 0?(i=0,e.footnoteOrder.push(n),l=e.footnoteOrder.length):l=o+1,i+=1,e.footnoteCounts.set(n,i);let s={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+r,id:a+"fnref-"+r+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}var KT=C(()=>{"use strict";Eo()});function ZT(e,t){let a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var QT=C(()=>{"use strict"});function YT(e,t){if(e.options.allowDangerousHtml){let a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}var JT=C(()=>{"use strict"});function Yd(e,t){let a=t.referenceType,n="]";if(a==="collapsed"?n+="[]":a==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];let r=e.all(t),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});let l=r[r.length-1];return l&&l.type==="text"?l.value+=n:r.push({type:"text",value:n}),r}var qy=C(()=>{"use strict"});function eA(e,t){let a=String(t.identifier).toUpperCase(),n=e.definitionById.get(a);if(!n)return Yd(e,t);let r={src:Xa(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}var tA=C(()=>{"use strict";Eo();qy()});function aA(e,t){let a={src:Xa(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);let n={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,n),e.applyData(t,n)}var nA=C(()=>{"use strict";Eo()});function rA(e,t){let a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);let n={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,n),e.applyData(t,n)}var oA=C(()=>{"use strict"});function lA(e,t){let a=String(t.identifier).toUpperCase(),n=e.definitionById.get(a);if(!n)return Yd(e,t);let r={href:Xa(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}var iA=C(()=>{"use strict";Eo();qy()});function sA(e,t){let a={href:Xa(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);let n={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var uA=C(()=>{"use strict";Eo()});function cA(e,t,a){let n=e.all(t),r=a?lz(a):dA(t),o={},l=[];if(typeof t.checked=="boolean"){let c=n[0],d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let i=-1;for(;++i<n.length;){let c=n[i];(r||i!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
|
|
47
47
|
`}),c.type==="element"&&c.tagName==="p"&&!r?l.push(...c.children):l.push(c)}let s=n[n.length-1];s&&(r||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
|
48
|
-
`});let u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function
|
|
48
|
+
`});let u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function lz(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let a=e.children,n=-1;for(;!t&&++n<a.length;)t=dA(a[n])}return t}function dA(e){let t=e.spread;return t??e.children.length>1}var fA=C(()=>{"use strict"});function pA(e,t){let a={},n=e.all(t),r=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++r<n.length;){let l=n[r];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(n,!0)};return e.patch(t,o),e.applyData(t,o)}var mA=C(()=>{"use strict"});function hA(e,t){let a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var gA=C(()=>{"use strict"});function yA(e,t){let a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}var wA=C(()=>{"use strict"});function xA(e,t){let a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var vA=C(()=>{"use strict"});function bA(e,t){let a=e.all(t),n=a.shift(),r=[];if(n){let l={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],l),r.push(l)}if(a.length>0){let l={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},i=Hl(t.children[1]),s=gd(t.children[t.children.length-1]);i&&s&&(l.position={start:i,end:s}),r.push(l)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}var SA=C(()=>{"use strict";Rs()});function IA(e,t,a){let n=a?a.children:void 0,o=(n?n.indexOf(t):1)===0?"th":"td",l=a&&a.type==="table"?a.align:void 0,i=l?l.length:t.children.length,s=-1,u=[];for(;++s<i;){let d=t.children[s],f={},p=l?l[s]:void 0;p&&(f.align=p);let m={type:"element",tagName:o,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}var CA=C(()=>{"use strict"});function kA(e,t){let a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var LA=C(()=>{"use strict"});function AA(e){let t=String(e),a=/\r?\n|\r/g,n=a.exec(t),r=0,o=[];for(;n;)o.push(TA(t.slice(r,n.index),r>0,!0),n[0]),r=n.index+n[0].length,n=a.exec(t);return o.push(TA(t.slice(r),r>0,!1)),o.join("")}function TA(e,t,a){let n=0,r=e.length;if(t){let o=e.codePointAt(n);for(;o===9||o===32;)n++,o=e.codePointAt(n)}if(a){let o=e.codePointAt(r-1);for(;o===9||o===32;)r--,o=e.codePointAt(r-1)}return r>n?e.slice(n,r):""}var MA=C(()=>{"use strict"});function EA(e,t){let a={type:"text",value:AA(String(t.value))};return e.patch(t,a),e.applyData(t,a)}var RA=C(()=>{"use strict";MA()});function DA(e,t){let a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}var _A=C(()=>{"use strict"});function Jd(){}var OA,PA=C(()=>{"use strict";FT();qT();jT();GT();WT();KT();QT();JT();tA();nA();oA();iA();uA();fA();mA();gA();wA();vA();SA();CA();LA();RA();_A();OA={blockquote:UT,break:zT,code:HT,delete:VT,emphasis:$T,footnoteReference:XT,heading:ZT,html:YT,imageReference:eA,image:aA,inlineCode:rA,linkReference:lA,link:sA,listItem:cA,list:pA,paragraph:hA,root:yA,strong:xA,table:bA,tableCell:kA,tableRow:IA,text:EA,thematicBreak:DA,toml:Jd,yaml:Jd,definition:Jd,footnoteDefinition:Jd}});function iz(e,t){let a=[{type:"text",value:"\u21A9"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function sz(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NA(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||iz,n=e.options.footnoteBackLabel||sz,r=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},i=[],s=-1;for(;++s<e.footnoteOrder.length;){let u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;let c=e.all(u),d=String(u.identifier).toUpperCase(),f=Xa(d.toLowerCase()),p=0,m=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++p<=x;){m.length>0&&m.push({type:"text",value:" "});let w=typeof a=="string"?a:a(s,p);typeof w=="string"&&(w={type:"text",value:w}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(s,p),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}let b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){let w=b.children[b.children.length-1];w&&w.type==="text"?w.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...m)}else c.push(...m);let y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,y),i.push(y)}if(i.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ur(l),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
|
|
49
49
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(i,!0)},{type:"text",value:`
|
|
50
|
-
`}]}}var
|
|
50
|
+
`}]}}var BA=C(()=>{"use strict";hd();Eo()});function FA(e,t){let a=t||uz,n=new Map,r=new Map,o=new Map,l={...OA,...a.handlers},i={all:u,applyData:dz,definitionById:n,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:a,patch:cz,wrap:pz};return Qn(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){let d=c.type==="definition"?n:r,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),i;function s(c,d){let f=c.type,p=i.handlers[f];if(Hy.call(i.handlers,f)&&p)return p(i,c,d);if(i.options.passThrough&&i.options.passThrough.includes(f)){if("children"in c){let{children:x,...b}=c,y=Ur(b);return y.children=i.all(c),y}return Ur(c)}return(i.options.unknownHandler||fz)(i,c,d)}function u(c){let d=[];if("children"in c){let f=c.children,p=-1;for(;++p<f.length;){let m=i.one(f[p],c);if(m){if(p&&f[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=UA(m.value)),!Array.isArray(m)&&m.type==="element")){let x=m.children[0];x&&x.type==="text"&&(x.value=UA(x.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function cz(e,t){e.position&&(t.position=Es(e))}function dz(e,t){let a=t;if(e&&e.data){let n=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if(typeof n=="string")if(a.type==="element")a.tagName=n;else{let l="children"in a?a.children:[a];a={type:"element",tagName:n,properties:{},children:l}}a.type==="element"&&o&&Object.assign(a.properties,Ur(o)),"children"in a&&a.children&&r!==null&&r!==void 0&&(a.children=r)}return a}function fz(e,t){let a=t.data||{},n="value"in t&&!(Hy.call(a,"hProperties")||Hy.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pz(e,t){let a=[],n=-1;for(t&&a.push({type:"text",value:`
|
|
51
51
|
`});++n<e.length;)n&&a.push({type:"text",value:`
|
|
52
52
|
`}),a.push(e[n]);return t&&e.length>0&&a.push({type:"text",value:`
|
|
53
|
-
`}),a}function
|
|
54
|
-
`},r)),o}var mA=I(()=>{"use strict";cA();pA()});var hA=I(()=>{"use strict";mA()});function Qd(e,t){return e&&"run"in e?async function(a,n){let r=Zd(a,{file:n,...t});await e.run(r,n)}:function(a,n){return Zd(a,{file:n,...e||t})}}var gA=I(()=>{"use strict";hA()});var yA=I(()=>{"use strict";gA()});function Ey(e){if(e)throw e}var wA=I(()=>{"use strict"});var TA=Wt((bJ,kA)=>{"use strict";var Kd=Object.prototype.hasOwnProperty,LA=Object.prototype.toString,xA=Object.defineProperty,vA=Object.getOwnPropertyDescriptor,bA=function(t){return typeof Array.isArray=="function"?Array.isArray(t):LA.call(t)==="[object Array]"},SA=function(t){if(!t||LA.call(t)!=="[object Object]")return!1;var a=Kd.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Kd.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!a&&!n)return!1;var r;for(r in t);return typeof r>"u"||Kd.call(t,r)},CA=function(t,a){xA&&a.name==="__proto__"?xA(t,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):t[a.name]=a.newValue},IA=function(t,a){if(a==="__proto__")if(Kd.call(t,a)){if(vA)return vA(t,a).value}else return;return t[a]};kA.exports=function e(){var t,a,n,r,o,l,i=arguments[0],s=1,u=arguments.length,c=!1;for(typeof i=="boolean"&&(c=i,i=arguments[1]||{},s=2),(i==null||typeof i!="object"&&typeof i!="function")&&(i={});s<u;++s)if(t=arguments[s],t!=null)for(a in t)n=IA(i,a),r=IA(t,a),i!==r&&(c&&r&&(SA(r)||(o=bA(r)))?(o?(o=!1,l=n&&bA(n)?n:[]):l=n&&SA(n)?n:{},CA(i,{name:a,newValue:e(c,l,r)})):typeof r<"u"&&CA(i,{name:a,newValue:r}));return i}});function Fs(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var AA=I(()=>{"use strict"});function Ry(){let e=[],t={run:a,use:n};return t;function a(...r){let o=-1,l=r.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);i(null,...r);function i(s,...u){let c=e[++o],d=-1;if(s){l(s);return}for(;++d<r.length;)(u[d]===null||u[d]===void 0)&&(u[d]=r[d]);r=u,c?MA(c,i)(...u):l(null,...u)}}function n(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function MA(e,t){let a;return n;function n(...l){let i=e.length>l.length,s;i&&l.push(r);try{s=e.apply(this,l)}catch(u){let c=u;if(i&&a)throw c;return r(c)}i||(s&&s.then&&typeof s.then=="function"?s.then(o,r):s instanceof Error?r(s):o(s))}function r(l,...i){a||(a=!0,t(l,...i))}function o(l){r(null,l)}}var EA=I(()=>{"use strict"});var RA=I(()=>{"use strict";EA()});function uz(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hs(e);let a=0,n=-1,r=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(o){a=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":e.slice(a,n)}if(t===e)return"";let l=-1,i=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(o){a=r+1;break}}else l<0&&(o=!0,l=r+1),i>-1&&(e.codePointAt(r)===t.codePointAt(i--)?i<0&&(n=r):(i=-1,n=l));return a===n?n=l:n<0&&(n=e.length),e.slice(a,n)}function cz(e){if(Hs(e),e.length===0)return".";let t=-1,a=e.length,n;for(;--a;)if(e.codePointAt(a)===47){if(n){t=a;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function dz(e){Hs(e);let t=e.length,a=-1,n=0,r=-1,o=0,l;for(;t--;){let i=e.codePointAt(t);if(i===47){if(l){n=t+1;break}continue}a<0&&(l=!0,a=t+1),i===46?r<0?r=t:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||a<0||o===0||o===1&&r===a-1&&r===n+1?"":e.slice(r,a)}function fz(...e){let t=-1,a;for(;++t<e.length;)Hs(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":pz(a)}function pz(e){Hs(e);let t=e.codePointAt(0)===47,a=mz(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function mz(e,t){let a="",n=0,r=-1,o=0,l=-1,i,s;for(;++l<=e.length;){if(l<e.length)i=e.codePointAt(l);else{if(i===47)break;i=47}if(i===47){if(!(r===l-1||o===1))if(r!==l-1&&o===2){if(a.length<2||n!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(s=a.lastIndexOf("/"),s!==a.length-1){s<0?(a="",n=0):(a=a.slice(0,s),n=a.length-1-a.lastIndexOf("/")),r=l,o=0;continue}}else if(a.length>0){a="",n=0,r=l,o=0;continue}}t&&(a=a.length>0?a+"/..":"..",n=2)}else a.length>0?a+="/"+e.slice(r+1,l):a=e.slice(r+1,l),n=l-r-1;r=l,o=0}else i===46&&o>-1?o++:o=-1}return a}function Hs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var nn,DA=I(()=>{"use strict";nn={basename:uz,dirname:cz,extname:dz,join:fz,sep:"/"}});function hz(){return"/"}var _A,OA=I(()=>{"use strict";_A={cwd:hz}});function Wl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Dy=I(()=>{"use strict"});function PA(e){if(typeof e=="string")e=new URL(e);else if(!Wl(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return gz(e)}function gz(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){let n=t.codePointAt(a+2);if(n===70||n===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var NA=I(()=>{"use strict";Dy();Dy()});function Oy(e,t){if(e&&e.includes(nn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+nn.sep+"`")}function Py(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function BA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function yz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var _y,js,UA=I(()=>{"use strict";yy();DA();OA();NA();_y=["history","path","basename","stem","extname","dirname"],js=class{constructor(t){let a;t?Wl(t)?a={path:t}:typeof t=="string"||yz(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":_A.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<_y.length;){let o=_y[n];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let r;for(r in a)_y.includes(r)||(this[r]=a[r])}get basename(){return typeof this.path=="string"?nn.basename(this.path):void 0}set basename(t){Py(t,"basename"),Oy(t,"basename"),this.path=nn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?nn.dirname(this.path):void 0}set dirname(t){BA(this.basename,"dirname"),this.path=nn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?nn.extname(this.path):void 0}set extname(t){if(Oy(t,"extname"),BA(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=nn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wl(t)&&(t=PA(t)),Py(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?nn.basename(this.path,this.extname):void 0}set stem(t){Py(t,"stem"),Oy(t,"stem"),this.path=nn.join(this.dirname||"",t+(this.extname||""))}fail(t,a,n){let r=this.message(t,a,n);throw r.fatal=!0,r}info(t,a,n){let r=this.message(t,a,n);return r.fatal=void 0,r}message(t,a,n){let r=new Lt(t,a,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var zA=I(()=>{"use strict";UA()});var qA,FA=I(()=>{"use strict";qA=(function(e){let n=this.constructor.prototype,r=n[e],o=function(){return r.apply(o,arguments)};return Object.setPrototypeOf(o,n),o})});function Ny(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function By(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HA(e){if(!Fs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jA(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yd(e){return xz(e)?e:new js(e)}function xz(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vz(e){return typeof e=="string"||bz(e)}function bz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Jd,wz,zy,qy,VA=I(()=>{"use strict";wA();Jd=q(TA(),1);AA();RA();zA();FA();wz={}.hasOwnProperty,zy=class e extends qA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ry()}copy(){let t=new e,a=-1;for(;++a<this.attachers.length;){let n=this.attachers[a];t.use(...n)}return t.data((0,Jd.default)(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Uy("data",this.frozen),this.namespace[t]=a,this):wz.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Uy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[a,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=a.call(t,...n);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let a=Yd(t),n=this.parser||this.Parser;return Ny("parse",n),n(String(a),a)}process(t,a){let n=this;return this.freeze(),Ny("process",this.parser||this.Parser),By("process",this.compiler||this.Compiler),a?r(void 0,a):new Promise(r);function r(o,l){let i=Yd(t),s=n.parse(i);n.run(s,i,function(c,d,f){if(c||!d||!f)return u(c);let p=d,m=n.stringify(p,f);vz(m)?f.value=m:f.result=m,u(c,f)});function u(c,d){c||!d?l(c):o?o(d):a(void 0,d)}}}processSync(t){let a=!1,n;return this.freeze(),Ny("processSync",this.parser||this.Parser),By("processSync",this.compiler||this.Compiler),this.process(t,r),jA("processSync","process",a),n;function r(o,l){a=!0,Ey(o),n=l}}run(t,a,n){HA(t),this.freeze();let r=this.transformers;return!n&&typeof a=="function"&&(n=a,a=void 0),n?o(void 0,n):new Promise(o);function o(l,i){let s=Yd(a);r.run(t,s,u);function u(c,d,f){let p=d||t;c?i(c):l?l(p):n(void 0,p,f)}}}runSync(t,a){let n=!1,r;return this.run(t,a,o),jA("runSync","run",n),r;function o(l,i){Ey(l),r=i,n=!0}}stringify(t,a){this.freeze();let n=Yd(a),r=this.compiler||this.Compiler;return By("stringify",r),HA(t),r(t,n)}use(t,...a){let n=this.attachers,r=this.namespace;if(Uy("use",this.frozen),t!=null)if(typeof t=="function")s(t,a);else if(typeof t=="object")Array.isArray(t)?i(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...d]=u;s(c,d)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(u.plugins),u.settings&&(r.settings=(0,Jd.default)(!0,r.settings,u.settings))}function i(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,c){let d=-1,f=-1;for(;++d<n.length;)if(n[d][0]===u){f=d;break}if(f===-1)n.push([u,...c]);else if(c.length>0){let[p,...m]=c,x=n[f][1];Fs(x)&&Fs(p)&&(p=(0,Jd.default)(!0,x,p)),n[f]=[u,p,...m]}}}},qy=new zy().freeze()});var GA=I(()=>{"use strict";VA()});function Vy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function YA(e){Uo=e}function Pe(e,t=""){let a=typeof e=="string"?e:e.source,n={replace:(r,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(na.caret,"$1"),a=a.replace(r,l),n},getRegex:()=>new RegExp(a,t)};return n}function tr(e,t){if(t){if(na.escapeTest.test(e))return e.replace(na.escapeReplace,XA)}else if(na.escapeTestNoEncode.test(e))return e.replace(na.escapeReplaceNoEncode,XA);return e}function ZA(e){try{e=encodeURI(e).replace(na.percentDecode,"%")}catch{return null}return e}function QA(e,t){let a=e.replace(na.findPipe,(o,l,i)=>{let s=!1,u=l;for(;--u>=0&&i[u]==="\\";)s=!s;return s?"|":" |"}),n=a.split(na.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(na.slashPipe,"|");return n}function Gs(e,t,a){let n=e.length;if(n===0)return"";let r=0;for(;r<n;){let o=e.charAt(n-r-1);if(o===t&&!a)r++;else if(o!==t&&a)r++;else break}return e.slice(0,n-r)}function aq(e,t){if(e.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])a++;else if(e[n]===t[1]&&(a--,a<0))return n;return a>0?-2:-1}function KA(e,t,a,n,r){let o=t.href,l=t.title||null,i=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let s={type:e[0].charAt(0)==="!"?"image":"link",raw:a,href:o,title:l,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,s}function nq(e,t,a){let n=e.match(a.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
53
|
+
`}),a}function UA(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}var Hy,uz,zA=C(()=>{"use strict";hd();fd();Rs();PA();Hy={}.hasOwnProperty,uz={}});function ef(e,t){let a=FA(e,t),n=a.one(e,void 0),r=NA(a),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return r&&("children"in o,o.children.push({type:"text",value:`
|
|
54
|
+
`},r)),o}var qA=C(()=>{"use strict";BA();zA()});var HA=C(()=>{"use strict";qA()});function tf(e,t){return e&&"run"in e?async function(a,n){let r=ef(a,{file:n,...t});await e.run(r,n)}:function(a,n){return ef(a,{file:n,...e||t})}}var jA=C(()=>{"use strict";HA()});var VA=C(()=>{"use strict";jA()});function jy(e){if(e)throw e}var GA=C(()=>{"use strict"});var eM=Wt((Eee,JA)=>{"use strict";var af=Object.prototype.hasOwnProperty,YA=Object.prototype.toString,$A=Object.defineProperty,WA=Object.getOwnPropertyDescriptor,XA=function(t){return typeof Array.isArray=="function"?Array.isArray(t):YA.call(t)==="[object Array]"},KA=function(t){if(!t||YA.call(t)!=="[object Object]")return!1;var a=af.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&af.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!a&&!n)return!1;var r;for(r in t);return typeof r>"u"||af.call(t,r)},ZA=function(t,a){$A&&a.name==="__proto__"?$A(t,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):t[a.name]=a.newValue},QA=function(t,a){if(a==="__proto__")if(af.call(t,a)){if(WA)return WA(t,a).value}else return;return t[a]};JA.exports=function e(){var t,a,n,r,o,l,i=arguments[0],s=1,u=arguments.length,c=!1;for(typeof i=="boolean"&&(c=i,i=arguments[1]||{},s=2),(i==null||typeof i!="object"&&typeof i!="function")&&(i={});s<u;++s)if(t=arguments[s],t!=null)for(a in t)n=QA(i,a),r=QA(t,a),i!==r&&(c&&r&&(KA(r)||(o=XA(r)))?(o?(o=!1,l=n&&XA(n)?n:[]):l=n&&KA(n)?n:{},ZA(i,{name:a,newValue:e(c,l,r)})):typeof r<"u"&&ZA(i,{name:a,newValue:r}));return i}});function Gs(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var tM=C(()=>{"use strict"});function Vy(){let e=[],t={run:a,use:n};return t;function a(...r){let o=-1,l=r.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);i(null,...r);function i(s,...u){let c=e[++o],d=-1;if(s){l(s);return}for(;++d<r.length;)(u[d]===null||u[d]===void 0)&&(u[d]=r[d]);r=u,c?aM(c,i)(...u):l(null,...u)}}function n(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function aM(e,t){let a;return n;function n(...l){let i=e.length>l.length,s;i&&l.push(r);try{s=e.apply(this,l)}catch(u){let c=u;if(i&&a)throw c;return r(c)}i||(s&&s.then&&typeof s.then=="function"?s.then(o,r):s instanceof Error?r(s):o(s))}function r(l,...i){a||(a=!0,t(l,...i))}function o(l){r(null,l)}}var nM=C(()=>{"use strict"});var rM=C(()=>{"use strict";nM()});function mz(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');$s(e);let a=0,n=-1,r=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(o){a=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":e.slice(a,n)}if(t===e)return"";let l=-1,i=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(o){a=r+1;break}}else l<0&&(o=!0,l=r+1),i>-1&&(e.codePointAt(r)===t.codePointAt(i--)?i<0&&(n=r):(i=-1,n=l));return a===n?n=l:n<0&&(n=e.length),e.slice(a,n)}function hz(e){if($s(e),e.length===0)return".";let t=-1,a=e.length,n;for(;--a;)if(e.codePointAt(a)===47){if(n){t=a;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gz(e){$s(e);let t=e.length,a=-1,n=0,r=-1,o=0,l;for(;t--;){let i=e.codePointAt(t);if(i===47){if(l){n=t+1;break}continue}a<0&&(l=!0,a=t+1),i===46?r<0?r=t:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||a<0||o===0||o===1&&r===a-1&&r===n+1?"":e.slice(r,a)}function yz(...e){let t=-1,a;for(;++t<e.length;)$s(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":wz(a)}function wz(e){$s(e);let t=e.codePointAt(0)===47,a=xz(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function xz(e,t){let a="",n=0,r=-1,o=0,l=-1,i,s;for(;++l<=e.length;){if(l<e.length)i=e.codePointAt(l);else{if(i===47)break;i=47}if(i===47){if(!(r===l-1||o===1))if(r!==l-1&&o===2){if(a.length<2||n!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(s=a.lastIndexOf("/"),s!==a.length-1){s<0?(a="",n=0):(a=a.slice(0,s),n=a.length-1-a.lastIndexOf("/")),r=l,o=0;continue}}else if(a.length>0){a="",n=0,r=l,o=0;continue}}t&&(a=a.length>0?a+"/..":"..",n=2)}else a.length>0?a+="/"+e.slice(r+1,l):a=e.slice(r+1,l),n=l-r-1;r=l,o=0}else i===46&&o>-1?o++:o=-1}return a}function $s(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var rn,oM=C(()=>{"use strict";rn={basename:mz,dirname:hz,extname:gz,join:yz,sep:"/"}});function vz(){return"/"}var lM,iM=C(()=>{"use strict";lM={cwd:vz}});function Zl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var Gy=C(()=>{"use strict"});function sM(e){if(typeof e=="string")e=new URL(e);else if(!Zl(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return bz(e)}function bz(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){let n=t.codePointAt(a+2);if(n===70||n===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var uM=C(()=>{"use strict";Gy();Gy()});function Wy(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function Xy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cM(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Sz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var $y,Ws,dM=C(()=>{"use strict";Ey();oM();iM();uM();$y=["history","path","basename","stem","extname","dirname"],Ws=class{constructor(t){let a;t?Zl(t)?a={path:t}:typeof t=="string"||Sz(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":lM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<$y.length;){let o=$y[n];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let r;for(r in a)$y.includes(r)||(this[r]=a[r])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){Xy(t,"basename"),Wy(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){cM(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(Wy(t,"extname"),cM(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zl(t)&&(t=sM(t)),Xy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){Xy(t,"stem"),Wy(t,"stem"),this.path=rn.join(this.dirname||"",t+(this.extname||""))}fail(t,a,n){let r=this.message(t,a,n);throw r.fatal=!0,r}info(t,a,n){let r=this.message(t,a,n);return r.fatal=void 0,r}message(t,a,n){let r=new Lt(t,a,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var fM=C(()=>{"use strict";dM()});var pM,mM=C(()=>{"use strict";pM=(function(e){let n=this.constructor.prototype,r=n[e],o=function(){return r.apply(o,arguments)};return Object.setPrototypeOf(o,n),o})});function Ky(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Zy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function hM(e){if(!Gs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function gM(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nf(e){return Cz(e)?e:new Ws(e)}function Cz(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kz(e){return typeof e=="string"||Lz(e)}function Lz(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var rf,Iz,Yy,Jy,yM=C(()=>{"use strict";GA();rf=z(eM(),1);tM();rM();fM();mM();Iz={}.hasOwnProperty,Yy=class e extends pM{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Vy()}copy(){let t=new e,a=-1;for(;++a<this.attachers.length;){let n=this.attachers[a];t.use(...n)}return t.data((0,rf.default)(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Qy("data",this.frozen),this.namespace[t]=a,this):Iz.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[a,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=a.call(t,...n);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let a=nf(t),n=this.parser||this.Parser;return Ky("parse",n),n(String(a),a)}process(t,a){let n=this;return this.freeze(),Ky("process",this.parser||this.Parser),Zy("process",this.compiler||this.Compiler),a?r(void 0,a):new Promise(r);function r(o,l){let i=nf(t),s=n.parse(i);n.run(s,i,function(c,d,f){if(c||!d||!f)return u(c);let p=d,m=n.stringify(p,f);kz(m)?f.value=m:f.result=m,u(c,f)});function u(c,d){c||!d?l(c):o?o(d):a(void 0,d)}}}processSync(t){let a=!1,n;return this.freeze(),Ky("processSync",this.parser||this.Parser),Zy("processSync",this.compiler||this.Compiler),this.process(t,r),gM("processSync","process",a),n;function r(o,l){a=!0,jy(o),n=l}}run(t,a,n){hM(t),this.freeze();let r=this.transformers;return!n&&typeof a=="function"&&(n=a,a=void 0),n?o(void 0,n):new Promise(o);function o(l,i){let s=nf(a);r.run(t,s,u);function u(c,d,f){let p=d||t;c?i(c):l?l(p):n(void 0,p,f)}}}runSync(t,a){let n=!1,r;return this.run(t,a,o),gM("runSync","run",n),r;function o(l,i){jy(l),r=i,n=!0}}stringify(t,a){this.freeze();let n=nf(a),r=this.compiler||this.Compiler;return Zy("stringify",r),hM(t),r(t,n)}use(t,...a){let n=this.attachers,r=this.namespace;if(Qy("use",this.frozen),t!=null)if(typeof t=="function")s(t,a);else if(typeof t=="object")Array.isArray(t)?i(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...d]=u;s(c,d)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(u.plugins),u.settings&&(r.settings=(0,rf.default)(!0,r.settings,u.settings))}function i(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,c){let d=-1,f=-1;for(;++d<n.length;)if(n[d][0]===u){f=d;break}if(f===-1)n.push([u,...c]);else if(c.length>0){let[p,...m]=c,x=n[f][1];Gs(x)&&Gs(p)&&(p=(0,rf.default)(!0,x,p)),n[f]=[u,p,...m]}}}},Jy=new Yy().freeze()});var wM=C(()=>{"use strict";yM()});function nw(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function kM(e){zo=e}function Pe(e,t=""){let a=typeof e=="string"?e:e.source,n={replace:(r,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(na.caret,"$1"),a=a.replace(r,l),n},getRegex:()=>new RegExp(a,t)};return n}function ar(e,t){if(t){if(na.escapeTest.test(e))return e.replace(na.escapeReplace,bM)}else if(na.escapeTestNoEncode.test(e))return e.replace(na.escapeReplaceNoEncode,bM);return e}function SM(e){try{e=encodeURI(e).replace(na.percentDecode,"%")}catch{return null}return e}function IM(e,t){let a=e.replace(na.findPipe,(o,l,i)=>{let s=!1,u=l;for(;--u>=0&&i[u]==="\\";)s=!s;return s?"|":" |"}),n=a.split(na.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(na.slashPipe,"|");return n}function Ks(e,t,a){let n=e.length;if(n===0)return"";let r=0;for(;r<n;){let o=e.charAt(n-r-1);if(o===t&&!a)r++;else if(o!==t&&a)r++;else break}return e.slice(0,n-r)}function iq(e,t){if(e.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])a++;else if(e[n]===t[1]&&(a--,a<0))return n;return a>0?-2:-1}function CM(e,t,a,n,r){let o=t.href,l=t.title||null,i=e[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let s={type:e[0].charAt(0)==="!"?"image":"link",raw:a,href:o,title:l,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,s}function sq(e,t,a){let n=e.match(a.other.indentCodeCompensation);if(n===null)return t;let r=n[1];return t.split(`
|
|
55
55
|
`).map(o=>{let l=o.match(a.other.beginningSpace);if(l===null)return o;let[i]=l;return i.length>=r.length?o.slice(r.length):o}).join(`
|
|
56
|
-
`)}function Je(e,t){return
|
|
57
|
-
]`).replace("lheading",
|
|
58
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let a=t[0],n=
|
|
59
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let a=
|
|
56
|
+
`)}function Je(e,t){return Fo.parse(e,t)}var zo,Qs,Tz,na,Az,Mz,Ez,Ys,Rz,rw,LM,TM,Dz,ow,_z,lw,Oz,Pz,df,iw,Nz,AM,Bz,sw,xM,Uz,Fz,zz,qz,MM,Hz,ff,uw,EM,jz,RM,Vz,Gz,$z,DM,Wz,Xz,_M,Kz,Zz,Qz,Yz,Jz,eq,tq,sf,aq,OM,PM,nq,vM,cw,rq,ew,oq,of,Xs,lq,bM,uf,_a,cf,dw,on,lf,Zs,uq,Fo,nte,rte,ote,lte,ite,ste,ute,NM=C(()=>{"use strict";zo=nw();Qs={exec:()=>null};Tz=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),na={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Az=/^(?:[ \t]*(?:\n|$))+/,Mz=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ez=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ys=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Rz=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,rw=/(?:[*+-]|\d{1,9}[.)])/,LM=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,TM=Pe(LM).replace(/bull/g,rw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Dz=Pe(LM).replace(/bull/g,rw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ow=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_z=/^[^\n]+/,lw=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Oz=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lw).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Pz=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rw).getRegex(),df="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",iw=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nz=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",iw).replace("tag",df).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),AM=Pe(ow).replace("hr",Ys).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",df).getRegex(),Bz=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",AM).getRegex(),sw={blockquote:Bz,code:Mz,def:Oz,fences:Ez,heading:Rz,hr:Ys,html:Nz,lheading:TM,list:Pz,newline:Az,paragraph:AM,table:Qs,text:_z},xM=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ys).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",df).getRegex(),Uz={...sw,lheading:Dz,table:xM,paragraph:Pe(ow).replace("hr",Ys).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xM).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",df).getRegex()},Fz={...sw,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iw).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(ow).replace("hr",Ys).replace("heading",` *#{1,6} *[^
|
|
57
|
+
]`).replace("lheading",TM).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zz=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qz=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,MM=/^( {2,}|\\)\n(?!\s*$)/,Hz=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ff=/[\p{P}\p{S}]/u,uw=/[\s\p{P}\p{S}]/u,EM=/[^\s\p{P}\p{S}]/u,jz=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uw).getRegex(),RM=/(?!~)[\p{P}\p{S}]/u,Vz=/(?!~)[\s\p{P}\p{S}]/u,Gz=/(?:[^\s\p{P}\p{S}]|~)/u,$z=Pe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tz?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),DM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Wz=Pe(DM,"u").replace(/punct/g,ff).getRegex(),Xz=Pe(DM,"u").replace(/punct/g,RM).getRegex(),_M="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Kz=Pe(_M,"gu").replace(/notPunctSpace/g,EM).replace(/punctSpace/g,uw).replace(/punct/g,ff).getRegex(),Zz=Pe(_M,"gu").replace(/notPunctSpace/g,Gz).replace(/punctSpace/g,Vz).replace(/punct/g,RM).getRegex(),Qz=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,EM).replace(/punctSpace/g,uw).replace(/punct/g,ff).getRegex(),Yz=Pe(/\\(punct)/,"gu").replace(/punct/g,ff).getRegex(),Jz=Pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),eq=Pe(iw).replace("(?:-->|$)","-->").getRegex(),tq=Pe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",eq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,aq=Pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),OM=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",sf).replace("ref",lw).getRegex(),PM=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",lw).getRegex(),nq=Pe("reflink|nolink(?!\\()","g").replace("reflink",OM).replace("nolink",PM).getRegex(),vM=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,cw={_backpedal:Qs,anyPunctuation:Yz,autolink:Jz,blockSkip:$z,br:MM,code:qz,del:Qs,emStrongLDelim:Wz,emStrongRDelimAst:Kz,emStrongRDelimUnd:Qz,escape:zz,link:aq,nolink:PM,punctuation:jz,reflink:OM,reflinkSearch:nq,tag:tq,text:Hz,url:Qs},rq={...cw,link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",sf).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sf).getRegex()},ew={...cw,emStrongRDelimAst:Zz,emStrongLDelim:Xz,url:Pe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vM).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Pe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vM).getRegex()},oq={...ew,br:Pe(MM).replace("{2,}","*").getRegex(),text:Pe(ew.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},of={normal:sw,gfm:Uz,pedantic:Fz},Xs={normal:cw,gfm:ew,breaks:oq,pedantic:rq},lq={"&":"&","<":"<",">":">",'"':""","'":"'"},bM=e=>lq[e];uf=class{constructor(e){Z(this,"options");Z(this,"rules");Z(this,"lexer");this.options=e||zo}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let a=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Ks(a,`
|
|
58
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let a=t[0],n=sq(a,t[3]||"",this.rules);return{type:"code",raw:a,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let a=t[2].trim();if(this.rules.other.endingHash.test(a)){let n=Ks(a,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(a=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ks(t[0],`
|
|
59
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let a=Ks(t[0],`
|
|
60
60
|
`).split(`
|
|
61
61
|
`),n="",r="",o=[];for(;a.length>0;){let l=!1,i=[],s;for(s=0;s<a.length;s++)if(this.rules.other.blockquoteStart.test(a[s]))i.push(a[s]),l=!0;else if(!l)i.push(a[s]);else break;a=a.slice(s);let u=i.join(`
|
|
62
62
|
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -74,9 +74,9 @@ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
74
74
|
`,1)[0],M;if(f=v,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),M=f):M=f.replace(this.rules.other.tabCharGlobal," "),y.test(f)||w.test(f)||g.test(f)||x.test(f)||b.test(f))break;if(M.search(this.rules.other.nonSpaceChar)>=m||!f.trim())c+=`
|
|
75
75
|
`+M.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(d)||w.test(d)||b.test(d))break;c+=`
|
|
76
76
|
`+f}!p&&!f.trim()&&(p=!0),u+=v+`
|
|
77
|
-
`,e=e.substring(v.length+1),d=M.slice(m)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=u}let i=r.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let s of r.items){if(this.lexer.state.top=!1,s.tokens=this.lexer.blockTokens(s.text,[]),s.task){if(s.text=s.text.replace(this.rules.other.listReplaceTask,""),s.tokens[0]?.type==="text"||s.tokens[0]?.type==="paragraph"){s.tokens[0].raw=s.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),s.tokens[0].text=s.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(s.raw);if(u){let c={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};s.checked=c.checked,r.loose?s.tokens[0]&&["paragraph","text"].includes(s.tokens[0].type)&&"tokens"in s.tokens[0]&&s.tokens[0].tokens?(s.tokens[0].raw=c.raw+s.tokens[0].raw,s.tokens[0].text=c.raw+s.tokens[0].text,s.tokens[0].tokens.unshift(c)):s.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):s.tokens.unshift(c)}}if(!r.loose){let u=s.tokens.filter(d=>d.type==="space"),c=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=c}}if(r.loose)for(let s of r.items){s.loose=!0;for(let u of s.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let a=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:a,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let a=
|
|
78
|
-
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(a.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<a.length;l++)o.header.push({text:a[l],tokens:this.lexer.inline(a[l]),header:!0,align:o.align[l]});for(let l of r)o.rows.push(
|
|
79
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:a,tokens:this.lexer.inline(a)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let a=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let o=
|
|
77
|
+
`,e=e.substring(v.length+1),d=M.slice(m)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=u}let i=r.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let s of r.items){if(this.lexer.state.top=!1,s.tokens=this.lexer.blockTokens(s.text,[]),s.task){if(s.text=s.text.replace(this.rules.other.listReplaceTask,""),s.tokens[0]?.type==="text"||s.tokens[0]?.type==="paragraph"){s.tokens[0].raw=s.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),s.tokens[0].text=s.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(s.raw);if(u){let c={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};s.checked=c.checked,r.loose?s.tokens[0]&&["paragraph","text"].includes(s.tokens[0].type)&&"tokens"in s.tokens[0]&&s.tokens[0].tokens?(s.tokens[0].raw=c.raw+s.tokens[0].raw,s.tokens[0].text=c.raw+s.tokens[0].text,s.tokens[0].tokens.unshift(c)):s.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):s.tokens.unshift(c)}}if(!r.loose){let u=s.tokens.filter(d=>d.type==="space"),c=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=c}}if(r.loose)for(let s of r.items){s.loose=!0;for(let u of s.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let a=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:a,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let a=IM(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
78
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(a.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<a.length;l++)o.header.push({text:a[l],tokens:this.lexer.inline(a[l]),header:!0,align:o.align[l]});for(let l of r)o.rows.push(IM(l,o.header.length).map((i,s)=>({text:i,tokens:this.lexer.inline(i),header:!1,align:o.align[s]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let a=t[1].charAt(t[1].length-1)===`
|
|
79
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:a,tokens:this.lexer.inline(a)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let a=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let o=Ks(a.slice(0,-1),"\\");if((a.length-o.length)%2===0)return}else{let o=iq(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?n=n.slice(1):n=n.slice(1,-1)),CM(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let a;if((a=this.rules.inline.reflink.exec(e))||(a=this.rules.inline.nolink.exec(e))){let n=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[n.toLowerCase()];if(!r){let o=a[0].charAt(0);return{type:"text",raw:o,text:o}}return CM(a,r,a[0],this.lexer,this.rules)}}emStrong(e,t,a=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!a||this.rules.inline.punctuation.exec(a))){let r=[...n[0]].length-1,o,l,i=r,s=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(n=u.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(l=[...o].length,n[3]||n[4]){i+=l;continue}else if((n[5]||n[6])&&r%3&&!((r+l)%3)){s+=l;continue}if(i-=l,i>0)continue;l=Math.min(l,l+i+s);let c=[...n[0]][0].length,d=e.slice(0,r+n.index+c+l);if(Math.min(r,l)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let a=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(a),r=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return n&&r&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:t[0],text:a}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let a,n;return t[2]==="@"?(a=t[1],n="mailto:"+a):(a=t[1],n=a),{type:"link",raw:t[0],text:a,href:n,tokens:[{type:"text",raw:a,text:a}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let a,n;if(t[2]==="@")a=t[0],n="mailto:"+a;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);a=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:a,href:n,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let a=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:a}}}},_a=class tw{constructor(t){Z(this,"tokens");Z(this,"options");Z(this,"state");Z(this,"inlineQueue");Z(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||zo,this.options.tokenizer=this.options.tokenizer||new uf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let a={other:na,block:of.normal,inline:Xs.normal};this.options.pedantic?(a.block=of.pedantic,a.inline=Xs.pedantic):this.options.gfm&&(a.block=of.gfm,this.options.breaks?a.inline=Xs.breaks:a.inline=Xs.gfm),this.tokenizer.rules=a}static get rules(){return{block:of,inline:Xs}}static lex(t,a){return new tw(a).lex(t)}static lexInline(t,a){return new tw(a).inlineTokens(t)}lex(t){t=t.replace(na.carriageReturn,`
|
|
80
80
|
`),this.blockTokens(t,this.tokens);for(let a=0;a<this.inlineQueue.length;a++){let n=this.inlineQueue[a];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,a=[],n=!1){for(this.options.pedantic&&(t=t.replace(na.tabCharGlobal," ").replace(na.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(l=>(r=l.call({lexer:this},t,a))?(t=t.substring(r.raw.length),a.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let l=a.at(-1);r.raw.length===1&&l!==void 0?l.raw+=`
|
|
81
81
|
`:a.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let l=a.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
82
82
|
`)?"":`
|
|
@@ -90,9 +90,9 @@ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
90
90
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):a.push(r),n=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let l=a.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
91
91
|
`)?"":`
|
|
92
92
|
`)+r.raw,l.text+=`
|
|
93
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):a.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}inlineTokens(t,a=[]){let n=t,r=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)s.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=r[2]?r[2].length:0,n=n.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let l=!1,i="";for(;t;){l||(i=""),l=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},t,a))?(t=t.substring(s.raw.length),a.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);let c=a.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):a.push(s);continue}if(s=this.tokenizer.emStrong(t,n,i)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.del(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),a.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),a.push(s);continue}let u=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(s=this.tokenizer.inlineText(u)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(i=s.raw.slice(-1)),l=!0;let c=a.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):a.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return a}},
|
|
94
|
-
`;return n?'<pre><code class="language-'+
|
|
95
|
-
`:"<pre><code>"+(a?r:
|
|
93
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):a.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}inlineTokens(t,a=[]){let n=t,r=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)s.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=r[2]?r[2].length:0,n=n.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let l=!1,i="";for(;t;){l||(i=""),l=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},t,a))?(t=t.substring(s.raw.length),a.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);let c=a.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):a.push(s);continue}if(s=this.tokenizer.emStrong(t,n,i)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.del(t)){t=t.substring(s.raw.length),a.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),a.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),a.push(s);continue}let u=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(s=this.tokenizer.inlineText(u)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(i=s.raw.slice(-1)),l=!0;let c=a.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):a.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return a}},cf=class{constructor(e){Z(this,"options");Z(this,"parser");this.options=e||zo}space(e){return""}code({text:e,lang:t,escaped:a}){let n=(t||"").match(na.notSpaceStart)?.[0],r=e.replace(na.endingNewline,"")+`
|
|
94
|
+
`;return n?'<pre><code class="language-'+ar(n)+'">'+(a?r:ar(r,!0))+`</code></pre>
|
|
95
|
+
`:"<pre><code>"+(a?r:ar(r,!0))+`</code></pre>
|
|
96
96
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
97
97
|
${this.parser.parse(e)}</blockquote>
|
|
98
98
|
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -108,34 +108,34 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
108
108
|
`}tablerow({text:e}){return`<tr>
|
|
109
109
|
${e}</tr>
|
|
110
110
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),a=e.header?"th":"td";return(e.align?`<${a} align="${e.align}">`:`<${a}>`)+t+`</${a}>
|
|
111
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${
|
|
112
|
-
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+
|
|
113
|
-
`).map(c=>[{content:c,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[e]),[s,u]=(0,on.useState)(i);return(0,on.useEffect)(()=>{if(!l){u(i);return}let c=l.highlight({code:e,language:t,themes:o},d=>{u(d)});if(c){u(c);return}u(i)},[e,t,o,l,i]),(0,ya.jsx)(Jy.Provider,{value:{code:e},children:(0,ya.jsxs)(iq,{language:t,children:[(0,ya.jsx)(sq,{language:t,children:n}),(0,ya.jsx)(lq,{className:a,language:t,result:s,...r})]})})}});var pM={};wu(pM,{Mermaid:()=>ew});var mM=I(()=>{"use strict";"use client";sf()});function pq(e={}){let{immediate:t=!1,debounceDelay:a=cq,rootMargin:n=dq,idleTimeout:r=fq}=e,[o,l]=(0,D.useState)(!1),i=(0,D.useRef)(null),s=(0,D.useRef)(null),u=(0,D.useRef)(null),c=(0,D.useMemo)(()=>p=>{let m=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=(0,D.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,m)=>window.requestIdleCallback(p,m):c,[c]),f=(0,D.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,D.useEffect)(()=>{if(t){l(!0);return}let p=i.current;if(!p)return;s.current&&(clearTimeout(s.current),s.current=null),u.current&&(f(u.current),u.current=null);let m=()=>{s.current&&(clearTimeout(s.current),s.current=null),u.current&&(f(u.current),u.current=null)},x=g=>{u.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(l(!0),g.disconnect()):u.current=d(()=>{l(!0),g.disconnect()},{timeout:r/2})},{timeout:r})},b=g=>{m(),s.current=window.setTimeout(()=>{var v,M;let C=g.takeRecords();(C.length===0||(M=(v=C.at(-1))==null?void 0:v.isIntersecting)!=null&&M)&&x(g)},a)},y=(g,v)=>{g.isIntersecting?b(v):m()},w=new IntersectionObserver(g=>{for(let v of g)y(v,w)},{rootMargin:n,threshold:0});return w.observe(p),()=>{s.current&&clearTimeout(s.current),u.current&&f(u.current),w.disconnect()}},[t,a,n,r,f,d]),{shouldRender:o,containerRef:i}}function ff(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let a=e.position.start,n=t.position.start,r=e.position.end,o=t.position.end;return a?.line===n?.line&&a?.column===n?.column&&r?.line===o?.line&&r?.column===o?.column}function vt(e,t){return e.className===t.className&&ff(e.node,t.node)}var D,T,cq,dq,fq,lw,iw,df,mq,hq,gq,SM,hM,yq,wq,te,Xl,Jy,CM,gM,yM,xq,wM,vq,bq,Zs,Sq,Cq,Iq,rw,IM,fM,sw,Lq,kq,Qs,Tq,Aq,Mq,LM,kM,Eq,tw,Rq,Dq,_q,Oq,Pq,Nq,Bq,ow,uf,uw,TM,AM,MM,EM,Uq,RM,DM,_M,OM,PM,NM,BM,UM,zM,qM,FM,HM,jM,VM,GM,$M,WM,zq,XM,ZM,QM,qq,xM,vM,cf,Fq,bM,KM,Hq,jq,Vq,Gq,$q,Wq,Xq,aw,Zq,nw,YM,JM,eE,Qq,Kq,Yq,Jq,ra,cw,e5,Zl,t5,ew,sf=I(()=>{"use strict";"use client";D=q(Ae(),1);RC();_C();YC();RL();GL();T=q(ee(),1);Dh();Oh();Bk();cT();yA();GA();uM();cq=300,dq="300px",fq=500;lw=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),iw=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),df=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),mq=e=>(0,T.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,T.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),hq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),gq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),SM=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),hM=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),yq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),wq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),te=(...e)=>_h(Jc(e)),Xl=(e,t,a)=>{let n=typeof t=="string"?new Blob([t],{type:a}):t,r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r)},Jy=(0,D.createContext)({code:""}),CM=()=>(0,D.useContext)(Jy),gM=({onCopy:e,onError:t,timeout:a=2e3,children:n,className:r,code:o,...l})=>{let[i,s]=(0,D.useState)(!1),u=(0,D.useRef)(0),{code:c}=CM(),{isAnimating:d}=(0,D.useContext)(ra),f=o??c,p=async()=>{var x;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.writeText)){t?.(new Error("Clipboard API not available"));return}try{i||(await navigator.clipboard.writeText(f),s(!0),e?.(),u.current=window.setTimeout(()=>s(!1),a))}catch(b){t?.(b)}};(0,D.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let m=i?lw:iw;return(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...l,children:n??(0,T.jsx)(m,{size:14})})},yM={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",\u6587\u8A00:"wy"},xq=({onDownload:e,onError:t,language:a,children:n,className:r,code:o,...l})=>{let{code:i}=CM(),{isAnimating:s}=(0,D.useContext)(ra),u=o??i,c=`file.${a&&a in yM?yM[a]:"txt"}`,d="text/plain",f=()=>{try{Xl(c,u,d),e?.()}catch(p){t?.(p)}};return(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-download-button",disabled:s,onClick:f,title:"Download file",type:"button",...l,children:n??(0,T.jsx)(df,{size:14})})},wM=()=>(0,T.jsxs)("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[(0,T.jsx)("div",{className:"h-[46px] w-full bg-muted/80"}),(0,T.jsx)("div",{className:"flex w-full items-center justify-center p-4",children:(0,T.jsx)(mq,{className:"size-4 animate-spin"})})]}),vq=/\.[^/.]+$/,bq=({node:e,className:t,src:a,alt:n,...r})=>{let o=async()=>{if(a)try{let l=await(await fetch(a)).blob(),i=new URL(a,window.location.origin).pathname.split("/").pop()||"",s=i.split(".").pop(),u=i.includes(".")&&s!==void 0&&s.length<=4,c="";if(u)c=i;else{let d=l.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),c=`${(n||i||"image").replace(vq,"")}.${f}`}Xl(c,l,l.type)}catch{window.open(a,"_blank")}};return a?(0,T.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,T.jsx)("img",{alt:n,className:te("max-w-full rounded-lg",t),"data-streamdown":"image",src:a,...r}),(0,T.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,T.jsx)("button",{className:te("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:(0,T.jsx)(df,{size:14})})]}):null},Zs=0,Sq=()=>{Zs+=1,Zs===1&&(document.body.style.overflow="hidden")},Cq=()=>{Zs=Math.max(0,Zs-1),Zs===0&&(document.body.style.overflow="")},Iq=({url:e,isOpen:t,onClose:a,onConfirm:n})=>{let[r,o]=(0,D.useState)(!1),l=(0,D.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),i=(0,D.useCallback)(()=>{n(),a()},[n,a]);return(0,D.useEffect)(()=>{if(t){Sq();let s=u=>{u.key==="Escape"&&a()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),Cq()}}},[t,a]),t?(0,T.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:a,onKeyDown:s=>{s.key==="Escape"&&a()},role:"button",tabIndex:0,children:(0,T.jsxs)("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:s=>s.stopPropagation(),onKeyDown:s=>s.stopPropagation(),role:"presentation",children:[(0,T.jsx)("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:a,title:"Close",type:"button",children:(0,T.jsx)(SM,{size:16})}),(0,T.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,T.jsxs)("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[(0,T.jsx)(hM,{size:20}),(0,T.jsx)("span",{children:"Open external link?"})]}),(0,T.jsx)("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),(0,T.jsx)("div",{className:te("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,T.jsxs)("div",{className:"flex gap-2",children:[(0,T.jsx)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:l,type:"button",children:r?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(lw,{size:14}),(0,T.jsx)("span",{children:"Copied"})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(iw,{size:14}),(0,T.jsx)("span",{children:"Copy link"})]})}),(0,T.jsxs)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:i,type:"button",children:[(0,T.jsx)(hM,{size:14}),(0,T.jsx)("span",{children:"Open link"})]})]})]})}):null},rw=(0,D.createContext)(null),IM=()=>(0,D.useContext)(rw),fM=()=>{var e;let t=IM();return(e=t?.code)!=null?e:null},sw=()=>{var e;let t=IM();return(e=t?.mermaid)!=null?e:null},Lq=(e,t)=>{var a;let n=(a=void 0)!=null?a:5;return new Promise((r,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin="anonymous",i.onload=()=>{let s=document.createElement("canvas"),u=i.width*n,c=i.height*n;s.width=u,s.height=c;let d=s.getContext("2d");if(!d){o(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(i,0,0,u,c),s.toBlob(f=>{if(!f){o(new Error("Failed to create PNG blob"));return}r(f)},"image/png")},i.onerror=()=>o(new Error("Failed to load SVG image")),i.src=l})},kq=({chart:e,children:t,className:a,onDownload:n,config:r,onError:o})=>{let[l,i]=(0,D.useState)(!1),s=(0,D.useRef)(null),{isAnimating:u}=(0,D.useContext)(ra),c=sw(),d=async f=>{try{if(f==="mmd"){Xl("diagram.mmd",e,"text/plain"),i(!1),n?.(f);return}if(!c){o?.(new Error("Mermaid plugin not available"));return}let p=c.getMermaid(r),m=e.split("").reduce((y,w)=>(y<<5)-y+w.charCodeAt(0)|0,0),x=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:b}=await p.render(x,e);if(!b){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Xl("diagram.svg",b,"image/svg+xml"),i(!1),n?.(f);return}if(f==="png"){let y=await Lq(b);Xl("diagram.png",y,"image/png"),n?.(f),i(!1);return}}catch(p){o?.(p)}};return(0,D.useEffect)(()=>{let f=p=>{let m=p.composedPath();s.current&&!m.includes(s.current)&&i(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,T.jsxs)("div",{className:"relative",ref:s,children:[(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:u,onClick:()=>i(!l),title:"Download diagram",type:"button",children:t??(0,T.jsx)(df,{size:14})}),l?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Qs=0,Tq=()=>{Qs+=1,Qs===1&&(document.body.style.overflow="hidden")},Aq=()=>{Qs=Math.max(0,Qs-1),Qs===0&&(document.body.style.overflow="")},Mq=({chart:e,config:t,onFullscreen:a,onExit:n,className:r,...o})=>{let[l,i]=(0,D.useState)(!1),{isAnimating:s,controls:u}=(0,D.useContext)(ra),c=(()=>{if(typeof u=="boolean")return u;let f=u.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{i(!l)};return(0,D.useEffect)(()=>{if(l){Tq();let f=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),Aq()}}},[l]),(0,D.useEffect)(()=>{l?a?.():n&&n()},[l,a,n]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:s,onClick:d,title:"View fullscreen",type:"button",...o,children:(0,T.jsx)(hq,{size:14})}),l?(0,T.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[(0,T.jsx)("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:(0,T.jsx)(SM,{size:20})}),(0,T.jsx)("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:(0,T.jsx)(ew,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:c})})]}):null]})},LM=e=>{var t,a;let n=[],r=[],o=e.querySelectorAll("thead th");for(let i of o)n.push(((t=i.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let i of l){let s=[],u=i.querySelectorAll("td");for(let c of u)s.push(((a=c.textContent)==null?void 0:a.trim())||"");r.push(s)}return{headers:n,rows:r}},kM=e=>{let{headers:t,rows:a}=e,n=i=>{let s=!1,u=!1;for(let c of i){if(c==='"'){s=!0,u=!0;break}(c===","||c===`
|
|
111
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ar(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:a}){let n=this.parser.parseInline(a),r=SM(e);if(r===null)return n;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+ar(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:a,tokens:n}){n&&(a=this.parser.parseInline(n,this.parser.textRenderer));let r=SM(e);if(r===null)return ar(a);e=r;let o=`<img src="${e}" alt="${a}"`;return t&&(o+=` title="${ar(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ar(e.text)}},dw=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},on=class aw{constructor(t){Z(this,"options");Z(this,"renderer");Z(this,"textRenderer");this.options=t||zo,this.options.renderer=this.options.renderer||new cf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new dw}static parse(t,a){return new aw(a).parse(t)}static parseInline(t,a){return new aw(a).parseInline(t)}parse(t){let a="";for(let n=0;n<t.length;n++){let r=t[n];if(this.options.extensions?.renderers?.[r.type]){let l=r,i=this.options.extensions.renderers[l.type].call({parser:this},l);if(i!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){a+=i||"";continue}}let o=r;switch(o.type){case"space":{a+=this.renderer.space(o);break}case"hr":{a+=this.renderer.hr(o);break}case"heading":{a+=this.renderer.heading(o);break}case"code":{a+=this.renderer.code(o);break}case"table":{a+=this.renderer.table(o);break}case"blockquote":{a+=this.renderer.blockquote(o);break}case"list":{a+=this.renderer.list(o);break}case"checkbox":{a+=this.renderer.checkbox(o);break}case"html":{a+=this.renderer.html(o);break}case"def":{a+=this.renderer.def(o);break}case"paragraph":{a+=this.renderer.paragraph(o);break}case"text":{a+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return a}parseInline(t,a=this.renderer){let n="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let i=this.options.extensions.renderers[o.type].call({parser:this},o);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=i||"";continue}}let l=o;switch(l.type){case"escape":{n+=a.text(l);break}case"html":{n+=a.html(l);break}case"link":{n+=a.link(l);break}case"image":{n+=a.image(l);break}case"checkbox":{n+=a.checkbox(l);break}case"strong":{n+=a.strong(l);break}case"em":{n+=a.em(l);break}case"codespan":{n+=a.codespan(l);break}case"br":{n+=a.br(l);break}case"del":{n+=a.del(l);break}case"text":{n+=a.text(l);break}default:{let i='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return n}},Zs=(lf=class{constructor(e){Z(this,"options");Z(this,"block");this.options=e||zo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?_a.lex:_a.lexInline}provideParser(){return this.block?on.parse:on.parseInline}},Z(lf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Z(lf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),lf),uq=class{constructor(...e){Z(this,"defaults",nw());Z(this,"options",this.setOptions);Z(this,"parse",this.parseMarkdown(!0));Z(this,"parseInline",this.parseMarkdown(!1));Z(this,"Parser",on);Z(this,"Renderer",cf);Z(this,"TextRenderer",dw);Z(this,"Lexer",_a);Z(this,"Tokenizer",uf);Z(this,"Hooks",Zs);this.use(...e)}walkTokens(e,t){let a=[];for(let n of e)switch(a=a.concat(t.call(this,n)),n.type){case"table":{let r=n;for(let o of r.header)a=a.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let l of o)a=a.concat(this.walkTokens(l.tokens,t));break}case"list":{let r=n;a=a.concat(this.walkTokens(r.items,t));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let l=r[o].flat(1/0);a=a.concat(this.walkTokens(l,t))}):r.tokens&&(a=a.concat(this.walkTokens(r.tokens,t)))}}return a}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{let n={...a};if(n.async=this.defaults.async||n.async||!1,a.extensions&&(a.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...l){let i=r.renderer.apply(this,l);return i===!1&&(i=o.apply(this,l)),i}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),n.extensions=t),a.renderer){let r=this.defaults.renderer||new cf(this.defaults);for(let o in a.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,i=a.renderer[l],s=r[l];r[l]=(...u)=>{let c=i.apply(r,u);return c===!1&&(c=s.apply(r,u)),c||""}}n.renderer=r}if(a.tokenizer){let r=this.defaults.tokenizer||new uf(this.defaults);for(let o in a.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,i=a.tokenizer[l],s=r[l];r[l]=(...u)=>{let c=i.apply(r,u);return c===!1&&(c=s.apply(r,u)),c}}n.tokenizer=r}if(a.hooks){let r=this.defaults.hooks||new Zs;for(let o in a.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let l=o,i=a.hooks[l],s=r[l];Zs.passThroughHooks.has(o)?r[l]=u=>{if(this.defaults.async&&Zs.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await i.call(r,u);return s.call(r,d)})();let c=i.call(r,u);return s.call(r,c)}:r[l]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await i.apply(r,u);return d===!1&&(d=await s.apply(r,u)),d})();let c=i.apply(r,u);return c===!1&&(c=s.apply(r,u)),c}}n.hooks=r}if(a.walkTokens){let r=this.defaults.walkTokens,o=a.walkTokens;n.walkTokens=function(l){let i=[];return i.push(o.call(this,l)),r&&(i=i.concat(r.call(this,l))),i}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _a.lex(e,t??this.defaults)}parser(e,t){return on.parse(e,t??this.defaults)}parseMarkdown(e){return(t,a)=>{let n={...a},r={...this.defaults,...n},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(t):t,i=await(r.hooks?await r.hooks.provideLexer():e?_a.lex:_a.lexInline)(l,r),s=r.hooks?await r.hooks.processAllTokens(i):i;r.walkTokens&&await Promise.all(this.walkTokens(s,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser():e?on.parse:on.parseInline)(s,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let l=(r.hooks?r.hooks.provideLexer():e?_a.lex:_a.lexInline)(t,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let i=(r.hooks?r.hooks.provideParser():e?on.parse:on.parseInline)(l,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(l){return o(l)}}}onError(e,t){return a=>{if(a.message+=`
|
|
112
|
+
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+ar(a.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(a);throw a}}},Fo=new uq;Je.options=Je.setOptions=function(e){return Fo.setOptions(e),Je.defaults=Fo.defaults,kM(Je.defaults),Je};Je.getDefaults=nw;Je.defaults=zo;Je.use=function(...e){return Fo.use(...e),Je.defaults=Fo.defaults,kM(Je.defaults),Je};Je.walkTokens=function(e,t){return Fo.walkTokens(e,t)};Je.parseInline=Fo.parseInline;Je.Parser=on;Je.parser=on.parse;Je.Renderer=cf;Je.TextRenderer=dw;Je.Lexer=_a;Je.lexer=_a.lex;Je.Tokenizer=uf;Je.Hooks=Zs;Je.parse=Je;nte=Je.options,rte=Je.setOptions,ote=Je.use,lte=Je.walkTokens,ite=Je.parseInline,ste=on.parse,ute=_a.lex});var BM={};bu(BM,{CodeBlock:()=>mq});var ln,ya,cq,dq,fq,pq,mq,UM=C(()=>{"use strict";"use client";pf();ln=z(Me(),1),ya=z(te(),1),cq=ae("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),dq=(0,ln.memo)(({children:e,result:t,language:a,className:n,...r})=>{let o=(0,ln.useMemo)(()=>({backgroundColor:t.bg,color:t.fg}),[t.bg,t.fg]);return(0,ya.jsx)("pre",{className:ae(n,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":a,"data-streamdown":"code-block-body",style:o,...r,children:(0,ya.jsx)("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((l,i)=>(0,ya.jsx)("span",{className:cq,children:l.map((s,u)=>(0,ya.jsx)("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:s.color,backgroundColor:s.bgColor,...s.htmlStyle},...s.htmlAttrs,children:s.content},u))},i))})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),fq=({className:e,language:t,style:a,...n})=>(0,ya.jsx)("div",{className:ae("my-4 w-full overflow-hidden rounded-xl border border-border",e),"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...a},...n}),pq=({language:e,children:t})=>(0,ya.jsxs)("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:[(0,ya.jsx)("span",{className:"ml-1 font-mono lowercase",children:e}),(0,ya.jsx)("div",{className:"flex items-center gap-2",children:t})]}),mq=({code:e,language:t,className:a,children:n,...r})=>{let{shikiTheme:o}=(0,ln.useContext)(ra),l=FM(),i=(0,ln.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:e.split(`
|
|
113
|
+
`).map(c=>[{content:c,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[e]),[s,u]=(0,ln.useState)(i);return(0,ln.useEffect)(()=>{if(!l){u(i);return}let c=l.highlight({code:e,language:t,themes:o},d=>{u(d)});if(c){u(c);return}u(i)},[e,t,o,l,i]),(0,ya.jsx)(fw.Provider,{value:{code:e},children:(0,ya.jsxs)(fq,{language:t,children:[(0,ya.jsx)(pq,{language:t,children:n}),(0,ya.jsx)(dq,{className:a,language:t,result:s,...r})]})})}});var zM={};bu(zM,{Mermaid:()=>pw});var qM=C(()=>{"use strict";"use client";pf()});function wq(e={}){let{immediate:t=!1,debounceDelay:a=hq,rootMargin:n=gq,idleTimeout:r=yq}=e,[o,l]=(0,D.useState)(!1),i=(0,D.useRef)(null),s=(0,D.useRef)(null),u=(0,D.useRef)(null),c=(0,D.useMemo)(()=>p=>{let m=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=(0,D.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(p,m)=>window.requestIdleCallback(p,m):c,[c]),f=(0,D.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return(0,D.useEffect)(()=>{if(t){l(!0);return}let p=i.current;if(!p)return;s.current&&(clearTimeout(s.current),s.current=null),u.current&&(f(u.current),u.current=null);let m=()=>{s.current&&(clearTimeout(s.current),s.current=null),u.current&&(f(u.current),u.current=null)},x=g=>{u.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(l(!0),g.disconnect()):u.current=d(()=>{l(!0),g.disconnect()},{timeout:r/2})},{timeout:r})},b=g=>{m(),s.current=window.setTimeout(()=>{var v,M;let I=g.takeRecords();(I.length===0||(M=(v=I.at(-1))==null?void 0:v.isIntersecting)!=null&&M)&&x(g)},a)},y=(g,v)=>{g.isIntersecting?b(v):m()},w=new IntersectionObserver(g=>{for(let v of g)y(v,w)},{rootMargin:n,threshold:0});return w.observe(p),()=>{s.current&&clearTimeout(s.current),u.current&&f(u.current),w.disconnect()}},[t,a,n,r,f,d]),{shouldRender:o,containerRef:i}}function yf(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let a=e.position.start,n=t.position.start,r=e.position.end,o=t.position.end;return a?.line===n?.line&&a?.column===n?.column&&r?.line===o?.line&&r?.column===o?.column}function vt(e,t){return e.className===t.className&&yf(e.node,t.node)}var D,T,hq,gq,yq,xw,vw,gf,xq,vq,bq,KM,HM,Sq,Iq,ae,Ql,fw,ZM,jM,VM,Cq,GM,kq,Lq,Js,Tq,Aq,Mq,yw,QM,FM,bw,Eq,Rq,eu,Dq,_q,Oq,YM,JM,Pq,mw,Nq,Bq,Uq,Fq,zq,qq,Hq,ww,mf,Sw,eE,tE,aE,nE,jq,rE,oE,lE,iE,sE,uE,cE,dE,fE,pE,mE,hE,gE,yE,wE,xE,vE,Vq,bE,SE,IE,Gq,$M,WM,hf,$q,XM,CE,Wq,Xq,Kq,Zq,Qq,Yq,Jq,hw,e5,gw,kE,LE,TE,t5,a5,n5,r5,ra,Iw,o5,Yl,l5,pw,pf=C(()=>{"use strict";"use client";D=z(Me(),1);rC();lC();kC();rL();wL();T=z(te(),1);Gh();Wh();cT();BT();VA();wM();NM();hq=300,gq="300px",yq=500;xw=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),vw=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),gf=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),xq=e=>(0,T.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,T.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),vq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),bq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),KM=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),HM=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Sq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Iq=e=>(0,T.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),ae=(...e)=>$h(rd(e)),Ql=(e,t,a)=>{let n=typeof t=="string"?new Blob([t],{type:a}):t,r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r)},fw=(0,D.createContext)({code:""}),ZM=()=>(0,D.useContext)(fw),jM=({onCopy:e,onError:t,timeout:a=2e3,children:n,className:r,code:o,...l})=>{let[i,s]=(0,D.useState)(!1),u=(0,D.useRef)(0),{code:c}=ZM(),{isAnimating:d}=(0,D.useContext)(ra),f=o??c,p=async()=>{var x;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.writeText)){t?.(new Error("Clipboard API not available"));return}try{i||(await navigator.clipboard.writeText(f),s(!0),e?.(),u.current=window.setTimeout(()=>s(!1),a))}catch(b){t?.(b)}};(0,D.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let m=i?xw:vw;return(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...l,children:n??(0,T.jsx)(m,{size:14})})},VM={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",\u6587\u8A00:"wy"},Cq=({onDownload:e,onError:t,language:a,children:n,className:r,code:o,...l})=>{let{code:i}=ZM(),{isAnimating:s}=(0,D.useContext)(ra),u=o??i,c=`file.${a&&a in VM?VM[a]:"txt"}`,d="text/plain",f=()=>{try{Ql(c,u,d),e?.()}catch(p){t?.(p)}};return(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-download-button",disabled:s,onClick:f,title:"Download file",type:"button",...l,children:n??(0,T.jsx)(gf,{size:14})})},GM=()=>(0,T.jsxs)("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[(0,T.jsx)("div",{className:"h-[46px] w-full bg-muted/80"}),(0,T.jsx)("div",{className:"flex w-full items-center justify-center p-4",children:(0,T.jsx)(xq,{className:"size-4 animate-spin"})})]}),kq=/\.[^/.]+$/,Lq=({node:e,className:t,src:a,alt:n,...r})=>{let o=async()=>{if(a)try{let l=await(await fetch(a)).blob(),i=new URL(a,window.location.origin).pathname.split("/").pop()||"",s=i.split(".").pop(),u=i.includes(".")&&s!==void 0&&s.length<=4,c="";if(u)c=i;else{let d=l.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),c=`${(n||i||"image").replace(kq,"")}.${f}`}Ql(c,l,l.type)}catch{window.open(a,"_blank")}};return a?(0,T.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,T.jsx)("img",{alt:n,className:ae("max-w-full rounded-lg",t),"data-streamdown":"image",src:a,...r}),(0,T.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,T.jsx)("button",{className:ae("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:(0,T.jsx)(gf,{size:14})})]}):null},Js=0,Tq=()=>{Js+=1,Js===1&&(document.body.style.overflow="hidden")},Aq=()=>{Js=Math.max(0,Js-1),Js===0&&(document.body.style.overflow="")},Mq=({url:e,isOpen:t,onClose:a,onConfirm:n})=>{let[r,o]=(0,D.useState)(!1),l=(0,D.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),i=(0,D.useCallback)(()=>{n(),a()},[n,a]);return(0,D.useEffect)(()=>{if(t){Tq();let s=u=>{u.key==="Escape"&&a()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),Aq()}}},[t,a]),t?(0,T.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:a,onKeyDown:s=>{s.key==="Escape"&&a()},role:"button",tabIndex:0,children:(0,T.jsxs)("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:s=>s.stopPropagation(),onKeyDown:s=>s.stopPropagation(),role:"presentation",children:[(0,T.jsx)("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:a,title:"Close",type:"button",children:(0,T.jsx)(KM,{size:16})}),(0,T.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,T.jsxs)("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[(0,T.jsx)(HM,{size:20}),(0,T.jsx)("span",{children:"Open external link?"})]}),(0,T.jsx)("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),(0,T.jsx)("div",{className:ae("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,T.jsxs)("div",{className:"flex gap-2",children:[(0,T.jsx)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:l,type:"button",children:r?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(xw,{size:14}),(0,T.jsx)("span",{children:"Copied"})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(vw,{size:14}),(0,T.jsx)("span",{children:"Copy link"})]})}),(0,T.jsxs)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:i,type:"button",children:[(0,T.jsx)(HM,{size:14}),(0,T.jsx)("span",{children:"Open link"})]})]})]})}):null},yw=(0,D.createContext)(null),QM=()=>(0,D.useContext)(yw),FM=()=>{var e;let t=QM();return(e=t?.code)!=null?e:null},bw=()=>{var e;let t=QM();return(e=t?.mermaid)!=null?e:null},Eq=(e,t)=>{var a;let n=(a=void 0)!=null?a:5;return new Promise((r,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin="anonymous",i.onload=()=>{let s=document.createElement("canvas"),u=i.width*n,c=i.height*n;s.width=u,s.height=c;let d=s.getContext("2d");if(!d){o(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(i,0,0,u,c),s.toBlob(f=>{if(!f){o(new Error("Failed to create PNG blob"));return}r(f)},"image/png")},i.onerror=()=>o(new Error("Failed to load SVG image")),i.src=l})},Rq=({chart:e,children:t,className:a,onDownload:n,config:r,onError:o})=>{let[l,i]=(0,D.useState)(!1),s=(0,D.useRef)(null),{isAnimating:u}=(0,D.useContext)(ra),c=bw(),d=async f=>{try{if(f==="mmd"){Ql("diagram.mmd",e,"text/plain"),i(!1),n?.(f);return}if(!c){o?.(new Error("Mermaid plugin not available"));return}let p=c.getMermaid(r),m=e.split("").reduce((y,w)=>(y<<5)-y+w.charCodeAt(0)|0,0),x=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:b}=await p.render(x,e);if(!b){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Ql("diagram.svg",b,"image/svg+xml"),i(!1),n?.(f);return}if(f==="png"){let y=await Eq(b);Ql("diagram.png",y,"image/png"),n?.(f),i(!1);return}}catch(p){o?.(p)}};return(0,D.useEffect)(()=>{let f=p=>{let m=p.composedPath();s.current&&!m.includes(s.current)&&i(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),(0,T.jsxs)("div",{className:"relative",ref:s,children:[(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:u,onClick:()=>i(!l),title:"Download diagram",type:"button",children:t??(0,T.jsx)(gf,{size:14})}),l?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},eu=0,Dq=()=>{eu+=1,eu===1&&(document.body.style.overflow="hidden")},_q=()=>{eu=Math.max(0,eu-1),eu===0&&(document.body.style.overflow="")},Oq=({chart:e,config:t,onFullscreen:a,onExit:n,className:r,...o})=>{let[l,i]=(0,D.useState)(!1),{isAnimating:s,controls:u}=(0,D.useContext)(ra),c=(()=>{if(typeof u=="boolean")return u;let f=u.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{i(!l)};return(0,D.useEffect)(()=>{if(l){Dq();let f=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),_q()}}},[l]),(0,D.useEffect)(()=>{l?a?.():n&&n()},[l,a,n]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:s,onClick:d,title:"View fullscreen",type:"button",...o,children:(0,T.jsx)(vq,{size:14})}),l?(0,T.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[(0,T.jsx)("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:(0,T.jsx)(KM,{size:20})}),(0,T.jsx)("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:(0,T.jsx)(pw,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:c})})]}):null]})},YM=e=>{var t,a;let n=[],r=[],o=e.querySelectorAll("thead th");for(let i of o)n.push(((t=i.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let i of l){let s=[],u=i.querySelectorAll("td");for(let c of u)s.push(((a=c.textContent)==null?void 0:a.trim())||"");r.push(s)}return{headers:n,rows:r}},JM=e=>{let{headers:t,rows:a}=e,n=i=>{let s=!1,u=!1;for(let c of i){if(c==='"'){s=!0,u=!0;break}(c===","||c===`
|
|
114
114
|
`)&&(s=!0)}return s?u?`"${i.replace(/"/g,'""')}"`:`"${i}"`:i},r=t.length>0?a.length+1:a.length,o=new Array(r),l=0;t.length>0&&(o[l]=t.map(n).join(","),l+=1);for(let i of a)o[l]=i.map(n).join(","),l+=1;return o.join(`
|
|
115
|
-
`)},
|
|
115
|
+
`)},Pq=e=>{let{headers:t,rows:a}=e,n=i=>{let s=!1;for(let c of i)if(c===" "||c===`
|
|
116
116
|
`||c==="\r"){s=!0;break}if(!s)return i;let u=[];for(let c of i)c===" "?u.push("\\t"):c===`
|
|
117
117
|
`?u.push("\\n"):c==="\r"?u.push("\\r"):u.push(c);return u.join("")},r=t.length>0?a.length+1:a.length,o=new Array(r),l=0;t.length>0&&(o[l]=t.map(n).join(" "),l+=1);for(let i of a)o[l]=i.map(n).join(" "),l+=1;return o.join(`
|
|
118
|
-
`)},
|
|
119
|
-
`)},Dq=({children:e,className:t,onCopy:a,onError:n,timeout:r=2e3})=>{let[o,l]=(0,D.useState)(!1),[i,s]=(0,D.useState)(!1),u=(0,D.useRef)(null),c=(0,D.useRef)(0),{isAnimating:d}=(0,D.useContext)(ra),f=async m=>{var x,b;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.write)){n?.(new Error("Clipboard API not available"));return}try{let y=(b=u.current)==null?void 0:b.closest('[data-streamdown="table-wrapper"]'),w=y?.querySelector("table");if(!w){n?.(new Error("Table not found"));return}let g=LM(w),v=m==="csv"?kM(g):Eq(g),M=new ClipboardItem({"text/plain":new Blob([v],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),s(!0),l(!1),a?.(m),c.current=window.setTimeout(()=>s(!1),r)}catch(y){n?.(y)}};(0,D.useEffect)(()=>{let m=x=>{let b=x.composedPath();u.current&&!b.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(c.current)}},[]);let p=i?lw:iw;return(0,T.jsxs)("div",{className:"relative",ref:u,children:[(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>l(!o),title:"Copy table",type:"button",children:e??(0,T.jsx)(p,{size:14})}),o?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},_q=({children:e,className:t,onDownload:a,onError:n})=>{let[r,o]=(0,D.useState)(!1),l=(0,D.useRef)(null),{isAnimating:i}=(0,D.useContext)(ra),s=u=>{var c;try{let d=(c=l.current)==null?void 0:c.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){n?.(new Error("Table not found"));return}let p=LM(f),m=u==="csv"?kM(p):Rq(p);Xl(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),o(!1),a?.(u)}catch(d){n?.(d)}};return(0,D.useEffect)(()=>{let u=c=>{let d=c.composedPath();l.current&&!d.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),(0,T.jsxs)("div",{className:"relative",ref:l,children:[(0,T.jsx)("button",{className:te("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:i,onClick:()=>o(!r),title:"Download table",type:"button",children:e??(0,T.jsx)(df,{size:14})}),r?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>s("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>s("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},Oq=({children:e,className:t,showControls:a,...n})=>(0,T.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[a?(0,T.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,T.jsx)(Dq,{}),(0,T.jsx)(_q,{})]}):null,(0,T.jsx)("div",{className:"overflow-x-auto",children:(0,T.jsx)("table",{className:te("w-full border-collapse border border-border",t),"data-streamdown":"table",...n,children:e})})]}),Pq=(0,D.lazy)(()=>Promise.resolve().then(()=>(dM(),cM)).then(e=>({default:e.CodeBlock}))),Nq=(0,D.lazy)(()=>Promise.resolve().then(()=>(mM(),pM)).then(e=>({default:e.Mermaid}))),Bq=/language-([^\s]+)/;ow=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,uf=(e,t)=>{if(typeof e=="boolean")return e;let a=e.mermaid;return a===!1?!1:a===!0||a===void 0?!0:a[t]!==!1},uw=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("ol",{className:te("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e}),(e,t)=>vt(e,t));uw.displayName="MarkdownOl";TM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("li",{className:te("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e}),(e,t)=>e.className===t.className&&ff(e.node,t.node));TM.displayName="MarkdownLi";AM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("ul",{className:te("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e}),(e,t)=>vt(e,t));AM.displayName="MarkdownUl";MM=(0,D.memo)(({className:e,node:t,...a})=>(0,T.jsx)("hr",{className:te("my-6 border-border",e),"data-streamdown":"horizontal-rule",...a}),(e,t)=>vt(e,t));MM.displayName="MarkdownHr";EM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("span",{className:te("font-semibold",t),"data-streamdown":"strong",...n,children:e}),(e,t)=>vt(e,t));EM.displayName="MarkdownStrong";Uq=({children:e,className:t,href:a,node:n,...r})=>{let{linkSafety:o}=(0,D.useContext)(ra),[l,i]=(0,D.useState)(!1),s=a==="streamdown:incomplete-link",u=(0,D.useCallback)(async p=>{if(!(!(o!=null&&o.enabled&&a)||s)){if(p.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(a)){window.open(a,"_blank","noreferrer");return}i(!0)}},[o,a,s]),c=(0,D.useCallback)(()=>{a&&window.open(a,"_blank","noreferrer")},[a]),d=(0,D.useCallback)(()=>{i(!1)},[]),f={url:a??"",isOpen:l,onClose:d,onConfirm:c};return o!=null&&o.enabled&&a?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:te("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":s,"data-streamdown":"link",onClick:u,type:"button",children:e}),o.renderModal?o.renderModal(f):(0,T.jsx)(Iq,{...f})]}):(0,T.jsx)("a",{className:te("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":s,"data-streamdown":"link",href:a,rel:"noreferrer",target:"_blank",...r,children:e})},RM=(0,D.memo)(Uq,(e,t)=>vt(e,t)&&e.href===t.href);RM.displayName="MarkdownA";DM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h1",{className:te("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e}),(e,t)=>vt(e,t));DM.displayName="MarkdownH1";_M=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h2",{className:te("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e}),(e,t)=>vt(e,t));_M.displayName="MarkdownH2";OM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h3",{className:te("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e}),(e,t)=>vt(e,t));OM.displayName="MarkdownH3";PM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h4",{className:te("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e}),(e,t)=>vt(e,t));PM.displayName="MarkdownH4";NM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h5",{className:te("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e}),(e,t)=>vt(e,t));NM.displayName="MarkdownH5";BM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h6",{className:te("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e}),(e,t)=>vt(e,t));BM.displayName="MarkdownH6";UM=(0,D.memo)(({children:e,className:t,node:a,...n})=>{let{controls:r}=(0,D.useContext)(ra),o=ow(r,"table");return(0,T.jsx)(Oq,{className:t,showControls:o,...n,children:e})},(e,t)=>vt(e,t));UM.displayName="MarkdownTable";zM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("thead",{className:te("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e}),(e,t)=>vt(e,t));zM.displayName="MarkdownThead";qM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("tbody",{className:te("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...n,children:e}),(e,t)=>vt(e,t));qM.displayName="MarkdownTbody";FM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("tr",{className:te("border-border border-b",t),"data-streamdown":"table-row",...n,children:e}),(e,t)=>vt(e,t));FM.displayName="MarkdownTr";HM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("th",{className:te("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e}),(e,t)=>vt(e,t));HM.displayName="MarkdownTh";jM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("td",{className:te("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e}),(e,t)=>vt(e,t));jM.displayName="MarkdownTd";VM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("blockquote",{className:te("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e}),(e,t)=>vt(e,t));VM.displayName="MarkdownBlockquote";GM=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("sup",{className:te("text-sm",t),"data-streamdown":"superscript",...n,children:e}),(e,t)=>vt(e,t));GM.displayName="MarkdownSup";$M=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("sub",{className:te("text-sm",t),"data-streamdown":"subscript",...n,children:e}),(e,t)=>vt(e,t));$M.displayName="MarkdownSub";WM=(0,D.memo)(({children:e,className:t,node:a,...n})=>{if("data-footnotes"in n){let r=l=>{var i,s;if(!(0,D.isValidElement)(l))return!1;let u=Array.isArray(l.props.children)?l.props.children:[l.props.children],c=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(c=!0);else if((0,D.isValidElement)(f))if(((i=f.props)==null?void 0:i["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let m of p){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if((0,D.isValidElement)(m)&&((s=m.props)==null?void 0:s["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},o=Array.isArray(e)?e.map(l=>{if(!(0,D.isValidElement)(l))return l;if(l.type===uw){let i=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(s=>!r(s));return i.length===0?null:{...l,props:{...l.props,children:i}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?(0,T.jsx)("section",{className:t,...n,children:o}):null}return(0,T.jsx)("section",{className:t,...n,children:e})},(e,t)=>vt(e,t));WM.displayName="MarkdownSection";zq=({node:e,className:t,children:a,...n})=>{var r,o,l;let i=((r=e?.position)==null?void 0:r.start.line)===((o=e?.position)==null?void 0:o.end.line),{mermaid:s,controls:u}=(0,D.useContext)(ra),c=sw();if(i)return(0,T.jsx)("code",{className:te("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:a});let d=t?.match(Bq),f=(l=d?.at(1))!=null?l:"",p="";if((0,D.isValidElement)(a)&&a.props&&typeof a.props=="object"&&"children"in a.props&&typeof a.props.children=="string"?p=a.props.children:typeof a=="string"&&(p=a),f==="mermaid"&&c){let x=ow(u,"mermaid"),b=uf(u,"download"),y=uf(u,"copy"),w=uf(u,"fullscreen"),g=uf(u,"panZoom"),v=x&&(b||y||w);return(0,T.jsx)(D.Suspense,{fallback:(0,T.jsx)(wM,{}),children:(0,T.jsxs)("div",{className:te("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[v?(0,T.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[b?(0,T.jsx)(kq,{chart:p,config:s?.config}):null,y?(0,T.jsx)(gM,{code:p}):null,w?(0,T.jsx)(Mq,{chart:p,config:s?.config}):null]}):null,(0,T.jsx)(Nq,{chart:p,config:s?.config,showControls:g})]})})}let m=ow(u,"code");return(0,T.jsx)(D.Suspense,{fallback:(0,T.jsx)(wM,{}),children:(0,T.jsx)(Pq,{className:te("overflow-x-auto border-border border-t",t),code:p,language:f,children:m?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(xq,{code:p,language:f}),(0,T.jsx)(gM,{})]}):null})})},XM=(0,D.memo)(zq,(e,t)=>e.className===t.className&&ff(e.node,t.node));XM.displayName="MarkdownCode";ZM=(0,D.memo)(bq,(e,t)=>e.className===t.className&&ff(e.node,t.node));ZM.displayName="MarkdownImg";QM=(0,D.memo)(({children:e,className:t,node:a,...n})=>{var r,o;let l=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(l.length===1&&(0,D.isValidElement)(l[0])){let i=l[0].props.node,s=i?.tagName;if(s==="img")return(0,T.jsx)(T.Fragment,{children:e});if(s==="code"&&((r=i?.position)==null?void 0:r.start.line)!==((o=i?.position)==null?void 0:o.end.line))return(0,T.jsx)(T.Fragment,{children:e})}return(0,T.jsx)("p",{className:t,...n,children:e})},(e,t)=>vt(e,t));QM.displayName="MarkdownParagraph";qq={ol:uw,li:TM,ul:AM,hr:MM,strong:EM,a:RM,h1:DM,h2:_M,h3:OM,h4:PM,h5:NM,h6:BM,table:UM,thead:zM,tbody:qM,tr:FM,th:HM,td:jM,blockquote:VM,code:XM,img:ZM,pre:({children:e})=>e,sup:GM,sub:$M,p:QM,section:WM},xM=[],vM={allowDangerousHtml:!0},cf=new WeakMap,Fq=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let a=e.rehypePlugins,n=e.remarkPlugins,r=e.remarkRehypeOptions;if(!(a||n||r)){let c="default";return this.keyCache.set(e,c),c}let o=c=>{if(!c||c.length===0)return"";let d="";for(let f=0;f<c.length;f+=1){let p=c[f];if(f>0&&(d+=","),Array.isArray(p)){let[m,x]=p;if(typeof m=="function"){let b=cf.get(m);b||(b=m.name,cf.set(m,b)),d+=b}else d+=String(m);d+=":",d+=JSON.stringify(x)}else if(typeof p=="function"){let m=cf.get(p);m||(m=p.name,cf.set(p,m)),d+=m}else d+=String(p)}return d},l=o(a),i=o(n),s=r?JSON.stringify(r):"",u=`${i}::${l}::${s}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),a=this.cache.get(t);return a&&(this.cache.delete(t),this.cache.set(t,a)),a}set(e,t){let a=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(a,t)}clear(){this.cache.clear()}},bM=new Fq,KM=e=>{let t=Hq(e),a=e.children||"";return Vq(t.runSync(t.parse(a),a),e)},Hq=e=>{let t=bM.get(e);if(t)return t;let a=jq(e);return bM.set(e,a),a},jq=e=>{let t=e.rehypePlugins||xM,a=e.remarkPlugins||xM,n=e.remarkRehypeOptions?{...vM,...e.remarkRehypeOptions}:vM;return qy().use($d).use(a).use(Qd,n).use(t)},Vq=(e,t)=>xy(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0}),Gq=/\[\^[^\]\s]{1,200}\](?!:)/,$q=/\[\^[^\]\s]{1,200}\]:/,Wq=/<\/(\w+)>/,Xq=/<(\w+)[\s>]/,aw=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
120
|
-
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},
|
|
121
|
-
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},nw=e=>{let t=0;for(let a=0;a<e.length-1;a+=1)e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},YM=e=>{let t=Gq.test(e),a=$q.test(e);if(t||a)return[e];let n=Ra.lex(e,{gfm:!0}),r=[],o=[];for(let l of n){let i=l.raw,s=r.length;if(o.length>0){if(r[s-1]+=i,l.type==="html"){let u=i.match(Wq);if(u){let c=u[1];o.at(-1)===c&&o.pop()}}continue}if(l.type==="html"&&l.block){let u=i.match(Xq);if(u){let c=u[1];i.includes(`</${c}>`)||o.push(c)}}if(i.trim()==="$$"&&s>0){let u=r[s-1],c=aw(u),d=nw(u);if(c&&d%2===1){r[s-1]=u+i;continue}}if(s>0&&Zq(i)){let u=r[s-1],c=aw(u),d=nw(u),f=nw(i);if(c&&d%2===1&&!aw(i)&&f===1){r[s-1]=u+i;continue}}r.push(i)}return r},JM={raw:DC,sanitize:[fd,{}],harden:[EC,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},eE={gfm:[Bd,{}]},Qq=Object.values(JM),Kq=Object.values(eE),Yq={block:" \u258B",circle:" \u25CF"},Jq={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ra=(0,D.createContext)(Jq),cw=(0,D.memo)(({content:e,shouldParseIncompleteMarkdown:t,index:a,...n})=>(0,T.jsx)(KM,{...n,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let a=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(a.length!==n.length||a.some(r=>{var o,l;return((o=e.components)==null?void 0:o[r])!==((l=t.components)==null?void 0:l[r])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});cw.displayName="Block";e5=["github-light","github-dark"],Zl=(0,D.memo)(({children:e,mode:t="streaming",parseIncompleteMarkdown:a=!0,components:n,rehypePlugins:r=Qq,remarkPlugins:o=Kq,className:l,shikiTheme:i=e5,mermaid:s,controls:u=!0,isAnimating:c=!1,BlockComponent:d=cw,parseMarkdownIntoBlocksFn:f=YM,caret:p,plugins:m,remend:x,linkSafety:b={enabled:!0},...y})=>{let w=(0,D.useId)(),[g,v]=(0,D.useTransition)(),M=(0,D.useMemo)(()=>typeof e!="string"?"":t==="streaming"&&a?VL(e,x):e,[e,t,a,x]),C=(0,D.useMemo)(()=>f(M),[M,f]),[A,E]=(0,D.useState)(C);(0,D.useEffect)(()=>{t==="streaming"?v(()=>{E(C)}):E(C)},[C,t]);let _=t==="streaming"?A:C,k=(0,D.useMemo)(()=>_.map((j,K)=>`${w}-${K}`),[_.length,w]),W=(0,D.useMemo)(()=>{var j,K;return{shikiTheme:(K=(j=m?.code)==null?void 0:j.getThemes())!=null?K:i,controls:u,isAnimating:c,mode:t,mermaid:s,linkSafety:b}},[i,u,c,t,s,b,m?.code]),U=(0,D.useMemo)(()=>({...qq,...n}),[n]),R=(0,D.useMemo)(()=>{let j=[];return m!=null&&m.cjk&&(j=[...j,...m.cjk.remarkPluginsBefore]),j=[...j,...o],m!=null&&m.cjk&&(j=[...j,...m.cjk.remarkPluginsAfter]),m!=null&&m.math&&(j=[...j,m.math.remarkPlugin]),j},[o,m?.math,m?.cjk]),B=(0,D.useMemo)(()=>m!=null&&m.math?[...r,m.math.rehypePlugin]:r,[r,m?.math]),F=(0,D.useMemo)(()=>p&&c?{"--streamdown-caret":`"${Yq[p]}"`}:void 0,[p,c]);return t==="static"?(0,T.jsx)(rw.Provider,{value:m??null,children:(0,T.jsx)(ra.Provider,{value:W,children:(0,T.jsx)("div",{className:te("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:(0,T.jsx)(KM,{components:U,rehypePlugins:B,remarkPlugins:R,...y,children:e})})})}):(0,T.jsx)(rw.Provider,{value:m??null,children:(0,T.jsx)(ra.Provider,{value:W,children:(0,T.jsxs)("div",{className:te("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",p?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:F,children:[_.length===0&&p&&c&&(0,T.jsx)("span",{}),_.map((j,K)=>(0,T.jsx)(d,{components:U,content:j,index:K,rehypePlugins:B,remarkPlugins:R,shouldParseIncompleteMarkdown:a,...y},k[K]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);Zl.displayName="Streamdown";t5=({children:e,className:t,minZoom:a=.5,maxZoom:n=3,zoomStep:r=.1,showControls:o=!0,initialZoom:l=1,fullscreen:i=!1})=>{let s=(0,D.useRef)(null),u=(0,D.useRef)(null),[c,d]=(0,D.useState)(l),[f,p]=(0,D.useState)({x:0,y:0}),[m,x]=(0,D.useState)(!1),[b,y]=(0,D.useState)({x:0,y:0}),[w,g]=(0,D.useState)({x:0,y:0}),v=(0,D.useCallback)(U=>{d(R=>Math.max(a,Math.min(n,R+U)))},[a,n]),M=(0,D.useCallback)(()=>{v(r)},[v,r]),C=(0,D.useCallback)(()=>{v(-r)},[v,r]),A=(0,D.useCallback)(()=>{d(l),p({x:0,y:0})},[l]),E=(0,D.useCallback)(U=>{U.preventDefault();let R=U.deltaY>0?-r:r;v(R)},[v,r]),_=(0,D.useCallback)(U=>{if(U.button!==0||U.isPrimary===!1)return;x(!0),y({x:U.clientX,y:U.clientY}),g(f);let R=U.currentTarget;R instanceof HTMLElement&&R.setPointerCapture(U.pointerId)},[f]),k=(0,D.useCallback)(U=>{if(!m)return;U.preventDefault();let R=U.clientX-b.x,B=U.clientY-b.y;p({x:w.x+R,y:w.y+B})},[m,b,w]),W=(0,D.useCallback)(U=>{x(!1);let R=U.currentTarget;R instanceof HTMLElement&&R.releasePointerCapture(U.pointerId)},[]);return(0,D.useEffect)(()=>{let U=s.current;if(U)return U.addEventListener("wheel",E,{passive:!1}),()=>{U.removeEventListener("wheel",E)}},[E]),(0,D.useEffect)(()=>{let U=u.current;if(U&&m)return document.body.style.userSelect="none",U.addEventListener("pointermove",k,{passive:!1}),U.addEventListener("pointerup",W),U.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",k),U.removeEventListener("pointerup",W),U.removeEventListener("pointercancel",W)}},[m,k,W]),(0,T.jsxs)("div",{className:te("relative flex flex-col",i?"h-full w-full":"min-h-28 w-full",t),ref:s,style:{cursor:m?"grabbing":"grab"},children:[o?(0,T.jsxs)("div",{className:te("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",i?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c>=n,onClick:M,title:"Zoom in",type:"button",children:(0,T.jsx)(yq,{size:16})}),(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c<=a,onClick:C,title:"Zoom out",type:"button",children:(0,T.jsx)(wq,{size:16})}),(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:A,title:"Reset zoom and pan",type:"button",children:(0,T.jsx)(gq,{size:16})})]}):null,(0,T.jsx)("div",{className:te("flex-1 origin-center transition-transform duration-150 ease-out",i?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:_,ref:u,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${c})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},ew=({chart:e,className:t,config:a,fullscreen:n=!1,showControls:r=!0})=>{let[o,l]=(0,D.useState)(null),[i,s]=(0,D.useState)(!1),[u,c]=(0,D.useState)(""),[d,f]=(0,D.useState)(""),[p,m]=(0,D.useState)(0),{mermaid:x}=(0,D.useContext)(ra),b=sw(),y=x?.errorComponent,{shouldRender:w,containerRef:g}=pq({immediate:n});if((0,D.useEffect)(()=>{if(w){if(!b){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),s(!0);let M=b.getMermaid(a),C=e.split("").reduce((_,k)=>(_<<5)-_+k.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(C)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:E}=await M.render(A,e);c(E),f(E)}catch(M){if(!(d||u)){let C=M instanceof Error?M.message:"Failed to render Mermaid chart";l(C)}}finally{s(!1)}})()}},[e,a,p,w,b]),!(w||u||d))return(0,T.jsx)("div",{className:te("my-4 min-h-[200px]",t),ref:g});if(i&&!u&&!d)return(0,T.jsx)("div",{className:te("my-4 flex justify-center p-4",t),ref:g,children:(0,T.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,T.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,T.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!u&&!d)return y?(0,T.jsx)("div",{ref:g,children:(0,T.jsx)(y,{chart:e,error:o,retry:()=>m(C=>C+1)})}):(0,T.jsxs)("div",{className:te("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:g,children:[(0,T.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),(0,T.jsxs)("details",{className:"mt-2",children:[(0,T.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,T.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let v=u||d;return(0,T.jsx)("div",{className:te("size-full",t),"data-streamdown":"mermaid",ref:g,children:(0,T.jsx)(t5,{className:te(n?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:r,zoomStep:.1,children:(0,T.jsx)("div",{"aria-label":"Mermaid chart",className:te("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:v},role:"img"})})})}});var CR=Wt((une,SR)=>{"use strict";function BH(e,t){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let a,n=0;return function(...o){clearTimeout(a);let l=Date.now(),i=l-n,s=t-i;s<=0?(n=l,e.apply(this,o)):a=setTimeout(()=>{n=Date.now(),e.apply(this,o)},s)}}SR.exports=BH});var mu=q(Ae(),1),Kw=q(F0(),1);var H0="500px",aP="https://app.waniwani.ai/api/mcp/chat",nP={api:aP};function Eh(){if(typeof document>"u")return null;if(document.currentScript instanceof HTMLScriptElement)return document.currentScript;let e=document.querySelector("script[src][data-token]");if(e instanceof HTMLScriptElement)return e;let t=document.querySelectorAll("script[src]");for(let a of t)if(a instanceof HTMLScriptElement&&/embed/i.test(a.src))return a;return null}function Zc(){let e=Eh();if(!e)return{};let t=E=>e.getAttribute(E)??void 0,a=E=>{let _=e.getAttribute(E);if(_==null)return;let k=_.trim().toLowerCase();if(k==="true"||k==="1"||k==="")return!0;if(k==="false"||k==="0")return!1},n={},r=t("data-api");r&&(n.api=r);let o=t("data-token");o&&(n.token=o);let l=t("data-title");l&&(n.title=l);let i=t("data-welcome-message");i&&(n.welcomeMessage=i);let s=t("data-placeholder");s&&(n.placeholder=s);let u=t("data-mcp-server-url");u&&(n.mcpServerUrl=u);let c=t("data-channel-id");if(c&&(n.channelId=c),t("data-show-tool-calls")?.trim().toLowerCase()==="titles-only")n.showToolCalls="titles-only";else{let E=a("data-show-tool-calls");E!==void 0&&(n.showToolCalls=E)}let f=t("data-css");f&&(n.css=f);let p=t("data-suggestions");p&&(n.suggestions=p.split(",").map(E=>E.trim()).filter(Boolean));let m=a("data-enable-thread-history");m!==void 0&&(n.enableThreadHistory=m);let x=a("data-disable-page-view");x!==void 0&&(n.disablePageView=x);let b=a("data-hide-header");b!==void 0&&(n.hideHeader=b);let y=t("data-theme");(y==="light"||y==="dark"||y==="auto")&&(n.appearance={theme:y});let w=t("data-locale");(w==="en"||w==="fr"||w==="es")&&(n.locale=w);let g=t("data-mode");(g==="inline"||g==="floating")&&(n.mode=g);let v=t("data-height");v&&(n.height=v);let M=t("data-launcher-text");M&&(n.launcherText=M);let C=t("data-appear-delay");if(C!==void 0){let E=Number.parseInt(C.trim(),10);Number.isFinite(E)&&E>=0&&(n.appearDelay=E)}let A=t("data-disclaimer");if(A!==void 0){let E=A.trim(),_=E.toLowerCase();_==="false"||_==="0"?n.disclaimer=!1:E&&(n.disclaimer=E)}return n}function Mh(e){if(!e)return{};let t={};for(let a in e)e[a]!==void 0&&(t[a]=e[a]);return t}function is(e,t,a){let n=a??Zc(),r=rP(t,n,e),o={token:"",...nP,...Mh(t),...Mh(n),...Mh(e),...r?{appearance:r}:{}};if(!o.token)throw new Error("[Waniwani] Missing required config: `token`. Set data-token on the script tag or pass it to Waniwani.chat.init().");return o}function rP(e,t,a){let n=a?.appearance?.theme??t.appearance?.theme??e?.appearance?.theme,r={...e?.appearance?.variables??{},...t.appearance?.variables??{},...a?.appearance?.variables??{}},o=Object.keys(r).length>0;if(!n&&!o)return;let l={};return n&&(l.theme=n),o&&(l.variables=r),l}var Kc=q(Ae());var Qc=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();var j0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var V0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase());var Rh=e=>{let t=V0(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ss=q(Ae());var G0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var $0=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var W0=(0,ss.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:r="",children:o,iconNode:l,...i},s)=>(0,ss.createElement)("svg",{ref:s,...G0,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:Qc("lucide",r),...!o&&!$0(i)&&{"aria-hidden":"true"},...i},[...l.map(([u,c])=>(0,ss.createElement)(u,c)),...Array.isArray(o)?o:[o]]));var Oe=(e,t)=>{let a=(0,Kc.forwardRef)(({className:n,...r},o)=>(0,Kc.createElement)(W0,{ref:o,iconNode:t,className:Qc(`lucide-${j0(Rh(e))}`,`lucide-${e}`,n),...r}));return a.displayName=Rh(e),a};var oP=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],us=Oe("arrow-down",oP);var lP=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],wo=Oe("arrow-up",lP);var iP=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cs=Oe("check",iP);var sP=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Or=Oe("chevron-down",sP);var uP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ds=Oe("chevron-right",uP);var cP=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],fs=Oe("clipboard-copy",cP);var dP=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wn=Oe("clock",dP);var fP=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ps=Oe("file",fP);var pP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ms=Oe("globe",pP);var mP=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],hs=Oe("loader",mP);var hP=[["path",{d:"M5 12h14",key:"1ays0h"}]],gs=Oe("minus",hP);var gP=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],ys=Oe("paperclip",gP);var yP=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ws=Oe("square",yP);var wP=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],xo=Oe("wrench",wP);var xP=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xn=Oe("x",xP);var vP=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xs=Oe("zap",vP);var Ze=q(Ae(),1);var Ol=q(Ae(),1),vs=q(ee(),1);function CP(e){return 1-(1-e)**3}function IP({start:e=0,end:t=100,duration:a=1e3,delay:n=0,ease:r=CP,onUpdate:o,onEnd:l}){let i=performance.now()+n;function s(){let u=performance.now()-i,c=Math.min(u/a,1);o(e+(t-e)*r(c)),c<1?requestAnimationFrame(s):l&&l()}setTimeout(()=>requestAnimationFrame(s),n)}var LP=["80% 55%","69% 34%","8% 6%","41% 38%","86% 85%","82% 18%","51% 4%"],kP=[0,1,2,0,1,2,1];function TP(e){let t=[];for(let a=0;a<7;a++){let n=e[Math.min(kP[a],e.length-1)];t.push(`radial-gradient(at ${LP[a]}, ${n} 0px, transparent 50%)`)}return t.push(`linear-gradient(${e[0]} 0 100%)`),t}var AP=({children:e,className:t="",style:a,edgeSensitivity:n=30,backgroundColor:r="#120F17",borderRadius:o=28,coneSpread:l=25,animated:i=!1,colors:s=["#c084fc","#f472b6","#38bdf8"]})=>{let[u,c]=(0,Ol.useState)(110),[d,f]=(0,Ol.useState)(0),[p,m]=(0,Ol.useState)(!1);(0,Ol.useEffect)(()=>{if(!i)return;let M=110;m(!0),c(M),IP({ease:C=>C,duration:2e3,onUpdate:C=>{let A=C/100;c(M+360*A);let E=Math.min(A/.1,1),_=A>.85?(1-A)/.15:1;f(Math.min(E,_))},onEnd:()=>m(!1)})},[i]);let x=n+20,b=p?Math.max(0,(d*100-x)/(100-x)):0,w=TP(s).map(M=>`${M} border-box`),v=`conic-gradient(from ${`${u.toFixed(3)}deg`} at center, black ${l}%, transparent ${l+15}%, transparent ${100-l-15}%, black ${100-l}%)`;return(0,vs.jsxs)("div",{className:`ww:relative ww:grid ww:isolate ww:border ${t}`,style:{background:r,borderRadius:`${o}px`,transform:"translate3d(0, 0, 0.01px)",...a},children:[(0,vs.jsx)("div",{className:"ww:absolute ww:inset-0 ww:rounded-[inherit] ww:-z-[1]",style:{border:"1px solid transparent",background:[`linear-gradient(${r} 0 100%) padding-box`,"linear-gradient(rgb(255 255 255 / 0%) 0% 100%) border-box",...w].join(", "),opacity:b,maskImage:v,WebkitMaskImage:v,transition:p?"opacity 0.25s ease-out":"opacity 0.75s ease-in-out"}}),(0,vs.jsx)("div",{className:"ww:flex ww:flex-col ww:relative ww:overflow-auto ww:z-[1]",children:e})]})},K0=AP;Dh();Oh();var MP=J0({prefix:"ww"});function V(...e){return MP(Jc(e))}var bs=q(ee(),1);function ed({suggestions:e,isLoading:t,onSelect:a,className:n,...r}){return e.length===0&&!t?null:(0,bs.jsx)("div",{className:V("ww:px-4 ww:py-2",n),...r,children:(0,bs.jsx)("div",{className:"ww:mx-auto ww:w-full ww:max-w-3xl ww:flex ww:flex-wrap ww:gap-2",children:t?[0,1,2].map(o=>(0,bs.jsx)("div",{className:"ww:h-8 ww:rounded-full ww:bg-accent ww:animate-pulse",style:{width:`${60+o*20}px`}},o)):e.map((o,l)=>(0,bs.jsx)("button",{type:"button",onClick:()=>a(o),className:V("ww:rounded-full ww:border ww:border-border ww:bg-background ww:px-3.5 ww:py-1.5 ww:text-sm","ww:text-foreground ww:hover:bg-accent ww:hover:border-primary/30","ww:transition-all ww:duration-200 ww:ease-out ww:cursor-pointer","ww:animate-[ww-fade-in_0.2s_ease-out_both]"),style:{animationDelay:`${l*50}ms`},children:o},o))})})}var Pl=q(Ae(),1),EP=80,RP=50,DP=15e3,eC=500;function td(e,t=!0){let[a,n]=(0,Pl.useState)(""),r=(0,Pl.useRef)(void 0);return(0,Pl.useEffect)(()=>{if(!t){n("");return}let o=0,l=!1,i=!1,s=()=>{i||(l?(o--,n(e.slice(0,o)),o<=0?(l=!1,r.current=setTimeout(s,eC)):r.current=setTimeout(s,RP)):(o++,n(e.slice(0,o)),o>=e.length?(l=!0,r.current=setTimeout(s,DP)):r.current=setTimeout(s,EP)))};return r.current=setTimeout(s,eC),()=>{i=!0,clearTimeout(r.current)}},[e,t]),a}var an=q(Ae(),1);var tC=["en","fr","es"];function Nl(e){return tC.includes(e)}function Ph(e){if(e&&Nl(e))return e;if(e){let a=e.split("-")[0]?.toLowerCase();if(a&&Nl(a))return a}let t=[];if(typeof navigator<"u"&&(navigator.language&&t.push(navigator.language),navigator.languages&&t.push(...navigator.languages)),typeof document<"u"){let a=document.documentElement.getAttribute("lang");a&&t.push(a)}for(let a of t){let n=a.toLowerCase();if(Nl(n))return n;let r=n.split("-")[0];if(r&&Nl(r))return r}return"en"}var ad={promptInput:{placeholder:"What would you like to know?",uploadFiles:"Upload files",stop:"Stop",submit:"Submit",removeAttachments:"Remove all attachments"},workingIndicator:{default:"On it\u2026"},reasoning:{thinking:"Thinking\u2026",thoughtBrief:"Thought for a few seconds",thoughtForSeconds:e=>`Thought for ${e} second${e===1?"":"s"}`},chainOfThought:{working:"Working on it\u2026",done:"Thought process"},tool:{copy:"Copy",copied:"Copied",request:"Request",response:"Response",error:"Error"},attachments:{attachmentFallback:"attachment",fileFallback:"file"},threadMenu:{newChat:"New chat",threadHistory:"Thread history",deleteThread:"Delete thread",noPreviousChats:"No previous chats yet.",hiddenThreads:e=>`${e} older thread${e===1?"":"s"} hidden`},chatQueue:{attachmentFallback:"(attachment)",removeFromQueue:"Remove from queue",queued:e=>`${e} queued`},poweredBy:{label:"AI agent powered by"},aiDisclaimer:{default:"can make mistakes"},exportSession:{saving:"saving...",saved:"saved",error:"error",export:"export",tooltip:"Save scenario to Waniwani"},widgetErrorBoundary:{failedToLoad:"Widget failed to load",retry:"Retry"},launcher:{prompt:"Ask anything\u2026",open:"Open chat",close:"Close chat",minimize:"Minimize"}};var aC={promptInput:{placeholder:"\xBFQu\xE9 te gustar\xEDa saber?",uploadFiles:"Subir archivos",stop:"Detener",submit:"Enviar",removeAttachments:"Eliminar todos los archivos adjuntos"},workingIndicator:{default:"Un momento\u2026"},reasoning:{thinking:"Pensando\u2026",thoughtBrief:"Pensado durante unos segundos",thoughtForSeconds:e=>`Pensado durante ${e} segundo${e===1?"":"s"}`},chainOfThought:{working:"Estoy en ello\u2026",done:"Razonamiento"},tool:{copy:"Copiar",copied:"Copiado",request:"Solicitud",response:"Respuesta",error:"Error"},attachments:{attachmentFallback:"adjunto",fileFallback:"archivo"},threadMenu:{newChat:"Nueva conversaci\xF3n",threadHistory:"Historial",deleteThread:"Eliminar conversaci\xF3n",noPreviousChats:"A\xFAn no hay conversaciones anteriores.",hiddenThreads:e=>`${e} conversaci\xF3n${e===1?"":"es"} anterior${e===1?"":"es"} oculta${e===1?"":"s"}`},chatQueue:{attachmentFallback:"(adjunto)",removeFromQueue:"Quitar de la cola",queued:e=>`${e} en cola`},poweredBy:{label:"Agente IA con tecnolog\xEDa de"},aiDisclaimer:{default:"puede cometer errores"},exportSession:{saving:"guardando...",saved:"guardado",error:"error",export:"exportar",tooltip:"Guardar escenario en Waniwani"},widgetErrorBoundary:{failedToLoad:"No se pudo cargar el widget",retry:"Reintentar"},launcher:{prompt:"Pregunta lo que quieras\u2026",open:"Abrir chat",close:"Cerrar chat",minimize:"Minimizar"}};var nC={promptInput:{placeholder:"Que souhaitez-vous savoir ?",uploadFiles:"Importer des fichiers",stop:"Arr\xEAter",submit:"Envoyer",removeAttachments:"Supprimer toutes les pi\xE8ces jointes"},workingIndicator:{default:"Un instant\u2026"},reasoning:{thinking:"R\xE9flexion\u2026",thoughtBrief:"R\xE9flexion pendant quelques secondes",thoughtForSeconds:e=>`R\xE9flexion pendant ${e} seconde${e===1?"":"s"}`},chainOfThought:{working:"Je m'en occupe\u2026",done:"Raisonnement"},tool:{copy:"Copier",copied:"Copi\xE9",request:"Requ\xEAte",response:"R\xE9ponse",error:"Erreur"},attachments:{attachmentFallback:"pi\xE8ce jointe",fileFallback:"fichier"},threadMenu:{newChat:"Nouvelle conversation",threadHistory:"Historique",deleteThread:"Supprimer la conversation",noPreviousChats:"Aucune conversation pr\xE9c\xE9dente.",hiddenThreads:e=>`${e} conversation${e===1?"":"s"} plus ancienne${e===1?"":"s"} masqu\xE9e${e===1?"":"s"}`},chatQueue:{attachmentFallback:"(pi\xE8ce jointe)",removeFromQueue:"Retirer de la file",queued:e=>`${e} en attente`},poweredBy:{label:"Agent IA propuls\xE9 par"},aiDisclaimer:{default:"peut faire des erreurs"},exportSession:{saving:"enregistrement...",saved:"enregistr\xE9",error:"erreur",export:"exporter",tooltip:"Enregistrer le sc\xE9nario dans Waniwani"},widgetErrorBoundary:{failedToLoad:"\xC9chec du chargement du widget",retry:"R\xE9essayer"},launcher:{prompt:"Posez votre question\u2026",open:"Ouvrir le chat",close:"Fermer le chat",minimize:"R\xE9duire"}};var Nh={en:ad,fr:nC,es:aC};var oC=q(ee(),1),rC=(0,an.createContext)(null);function _P(e,t){if(!t)return e;let a={...e};for(let n of Object.keys(e)){let r=e[n],o=t[n];o&&typeof r=="object"&&(a[n]={...r,...o})}return a}function Ss({children:e,locale:t,messages:a}){let n=!!(t&&OP(t)),r=n?t:"en",[o,l]=(0,an.useState)(r),[i,s]=(0,an.useState)(n);(0,an.useEffect)(()=>{l(Ph(t)),s(!0)},[t]);let u=(0,an.useMemo)(()=>{let c=Nh[o]??Nh["en"];return{locale:o,t:_P(c,a),ready:i}},[o,a,i]);return(0,oC.jsx)(rC.Provider,{value:u,children:e})}function OP(e){return e==="en"||e==="fr"||e==="es"}function Ee(){let e=(0,an.useContext)(rC);return e||{locale:"en",t:ad,ready:!0}}function Bh(e,t){let a=Date.now()-e;if(a<6e4)try{return new Intl.RelativeTimeFormat(t,{numeric:"auto",style:"narrow"}).format(0,"second")}catch{return"just now"}let n,r;a<60*6e4?(n=-Math.floor(a/6e4),r="minute"):a<1440*6e4?(n=-Math.floor(a/(60*6e4)),r="hour"):(n=-Math.floor(a/(1440*6e4)),r="day");try{return new Intl.RelativeTimeFormat(t,{numeric:"auto",style:"short"}).format(n,r)}catch{return`${Math.abs(n)}${r==="minute"?"m":r==="hour"?"h":"d"} ago`}}var tt=q(Ae(),1);var Cs=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,a)=>(a&=63,a<36?t+=a.toString(36):a<62?t+=(a-26).toString(36).toUpperCase():a>62?t+="-":t+="_",t),"");var nt=q(Ae(),1);var lC=q(ee(),1),yn=({className:e,variant:t="default",size:a="default",type:n="button",...r})=>(0,lC.jsx)("button",{type:n,className:V("ww:inline-flex ww:cursor-pointer ww:items-center ww:justify-center ww:rounded-md ww:font-medium ww:transition-colors ww:disabled:pointer-events-none ww:disabled:opacity-50",t==="default"&&"ww:bg-primary ww:text-primary-foreground ww:hover:bg-primary/90",t==="outline"&&"ww:border ww:border-border ww:bg-background ww:hover:bg-accent ww:hover:text-accent-foreground",t==="ghost"&&"ww:hover:bg-accent ww:hover:text-accent-foreground",a==="default"&&"ww:h-9 ww:px-4 ww:py-2 ww:text-sm",a==="sm"&&"ww:h-8 ww:px-3 ww:text-xs",a==="icon"&&"ww:size-9 ww:!rounded-full",a==="icon-sm"&&"ww:size-7 ww:!rounded-full",e),...r});var ta=q(ee(),1),PP=async e=>{try{let a=await(await fetch(e)).blob();return new Promise(n=>{let r=new FileReader;r.onloadend=()=>n(r.result),r.onerror=()=>n(null),r.readAsDataURL(a)})}catch{return null}},iC=(0,nt.createContext)(null),sC=()=>{let e=(0,nt.useContext)(iC);if(!e)throw new Error("usePromptInputAttachments must be used within a PromptInput");return e},uC=({className:e,accept:t,multiple:a,globalDrop:n,maxFiles:r,maxFileSize:o,onSubmit:l,children:i,...s})=>{let{t:u}=Ee(),c=(0,nt.useRef)(null),d=(0,nt.useRef)(null),[f,p]=(0,nt.useState)([]),m=(0,nt.useRef)(f);(0,nt.useEffect)(()=>{m.current=f},[f]);let x=(0,nt.useCallback)(()=>{c.current?.click()},[]),b=(0,nt.useCallback)(C=>{let A=[...C];if(A.length===0)return;let E=k=>o?k.size<=o:!0,_=A.filter(E);p(k=>{let W=typeof r=="number"?Math.max(0,r-k.length):void 0,U=typeof W=="number"?_.slice(0,W):_;return[...k,...U.map(R=>({filename:R.name,id:Cs(),mediaType:R.type,type:"file",url:URL.createObjectURL(R)}))]})},[r,o]),y=(0,nt.useCallback)(C=>{p(A=>{let E=A.find(_=>_.id===C);return E?.url&&URL.revokeObjectURL(E.url),A.filter(_=>_.id!==C)})},[]),w=(0,nt.useCallback)(()=>{p(C=>{for(let A of C)A.url&&URL.revokeObjectURL(A.url);return[]})},[]);(0,nt.useEffect)(()=>()=>{for(let C of m.current)C.url&&URL.revokeObjectURL(C.url)},[]);let g=(0,nt.useCallback)(C=>{C.currentTarget.files&&b(C.currentTarget.files),C.currentTarget.value=""},[b]);(0,nt.useEffect)(()=>{if(!n)return;let C=E=>{E.dataTransfer?.types?.includes("Files")&&E.preventDefault()},A=E=>{E.dataTransfer?.types?.includes("Files")&&E.preventDefault(),E.dataTransfer?.files&&E.dataTransfer.files.length>0&&b(E.dataTransfer.files)};return document.addEventListener("dragover",C),document.addEventListener("drop",A),()=>{document.removeEventListener("dragover",C),document.removeEventListener("drop",A)}},[b,n]);let v=(0,nt.useCallback)(async C=>{C.preventDefault();let A=C.currentTarget,_=new FormData(A).get("message")||"";A.reset();let k=await Promise.all(f.map(async({id:W,...U})=>{if(U.url?.startsWith("blob:")){let R=await PP(U.url);return{...U,url:R??U.url}}return U}));try{let W=l({files:k,text:_},C);W instanceof Promise&&await W,w()}catch{}},[f,l,w]),M=(0,nt.useMemo)(()=>({add:b,clear:w,files:f,openFileDialog:x,remove:y}),[f,b,y,w,x]);return(0,ta.jsxs)(iC.Provider,{value:M,children:[(0,ta.jsx)("input",{accept:t,"aria-label":u.promptInput.uploadFiles,className:"ww:hidden",multiple:a,onChange:g,ref:c,title:u.promptInput.uploadFiles,type:"file"}),(0,ta.jsx)("form",{className:V("ww:flex ww:w-full ww:flex-col ww:rounded-lg ww:border ww:border-border ww:bg-background",e),onSubmit:v,ref:d,...s,children:i})]})};var cC=({onChange:e,onKeyDown:t,className:a,placeholder:n,...r})=>{let{t:o}=Ee(),l=sC(),[i,s]=(0,nt.useState)(!1),u=n??o.promptInput.placeholder,c=(0,nt.useCallback)(f=>{if(t?.(f),!f.defaultPrevented){if(f.key==="Enter"){if(i||f.nativeEvent.isComposing||f.shiftKey)return;f.preventDefault();let{form:p}=f.currentTarget;if(p?.querySelector('button[type="submit"]')?.disabled)return;p?.requestSubmit()}if(f.key==="Backspace"&&f.currentTarget.value===""&&l.files.length>0){f.preventDefault();let p=l.files.at(-1);p&&l.remove(p.id)}}},[t,i,l]),d=(0,nt.useCallback)(f=>{let p=f.clipboardData?.items;if(!p)return;let m=[];for(let x of p)if(x.kind==="file"){let b=x.getAsFile();b&&m.push(b)}m.length>0&&(f.preventDefault(),l.add(m))},[l]);return(0,ta.jsx)("textarea",{className:V("ww:field-sizing-content ww:max-h-48 ww:min-h-0 ww:w-full ww:resize-none ww:border-0 ww:bg-transparent ww:px-3 ww:py-2 ww:text-base ww:sm:text-sm ww:outline-none ww:placeholder:text-muted-foreground",a),name:"message",onCompositionEnd:()=>s(!1),onCompositionStart:()=>s(!0),onKeyDown:c,onPaste:d,placeholder:u,onChange:e,...r})},dC=({className:e,status:t,onStop:a,onClick:n,children:r,...o})=>{let{t:l}=Ee(),i=t==="submitted"||t==="streaming",s=(0,ta.jsx)(wo,{className:"ww:size-4"});t==="submitted"?s=(0,ta.jsx)(hs,{className:"ww:size-4 ww:animate-spin"}):t==="streaming"&&(s=(0,ta.jsx)(ws,{className:"ww:size-4"}));let u=(0,nt.useCallback)(c=>{if(i&&a){c.preventDefault(),a();return}n?.(c)},[i,a,n]);return(0,ta.jsx)(yn,{"aria-label":i?l.promptInput.stop:l.promptInput.submit,className:V("ww:bg-foreground ww:text-background ww:hover:bg-foreground ww:rounded-full",e),onClick:u,size:"icon-sm",type:i&&a?"button":"submit",variant:"ghost",...o,children:r??s})},fC=({className:e,children:t,...a})=>{let{t:n}=Ee(),r=sC();return r.files.length>0?(0,ta.jsxs)(yn,{className:V("ww:group ww:relative",e),onClick:()=>r.clear(),size:"icon-sm",type:"button",variant:"ghost","aria-label":n.promptInput.removeAttachments,...a,children:[(0,ta.jsx)("span",{className:"ww:flex ww:size-5 ww:items-center ww:justify-center ww:rounded-full ww:bg-primary ww:text-[10px] ww:font-medium ww:text-primary-foreground ww:transition-opacity ww:group-hover:opacity-0",children:r.files.length}),(0,ta.jsx)(Xn,{className:"ww:absolute ww:size-4 ww:opacity-0 ww:transition-opacity ww:group-hover:opacity-100"})]}):(0,ta.jsx)(yn,{className:V(e),onClick:()=>r.openFileDialog(),size:"icon-sm",type:"button",variant:"ghost",...a,children:t??(0,ta.jsx)(ys,{className:"ww:size-4"})})};var mC=q(ee(),1);function pC({text:e}){let{t}=Ee();return e===!1?null:(0,mC.jsx)("span",{className:"ww:whitespace-nowrap ww:text-[10px] ww:sm:text-[11px] ww:text-muted-foreground ww:opacity-70",children:e||t.aiDisclaimer.default})}var nd=q(Ae(),1);var vo=q(ee(),1),hC=({className:e,...t})=>(0,vo.jsx)("div",{className:V("ww:flex ww:flex-col ww:gap-1 ww:px-3 ww:py-2",e),...t}),gC=({className:e,...t})=>(0,vo.jsx)("li",{className:V("ww:group ww:flex ww:items-center ww:gap-2 ww:rounded-md ww:px-2 ww:py-1 ww:text-sm ww:transition-colors ww:hover:bg-muted",e),...t}),yC=({className:e,...t})=>(0,vo.jsx)("span",{className:V("ww:inline-block ww:size-2 ww:shrink-0 ww:rounded-full ww:border ww:border-muted-foreground/50",e),...t}),wC=({className:e,...t})=>(0,vo.jsx)("span",{className:V("ww:line-clamp-1 ww:grow ww:break-words ww:text-muted-foreground",e),...t}),xC=({className:e,...t})=>(0,vo.jsx)("div",{className:V("ww:flex ww:shrink-0 ww:gap-1 ww:opacity-0 ww:transition-opacity ww:group-hover:opacity-100",e),...t}),vC=({className:e,...t})=>(0,vo.jsx)(yn,{className:V("ww:size-auto ww:rounded ww:p-1 ww:text-muted-foreground ww:hover:bg-muted-foreground/10 ww:hover:text-foreground",e),size:"icon",type:"button",variant:"ghost",...t});var $a=q(ee(),1),bC=(0,nd.memo)(({message:e,onRemove:t})=>{let{t:a}=Ee(),n=(0,nd.useCallback)(()=>t(e.id),[t,e.id]);return(0,$a.jsxs)(gC,{children:[(0,$a.jsx)(yC,{}),(0,$a.jsx)(wC,{children:e.text||a.chatQueue.attachmentFallback}),(0,$a.jsx)(xC,{children:(0,$a.jsx)(vC,{"aria-label":a.chatQueue.removeFromQueue,onClick:n,children:(0,$a.jsx)(Xn,{className:"ww:size-3"})})})]})});bC.displayName="ChatQueueItem";function SC({queuedMessages:e,onRemove:t,className:a}){let{t:n}=Ee();return e.length===0?null:(0,$a.jsxs)(hC,{className:V("ww:border-t ww:border-border",a),children:[(0,$a.jsx)("div",{className:"ww:text-[11px] ww:font-medium ww:text-muted-foreground ww:px-2",children:n.chatQueue.queued(e.length)}),(0,$a.jsx)("ul",{children:e.map(r=>(0,$a.jsx)(bC,{message:r,onRemove:t},r.id))})]})}var Pr=q(ee(),1),CC=({files:e,className:t,...a})=>e.length===0?null:(0,Pr.jsx)("div",{className:V("ww:flex ww:flex-wrap ww:gap-1.5",t),...a,children:e.map((n,r)=>(0,Pr.jsx)(NP,{file:n},r))});function NP({file:e}){let{t}=Ee();return e.mediaType?.startsWith("image/")&&e.url?(0,Pr.jsx)("img",{src:e.url,alt:e.filename??t.attachments.attachmentFallback,className:"ww:h-16 ww:max-w-32 ww:rounded ww:object-cover"}):(0,Pr.jsxs)("span",{className:"ww:inline-flex ww:items-center ww:gap-1.5 ww:rounded ww:bg-background/20 ww:px-2 ww:py-1 ww:text-xs",children:[(0,Pr.jsx)(ps,{className:"ww:size-3 ww:shrink-0"}),(0,Pr.jsx)("span",{className:"ww:max-w-24 ww:truncate",children:e.filename??t.attachments.fileFallback})]})}var wa=q(Ae(),1);var ht=q(Ae(),1);sf();var tE=q(Ae(),1);var aE=q(ee(),1),a5=({as:e="span",className:t,duration:a=2,style:n,children:r,...o})=>{let l={backgroundImage:"linear-gradient(90deg, var(--ww-color-muted-foreground) 0%, var(--ww-color-muted-foreground) 40%, var(--ww-color-foreground) 50%, var(--ww-color-muted-foreground) 60%, var(--ww-color-muted-foreground) 100%)",backgroundSize:"250% 100%",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent",animation:`ww-shimmer ${a}s linear infinite`,...n};return(0,aE.jsx)(e,{"data-waniwani-shimmer":"",className:V("ww:inline-block",t),style:l,...o,children:r})},ln=(0,tE.memo)(a5);ln.displayName="Shimmer";var Kt=q(ee(),1),nE=(0,ht.createContext)(null);function rE(){let e=(0,ht.useContext)(nE);if(!e)throw new Error("Reasoning components must be used within <Reasoning>");return e}var n5=1e3,r5=1e3,Ks=(0,ht.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:n,onOpenChange:r,duration:o,children:l,...i})=>{let s=n??t,u=n===!1,c=a!==void 0,[d,f]=(0,ht.useState)(s),p=c?a:d,m=(0,ht.useCallback)(A=>{c||f(A),r?.(A)},[c,r]),[x,b]=(0,ht.useState)(void 0),y=o??x,w=(0,ht.useRef)(t),[g,v]=(0,ht.useState)(!1),M=(0,ht.useRef)(null);(0,ht.useEffect)(()=>{t?(w.current=!0,M.current===null&&(M.current=Date.now())):M.current!==null&&(b(Math.ceil((Date.now()-M.current)/r5)),M.current=null)},[t]),(0,ht.useEffect)(()=>{t&&!p&&!u&&m(!0)},[t,p,u,m]),(0,ht.useEffect)(()=>{if(w.current&&!t&&p&&!g){let A=setTimeout(()=>{m(!1),v(!0)},n5);return()=>clearTimeout(A)}},[t,p,g,m]);let C=(0,ht.useMemo)(()=>({isStreaming:t,isOpen:p,setIsOpen:m,duration:y}),[t,p,m,y]);return(0,Kt.jsx)(nE.Provider,{value:C,children:(0,Kt.jsx)("div",{className:V("ww:mb-4 ww:flex ww:flex-col ww:gap-2",e),"data-state":p?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...i,children:l})})});Ks.displayName="Reasoning";var Ys=(0,ht.memo)(({className:e,children:t,getThinkingMessage:a,hideIcon:n=!1,onClick:r,...o})=>{let{t:l}=Ee(),{isStreaming:i,isOpen:s,duration:u,setIsOpen:c}=rE(),f=a??((p,m)=>p||m===0?(0,Kt.jsx)(ln,{duration:1.6,children:l.reasoning.thinking}):m===void 0?(0,Kt.jsx)("span",{children:l.reasoning.thoughtBrief}):(0,Kt.jsx)("span",{children:l.reasoning.thoughtForSeconds(m)}));return(0,Kt.jsx)("button",{type:"button","aria-expanded":s,onClick:p=>{c(!s),r?.(p)},className:V("ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),...o,children:t??(0,Kt.jsxs)(Kt.Fragment,{children:[!n&&(0,Kt.jsx)(Wn,{className:"ww:size-4 ww:shrink-0"}),f(i,u)]})})});Ys.displayName="ReasoningTrigger";var Js=(0,ht.memo)(({className:e,children:t,...a})=>{let{isOpen:n}=rE();return(0,Kt.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,Kt.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,Kt.jsx)("div",{className:V("ww:text-sm ww:text-muted-foreground",e),...a,children:(0,Kt.jsx)(Zl,{children:t})})})})});Js.displayName="ReasoningContent";var Ie=q(ee(),1),o5=500,oE=(0,wa.createContext)(null);function lE(){let e=(0,wa.useContext)(oE);if(!e)throw new Error("ChainOfThought components must be used within <ChainOfThought>");return e}function iE({className:e,isWorking:t=!1,activeStep:a,open:n,defaultOpen:r=!1,onOpenChange:o,children:l,...i}){let s=n!==void 0,[u,c]=(0,wa.useState)(r),d=s?n:u,f=(0,wa.useCallback)(b=>{s||c(b),o?.(b)},[s,o]),[p,m]=(0,wa.useState)(!t);(0,wa.useEffect)(()=>{if(t){m(!1);return}let b=setTimeout(()=>m(!0),o5);return()=>clearTimeout(b)},[t]);let x=(0,wa.useMemo)(()=>({open:d,setOpen:f,isWorking:t,settled:p,activeStep:a}),[d,f,t,p,a]);return(0,Ie.jsx)(oE.Provider,{value:x,children:(0,Ie.jsx)("div",{className:V("ww:mb-4 ww:flex ww:flex-col ww:gap-2",e),"data-state":d?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...i,children:l})})}function sE({className:e,label:t,workingLabel:a,children:n,...r}){let{open:o,setOpen:l,isWorking:i,settled:s,activeStep:u}=lE();if(!s){let c=u?.icon,d=u?.label??a??t??"";return(0,Ie.jsx)("div",{className:V("ww:flex ww:min-h-5 ww:w-full ww:items-center ww:gap-1.5 ww:text-sm ww:text-muted-foreground",e),children:(0,Ie.jsxs)("span",{className:"ww:flex ww:min-w-0 ww:items-center ww:gap-1.5",style:{animation:"ww-fade-in 0.25s ease-out"},children:[c&&(0,Ie.jsx)(c,{className:V("ww:size-4 ww:shrink-0",i&&"ww:animate-pulse")}),(0,Ie.jsx)("span",{className:"ww:truncate",children:i?(0,Ie.jsx)(ln,{duration:2.6,children:d}):d})]},d)})}return(0,Ie.jsxs)("button",{type:"button",onClick:()=>l(!o),"aria-expanded":o,className:V("ww:flex ww:min-h-5 ww:w-full ww:items-center ww:gap-1.5 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),style:{animation:"ww-fade-in 0.25s ease-out"},...r,children:[(0,Ie.jsx)("span",{className:"ww:truncate",children:n??t}),(0,Ie.jsx)(Or,{className:V("ww:size-4 ww:shrink-0 ww:transition-transform ww:duration-200",o&&"ww:rotate-180")})]})}function uE({className:e,children:t,...a}){let{open:n}=lE();return(0,Ie.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,Ie.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,Ie.jsx)("div",{className:V("ww:flex ww:flex-col",e),...a,children:t})})})}function cE({icon:e,isLast:t,running:a,error:n}){return(0,Ie.jsxs)("div",{className:"ww:flex ww:flex-col ww:items-center ww:self-stretch",children:[(0,Ie.jsx)("span",{className:"ww:flex ww:h-5 ww:items-center",children:(0,Ie.jsx)(e,{className:V("ww:size-4 ww:shrink-0",n?"ww:text-destructive":a?"ww:animate-pulse ww:text-foreground":"ww:text-muted-foreground")})}),!t&&(0,Ie.jsx)("span",{className:"ww:w-px ww:flex-1 ww:bg-border"})]})}function dw({className:e,icon:t,title:a,state:n,isLast:r=!1,children:o,...l}){let i=n==="input-available"||n==="input-streaming",s=n==="output-error",u=o!=null,[c,d]=(0,wa.useState)(!1),f=a??"",p=i?(0,Ie.jsx)(ln,{duration:1.6,children:f}):(0,Ie.jsx)("span",{className:"ww:truncate",children:f});return(0,Ie.jsxs)("div",{className:V("ww:flex ww:gap-2",e),...l,children:[(0,Ie.jsx)(cE,{icon:t,isLast:r,running:i,error:s}),(0,Ie.jsxs)("div",{className:V("ww:min-w-0 ww:flex-1",!r&&"ww:pb-3"),children:[u?(0,Ie.jsxs)("button",{type:"button",onClick:()=>d(m=>!m),"aria-expanded":c,className:"ww:flex ww:w-full ww:items-center ww:gap-1.5 ww:text-left ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",children:[p,(0,Ie.jsx)(Or,{className:V("ww:size-3.5 ww:shrink-0 ww:transition-transform ww:duration-200",c&&"ww:rotate-180")})]}):(0,Ie.jsx)("div",{className:"ww:flex ww:items-center ww:text-sm ww:text-muted-foreground",children:p}),u&&(0,Ie.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",c?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,Ie.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,Ie.jsx)("div",{className:"ww:mt-2 ww:space-y-3 ww:rounded-lg ww:border ww:border-border ww:bg-background ww:p-3",children:o})})})]})]})}function dE({isStreaming:e=!1,isLast:t=!1,children:a}){return(0,Ie.jsxs)("div",{className:"ww:flex ww:gap-2",children:[(0,Ie.jsx)(cE,{icon:Wn,isLast:t,running:e}),(0,Ie.jsx)("div",{className:V("ww:min-w-0 ww:flex-1",!t&&"ww:pb-3"),children:(0,Ie.jsxs)(Ks,{isStreaming:e,className:"ww:mb-0",children:[(0,Ie.jsx)(Ys,{hideIcon:!0}),(0,Ie.jsx)(Js,{children:a})]})})]})}var fw={name:"cjk-noop",type:"cjk",remarkPluginsBefore:[],remarkPluginsAfter:[],remarkPlugins:[]};var fE={name:"shiki-noop",type:"code-highlighter",supportsLanguage:()=>!1,getSupportedLanguages:()=>[],getThemes:()=>["github-light","github-dark"],highlight:()=>null};var hE=q(Ae(),1);var ar=q(Ae(),1),l5=5,pE=400;function mE(e,t,a={}){let{msPerChar:n=l5}=a,[r,o]=(0,ar.useState)(t?"":e),l=(0,ar.useRef)(e),i=(0,ar.useRef)(t?0:e.length),s=(0,ar.useRef)(0),u=(0,ar.useRef)(null);return(e.length<i.current||!e.startsWith(r.slice(0,i.current)))&&(i.current=t?0:e.length),l.current=e,(0,ar.useEffect)(()=>{if(!t){u.current!==null&&(cancelAnimationFrame(u.current),u.current=null),i.current=e.length,o(e);return}if(l.current.length-i.current>pE&&(i.current=l.current.length-pE),u.current!==null)return;let d=f=>{let p=l.current;if(i.current>=p.length){u.current=null;return}s.current===0&&(s.current=f);let m=f-s.current;if(m>=n){let x=Math.min(Math.floor(m/n),p.length-i.current);i.current+=x,o(p.slice(0,i.current)),s.current=f}u.current=requestAnimationFrame(d)};return u.current=requestAnimationFrame(d),()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[e,t,n]),r}var eu=q(ee(),1),pw=({className:e,from:t,children:a,...n})=>(0,eu.jsx)("div",{className:V("ww:group ww:flex ww:w-full",t==="user"?"is-user ww:ml-auto ww:max-w-[80%] ww:flex-col ww:items-end":"is-assistant ww:flex-col",e),...n,children:(0,eu.jsx)("div",{className:V("ww:flex ww:min-w-0 ww:flex-col ww:gap-2","ww:w-full"),children:a})}),mw=({children:e,className:t,...a})=>(0,eu.jsx)("div",{className:V("ww:flex ww:w-fit ww:min-w-0 ww:max-w-full ww:flex-col ww:gap-2 ww:overflow-hidden ww:text-base","ww:group-[.is-user]:ml-auto ww:group-[.is-user]:rounded-lg ww:group-[.is-user]:bg-user-bubble ww:group-[.is-user]:px-4 ww:group-[.is-user]:py-3 ww:group-[.is-user]:text-primary-foreground","ww:group-[.is-assistant]:text-foreground",t),...a,children:e}),i5={cjk:fw,code:fE},s5={cjk:fw},u5={enabled:!1};function c5({className:e,linkSafety:t,isStreaming:a,children:n,...r}){let l=mE(typeof n=="string"?n:"",!!a),i=typeof n=="string"?l:n;return(0,eu.jsx)(Zl,{className:V("ww:size-full ww:[&>*:first-child]:mt-0 ww:[&>*:last-child]:mb-0",e),linkSafety:t??u5,plugins:a?s5:i5,...r,children:i})}var pf=(0,hE.memo)(c5,(e,t)=>e.children===t.children&&e.isStreaming===t.isStreaming);pf.displayName="MessageResponse";var Pt=q(Ae(),1);var pe=q(ee(),1);function d5(e,t=80){if(e==null)return String(e);if(typeof e!="object")return String(e).slice(0,t);if(Array.isArray(e))return`Array(${e.length})`;let a=JSON.stringify(e);if(a.length<=t)return a;let n=Object.entries(e),r=[],o=t-2;for(let[l,i]of n){if(o<=8)break;let s=l.length>4?`${l.slice(0,4)}\u2026`:l,u;typeof i=="string"?u=i.length>2?`'${i.slice(0,1)}\u2026`:`'${i}'`:Array.isArray(i)?u=`Array(${i.length})`:typeof i=="object"&&i!==null?u="{\u2026}":u=String(i);let c=`${s}\u2009${u}`;r.push(c),o-=c.length+3}return`{${r.join(", ")}}`}function f5({text:e,className:t}){let{t:a}=Ee(),[n,r]=(0,Pt.useState)(!1),o=(0,Pt.useRef)(null);(0,Pt.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]);let l=(0,Pt.useCallback)(async i=>{i.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r(!1),2e3)}catch{}},[e]);return(0,pe.jsx)(yn,{variant:"ghost",size:"sm",onClick:l,className:V("ww:h-auto ww:gap-1 ww:px-1.5 ww:py-0.5 ww:text-xs ww:text-muted-foreground ww:hover:text-foreground",t),children:n?(0,pe.jsxs)(pe.Fragment,{children:[(0,pe.jsx)(cs,{className:"ww:size-3.5"}),(0,pe.jsx)("span",{children:a.tool.copied})]}):(0,pe.jsxs)(pe.Fragment,{children:[(0,pe.jsx)(fs,{className:"ww:size-3.5"}),(0,pe.jsx)("span",{children:a.tool.copy})]})})}function wE({data:e,label:t,className:a,...n}){let[r,o]=(0,Pt.useState)(!1),l=(0,Pt.useMemo)(()=>JSON.stringify(e,null,2),[e]),i=d5(e);return(0,pe.jsxs)("div",{className:V("ww:rounded-lg ww:bg-tool-card",a),...n,children:[(0,pe.jsxs)("div",{className:"ww:flex ww:items-center ww:justify-between ww:px-3 ww:pt-2.5 ww:pb-1.5",children:[(0,pe.jsx)("span",{className:"ww:text-xs ww:font-medium ww:text-muted-foreground",children:t}),(0,pe.jsx)(f5,{text:l})]}),(0,pe.jsxs)("button",{type:"button",onClick:()=>o(s=>!s),className:"ww:flex ww:w-full ww:items-start ww:gap-2 ww:px-3 ww:pb-3 ww:text-left",children:[(0,pe.jsx)(ds,{className:V("ww:mt-0.5 ww:size-3.5 ww:shrink-0 ww:text-muted-foreground ww:transition-transform ww:duration-150",r&&"ww:rotate-90")}),r?(0,pe.jsx)("pre",{className:"ww:overflow-x-auto ww:text-xs ww:font-mono ww:text-foreground ww:whitespace-pre-wrap ww:break-all",children:(0,pe.jsx)("code",{children:l})}):(0,pe.jsx)("span",{className:"ww:truncate ww:text-xs ww:font-mono ww:text-foreground/80",children:i})]})]})}var gw=(0,Pt.createContext)({open:!1,toggle:()=>{}});function xE({className:e,defaultOpen:t=!1,children:a,...n}){let[r,o]=(0,Pt.useState)(t);return(0,pe.jsx)(gw.Provider,{value:{open:r,toggle:()=>o(l=>!l)},children:(0,pe.jsx)("div",{className:V("ww:mb-4 ww:w-full",e),"data-state":r?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...n,children:a})})}function vE({className:e,title:t,state:a,...n}){let{open:r,toggle:o}=(0,Pt.useContext)(gw),l=a==="input-available"||a==="input-streaming",i=t??"";return(0,pe.jsxs)("button",{type:"button",onClick:o,className:V("ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),"aria-expanded":r,...n,children:[(0,pe.jsx)(xo,{className:"ww:size-4 ww:shrink-0"}),(0,pe.jsx)("span",{className:"ww:truncate",children:l?(0,pe.jsx)(ln,{duration:1.6,children:i}):i}),(0,pe.jsx)(Or,{className:V("ww:size-4 ww:shrink-0 ww:transition-transform ww:duration-200",r&&"ww:rotate-180")})]})}function bE({className:e,title:t,state:a,...n}){let r=a==="input-available"||a==="input-streaming",o=t??"";return(0,pe.jsx)("div",{className:V("ww:mb-4 ww:flex ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground",e),style:{animation:"ww-fade-in 0.2s ease-out"},...n,children:(0,pe.jsx)("span",{className:"ww:truncate",children:r?(0,pe.jsx)(ln,{duration:1.6,children:o}):o})})}function SE({className:e,children:t,...a}){let{open:n}=(0,Pt.useContext)(gw);return(0,pe.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,pe.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,pe.jsx)("div",{className:V("ww:mt-2 ww:space-y-3 ww:rounded-lg ww:border ww:border-border ww:bg-background ww:p-3",e),...a,children:t})})})}function yw({className:e,input:t,debug:a,...n}){let{t:r}=Ee(),o=(0,Pt.useMemo)(()=>{if(!a&&typeof t=="object"&&t!==null&&!Array.isArray(t)){let{_meta:l,...i}=t;return i}return t},[t,a]);return(0,pe.jsx)(wE,{data:o,label:r.tool.request,className:e,...n})}function hw(e){if(!(typeof e!="object"||e===null))return e}function CE(e){return hw(e?.ui)}function IE(e){return hw(hw(e)?._meta)}function gE(e){if(!e)return;let t=CE(e)?.resourceUri;if(typeof t=="string"&&t.length>0)return t;let a=e["ui/resourceUri"];if(typeof a=="string"&&a.length>0)return a;let n=e["openai/outputTemplate"];if(typeof n=="string"&&n.length>0)return n}function yE(e){return CE(e)?.autoHeight===!0}function tu(e,t,a){if(e){let n=gE(a?.[e]?._meta);if(n)return n}return gE(IE(t))}function LE(e,t,a){return e&&yE(a?.[e]?._meta)?!0:yE(IE(t))}function ww({className:e,output:t,errorText:a,debug:n,...r}){let{t:o}=Ee(),l=(0,Pt.useMemo)(()=>{if(!n&&typeof t=="object"&&t!==null&&!Array.isArray(t)){let{_meta:i,...s}=t;return s}return t},[t,n]);return t||a?a?(0,pe.jsxs)("div",{className:V("ww:space-y-2",e),...r,children:[(0,pe.jsx)("h4",{className:"ww:text-xs ww:font-medium ww:uppercase ww:tracking-wide ww:text-muted-foreground",children:o.tool.error}),(0,pe.jsx)("div",{className:"ww:rounded-lg ww:bg-destructive/10 ww:p-3 ww:text-xs ww:text-destructive",children:a})]}):(0,pe.jsx)(wE,{data:l,label:o.tool.response,className:e,...r}):null}var au=q(ee(),1);function kE(e){return e.type==="text"||e.type==="reasoning"||e.type==="file"||"toolCallId"in e}function TE(e){return e.parts.some(kE)}function AE(e,t,a){if(t!=="submitted"&&t!=="streaming")return!1;let n=e[e.length-1];return!n||n.role!=="assistant"?!0:!n.parts.some(o=>!(!kE(o)||a?.ignoreToolParts&&"toolCallId"in o||a?.ignoreReasoningParts&&o.type==="reasoning"))}function ME({className:e,...t}){let{t:a}=Ee();return(0,au.jsxs)("div",{"aria-live":"polite",className:V("ww:mb-4 ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground",e),style:{animation:"ww-fade-in 0.2s ease-out"},...t,children:[(0,au.jsx)(xs,{className:"ww:size-4 ww:shrink-0"}),(0,au.jsx)(ln,{duration:1.6,children:a.workingIndicator.default})]})}var et=q(Ae(),1);function Ql(e){if(!e)return!1;let t=Array.isArray(e.content)&&e.content.length>0,a=typeof e.structuredContent=="object"&&e.structuredContent!==null&&Object.keys(e.structuredContent).length>0;return t||a}function EE(e,t){return!Ql(e)&&!Ql(t)?null:Ql(e)?Ql(t)?{...e.content||t.content?{content:[...e.content??[],...t.content??[]]}:{},...e.structuredContent||t.structuredContent?{structuredContent:{...e.structuredContent??{},...t.structuredContent??{}}}:{}}:{...e.content?{content:[...e.content]}:{},...e.structuredContent?{structuredContent:{...e.structuredContent}}:{}}:{...t?.content?{content:[...t.content]}:{},...t?.structuredContent?{structuredContent:{...t.structuredContent}}:{}}}var DE=q(ee(),1),p5="/api/mcp/resource",m5=500,h5=0,g5=16,y5="2026-01-26",w5=300,x5=3e3,v5=3;function b5(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function S5(e,t,a){return tu(e,t,a)?!1:t._meta?.["waniwani/autoInjectResultText"]!==!1}function RE({resourceUri:e,toolInput:t,toolResult:a,resourceEndpoint:n=p5,chatSessionId:r,isDark:o=!1,className:l,autoHeight:i=!1,onOpenLink:s,onFollowUp:u,onCallTool:c,onDisplayModeChange:d,isFullscreen:f=!1,toolDefinitions:p}){let m=(0,et.useRef)(null),x=(0,et.useRef)(t),b=(0,et.useRef)(a),y=(0,et.useRef)({width:0,height:0}),w=(0,et.useRef)(null),g=(0,et.useRef)(!1),v=(0,et.useRef)(0),M=(0,et.useRef)("inline"),[C,A]=(0,et.useState)(h5),[E,_]=(0,et.useState)(void 0),k=(0,et.useRef)(s),W=(0,et.useRef)(u),U=(0,et.useRef)(c),R=(0,et.useRef)(d),B=(0,et.useRef)(r),F=(0,et.useRef)(p);x.current=t,b.current=a,k.current=s,W.current=u,U.current=c,R.current=d,B.current=r,F.current=p;let j=(0,et.useCallback)(S=>i?Math.max(S+g5,0):Math.min(Math.max(S,50),m5),[i]),K=(0,et.useMemo)(()=>{let S=n.includes("?")?"&":"?";return`${n}${S}uri=${encodeURIComponent(e)}`},[n,e]),de=(0,et.useRef)(o);de.current=o;let He=(0,et.useRef)(f);return(0,et.useEffect)(()=>{He.current=f,y.current.height=-1,w.current&&(w.current.cancel(),w.current=null)},[f]),(0,et.useEffect)(()=>{if(!g.current)return;let S=m.current;S?.contentWindow&&S.contentWindow.postMessage({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:{theme:o?"dark":"light"}},"*")},[o]),(0,et.useEffect)(()=>{let S=m.current;if(!S)return;let Be=!1,rt=!1,L=null,Re=null,le=setTimeout(()=>{if(Be||rt||v.current>=v5)return;v.current+=1;let fe=new URL(S.src);fe.searchParams.set("_retry",String(v.current)),S.src=fe.toString()},x5),ve=fe=>{S.contentWindow?.postMessage(fe,"*")},kt=fe=>{if(Be||fe.source!==S.contentWindow)return;let me=fe.data;if(!me||typeof me!="object"||me.jsonrpc!=="2.0")return;let be=me.method,De=me.id;if(be==="ui/initialize"&&De!=null){rt=!0,clearTimeout(le),ve({jsonrpc:"2.0",id:De,result:{protocolVersion:me.params?.protocolVersion??y5,hostInfo:{name:"Waniwani Chat",version:"1.0.0"},hostCapabilities:{openLinks:{},message:{text:{}},tools:{},updateModelContext:{text:{},structuredContent:{}}},hostContext:{theme:de.current?"dark":"light",displayMode:M.current}}});return}if(be==="ui/notifications/initialized"){g.current=!0;let Se=x.current,Ue=b.current,Le=Ue._meta&&typeof Ue._meta=="object"?Ue._meta:null,$=b5(B.current),re=Le&&typeof Le.waniwani=="object"&&Le.waniwani!==null?Le.waniwani:null,je=re||$?{...re??{},...$?{sessionId:$}:{}}:void 0,Nt=Le||je?{...Le??{},...je?{waniwani:je}:{}}:void 0;ve({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:Se}});let xa=Ue.content??[{type:"text",text:JSON.stringify(Ue)}];ve({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:{content:xa,structuredContent:Ue.structuredContent,_meta:Nt,meta:Nt}});return}if(be==="ui/notifications/size-changed"){let Se=me.params,Ue=typeof Se?.height=="number"?Se.height:void 0,Le=typeof Se?.width=="number"?Se.width:void 0,$=y.current,re=Ue!==void 0&&Ue!==$.height,je=Le!==void 0&&Le!==$.width;if(!re&&!je)return;if(re&&Ue!==void 0){if($.height=Ue,He.current)return;let Nt=j(Ue),xa=S.getBoundingClientRect().height;if(w.current&&(w.current.cancel(),w.current=null),A(Nt),S.animate&&Math.abs(xa-Nt)>2){let ia=S.animate([{height:`${xa}px`},{height:`${Nt}px`}],{duration:w5,easing:"ease-out",fill:"forwards"});w.current=ia,ia.onfinish=()=>{w.current===ia&&(ia.cancel(),w.current=null)}}}je&&i&&Le!==void 0&&($.width=Le,_(Le));return}if(be==="ui/open-link"&&De!=null){let Se=me.params?.url;typeof Se=="string"&&(k.current?k.current(Se):window.open(Se,"_blank","noopener,noreferrer")),ve({jsonrpc:"2.0",id:De,result:{}});return}if(be==="ui/message"&&De!=null){if(W.current&&me.params){let Se=me.params,Ue=L;if(L=null,Re){clearTimeout(Re.timer);let Le=Re.text;Re=null;let $=(Se.content??[]).map(re=>re.text??"").join("").trim();Se={...Se,content:[{type:"text",text:`${$}
|
|
118
|
+
`)},mw=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let a=[];for(let n of e)n==="\\"?a.push("\\\\"):n==="|"?a.push("\\|"):a.push(n);return a.join("")},Nq=e=>{let{headers:t,rows:a}=e;if(t.length===0)return"";let n=new Array(a.length+2),r=0,o=t.map(i=>mw(i));n[r]=`| ${o.join(" | ")} |`,r+=1;let l=new Array(t.length);for(let i=0;i<t.length;i+=1)l[i]="---";n[r]=`| ${l.join(" | ")} |`,r+=1;for(let i of a)if(i.length<t.length){let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]=u<i.length?mw(i[u]):"";n[r]=`| ${s.join(" | ")} |`,r+=1}else{let s=i.map(u=>mw(u));n[r]=`| ${s.join(" | ")} |`,r+=1}return n.join(`
|
|
119
|
+
`)},Bq=({children:e,className:t,onCopy:a,onError:n,timeout:r=2e3})=>{let[o,l]=(0,D.useState)(!1),[i,s]=(0,D.useState)(!1),u=(0,D.useRef)(null),c=(0,D.useRef)(0),{isAnimating:d}=(0,D.useContext)(ra),f=async m=>{var x,b;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.write)){n?.(new Error("Clipboard API not available"));return}try{let y=(b=u.current)==null?void 0:b.closest('[data-streamdown="table-wrapper"]'),w=y?.querySelector("table");if(!w){n?.(new Error("Table not found"));return}let g=YM(w),v=m==="csv"?JM(g):Pq(g),M=new ClipboardItem({"text/plain":new Blob([v],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),s(!0),l(!1),a?.(m),c.current=window.setTimeout(()=>s(!1),r)}catch(y){n?.(y)}};(0,D.useEffect)(()=>{let m=x=>{let b=x.composedPath();u.current&&!b.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(c.current)}},[]);let p=i?xw:vw;return(0,T.jsxs)("div",{className:"relative",ref:u,children:[(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>l(!o),title:"Copy table",type:"button",children:e??(0,T.jsx)(p,{size:14})}),o?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Uq=({children:e,className:t,onDownload:a,onError:n})=>{let[r,o]=(0,D.useState)(!1),l=(0,D.useRef)(null),{isAnimating:i}=(0,D.useContext)(ra),s=u=>{var c;try{let d=(c=l.current)==null?void 0:c.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){n?.(new Error("Table not found"));return}let p=YM(f),m=u==="csv"?JM(p):Nq(p);Ql(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),o(!1),a?.(u)}catch(d){n?.(d)}};return(0,D.useEffect)(()=>{let u=c=>{let d=c.composedPath();l.current&&!d.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),(0,T.jsxs)("div",{className:"relative",ref:l,children:[(0,T.jsx)("button",{className:ae("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:i,onClick:()=>o(!r),title:"Download table",type:"button",children:e??(0,T.jsx)(gf,{size:14})}),r?(0,T.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>s("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),(0,T.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>s("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},Fq=({children:e,className:t,showControls:a,...n})=>(0,T.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[a?(0,T.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,T.jsx)(Bq,{}),(0,T.jsx)(Uq,{})]}):null,(0,T.jsx)("div",{className:"overflow-x-auto",children:(0,T.jsx)("table",{className:ae("w-full border-collapse border border-border",t),"data-streamdown":"table",...n,children:e})})]}),zq=(0,D.lazy)(()=>Promise.resolve().then(()=>(UM(),BM)).then(e=>({default:e.CodeBlock}))),qq=(0,D.lazy)(()=>Promise.resolve().then(()=>(qM(),zM)).then(e=>({default:e.Mermaid}))),Hq=/language-([^\s]+)/;ww=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,mf=(e,t)=>{if(typeof e=="boolean")return e;let a=e.mermaid;return a===!1?!1:a===!0||a===void 0?!0:a[t]!==!1},Sw=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("ol",{className:ae("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e}),(e,t)=>vt(e,t));Sw.displayName="MarkdownOl";eE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("li",{className:ae("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e}),(e,t)=>e.className===t.className&&yf(e.node,t.node));eE.displayName="MarkdownLi";tE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("ul",{className:ae("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e}),(e,t)=>vt(e,t));tE.displayName="MarkdownUl";aE=(0,D.memo)(({className:e,node:t,...a})=>(0,T.jsx)("hr",{className:ae("my-6 border-border",e),"data-streamdown":"horizontal-rule",...a}),(e,t)=>vt(e,t));aE.displayName="MarkdownHr";nE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("span",{className:ae("font-semibold",t),"data-streamdown":"strong",...n,children:e}),(e,t)=>vt(e,t));nE.displayName="MarkdownStrong";jq=({children:e,className:t,href:a,node:n,...r})=>{let{linkSafety:o}=(0,D.useContext)(ra),[l,i]=(0,D.useState)(!1),s=a==="streamdown:incomplete-link",u=(0,D.useCallback)(async p=>{if(!(!(o!=null&&o.enabled&&a)||s)){if(p.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(a)){window.open(a,"_blank","noreferrer");return}i(!0)}},[o,a,s]),c=(0,D.useCallback)(()=>{a&&window.open(a,"_blank","noreferrer")},[a]),d=(0,D.useCallback)(()=>{i(!1)},[]),f={url:a??"",isOpen:l,onClose:d,onConfirm:c};return o!=null&&o.enabled&&a?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:ae("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":s,"data-streamdown":"link",onClick:u,type:"button",children:e}),o.renderModal?o.renderModal(f):(0,T.jsx)(Mq,{...f})]}):(0,T.jsx)("a",{className:ae("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":s,"data-streamdown":"link",href:a,rel:"noreferrer",target:"_blank",...r,children:e})},rE=(0,D.memo)(jq,(e,t)=>vt(e,t)&&e.href===t.href);rE.displayName="MarkdownA";oE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h1",{className:ae("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e}),(e,t)=>vt(e,t));oE.displayName="MarkdownH1";lE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h2",{className:ae("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e}),(e,t)=>vt(e,t));lE.displayName="MarkdownH2";iE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h3",{className:ae("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e}),(e,t)=>vt(e,t));iE.displayName="MarkdownH3";sE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h4",{className:ae("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e}),(e,t)=>vt(e,t));sE.displayName="MarkdownH4";uE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h5",{className:ae("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e}),(e,t)=>vt(e,t));uE.displayName="MarkdownH5";cE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("h6",{className:ae("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e}),(e,t)=>vt(e,t));cE.displayName="MarkdownH6";dE=(0,D.memo)(({children:e,className:t,node:a,...n})=>{let{controls:r}=(0,D.useContext)(ra),o=ww(r,"table");return(0,T.jsx)(Fq,{className:t,showControls:o,...n,children:e})},(e,t)=>vt(e,t));dE.displayName="MarkdownTable";fE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("thead",{className:ae("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e}),(e,t)=>vt(e,t));fE.displayName="MarkdownThead";pE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("tbody",{className:ae("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...n,children:e}),(e,t)=>vt(e,t));pE.displayName="MarkdownTbody";mE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("tr",{className:ae("border-border border-b",t),"data-streamdown":"table-row",...n,children:e}),(e,t)=>vt(e,t));mE.displayName="MarkdownTr";hE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("th",{className:ae("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e}),(e,t)=>vt(e,t));hE.displayName="MarkdownTh";gE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("td",{className:ae("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e}),(e,t)=>vt(e,t));gE.displayName="MarkdownTd";yE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("blockquote",{className:ae("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e}),(e,t)=>vt(e,t));yE.displayName="MarkdownBlockquote";wE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("sup",{className:ae("text-sm",t),"data-streamdown":"superscript",...n,children:e}),(e,t)=>vt(e,t));wE.displayName="MarkdownSup";xE=(0,D.memo)(({children:e,className:t,node:a,...n})=>(0,T.jsx)("sub",{className:ae("text-sm",t),"data-streamdown":"subscript",...n,children:e}),(e,t)=>vt(e,t));xE.displayName="MarkdownSub";vE=(0,D.memo)(({children:e,className:t,node:a,...n})=>{if("data-footnotes"in n){let r=l=>{var i,s;if(!(0,D.isValidElement)(l))return!1;let u=Array.isArray(l.props.children)?l.props.children:[l.props.children],c=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(c=!0);else if((0,D.isValidElement)(f))if(((i=f.props)==null?void 0:i["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let m of p){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if((0,D.isValidElement)(m)&&((s=m.props)==null?void 0:s["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},o=Array.isArray(e)?e.map(l=>{if(!(0,D.isValidElement)(l))return l;if(l.type===Sw){let i=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(s=>!r(s));return i.length===0?null:{...l,props:{...l.props,children:i}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?(0,T.jsx)("section",{className:t,...n,children:o}):null}return(0,T.jsx)("section",{className:t,...n,children:e})},(e,t)=>vt(e,t));vE.displayName="MarkdownSection";Vq=({node:e,className:t,children:a,...n})=>{var r,o,l;let i=((r=e?.position)==null?void 0:r.start.line)===((o=e?.position)==null?void 0:o.end.line),{mermaid:s,controls:u}=(0,D.useContext)(ra),c=bw();if(i)return(0,T.jsx)("code",{className:ae("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:a});let d=t?.match(Hq),f=(l=d?.at(1))!=null?l:"",p="";if((0,D.isValidElement)(a)&&a.props&&typeof a.props=="object"&&"children"in a.props&&typeof a.props.children=="string"?p=a.props.children:typeof a=="string"&&(p=a),f==="mermaid"&&c){let x=ww(u,"mermaid"),b=mf(u,"download"),y=mf(u,"copy"),w=mf(u,"fullscreen"),g=mf(u,"panZoom"),v=x&&(b||y||w);return(0,T.jsx)(D.Suspense,{fallback:(0,T.jsx)(GM,{}),children:(0,T.jsxs)("div",{className:ae("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[v?(0,T.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[b?(0,T.jsx)(Rq,{chart:p,config:s?.config}):null,y?(0,T.jsx)(jM,{code:p}):null,w?(0,T.jsx)(Oq,{chart:p,config:s?.config}):null]}):null,(0,T.jsx)(qq,{chart:p,config:s?.config,showControls:g})]})})}let m=ww(u,"code");return(0,T.jsx)(D.Suspense,{fallback:(0,T.jsx)(GM,{}),children:(0,T.jsx)(zq,{className:ae("overflow-x-auto border-border border-t",t),code:p,language:f,children:m?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Cq,{code:p,language:f}),(0,T.jsx)(jM,{})]}):null})})},bE=(0,D.memo)(Vq,(e,t)=>e.className===t.className&&yf(e.node,t.node));bE.displayName="MarkdownCode";SE=(0,D.memo)(Lq,(e,t)=>e.className===t.className&&yf(e.node,t.node));SE.displayName="MarkdownImg";IE=(0,D.memo)(({children:e,className:t,node:a,...n})=>{var r,o;let l=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(l.length===1&&(0,D.isValidElement)(l[0])){let i=l[0].props.node,s=i?.tagName;if(s==="img")return(0,T.jsx)(T.Fragment,{children:e});if(s==="code"&&((r=i?.position)==null?void 0:r.start.line)!==((o=i?.position)==null?void 0:o.end.line))return(0,T.jsx)(T.Fragment,{children:e})}return(0,T.jsx)("p",{className:t,...n,children:e})},(e,t)=>vt(e,t));IE.displayName="MarkdownParagraph";Gq={ol:Sw,li:eE,ul:tE,hr:aE,strong:nE,a:rE,h1:oE,h2:lE,h3:iE,h4:sE,h5:uE,h6:cE,table:dE,thead:fE,tbody:pE,tr:mE,th:hE,td:gE,blockquote:yE,code:bE,img:SE,pre:({children:e})=>e,sup:wE,sub:xE,p:IE,section:vE},$M=[],WM={allowDangerousHtml:!0},hf=new WeakMap,$q=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let a=e.rehypePlugins,n=e.remarkPlugins,r=e.remarkRehypeOptions;if(!(a||n||r)){let c="default";return this.keyCache.set(e,c),c}let o=c=>{if(!c||c.length===0)return"";let d="";for(let f=0;f<c.length;f+=1){let p=c[f];if(f>0&&(d+=","),Array.isArray(p)){let[m,x]=p;if(typeof m=="function"){let b=hf.get(m);b||(b=m.name,hf.set(m,b)),d+=b}else d+=String(m);d+=":",d+=JSON.stringify(x)}else if(typeof p=="function"){let m=hf.get(p);m||(m=p.name,hf.set(p,m)),d+=m}else d+=String(p)}return d},l=o(a),i=o(n),s=r?JSON.stringify(r):"",u=`${i}::${l}::${s}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),a=this.cache.get(t);return a&&(this.cache.delete(t),this.cache.set(t,a)),a}set(e,t){let a=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(a,t)}clear(){this.cache.clear()}},XM=new $q,CE=e=>{let t=Wq(e),a=e.children||"";return Kq(t.runSync(t.parse(a),a),e)},Wq=e=>{let t=XM.get(e);if(t)return t;let a=Xq(e);return XM.set(e,a),a},Xq=e=>{let t=e.rehypePlugins||$M,a=e.remarkPlugins||$M,n=e.remarkRehypeOptions?{...WM,...e.remarkRehypeOptions}:WM;return Jy().use(Qd).use(a).use(tf,n).use(t)},Kq=(e,t)=>Dy(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0}),Zq=/\[\^[^\]\s]{1,200}\](?!:)/,Qq=/\[\^[^\]\s]{1,200}\]:/,Yq=/<\/(\w+)>/,Jq=/<(\w+)[\s>]/,hw=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
120
|
+
`||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},e5=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
|
|
121
|
+
`||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},gw=e=>{let t=0;for(let a=0;a<e.length-1;a+=1)e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},kE=e=>{let t=Zq.test(e),a=Qq.test(e);if(t||a)return[e];let n=_a.lex(e,{gfm:!0}),r=[],o=[];for(let l of n){let i=l.raw,s=r.length;if(o.length>0){if(r[s-1]+=i,l.type==="html"){let u=i.match(Yq);if(u){let c=u[1];o.at(-1)===c&&o.pop()}}continue}if(l.type==="html"&&l.block){let u=i.match(Jq);if(u){let c=u[1];i.includes(`</${c}>`)||o.push(c)}}if(i.trim()==="$$"&&s>0){let u=r[s-1],c=hw(u),d=gw(u);if(c&&d%2===1){r[s-1]=u+i;continue}}if(s>0&&e5(i)){let u=r[s-1],c=hw(u),d=gw(u),f=gw(i);if(c&&d%2===1&&!hw(i)&&f===1){r[s-1]=u+i;continue}}r.push(i)}return r},LE={raw:oC,sanitize:[yd,{}],harden:[nC,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},TE={gfm:[Hd,{}]},t5=Object.values(LE),a5=Object.values(TE),n5={block:" \u258B",circle:" \u25CF"},r5={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ra=(0,D.createContext)(r5),Iw=(0,D.memo)(({content:e,shouldParseIncompleteMarkdown:t,index:a,...n})=>(0,T.jsx)(CE,{...n,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let a=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(a.length!==n.length||a.some(r=>{var o,l;return((o=e.components)==null?void 0:o[r])!==((l=t.components)==null?void 0:l[r])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Iw.displayName="Block";o5=["github-light","github-dark"],Yl=(0,D.memo)(({children:e,mode:t="streaming",parseIncompleteMarkdown:a=!0,components:n,rehypePlugins:r=t5,remarkPlugins:o=a5,className:l,shikiTheme:i=o5,mermaid:s,controls:u=!0,isAnimating:c=!1,BlockComponent:d=Iw,parseMarkdownIntoBlocksFn:f=kE,caret:p,plugins:m,remend:x,linkSafety:b={enabled:!0},...y})=>{let w=(0,D.useId)(),[g,v]=(0,D.useTransition)(),M=(0,D.useMemo)(()=>typeof e!="string"?"":t==="streaming"&&a?yL(e,x):e,[e,t,a,x]),I=(0,D.useMemo)(()=>f(M),[M,f]),[A,E]=(0,D.useState)(I);(0,D.useEffect)(()=>{t==="streaming"?v(()=>{E(I)}):E(I)},[I,t]);let _=t==="streaming"?A:I,L=(0,D.useMemo)(()=>_.map((j,Y)=>`${w}-${Y}`),[_.length,w]),W=(0,D.useMemo)(()=>{var j,Y;return{shikiTheme:(Y=(j=m?.code)==null?void 0:j.getThemes())!=null?Y:i,controls:u,isAnimating:c,mode:t,mermaid:s,linkSafety:b}},[i,u,c,t,s,b,m?.code]),U=(0,D.useMemo)(()=>({...Gq,...n}),[n]),R=(0,D.useMemo)(()=>{let j=[];return m!=null&&m.cjk&&(j=[...j,...m.cjk.remarkPluginsBefore]),j=[...j,...o],m!=null&&m.cjk&&(j=[...j,...m.cjk.remarkPluginsAfter]),m!=null&&m.math&&(j=[...j,m.math.remarkPlugin]),j},[o,m?.math,m?.cjk]),B=(0,D.useMemo)(()=>m!=null&&m.math?[...r,m.math.rehypePlugin]:r,[r,m?.math]),q=(0,D.useMemo)(()=>p&&c?{"--streamdown-caret":`"${n5[p]}"`}:void 0,[p,c]);return t==="static"?(0,T.jsx)(yw.Provider,{value:m??null,children:(0,T.jsx)(ra.Provider,{value:W,children:(0,T.jsx)("div",{className:ae("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:(0,T.jsx)(CE,{components:U,rehypePlugins:B,remarkPlugins:R,...y,children:e})})})}):(0,T.jsx)(yw.Provider,{value:m??null,children:(0,T.jsx)(ra.Provider,{value:W,children:(0,T.jsxs)("div",{className:ae("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",p?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:q,children:[_.length===0&&p&&c&&(0,T.jsx)("span",{}),_.map((j,Y)=>(0,T.jsx)(d,{components:U,content:j,index:Y,rehypePlugins:B,remarkPlugins:R,shouldParseIncompleteMarkdown:a,...y},L[Y]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);Yl.displayName="Streamdown";l5=({children:e,className:t,minZoom:a=.5,maxZoom:n=3,zoomStep:r=.1,showControls:o=!0,initialZoom:l=1,fullscreen:i=!1})=>{let s=(0,D.useRef)(null),u=(0,D.useRef)(null),[c,d]=(0,D.useState)(l),[f,p]=(0,D.useState)({x:0,y:0}),[m,x]=(0,D.useState)(!1),[b,y]=(0,D.useState)({x:0,y:0}),[w,g]=(0,D.useState)({x:0,y:0}),v=(0,D.useCallback)(U=>{d(R=>Math.max(a,Math.min(n,R+U)))},[a,n]),M=(0,D.useCallback)(()=>{v(r)},[v,r]),I=(0,D.useCallback)(()=>{v(-r)},[v,r]),A=(0,D.useCallback)(()=>{d(l),p({x:0,y:0})},[l]),E=(0,D.useCallback)(U=>{U.preventDefault();let R=U.deltaY>0?-r:r;v(R)},[v,r]),_=(0,D.useCallback)(U=>{if(U.button!==0||U.isPrimary===!1)return;x(!0),y({x:U.clientX,y:U.clientY}),g(f);let R=U.currentTarget;R instanceof HTMLElement&&R.setPointerCapture(U.pointerId)},[f]),L=(0,D.useCallback)(U=>{if(!m)return;U.preventDefault();let R=U.clientX-b.x,B=U.clientY-b.y;p({x:w.x+R,y:w.y+B})},[m,b,w]),W=(0,D.useCallback)(U=>{x(!1);let R=U.currentTarget;R instanceof HTMLElement&&R.releasePointerCapture(U.pointerId)},[]);return(0,D.useEffect)(()=>{let U=s.current;if(U)return U.addEventListener("wheel",E,{passive:!1}),()=>{U.removeEventListener("wheel",E)}},[E]),(0,D.useEffect)(()=>{let U=u.current;if(U&&m)return document.body.style.userSelect="none",U.addEventListener("pointermove",L,{passive:!1}),U.addEventListener("pointerup",W),U.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",L),U.removeEventListener("pointerup",W),U.removeEventListener("pointercancel",W)}},[m,L,W]),(0,T.jsxs)("div",{className:ae("relative flex flex-col",i?"h-full w-full":"min-h-28 w-full",t),ref:s,style:{cursor:m?"grabbing":"grab"},children:[o?(0,T.jsxs)("div",{className:ae("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",i?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c>=n,onClick:M,title:"Zoom in",type:"button",children:(0,T.jsx)(Sq,{size:16})}),(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c<=a,onClick:I,title:"Zoom out",type:"button",children:(0,T.jsx)(Iq,{size:16})}),(0,T.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:A,title:"Reset zoom and pan",type:"button",children:(0,T.jsx)(bq,{size:16})})]}):null,(0,T.jsx)("div",{className:ae("flex-1 origin-center transition-transform duration-150 ease-out",i?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:_,ref:u,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${c})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},pw=({chart:e,className:t,config:a,fullscreen:n=!1,showControls:r=!0})=>{let[o,l]=(0,D.useState)(null),[i,s]=(0,D.useState)(!1),[u,c]=(0,D.useState)(""),[d,f]=(0,D.useState)(""),[p,m]=(0,D.useState)(0),{mermaid:x}=(0,D.useContext)(ra),b=bw(),y=x?.errorComponent,{shouldRender:w,containerRef:g}=wq({immediate:n});if((0,D.useEffect)(()=>{if(w){if(!b){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),s(!0);let M=b.getMermaid(a),I=e.split("").reduce((_,L)=>(_<<5)-_+L.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(I)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:E}=await M.render(A,e);c(E),f(E)}catch(M){if(!(d||u)){let I=M instanceof Error?M.message:"Failed to render Mermaid chart";l(I)}}finally{s(!1)}})()}},[e,a,p,w,b]),!(w||u||d))return(0,T.jsx)("div",{className:ae("my-4 min-h-[200px]",t),ref:g});if(i&&!u&&!d)return(0,T.jsx)("div",{className:ae("my-4 flex justify-center p-4",t),ref:g,children:(0,T.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,T.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,T.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!u&&!d)return y?(0,T.jsx)("div",{ref:g,children:(0,T.jsx)(y,{chart:e,error:o,retry:()=>m(I=>I+1)})}):(0,T.jsxs)("div",{className:ae("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:g,children:[(0,T.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),(0,T.jsxs)("details",{className:"mt-2",children:[(0,T.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,T.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let v=u||d;return(0,T.jsx)("div",{className:ae("size-full",t),"data-streamdown":"mermaid",ref:g,children:(0,T.jsx)(l5,{className:ae(n?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:r,zoomStep:.1,children:(0,T.jsx)("div",{"aria-label":"Mermaid chart",className:ae("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:v},role:"img"})})})}});var Z2=Wt((wre,K2)=>{"use strict";function H9(e,t){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let a,n=0;return function(...o){clearTimeout(a);let l=Date.now(),i=l-n,s=t-i;s<=0?(n=l,e.apply(this,o)):a=setTimeout(()=>{n=Date.now(),e.apply(this,o)},s)}}K2.exports=H9});var yu=z(Me(),1),ox=z(K0(),1);function Nl(e,t){for(let a of t){let n=e[a];if(typeof n=="string"&&n.length>0)return n}}var CP=["waniwani/sessionId","openai/sessionId","openai/session","sessionId","conversationId","mcp-session-id"],kP=["waniwani/requestId","openai/requestId","requestId","mcp/requestId"],LP=["waniwani/traceId","openai/traceId","traceId","mcp/traceId","openai/requestId","requestId"],TP=["waniwani/userId","openai/userId","externalUserId","userId","actorId"],AP=["waniwani/visitorId","visitorId"],MP=["correlationId","openai/requestId"];function Z0(e){return e?Nl(e,CP):void 0}function Q0(e){return e?Nl(e,kP):void 0}function Y0(e){return e?Nl(e,LP):void 0}function J0(e){return e?Nl(e,TP):void 0}function eI(e){return e?Nl(e,AP):void 0}function tI(e){return e?Nl(e,MP):void 0}var EP=[{key:"openai/sessionId",source:"chatgpt"},{key:"openai/session",source:"chatgpt"}],RP=[{needle:"claude",source:"claude"},{needle:"chatgpt",source:"chatgpt"},{needle:"openai",source:"chatgpt"},{needle:"gemini",source:"gemini"}];function aI(e,t){if(e){let n=e["waniwani/source"];if(typeof n=="string"&&n.length>0)return n;for(let{key:r,source:o}of EP){let l=e[r];if(typeof l=="string"&&l.length>0)return o}}let a=t?.name;if(typeof a=="string"&&a.length>0){let n=a.toLowerCase();for(let{needle:r,source:o}of RP)if(n.includes(r))return o}}var DP="@waniwani/sdk";function nI(e,t={}){let a=t.now??(()=>new Date),n=t.generateId??_P,r=NP(e),o=Yc(e.meta),l=Yc(e.metadata),i=BP(e,o),s=Ea(e.eventId)??n(),u=UP(e.timestamp,a),c=Ea(e.source)??aI(o)??t.source??DP,d=Oh(e)?{...e}:void 0,f={...l};return Object.keys(o).length>0&&(f.meta=o),d&&(f.rawLegacy=d),{id:s,type:"mcp.event",name:r,source:c,timestamp:u,correlation:i,properties:OP(e,r),metadata:f,rawLegacy:d}}function _P(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`evt_${crypto.randomUUID()}`:`evt_${Math.random().toString(36).slice(2,10)}_${Date.now().toString(36)}`}function OP(e,t){if(!Oh(e))return Yc(e.properties);let a=PP(e,t),n=Yc(e.properties);return{...a,...n}}function PP(e,t){switch(t){case"tool.called":{let a={};return Ea(e.toolName)&&(a.name=e.toolName),Ea(e.toolType)&&(a.type=e.toolType),a}case"quote.succeeded":{let a={};return typeof e.quoteAmount=="number"&&(a.amount=e.quoteAmount),Ea(e.quoteCurrency)&&(a.currency=e.quoteCurrency),a}case"link.clicked":{let a={};return Ea(e.linkUrl)&&(a.url=e.linkUrl),a}case"purchase.completed":{let a={};return typeof e.purchaseAmount=="number"&&(a.amount=e.purchaseAmount),Ea(e.purchaseCurrency)&&(a.currency=e.purchaseCurrency),a}default:return{}}}function NP(e){return Oh(e)?e.eventType:e.event}function BP(e,t){let a=Ea(e.requestId)??Q0(t),n=Ea(e.sessionId)??Z0(t),r=Ea(e.traceId)??Y0(t),o=Ea(e.externalUserId)??J0(t),l=Ea(e.visitorId)??eI(t),i=Ea(e.correlationId)??tI(t)??a,s={};return n&&(s.sessionId=n),r&&(s.traceId=r),a&&(s.requestId=a),i&&(s.correlationId=i),o&&(s.externalUserId=o),l&&(s.visitorId=l),s}function UP(e,t){if(e instanceof Date)return e.toISOString();if(typeof e=="string"){let a=new Date(e);if(!Number.isNaN(a.getTime()))return a.toISOString()}return t().toISOString()}function Yc(e){return!e||typeof e!="object"||Array.isArray(e)?{}:e}function Ea(e){if(typeof e=="string"&&e.trim().length!==0)return e}function Oh(e){return"eventType"in e}function rI(e){return{priceShown:({amount:t,currency:a,itemId:n,label:r,...o})=>e({event:"price_shown",properties:{amount:t,currency:a,itemId:n,label:r},...o}),pricesCompared:({options:t,...a})=>e({event:"prices_compared",properties:{options:t},...a}),optionSelected:({id:t,amount:a,currency:n,...r})=>e({event:"option_selected",properties:{id:t,amount:a,currency:n},...r}),leadQualified:t=>{let{externalId:a,email:n,name:r,...o}=t??{};return e({event:"lead_qualified",properties:{externalId:a,email:n,name:r},...o})},converted:({amount:t,currency:a,occurredAt:n,...r})=>e({event:"converted",properties:{amount:t,currency:a,occurredAt:n},...r})}}var FP="/api/mcp/events/v2/batch";var oI="@waniwani/sdk";var zP=new Set([401,403]),qP=new Set([408,425,429,500,502,503,504]);function lI(e){return new Ph(e)}var Ph=class{constructor(t){Z(this,"endpointUrl");Z(this,"flushIntervalMs");Z(this,"maxBatchSize");Z(this,"maxBufferSize");Z(this,"maxRetries");Z(this,"retryBaseDelayMs");Z(this,"retryMaxDelayMs");Z(this,"shutdownTimeoutMs");Z(this,"sdkVersion");Z(this,"fetchFn");Z(this,"logger");Z(this,"now");Z(this,"sleep");Z(this,"apiKey");Z(this,"buffer",[]);Z(this,"flushTimer");Z(this,"flushScheduled",!1);Z(this,"flushScheduledTimer");Z(this,"flushInFlight");Z(this,"inFlightCount",0);Z(this,"isStopped",!1);Z(this,"isShuttingDown",!1);this.endpointUrl=VP(t.apiUrl,t.endpointPath??FP),this.flushIntervalMs=t.flushIntervalMs??1e3,this.maxBatchSize=t.maxBatchSize??20,this.maxBufferSize=t.maxBufferSize??1e3,this.maxRetries=t.maxRetries??3,this.retryBaseDelayMs=t.retryBaseDelayMs??200,this.retryMaxDelayMs=t.retryMaxDelayMs??2e3,this.shutdownTimeoutMs=t.shutdownTimeoutMs??2e3,this.fetchFn=t.fetchFn??fetch,this.logger=t.logger??console,this.now=t.now??(()=>new Date),this.sleep=t.sleep??(a=>new Promise(n=>setTimeout(n,a))),this.apiKey=t.apiKey,this.sdkVersion=t.sdkVersion,this.flushIntervalMs>0&&(this.flushTimer=setInterval(()=>{this.flush()},this.flushIntervalMs)),this.registerBrowserTeardown()}enqueue(t){if(this.isStopped||this.isShuttingDown){this.logger.warn("[Waniwani] Tracking transport is stopped, dropping event %s",t.id);return}if(this.buffer.length>=this.maxBufferSize){let a=this.buffer.length-this.maxBufferSize+1;this.buffer.splice(0,a),this.logger.warn("[Waniwani] Tracking buffer overflow, dropped %d oldest event(s)",a)}if(this.buffer.push(t),this.buffer.length>=this.maxBatchSize){this.flush();return}this.scheduleMicroFlush()}pendingEvents(){return this.buffer.length+this.inFlightCount}async flush(){return this.flushInFlight?this.flushInFlight:(this.flushInFlight=this.flushLoop().finally(()=>{this.flushInFlight=void 0}),this.flushInFlight)}async shutdown(t){this.isShuttingDown=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.flushScheduledTimer&&(clearTimeout(this.flushScheduledTimer),this.flushScheduledTimer=void 0,this.flushScheduled=!1);let a=t?.timeoutMs??this.shutdownTimeoutMs,n=this.flush();if(!Number.isFinite(a)||a<=0)return await n,this.isStopped=!0,{timedOut:!1,pendingEvents:this.pendingEvents()};let r=Symbol("shutdown-timeout");return await Promise.race([n.then(()=>"flushed"),this.sleep(a).then(()=>r)])===r?(this.isStopped=!0,{timedOut:!0,pendingEvents:this.pendingEvents()}):(this.isStopped=!0,{timedOut:!1,pendingEvents:this.pendingEvents()})}registerBrowserTeardown(){if(typeof document>"u"||typeof window>"u")return;let t=()=>{document.visibilityState==="hidden"&&this.keepaliveFlush()};document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",()=>this.keepaliveFlush())}keepaliveFlush(){if(this.isStopped||this.buffer.length===0)return;let t=this.buffer.splice(0,this.buffer.length);this.sendKeepaliveChunk(t)}sendKeepaliveChunk(t){let a=JSON.stringify(this.makeBatchRequest(t));if(a.length>6e4&&t.length>1){let n=Math.ceil(t.length/2);this.sendKeepaliveChunk(t.slice(0,n)),this.sendKeepaliveChunk(t.slice(n));return}try{this.fetchFn(this.endpointUrl,{method:"POST",headers:this.requestHeaders(),body:a,keepalive:!0}).catch(()=>{})}catch{}}requestHeaders(){let t={"Content-Type":"application/json","X-WaniWani-SDK":oI};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}scheduleMicroFlush(){this.flushScheduled||(this.flushScheduled=!0,this.flushScheduledTimer=setTimeout(()=>{this.flushScheduledTimer=void 0,this.flushScheduled=!1,this.flush()},0))}async flushLoop(){for(;this.buffer.length>0&&!this.isStopped;){let t=this.buffer.splice(0,this.maxBatchSize);await this.sendBatchWithRetry(t)}}async sendBatchWithRetry(t){let a=0,n=t;for(;n.length>0&&!this.isStopped;){this.inFlightCount=n.length;let r=await this.sendBatchOnce(n);switch(this.inFlightCount=0,r.kind){case"success":return;case"auth":this.stopTransportForAuthFailure(r.status,n.length);return;case"permanent":this.logger.error("[Waniwani] Dropping %d event(s) after permanent failure: %s",n.length,r.reason);return;case"retryable":if(a>=this.maxRetries){this.logger.error("[Waniwani] Dropping %d event(s) after retry exhaustion: %s",n.length,r.reason);return}await this.sleep(this.backoffDelayMs(a)),a+=1;continue;case"partial":if(r.permanent.length>0&&this.logger.error("[Waniwani] Dropping %d event(s) rejected as permanent",r.permanent.length),r.retryable.length===0)return;if(a>=this.maxRetries){this.logger.error("[Waniwani] Dropping %d retryable event(s) after retry exhaustion",r.retryable.length);return}n=r.retryable,await this.sleep(this.backoffDelayMs(a)),a+=1;continue}}}async sendBatchOnce(t){let a;try{a=await this.fetchFn(this.endpointUrl,{method:"POST",headers:this.requestHeaders(),body:JSON.stringify(this.makeBatchRequest(t))})}catch(o){return{kind:"retryable",reason:GP(o)}}if(zP.has(a.status))return{kind:"auth",status:a.status};if(qP.has(a.status))return{kind:"retryable",reason:`HTTP ${a.status}`};if(!a.ok)return{kind:"permanent",reason:`HTTP ${a.status}`};let n=await jP(a);if(!n?.rejected||n.rejected.length===0)return{kind:"success"};let r=this.classifyRejectedEvents(t,n.rejected);return r.retryable.length===0&&r.permanent.length===0?{kind:"success"}:{kind:"partial",retryable:r.retryable,permanent:r.permanent}}makeBatchRequest(t){return{sentAt:this.now().toISOString(),source:{sdk:oI,version:this.sdkVersion??"0.0.0"},events:t}}classifyRejectedEvents(t,a){let n=new Map(t.map(l=>[l.id,l])),r=[],o=[];for(let l of a){let i=n.get(l.eventId);if(i){if(HP(l)){r.push(i);continue}o.push(i)}}return{retryable:r,permanent:o}}backoffDelayMs(t){let a=this.retryBaseDelayMs*2**t;return Math.min(a,this.retryMaxDelayMs)}stopTransportForAuthFailure(t,a){this.isStopped=!0;let n=this.buffer.length;this.buffer.splice(0,n),this.logger.error("[Waniwani] Auth failure (HTTP %d). Stopping tracking transport and dropping %d queued event(s)",t,a+n)}};function HP(e){if(e.retryable===!0)return!0;let t=e.code.toLowerCase();return t.includes("timeout")||t.includes("temporary")||t.includes("unavailable")||t.includes("rate_limit")||t.includes("transient")||t.includes("server")}async function jP(e){let t=await e.text();if(t)try{return JSON.parse(t)}catch{return}}function VP(e,t){let a=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${a}${n}`}function GP(e){return e instanceof Error?e.message:String(e)}function iI(e){let{apiUrl:t,endpointPath:a}=$P(e.endpoint),n=lI({apiUrl:t,apiKey:e.token,endpointPath:a,flushIntervalMs:e.flushIntervalMs}),r,o=i=>typeof i=="function"?i():i,l=async i=>{let s=e.identity?.()??{},u=o(e.channelId),c=u===void 0?i.properties:{channelId:u,...i.properties},d=nI({sessionId:s.sessionId,visitorId:s.visitorId,externalUserId:s.externalUserId??r,traceId:s.traceId,...i,properties:c,metadata:{...e.metadata,...i.metadata}},{source:o(e.source)});return n.enqueue(d),{eventId:d.id}};return{track:Object.assign(l,rI(l)),identify(i,s){return r=i,l({event:"user.identified",externalUserId:i,properties:s})},flush:()=>n.flush(),shutdown:i=>n.shutdown(i)}}function $P(e){let t=new URL(e);return{apiUrl:t.origin,endpointPath:`${t.pathname}${t.search}`}}var WP="waniwani-memory";var Ra="threads",Jc="by_memoryUserId",XP="by_updatedAt";var uI="memoryUserId",sI="waniwani-memory-user-id",Nh=null;function Bh(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function KP(e,t){if(t<1&&(e.objectStoreNames.contains("ids")||e.createObjectStore("ids")),t<2&&!e.objectStoreNames.contains(Ra)){let a=e.createObjectStore(Ra,{keyPath:"threadId"});a.createIndex(Jc,"memoryUserId",{unique:!1}),a.createIndex(XP,"updatedAt",{unique:!1})}}async function Uh(){return new Promise((e,t)=>{let a=indexedDB.open(WP,2);a.onupgradeneeded=n=>{KP(a.result,n.oldVersion)},a.onsuccess=()=>e(a.result),a.onerror=()=>t(a.error)})}async function ZP(){return Uh()}async function QP(e){return new Promise((t,a)=>{let o=e.transaction("ids","readonly").objectStore("ids").get(uI);o.onsuccess=()=>t(typeof o.result=="string"?o.result:null),o.onerror=()=>a(o.error)})}async function YP(e,t){return new Promise((a,n)=>{let l=e.transaction("ids","readwrite").objectStore("ids").put(t,uI);l.onsuccess=()=>a(),l.onerror=()=>n(l.error)})}async function JP(){if(typeof indexedDB>"u")return null;try{let e=await ZP();try{let t=await QP(e);if(t)return t;let a=Bh();return await YP(e,a),a}finally{e.close()}}catch{return null}}function eN(){try{let e=localStorage.getItem(sI);if(e)return e;let t=Bh();return localStorage.setItem(sI,t),t}catch{return null}}async function cI(){let e=await JP();if(e)return e;let t=eN();return t||(Nh||(Nh=Bh()),Nh)}var dI="waniwani-visitor-id";function fI(e,t){return e.match(t)?.[1]??null}function tN(e){let t=[["Edge",/Edg(?:e|A|iOS)?\/(\S+)/],["Opera",/(?:OPR|Opera)\/(\S+)/],["Samsung Internet",/SamsungBrowser\/(\S+)/],["Firefox",/Firefox\/(\S+)/],["Chrome",/Chrome\/(\S+)/],["Safari",/Version\/(\S+).*Safari/]];for(let[a,n]of t){let r=fI(e,n);if(r)return{name:a,version:r}}return null}function aN(e){let t=[["iOS",/(?:iPhone|iPad|iPod).+?OS (\d+[_.\d]*)/],["Android",/Android (\d+[.\d]*)/],["macOS",/Mac OS X (\d+[_.\d]*)/],["Windows",/Windows NT (\d+[.\d]*)/],["ChromeOS",/CrOS \S+ (\d+[.\d]*)/],["Linux",/Linux/]];for(let[a,n]of t){let r=fI(e,n);if(r)return{name:a,version:r.replace(/_/g,".")};if(a==="Linux"&&n.test(e))return{name:a,version:""}}return null}function nN(e){return typeof navigator<"u"&&"userAgentData"in navigator&&navigator.userAgentData?.mobile?"mobile":/iPad|tablet|PlayBook/i.test(e)?"tablet":/Mobi|Android.*Mobile|iPhone|iPod/i.test(e)?"mobile":"desktop"}async function rN(e){let t=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(a)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function oN(){try{let a=localStorage.getItem(dI);if(a)return a}catch{}let e=[navigator.userAgent,screen.width,screen.height,screen.colorDepth,Intl.DateTimeFormat().resolvedOptions().timeZone,navigator.language,navigator.hardwareConcurrency??"",navigator.platform??""].join("|"),t=await rN(e);try{localStorage.setItem(dI,t)}catch{}return t}async function xo(){let e=navigator.userAgent,[t,a]=await Promise.all([oN(),cI()]);return{userAgent:e,browser:tN(e),os:aN(e),deviceType:nN(e),language:navigator.language,languages:[...navigator.languages],timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:screen.width,screenHeight:screen.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio??1,touchSupport:"ontouchstart"in window||navigator.maxTouchPoints>0,connectionType:navigator.connection?.effectiveType??"unknown",referrer:document.referrer,visitorId:t,memoryUserId:a}}var Fh=new Set;function lN(e,t,a){return`${e}|${t}|${a??""}`}function zh(e){try{return`${new URL(e).origin}/api/mcp/events/v2/batch`}catch{return e.replace(/\/$/,"").replace(/\/chat$/,"/events/v2/batch")}}async function pI(e){let{api:t,token:a,channelId:n,mode:r,source:o}=e;if(typeof window>"u"||!t||!a)return;let l=lN(t,a,n);if(!Fh.has(l)){Fh.add(l);try{let i=await xo(),s=new Date().toISOString(),u=JSON.stringify({sentAt:s,source:{sdk:"@waniwani/sdk",version:"0.1.0"},events:[{id:crypto.randomUUID(),type:"mcp.event",name:"page.viewed",source:o,timestamp:s,correlation:{visitorId:i.visitorId},properties:{channelId:n,mode:r,url:window.location.href,referrer:i.referrer,deviceType:i.deviceType,language:i.language,timezone:i.timezone},metadata:{}}]});await fetch(zh(t),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:u,keepalive:!0})}catch{Fh.delete(l)}}}function mI(e){let t;return xo().then(a=>{t=a.visitorId}).catch(()=>{}),iI({endpoint:zh(e.api),token:e.token,channelId:e.channelId,source:e.getSource,identity:()=>({sessionId:e.getSessionId(),visitorId:t})})}function qh(e){let t=!1,a=async()=>(t||(t=!0,console.warn(`[Waniwani] track() is disabled: ${e}`)),{eventId:""});return{track:Object.assign(a,{priceShown:a,pricesCompared:a,optionSelected:a,leadQualified:a,converted:a}),identify:a,flush:async()=>{},shutdown:async()=>({timedOut:!1,pendingEvents:0})}}var hI="500px",iN="https://app.waniwani.ai/api/mcp/chat",sN={api:iN};function jh(){if(typeof document>"u")return null;if(document.currentScript instanceof HTMLScriptElement)return document.currentScript;let e=document.querySelector("script[src][data-token]");if(e instanceof HTMLScriptElement)return e;let t=document.querySelectorAll("script[src]");for(let a of t)if(a instanceof HTMLScriptElement&&/embed/i.test(a.src))return a;return null}function ed(){let e=jh();if(!e)return{};let t=E=>e.getAttribute(E)??void 0,a=E=>{let _=e.getAttribute(E);if(_==null)return;let L=_.trim().toLowerCase();if(L==="true"||L==="1"||L==="")return!0;if(L==="false"||L==="0")return!1},n={},r=t("data-api");r&&(n.api=r);let o=t("data-token");o&&(n.token=o);let l=t("data-title");l&&(n.title=l);let i=t("data-welcome-message");i&&(n.welcomeMessage=i);let s=t("data-placeholder");s&&(n.placeholder=s);let u=t("data-mcp-server-url");u&&(n.mcpServerUrl=u);let c=t("data-channel-id");if(c&&(n.channelId=c),t("data-show-tool-calls")?.trim().toLowerCase()==="titles-only")n.showToolCalls="titles-only";else{let E=a("data-show-tool-calls");E!==void 0&&(n.showToolCalls=E)}let f=t("data-css");f&&(n.css=f);let p=t("data-suggestions");p&&(n.suggestions=p.split(",").map(E=>E.trim()).filter(Boolean));let m=a("data-enable-thread-history");m!==void 0&&(n.enableThreadHistory=m);let x=a("data-disable-page-view");x!==void 0&&(n.disablePageView=x);let b=a("data-hide-header");b!==void 0&&(n.hideHeader=b);let y=t("data-theme");(y==="light"||y==="dark"||y==="auto")&&(n.appearance={theme:y});let w=t("data-locale");(w==="en"||w==="fr"||w==="es")&&(n.locale=w);let g=t("data-mode");(g==="inline"||g==="floating")&&(n.mode=g);let v=t("data-height");v&&(n.height=v);let M=t("data-launcher-text");M&&(n.launcherText=M);let I=t("data-appear-delay");if(I!==void 0){let E=Number.parseInt(I.trim(),10);Number.isFinite(E)&&E>=0&&(n.appearDelay=E)}let A=t("data-disclaimer");if(A!==void 0){let E=A.trim(),_=E.toLowerCase();_==="false"||_==="0"?n.disclaimer=!1:E&&(n.disclaimer=E)}return n}function Hh(e){if(!e)return{};let t={};for(let a in e)e[a]!==void 0&&(t[a]=e[a]);return t}function ds(e,t,a){let n=a??ed(),r=uN(t,n,e),o={token:"",...sN,...Hh(t),...Hh(n),...Hh(e),...r?{appearance:r}:{}};if(!o.token)throw new Error("[Waniwani] Missing required config: `token`. Set data-token on the script tag or pass it to Waniwani.chat.init().");return o}function uN(e,t,a){let n=a?.appearance?.theme??t.appearance?.theme??e?.appearance?.theme,r={...e?.appearance?.variables??{},...t.appearance?.variables??{},...a?.appearance?.variables??{}},o=Object.keys(r).length>0;if(!n&&!o)return;let l={};return n&&(l.theme=n),o&&(l.variables=r),l}var ad=z(Me());var td=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();var gI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var yI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase());var Vh=e=>{let t=yI(e);return t.charAt(0).toUpperCase()+t.slice(1)};var fs=z(Me());var wI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var xI=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var vI=(0,fs.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:r="",children:o,iconNode:l,...i},s)=>(0,fs.createElement)("svg",{ref:s,...wI,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:td("lucide",r),...!o&&!xI(i)&&{"aria-hidden":"true"},...i},[...l.map(([u,c])=>(0,fs.createElement)(u,c)),...Array.isArray(o)?o:[o]]));var Oe=(e,t)=>{let a=(0,ad.forwardRef)(({className:n,...r},o)=>(0,ad.createElement)(vI,{ref:o,iconNode:t,className:td(`lucide-${gI(Vh(e))}`,`lucide-${e}`,n),...r}));return a.displayName=Vh(e),a};var cN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ps=Oe("arrow-down",cN);var dN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],vo=Oe("arrow-up",dN);var fN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ms=Oe("check",fN);var pN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pr=Oe("chevron-down",pN);var mN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hs=Oe("chevron-right",mN);var hN=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],gs=Oe("clipboard-copy",hN);var gN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xn=Oe("clock",gN);var yN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ys=Oe("file",yN);var wN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ws=Oe("globe",wN);var xN=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],xs=Oe("loader",xN);var vN=[["path",{d:"M5 12h14",key:"1ays0h"}]],vs=Oe("minus",vN);var bN=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],bs=Oe("paperclip",bN);var SN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ss=Oe("square",SN);var IN=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],bo=Oe("wrench",IN);var CN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Kn=Oe("x",CN);var kN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Is=Oe("zap",kN);var Ke=z(Me(),1);var Bl=z(Me(),1),Cs=z(te(),1);function AN(e){return 1-(1-e)**3}function MN({start:e=0,end:t=100,duration:a=1e3,delay:n=0,ease:r=AN,onUpdate:o,onEnd:l}){let i=performance.now()+n;function s(){let u=performance.now()-i,c=Math.min(u/a,1);o(e+(t-e)*r(c)),c<1?requestAnimationFrame(s):l&&l()}setTimeout(()=>requestAnimationFrame(s),n)}var EN=["80% 55%","69% 34%","8% 6%","41% 38%","86% 85%","82% 18%","51% 4%"],RN=[0,1,2,0,1,2,1];function DN(e){let t=[];for(let a=0;a<7;a++){let n=e[Math.min(RN[a],e.length-1)];t.push(`radial-gradient(at ${EN[a]}, ${n} 0px, transparent 50%)`)}return t.push(`linear-gradient(${e[0]} 0 100%)`),t}var _N=({children:e,className:t="",style:a,edgeSensitivity:n=30,backgroundColor:r="#120F17",borderRadius:o=28,coneSpread:l=25,animated:i=!1,colors:s=["#c084fc","#f472b6","#38bdf8"]})=>{let[u,c]=(0,Bl.useState)(110),[d,f]=(0,Bl.useState)(0),[p,m]=(0,Bl.useState)(!1);(0,Bl.useEffect)(()=>{if(!i)return;let M=110;m(!0),c(M),MN({ease:I=>I,duration:2e3,onUpdate:I=>{let A=I/100;c(M+360*A);let E=Math.min(A/.1,1),_=A>.85?(1-A)/.15:1;f(Math.min(E,_))},onEnd:()=>m(!1)})},[i]);let x=n+20,b=p?Math.max(0,(d*100-x)/(100-x)):0,w=DN(s).map(M=>`${M} border-box`),v=`conic-gradient(from ${`${u.toFixed(3)}deg`} at center, black ${l}%, transparent ${l+15}%, transparent ${100-l-15}%, black ${100-l}%)`;return(0,Cs.jsxs)("div",{className:`ww:relative ww:grid ww:isolate ww:border ${t}`,style:{background:r,borderRadius:`${o}px`,transform:"translate3d(0, 0, 0.01px)",...a},children:[(0,Cs.jsx)("div",{className:"ww:absolute ww:inset-0 ww:rounded-[inherit] ww:-z-[1]",style:{border:"1px solid transparent",background:[`linear-gradient(${r} 0 100%) padding-box`,"linear-gradient(rgb(255 255 255 / 0%) 0% 100%) border-box",...w].join(", "),opacity:b,maskImage:v,WebkitMaskImage:v,transition:p?"opacity 0.25s ease-out":"opacity 0.75s ease-in-out"}}),(0,Cs.jsx)("div",{className:"ww:flex ww:flex-col ww:relative ww:overflow-auto ww:z-[1]",children:e})]})},CI=_N;Gh();Wh();var ON=LI({prefix:"ww"});function V(...e){return ON(rd(e))}var ks=z(te(),1);function od({suggestions:e,isLoading:t,onSelect:a,className:n,...r}){return e.length===0&&!t?null:(0,ks.jsx)("div",{className:V("ww:px-4 ww:py-2",n),...r,children:(0,ks.jsx)("div",{className:"ww:mx-auto ww:w-full ww:max-w-3xl ww:flex ww:flex-wrap ww:gap-2",children:t?[0,1,2].map(o=>(0,ks.jsx)("div",{className:"ww:h-8 ww:rounded-full ww:bg-accent ww:animate-pulse",style:{width:`${60+o*20}px`}},o)):e.map((o,l)=>(0,ks.jsx)("button",{type:"button",onClick:()=>a(o),className:V("ww:rounded-full ww:border ww:border-border ww:bg-background ww:px-3.5 ww:py-1.5 ww:text-sm","ww:text-foreground ww:hover:bg-accent ww:hover:border-primary/30","ww:transition-all ww:duration-200 ww:ease-out ww:cursor-pointer","ww:animate-[ww-fade-in_0.2s_ease-out_both]"),style:{animationDelay:`${l*50}ms`},children:o},o))})})}var Ul=z(Me(),1),PN=80,NN=50,BN=15e3,TI=500;function ld(e,t=!0){let[a,n]=(0,Ul.useState)(""),r=(0,Ul.useRef)(void 0);return(0,Ul.useEffect)(()=>{if(!t){n("");return}let o=0,l=!1,i=!1,s=()=>{i||(l?(o--,n(e.slice(0,o)),o<=0?(l=!1,r.current=setTimeout(s,TI)):r.current=setTimeout(s,NN)):(o++,n(e.slice(0,o)),o>=e.length?(l=!0,r.current=setTimeout(s,BN)):r.current=setTimeout(s,PN)))};return r.current=setTimeout(s,TI),()=>{i=!0,clearTimeout(r.current)}},[e,t]),a}var nn=z(Me(),1);var AI=["en","fr","es"];function Fl(e){return AI.includes(e)}function Xh(e){if(e&&Fl(e))return e;if(e){let a=e.split("-")[0]?.toLowerCase();if(a&&Fl(a))return a}let t=[];if(typeof navigator<"u"&&(navigator.language&&t.push(navigator.language),navigator.languages&&t.push(...navigator.languages)),typeof document<"u"){let a=document.documentElement.getAttribute("lang");a&&t.push(a)}for(let a of t){let n=a.toLowerCase();if(Fl(n))return n;let r=n.split("-")[0];if(r&&Fl(r))return r}return"en"}var id={promptInput:{placeholder:"What would you like to know?",uploadFiles:"Upload files",stop:"Stop",submit:"Submit",removeAttachments:"Remove all attachments"},workingIndicator:{default:"On it\u2026"},reasoning:{thinking:"Thinking\u2026",thoughtBrief:"Thought for a few seconds",thoughtForSeconds:e=>`Thought for ${e} second${e===1?"":"s"}`},chainOfThought:{working:"Working on it\u2026",done:"Thought process"},tool:{copy:"Copy",copied:"Copied",request:"Request",response:"Response",error:"Error"},attachments:{attachmentFallback:"attachment",fileFallback:"file"},threadMenu:{newChat:"New chat",threadHistory:"Thread history",deleteThread:"Delete thread",noPreviousChats:"No previous chats yet.",hiddenThreads:e=>`${e} older thread${e===1?"":"s"} hidden`},chatQueue:{attachmentFallback:"(attachment)",removeFromQueue:"Remove from queue",queued:e=>`${e} queued`},poweredBy:{label:"AI agent powered by"},aiDisclaimer:{default:"can make mistakes"},exportSession:{saving:"saving...",saved:"saved",error:"error",export:"export",tooltip:"Save scenario to Waniwani"},widgetErrorBoundary:{failedToLoad:"Widget failed to load",retry:"Retry"},launcher:{prompt:"Ask anything\u2026",open:"Open chat",close:"Close chat",minimize:"Minimize"}};var MI={promptInput:{placeholder:"\xBFQu\xE9 te gustar\xEDa saber?",uploadFiles:"Subir archivos",stop:"Detener",submit:"Enviar",removeAttachments:"Eliminar todos los archivos adjuntos"},workingIndicator:{default:"Un momento\u2026"},reasoning:{thinking:"Pensando\u2026",thoughtBrief:"Pensado durante unos segundos",thoughtForSeconds:e=>`Pensado durante ${e} segundo${e===1?"":"s"}`},chainOfThought:{working:"Estoy en ello\u2026",done:"Razonamiento"},tool:{copy:"Copiar",copied:"Copiado",request:"Solicitud",response:"Respuesta",error:"Error"},attachments:{attachmentFallback:"adjunto",fileFallback:"archivo"},threadMenu:{newChat:"Nueva conversaci\xF3n",threadHistory:"Historial",deleteThread:"Eliminar conversaci\xF3n",noPreviousChats:"A\xFAn no hay conversaciones anteriores.",hiddenThreads:e=>`${e} conversaci\xF3n${e===1?"":"es"} anterior${e===1?"":"es"} oculta${e===1?"":"s"}`},chatQueue:{attachmentFallback:"(adjunto)",removeFromQueue:"Quitar de la cola",queued:e=>`${e} en cola`},poweredBy:{label:"Agente IA con tecnolog\xEDa de"},aiDisclaimer:{default:"puede cometer errores"},exportSession:{saving:"guardando...",saved:"guardado",error:"error",export:"exportar",tooltip:"Guardar escenario en Waniwani"},widgetErrorBoundary:{failedToLoad:"No se pudo cargar el widget",retry:"Reintentar"},launcher:{prompt:"Pregunta lo que quieras\u2026",open:"Abrir chat",close:"Cerrar chat",minimize:"Minimizar"}};var EI={promptInput:{placeholder:"Que souhaitez-vous savoir ?",uploadFiles:"Importer des fichiers",stop:"Arr\xEAter",submit:"Envoyer",removeAttachments:"Supprimer toutes les pi\xE8ces jointes"},workingIndicator:{default:"Un instant\u2026"},reasoning:{thinking:"R\xE9flexion\u2026",thoughtBrief:"R\xE9flexion pendant quelques secondes",thoughtForSeconds:e=>`R\xE9flexion pendant ${e} seconde${e===1?"":"s"}`},chainOfThought:{working:"Je m'en occupe\u2026",done:"Raisonnement"},tool:{copy:"Copier",copied:"Copi\xE9",request:"Requ\xEAte",response:"R\xE9ponse",error:"Erreur"},attachments:{attachmentFallback:"pi\xE8ce jointe",fileFallback:"fichier"},threadMenu:{newChat:"Nouvelle conversation",threadHistory:"Historique",deleteThread:"Supprimer la conversation",noPreviousChats:"Aucune conversation pr\xE9c\xE9dente.",hiddenThreads:e=>`${e} conversation${e===1?"":"s"} plus ancienne${e===1?"":"s"} masqu\xE9e${e===1?"":"s"}`},chatQueue:{attachmentFallback:"(pi\xE8ce jointe)",removeFromQueue:"Retirer de la file",queued:e=>`${e} en attente`},poweredBy:{label:"Agent IA propuls\xE9 par"},aiDisclaimer:{default:"peut faire des erreurs"},exportSession:{saving:"enregistrement...",saved:"enregistr\xE9",error:"erreur",export:"exporter",tooltip:"Enregistrer le sc\xE9nario dans Waniwani"},widgetErrorBoundary:{failedToLoad:"\xC9chec du chargement du widget",retry:"R\xE9essayer"},launcher:{prompt:"Posez votre question\u2026",open:"Ouvrir le chat",close:"Fermer le chat",minimize:"R\xE9duire"}};var Kh={en:id,fr:EI,es:MI};var DI=z(te(),1),RI=(0,nn.createContext)(null);function UN(e,t){if(!t)return e;let a={...e};for(let n of Object.keys(e)){let r=e[n],o=t[n];o&&typeof r=="object"&&(a[n]={...r,...o})}return a}function Ls({children:e,locale:t,messages:a}){let n=!!(t&&FN(t)),r=n?t:"en",[o,l]=(0,nn.useState)(r),[i,s]=(0,nn.useState)(n);(0,nn.useEffect)(()=>{l(Xh(t)),s(!0)},[t]);let u=(0,nn.useMemo)(()=>{let c=Kh[o]??Kh["en"];return{locale:o,t:UN(c,a),ready:i}},[o,a,i]);return(0,DI.jsx)(RI.Provider,{value:u,children:e})}function FN(e){return e==="en"||e==="fr"||e==="es"}function Re(){let e=(0,nn.useContext)(RI);return e||{locale:"en",t:id,ready:!0}}function Zh(e,t){let a=Date.now()-e;if(a<6e4)try{return new Intl.RelativeTimeFormat(t,{numeric:"auto",style:"narrow"}).format(0,"second")}catch{return"just now"}let n,r;a<60*6e4?(n=-Math.floor(a/6e4),r="minute"):a<1440*6e4?(n=-Math.floor(a/(60*6e4)),r="hour"):(n=-Math.floor(a/(1440*6e4)),r="day");try{return new Intl.RelativeTimeFormat(t,{numeric:"auto",style:"short"}).format(n,r)}catch{return`${Math.abs(n)}${r==="minute"?"m":r==="hour"?"h":"d"} ago`}}var tt=z(Me(),1);var Ts=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,a)=>(a&=63,a<36?t+=a.toString(36):a<62?t+=(a-26).toString(36).toUpperCase():a>62?t+="-":t+="_",t),"");var nt=z(Me(),1);var _I=z(te(),1),wn=({className:e,variant:t="default",size:a="default",type:n="button",...r})=>(0,_I.jsx)("button",{type:n,className:V("ww:inline-flex ww:cursor-pointer ww:items-center ww:justify-center ww:rounded-md ww:font-medium ww:transition-colors ww:disabled:pointer-events-none ww:disabled:opacity-50",t==="default"&&"ww:bg-primary ww:text-primary-foreground ww:hover:bg-primary/90",t==="outline"&&"ww:border ww:border-border ww:bg-background ww:hover:bg-accent ww:hover:text-accent-foreground",t==="ghost"&&"ww:hover:bg-accent ww:hover:text-accent-foreground",a==="default"&&"ww:h-9 ww:px-4 ww:py-2 ww:text-sm",a==="sm"&&"ww:h-8 ww:px-3 ww:text-xs",a==="icon"&&"ww:size-9 ww:!rounded-full",a==="icon-sm"&&"ww:size-7 ww:!rounded-full",e),...r});var ta=z(te(),1),zN=async e=>{try{let a=await(await fetch(e)).blob();return new Promise(n=>{let r=new FileReader;r.onloadend=()=>n(r.result),r.onerror=()=>n(null),r.readAsDataURL(a)})}catch{return null}},OI=(0,nt.createContext)(null),PI=()=>{let e=(0,nt.useContext)(OI);if(!e)throw new Error("usePromptInputAttachments must be used within a PromptInput");return e},NI=({className:e,accept:t,multiple:a,globalDrop:n,maxFiles:r,maxFileSize:o,onSubmit:l,children:i,...s})=>{let{t:u}=Re(),c=(0,nt.useRef)(null),d=(0,nt.useRef)(null),[f,p]=(0,nt.useState)([]),m=(0,nt.useRef)(f);(0,nt.useEffect)(()=>{m.current=f},[f]);let x=(0,nt.useCallback)(()=>{c.current?.click()},[]),b=(0,nt.useCallback)(I=>{let A=[...I];if(A.length===0)return;let E=L=>o?L.size<=o:!0,_=A.filter(E);p(L=>{let W=typeof r=="number"?Math.max(0,r-L.length):void 0,U=typeof W=="number"?_.slice(0,W):_;return[...L,...U.map(R=>({filename:R.name,id:Ts(),mediaType:R.type,type:"file",url:URL.createObjectURL(R)}))]})},[r,o]),y=(0,nt.useCallback)(I=>{p(A=>{let E=A.find(_=>_.id===I);return E?.url&&URL.revokeObjectURL(E.url),A.filter(_=>_.id!==I)})},[]),w=(0,nt.useCallback)(()=>{p(I=>{for(let A of I)A.url&&URL.revokeObjectURL(A.url);return[]})},[]);(0,nt.useEffect)(()=>()=>{for(let I of m.current)I.url&&URL.revokeObjectURL(I.url)},[]);let g=(0,nt.useCallback)(I=>{I.currentTarget.files&&b(I.currentTarget.files),I.currentTarget.value=""},[b]);(0,nt.useEffect)(()=>{if(!n)return;let I=E=>{E.dataTransfer?.types?.includes("Files")&&E.preventDefault()},A=E=>{E.dataTransfer?.types?.includes("Files")&&E.preventDefault(),E.dataTransfer?.files&&E.dataTransfer.files.length>0&&b(E.dataTransfer.files)};return document.addEventListener("dragover",I),document.addEventListener("drop",A),()=>{document.removeEventListener("dragover",I),document.removeEventListener("drop",A)}},[b,n]);let v=(0,nt.useCallback)(async I=>{I.preventDefault();let A=I.currentTarget,_=new FormData(A).get("message")||"";A.reset();let L=await Promise.all(f.map(async({id:W,...U})=>{if(U.url?.startsWith("blob:")){let R=await zN(U.url);return{...U,url:R??U.url}}return U}));try{let W=l({files:L,text:_},I);W instanceof Promise&&await W,w()}catch{}},[f,l,w]),M=(0,nt.useMemo)(()=>({add:b,clear:w,files:f,openFileDialog:x,remove:y}),[f,b,y,w,x]);return(0,ta.jsxs)(OI.Provider,{value:M,children:[(0,ta.jsx)("input",{accept:t,"aria-label":u.promptInput.uploadFiles,className:"ww:hidden",multiple:a,onChange:g,ref:c,title:u.promptInput.uploadFiles,type:"file"}),(0,ta.jsx)("form",{className:V("ww:flex ww:w-full ww:flex-col ww:rounded-lg ww:border ww:border-border ww:bg-background",e),onSubmit:v,ref:d,...s,children:i})]})};var BI=({onChange:e,onKeyDown:t,className:a,placeholder:n,...r})=>{let{t:o}=Re(),l=PI(),[i,s]=(0,nt.useState)(!1),u=n??o.promptInput.placeholder,c=(0,nt.useCallback)(f=>{if(t?.(f),!f.defaultPrevented){if(f.key==="Enter"){if(i||f.nativeEvent.isComposing||f.shiftKey)return;f.preventDefault();let{form:p}=f.currentTarget;if(p?.querySelector('button[type="submit"]')?.disabled)return;p?.requestSubmit()}if(f.key==="Backspace"&&f.currentTarget.value===""&&l.files.length>0){f.preventDefault();let p=l.files.at(-1);p&&l.remove(p.id)}}},[t,i,l]),d=(0,nt.useCallback)(f=>{let p=f.clipboardData?.items;if(!p)return;let m=[];for(let x of p)if(x.kind==="file"){let b=x.getAsFile();b&&m.push(b)}m.length>0&&(f.preventDefault(),l.add(m))},[l]);return(0,ta.jsx)("textarea",{className:V("ww:field-sizing-content ww:max-h-48 ww:min-h-0 ww:w-full ww:resize-none ww:border-0 ww:bg-transparent ww:px-3 ww:py-2 ww:text-base ww:sm:text-sm ww:outline-none ww:placeholder:text-muted-foreground",a),name:"message",onCompositionEnd:()=>s(!1),onCompositionStart:()=>s(!0),onKeyDown:c,onPaste:d,placeholder:u,onChange:e,...r})},UI=({className:e,status:t,onStop:a,onClick:n,children:r,...o})=>{let{t:l}=Re(),i=t==="submitted"||t==="streaming",s=(0,ta.jsx)(vo,{className:"ww:size-4"});t==="submitted"?s=(0,ta.jsx)(xs,{className:"ww:size-4 ww:animate-spin"}):t==="streaming"&&(s=(0,ta.jsx)(Ss,{className:"ww:size-4"}));let u=(0,nt.useCallback)(c=>{if(i&&a){c.preventDefault(),a();return}n?.(c)},[i,a,n]);return(0,ta.jsx)(wn,{"aria-label":i?l.promptInput.stop:l.promptInput.submit,className:V("ww:bg-foreground ww:text-background ww:hover:bg-foreground ww:rounded-full",e),onClick:u,size:"icon-sm",type:i&&a?"button":"submit",variant:"ghost",...o,children:r??s})},FI=({className:e,children:t,...a})=>{let{t:n}=Re(),r=PI();return r.files.length>0?(0,ta.jsxs)(wn,{className:V("ww:group ww:relative",e),onClick:()=>r.clear(),size:"icon-sm",type:"button",variant:"ghost","aria-label":n.promptInput.removeAttachments,...a,children:[(0,ta.jsx)("span",{className:"ww:flex ww:size-5 ww:items-center ww:justify-center ww:rounded-full ww:bg-primary ww:text-[10px] ww:font-medium ww:text-primary-foreground ww:transition-opacity ww:group-hover:opacity-0",children:r.files.length}),(0,ta.jsx)(Kn,{className:"ww:absolute ww:size-4 ww:opacity-0 ww:transition-opacity ww:group-hover:opacity-100"})]}):(0,ta.jsx)(wn,{className:V(e),onClick:()=>r.openFileDialog(),size:"icon-sm",type:"button",variant:"ghost",...a,children:t??(0,ta.jsx)(bs,{className:"ww:size-4"})})};var qI=z(te(),1);function zI({text:e}){let{t}=Re();return e===!1?null:(0,qI.jsx)("span",{className:"ww:whitespace-nowrap ww:text-[10px] ww:sm:text-[11px] ww:text-muted-foreground ww:opacity-70",children:e||t.aiDisclaimer.default})}var sd=z(Me(),1);var So=z(te(),1),HI=({className:e,...t})=>(0,So.jsx)("div",{className:V("ww:flex ww:flex-col ww:gap-1 ww:px-3 ww:py-2",e),...t}),jI=({className:e,...t})=>(0,So.jsx)("li",{className:V("ww:group ww:flex ww:items-center ww:gap-2 ww:rounded-md ww:px-2 ww:py-1 ww:text-sm ww:transition-colors ww:hover:bg-muted",e),...t}),VI=({className:e,...t})=>(0,So.jsx)("span",{className:V("ww:inline-block ww:size-2 ww:shrink-0 ww:rounded-full ww:border ww:border-muted-foreground/50",e),...t}),GI=({className:e,...t})=>(0,So.jsx)("span",{className:V("ww:line-clamp-1 ww:grow ww:break-words ww:text-muted-foreground",e),...t}),$I=({className:e,...t})=>(0,So.jsx)("div",{className:V("ww:flex ww:shrink-0 ww:gap-1 ww:opacity-0 ww:transition-opacity ww:group-hover:opacity-100",e),...t}),WI=({className:e,...t})=>(0,So.jsx)(wn,{className:V("ww:size-auto ww:rounded ww:p-1 ww:text-muted-foreground ww:hover:bg-muted-foreground/10 ww:hover:text-foreground",e),size:"icon",type:"button",variant:"ghost",...t});var Wa=z(te(),1),XI=(0,sd.memo)(({message:e,onRemove:t})=>{let{t:a}=Re(),n=(0,sd.useCallback)(()=>t(e.id),[t,e.id]);return(0,Wa.jsxs)(jI,{children:[(0,Wa.jsx)(VI,{}),(0,Wa.jsx)(GI,{children:e.text||a.chatQueue.attachmentFallback}),(0,Wa.jsx)($I,{children:(0,Wa.jsx)(WI,{"aria-label":a.chatQueue.removeFromQueue,onClick:n,children:(0,Wa.jsx)(Kn,{className:"ww:size-3"})})})]})});XI.displayName="ChatQueueItem";function KI({queuedMessages:e,onRemove:t,className:a}){let{t:n}=Re();return e.length===0?null:(0,Wa.jsxs)(HI,{className:V("ww:border-t ww:border-border",a),children:[(0,Wa.jsx)("div",{className:"ww:text-[11px] ww:font-medium ww:text-muted-foreground ww:px-2",children:n.chatQueue.queued(e.length)}),(0,Wa.jsx)("ul",{children:e.map(r=>(0,Wa.jsx)(XI,{message:r,onRemove:t},r.id))})]})}var Nr=z(te(),1),ZI=({files:e,className:t,...a})=>e.length===0?null:(0,Nr.jsx)("div",{className:V("ww:flex ww:flex-wrap ww:gap-1.5",t),...a,children:e.map((n,r)=>(0,Nr.jsx)(qN,{file:n},r))});function qN({file:e}){let{t}=Re();return e.mediaType?.startsWith("image/")&&e.url?(0,Nr.jsx)("img",{src:e.url,alt:e.filename??t.attachments.attachmentFallback,className:"ww:h-16 ww:max-w-32 ww:rounded ww:object-cover"}):(0,Nr.jsxs)("span",{className:"ww:inline-flex ww:items-center ww:gap-1.5 ww:rounded ww:bg-background/20 ww:px-2 ww:py-1 ww:text-xs",children:[(0,Nr.jsx)(ys,{className:"ww:size-3 ww:shrink-0"}),(0,Nr.jsx)("span",{className:"ww:max-w-24 ww:truncate",children:e.filename??t.attachments.fileFallback})]})}var wa=z(Me(),1);var ht=z(Me(),1);pf();var AE=z(Me(),1);var ME=z(te(),1),i5=({as:e="span",className:t,duration:a=2,style:n,children:r,...o})=>{let l={backgroundImage:"linear-gradient(90deg, var(--ww-color-muted-foreground) 0%, var(--ww-color-muted-foreground) 40%, var(--ww-color-foreground) 50%, var(--ww-color-muted-foreground) 60%, var(--ww-color-muted-foreground) 100%)",backgroundSize:"250% 100%",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent",animation:`ww-shimmer ${a}s linear infinite`,...n};return(0,ME.jsx)(e,{"data-waniwani-shimmer":"",className:V("ww:inline-block",t),style:l,...o,children:r})},sn=(0,AE.memo)(i5);sn.displayName="Shimmer";var Qt=z(te(),1),EE=(0,ht.createContext)(null);function RE(){let e=(0,ht.useContext)(EE);if(!e)throw new Error("Reasoning components must be used within <Reasoning>");return e}var s5=1e3,u5=1e3,tu=(0,ht.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:n,onOpenChange:r,duration:o,children:l,...i})=>{let s=n??t,u=n===!1,c=a!==void 0,[d,f]=(0,ht.useState)(s),p=c?a:d,m=(0,ht.useCallback)(A=>{c||f(A),r?.(A)},[c,r]),[x,b]=(0,ht.useState)(void 0),y=o??x,w=(0,ht.useRef)(t),[g,v]=(0,ht.useState)(!1),M=(0,ht.useRef)(null);(0,ht.useEffect)(()=>{t?(w.current=!0,M.current===null&&(M.current=Date.now())):M.current!==null&&(b(Math.ceil((Date.now()-M.current)/u5)),M.current=null)},[t]),(0,ht.useEffect)(()=>{t&&!p&&!u&&m(!0)},[t,p,u,m]),(0,ht.useEffect)(()=>{if(w.current&&!t&&p&&!g){let A=setTimeout(()=>{m(!1),v(!0)},s5);return()=>clearTimeout(A)}},[t,p,g,m]);let I=(0,ht.useMemo)(()=>({isStreaming:t,isOpen:p,setIsOpen:m,duration:y}),[t,p,m,y]);return(0,Qt.jsx)(EE.Provider,{value:I,children:(0,Qt.jsx)("div",{className:V("ww:mb-4 ww:flex ww:flex-col ww:gap-2",e),"data-state":p?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...i,children:l})})});tu.displayName="Reasoning";var au=(0,ht.memo)(({className:e,children:t,getThinkingMessage:a,hideIcon:n=!1,onClick:r,...o})=>{let{t:l}=Re(),{isStreaming:i,isOpen:s,duration:u,setIsOpen:c}=RE(),f=a??((p,m)=>p||m===0?(0,Qt.jsx)(sn,{duration:1.6,children:l.reasoning.thinking}):m===void 0?(0,Qt.jsx)("span",{children:l.reasoning.thoughtBrief}):(0,Qt.jsx)("span",{children:l.reasoning.thoughtForSeconds(m)}));return(0,Qt.jsx)("button",{type:"button","aria-expanded":s,onClick:p=>{c(!s),r?.(p)},className:V("ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),...o,children:t??(0,Qt.jsxs)(Qt.Fragment,{children:[!n&&(0,Qt.jsx)(Xn,{className:"ww:size-4 ww:shrink-0"}),f(i,u)]})})});au.displayName="ReasoningTrigger";var nu=(0,ht.memo)(({className:e,children:t,...a})=>{let{isOpen:n}=RE();return(0,Qt.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,Qt.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,Qt.jsx)("div",{className:V("ww:text-sm ww:text-muted-foreground",e),...a,children:(0,Qt.jsx)(Yl,{children:t})})})})});nu.displayName="ReasoningContent";var ke=z(te(),1),c5=500,DE=(0,wa.createContext)(null);function _E(){let e=(0,wa.useContext)(DE);if(!e)throw new Error("ChainOfThought components must be used within <ChainOfThought>");return e}function OE({className:e,isWorking:t=!1,activeStep:a,open:n,defaultOpen:r=!1,onOpenChange:o,children:l,...i}){let s=n!==void 0,[u,c]=(0,wa.useState)(r),d=s?n:u,f=(0,wa.useCallback)(b=>{s||c(b),o?.(b)},[s,o]),[p,m]=(0,wa.useState)(!t);(0,wa.useEffect)(()=>{if(t){m(!1);return}let b=setTimeout(()=>m(!0),c5);return()=>clearTimeout(b)},[t]);let x=(0,wa.useMemo)(()=>({open:d,setOpen:f,isWorking:t,settled:p,activeStep:a}),[d,f,t,p,a]);return(0,ke.jsx)(DE.Provider,{value:x,children:(0,ke.jsx)("div",{className:V("ww:mb-4 ww:flex ww:flex-col ww:gap-2",e),"data-state":d?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...i,children:l})})}function PE({className:e,label:t,workingLabel:a,children:n,...r}){let{open:o,setOpen:l,isWorking:i,settled:s,activeStep:u}=_E();if(!s){let c=u?.icon,d=u?.label??a??t??"";return(0,ke.jsx)("div",{className:V("ww:flex ww:min-h-5 ww:w-full ww:items-center ww:gap-1.5 ww:text-sm ww:text-muted-foreground",e),children:(0,ke.jsxs)("span",{className:"ww:flex ww:min-w-0 ww:items-center ww:gap-1.5",style:{animation:"ww-fade-in 0.25s ease-out"},children:[c&&(0,ke.jsx)(c,{className:V("ww:size-4 ww:shrink-0",i&&"ww:animate-pulse")}),(0,ke.jsx)("span",{className:"ww:truncate",children:i?(0,ke.jsx)(sn,{duration:2.6,children:d}):d})]},d)})}return(0,ke.jsxs)("button",{type:"button",onClick:()=>l(!o),"aria-expanded":o,className:V("ww:flex ww:min-h-5 ww:w-full ww:items-center ww:gap-1.5 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),style:{animation:"ww-fade-in 0.25s ease-out"},...r,children:[(0,ke.jsx)("span",{className:"ww:truncate",children:n??t}),(0,ke.jsx)(Pr,{className:V("ww:size-4 ww:shrink-0 ww:transition-transform ww:duration-200",o&&"ww:rotate-180")})]})}function NE({className:e,children:t,...a}){let{open:n}=_E();return(0,ke.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,ke.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,ke.jsx)("div",{className:V("ww:flex ww:flex-col",e),...a,children:t})})})}function BE({icon:e,isLast:t,running:a,error:n}){return(0,ke.jsxs)("div",{className:"ww:flex ww:flex-col ww:items-center ww:self-stretch",children:[(0,ke.jsx)("span",{className:"ww:flex ww:h-5 ww:items-center",children:(0,ke.jsx)(e,{className:V("ww:size-4 ww:shrink-0",n?"ww:text-destructive":a?"ww:animate-pulse ww:text-foreground":"ww:text-muted-foreground")})}),!t&&(0,ke.jsx)("span",{className:"ww:w-px ww:flex-1 ww:bg-border"})]})}function Cw({className:e,icon:t,title:a,state:n,isLast:r=!1,children:o,...l}){let i=n==="input-available"||n==="input-streaming",s=n==="output-error",u=o!=null,[c,d]=(0,wa.useState)(!1),f=a??"",p=i?(0,ke.jsx)(sn,{duration:1.6,children:f}):(0,ke.jsx)("span",{className:"ww:truncate",children:f});return(0,ke.jsxs)("div",{className:V("ww:flex ww:gap-2",e),...l,children:[(0,ke.jsx)(BE,{icon:t,isLast:r,running:i,error:s}),(0,ke.jsxs)("div",{className:V("ww:min-w-0 ww:flex-1",!r&&"ww:pb-3"),children:[u?(0,ke.jsxs)("button",{type:"button",onClick:()=>d(m=>!m),"aria-expanded":c,className:"ww:flex ww:w-full ww:items-center ww:gap-1.5 ww:text-left ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",children:[p,(0,ke.jsx)(Pr,{className:V("ww:size-3.5 ww:shrink-0 ww:transition-transform ww:duration-200",c&&"ww:rotate-180")})]}):(0,ke.jsx)("div",{className:"ww:flex ww:items-center ww:text-sm ww:text-muted-foreground",children:p}),u&&(0,ke.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",c?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,ke.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,ke.jsx)("div",{className:"ww:mt-2 ww:space-y-3 ww:rounded-lg ww:border ww:border-border ww:bg-background ww:p-3",children:o})})})]})]})}function UE({isStreaming:e=!1,isLast:t=!1,children:a}){return(0,ke.jsxs)("div",{className:"ww:flex ww:gap-2",children:[(0,ke.jsx)(BE,{icon:Xn,isLast:t,running:e}),(0,ke.jsx)("div",{className:V("ww:min-w-0 ww:flex-1",!t&&"ww:pb-3"),children:(0,ke.jsxs)(tu,{isStreaming:e,className:"ww:mb-0",children:[(0,ke.jsx)(au,{hideIcon:!0}),(0,ke.jsx)(nu,{children:a})]})})]})}var kw={name:"cjk-noop",type:"cjk",remarkPluginsBefore:[],remarkPluginsAfter:[],remarkPlugins:[]};var FE={name:"shiki-noop",type:"code-highlighter",supportsLanguage:()=>!1,getSupportedLanguages:()=>[],getThemes:()=>["github-light","github-dark"],highlight:()=>null};var HE=z(Me(),1);var nr=z(Me(),1),d5=5,zE=400;function qE(e,t,a={}){let{msPerChar:n=d5}=a,[r,o]=(0,nr.useState)(t?"":e),l=(0,nr.useRef)(e),i=(0,nr.useRef)(t?0:e.length),s=(0,nr.useRef)(0),u=(0,nr.useRef)(null);return(e.length<i.current||!e.startsWith(r.slice(0,i.current)))&&(i.current=t?0:e.length),l.current=e,(0,nr.useEffect)(()=>{if(!t){u.current!==null&&(cancelAnimationFrame(u.current),u.current=null),i.current=e.length,o(e);return}if(l.current.length-i.current>zE&&(i.current=l.current.length-zE),u.current!==null)return;let d=f=>{let p=l.current;if(i.current>=p.length){u.current=null;return}s.current===0&&(s.current=f);let m=f-s.current;if(m>=n){let x=Math.min(Math.floor(m/n),p.length-i.current);i.current+=x,o(p.slice(0,i.current)),s.current=f}u.current=requestAnimationFrame(d)};return u.current=requestAnimationFrame(d),()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[e,t,n]),r}var ru=z(te(),1),Lw=({className:e,from:t,children:a,...n})=>(0,ru.jsx)("div",{className:V("ww:group ww:flex ww:w-full",t==="user"?"is-user ww:ml-auto ww:max-w-[80%] ww:flex-col ww:items-end":"is-assistant ww:flex-col",e),...n,children:(0,ru.jsx)("div",{className:V("ww:flex ww:min-w-0 ww:flex-col ww:gap-2","ww:w-full"),children:a})}),Tw=({children:e,className:t,...a})=>(0,ru.jsx)("div",{className:V("ww:flex ww:w-fit ww:min-w-0 ww:max-w-full ww:flex-col ww:gap-2 ww:overflow-hidden ww:text-base","ww:group-[.is-user]:ml-auto ww:group-[.is-user]:rounded-lg ww:group-[.is-user]:bg-user-bubble ww:group-[.is-user]:px-4 ww:group-[.is-user]:py-3 ww:group-[.is-user]:text-primary-foreground","ww:group-[.is-assistant]:text-foreground",t),...a,children:e}),f5={cjk:kw,code:FE},p5={cjk:kw},m5={enabled:!1};function h5({className:e,linkSafety:t,isStreaming:a,children:n,...r}){let l=qE(typeof n=="string"?n:"",!!a),i=typeof n=="string"?l:n;return(0,ru.jsx)(Yl,{className:V("ww:size-full ww:[&>*:first-child]:mt-0 ww:[&>*:last-child]:mb-0",e),linkSafety:t??m5,plugins:a?p5:f5,...r,children:i})}var wf=(0,HE.memo)(h5,(e,t)=>e.children===t.children&&e.isStreaming===t.isStreaming);wf.displayName="MessageResponse";var Nt=z(Me(),1);var me=z(te(),1);function g5(e,t=80){if(e==null)return String(e);if(typeof e!="object")return String(e).slice(0,t);if(Array.isArray(e))return`Array(${e.length})`;let a=JSON.stringify(e);if(a.length<=t)return a;let n=Object.entries(e),r=[],o=t-2;for(let[l,i]of n){if(o<=8)break;let s=l.length>4?`${l.slice(0,4)}\u2026`:l,u;typeof i=="string"?u=i.length>2?`'${i.slice(0,1)}\u2026`:`'${i}'`:Array.isArray(i)?u=`Array(${i.length})`:typeof i=="object"&&i!==null?u="{\u2026}":u=String(i);let c=`${s}\u2009${u}`;r.push(c),o-=c.length+3}return`{${r.join(", ")}}`}function y5({text:e,className:t}){let{t:a}=Re(),[n,r]=(0,Nt.useState)(!1),o=(0,Nt.useRef)(null);(0,Nt.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]);let l=(0,Nt.useCallback)(async i=>{i.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r(!1),2e3)}catch{}},[e]);return(0,me.jsx)(wn,{variant:"ghost",size:"sm",onClick:l,className:V("ww:h-auto ww:gap-1 ww:px-1.5 ww:py-0.5 ww:text-xs ww:text-muted-foreground ww:hover:text-foreground",t),children:n?(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(ms,{className:"ww:size-3.5"}),(0,me.jsx)("span",{children:a.tool.copied})]}):(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(gs,{className:"ww:size-3.5"}),(0,me.jsx)("span",{children:a.tool.copy})]})})}function GE({data:e,label:t,className:a,...n}){let[r,o]=(0,Nt.useState)(!1),l=(0,Nt.useMemo)(()=>JSON.stringify(e,null,2),[e]),i=g5(e);return(0,me.jsxs)("div",{className:V("ww:rounded-lg ww:bg-tool-card",a),...n,children:[(0,me.jsxs)("div",{className:"ww:flex ww:items-center ww:justify-between ww:px-3 ww:pt-2.5 ww:pb-1.5",children:[(0,me.jsx)("span",{className:"ww:text-xs ww:font-medium ww:text-muted-foreground",children:t}),(0,me.jsx)(y5,{text:l})]}),(0,me.jsxs)("button",{type:"button",onClick:()=>o(s=>!s),className:"ww:flex ww:w-full ww:items-start ww:gap-2 ww:px-3 ww:pb-3 ww:text-left",children:[(0,me.jsx)(hs,{className:V("ww:mt-0.5 ww:size-3.5 ww:shrink-0 ww:text-muted-foreground ww:transition-transform ww:duration-150",r&&"ww:rotate-90")}),r?(0,me.jsx)("pre",{className:"ww:overflow-x-auto ww:text-xs ww:font-mono ww:text-foreground ww:whitespace-pre-wrap ww:break-all",children:(0,me.jsx)("code",{children:l})}):(0,me.jsx)("span",{className:"ww:truncate ww:text-xs ww:font-mono ww:text-foreground/80",children:i})]})]})}var Mw=(0,Nt.createContext)({open:!1,toggle:()=>{}});function $E({className:e,defaultOpen:t=!1,children:a,...n}){let[r,o]=(0,Nt.useState)(t);return(0,me.jsx)(Mw.Provider,{value:{open:r,toggle:()=>o(l=>!l)},children:(0,me.jsx)("div",{className:V("ww:mb-4 ww:w-full",e),"data-state":r?"open":"closed",style:{animation:"ww-fade-in 0.2s ease-out"},...n,children:a})})}function WE({className:e,title:t,state:a,...n}){let{open:r,toggle:o}=(0,Nt.useContext)(Mw),l=a==="input-available"||a==="input-streaming",i=t??"";return(0,me.jsxs)("button",{type:"button",onClick:o,className:V("ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground ww:transition-colors ww:hover:text-foreground",e),"aria-expanded":r,...n,children:[(0,me.jsx)(bo,{className:"ww:size-4 ww:shrink-0"}),(0,me.jsx)("span",{className:"ww:truncate",children:l?(0,me.jsx)(sn,{duration:1.6,children:i}):i}),(0,me.jsx)(Pr,{className:V("ww:size-4 ww:shrink-0 ww:transition-transform ww:duration-200",r&&"ww:rotate-180")})]})}function XE({className:e,title:t,state:a,...n}){let r=a==="input-available"||a==="input-streaming",o=t??"";return(0,me.jsx)("div",{className:V("ww:mb-4 ww:flex ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground",e),style:{animation:"ww-fade-in 0.2s ease-out"},...n,children:(0,me.jsx)("span",{className:"ww:truncate",children:r?(0,me.jsx)(sn,{duration:1.6,children:o}):o})})}function KE({className:e,children:t,...a}){let{open:n}=(0,Nt.useContext)(Mw);return(0,me.jsx)("div",{className:V("ww:grid ww:transition-[grid-template-rows,opacity] ww:duration-200 ww:ease-out",n?"ww:grid-rows-[1fr] ww:opacity-100":"ww:grid-rows-[0fr] ww:opacity-0"),children:(0,me.jsx)("div",{className:"ww:min-h-0 ww:overflow-hidden",children:(0,me.jsx)("div",{className:V("ww:mt-2 ww:space-y-3 ww:rounded-lg ww:border ww:border-border ww:bg-background ww:p-3",e),...a,children:t})})})}function Ew({className:e,input:t,debug:a,...n}){let{t:r}=Re(),o=(0,Nt.useMemo)(()=>{if(!a&&typeof t=="object"&&t!==null&&!Array.isArray(t)){let{_meta:l,...i}=t;return i}return t},[t,a]);return(0,me.jsx)(GE,{data:o,label:r.tool.request,className:e,...n})}function Aw(e){if(!(typeof e!="object"||e===null))return e}function ZE(e){return Aw(e?.ui)}function QE(e){return Aw(Aw(e)?._meta)}function jE(e){if(!e)return;let t=ZE(e)?.resourceUri;if(typeof t=="string"&&t.length>0)return t;let a=e["ui/resourceUri"];if(typeof a=="string"&&a.length>0)return a;let n=e["openai/outputTemplate"];if(typeof n=="string"&&n.length>0)return n}function VE(e){return ZE(e)?.autoHeight===!0}function ou(e,t,a){if(e){let n=jE(a?.[e]?._meta);if(n)return n}return jE(QE(t))}function YE(e,t,a){return e&&VE(a?.[e]?._meta)?!0:VE(QE(t))}function Rw({className:e,output:t,errorText:a,debug:n,...r}){let{t:o}=Re(),l=(0,Nt.useMemo)(()=>{if(!n&&typeof t=="object"&&t!==null&&!Array.isArray(t)){let{_meta:i,...s}=t;return s}return t},[t,n]);return t||a?a?(0,me.jsxs)("div",{className:V("ww:space-y-2",e),...r,children:[(0,me.jsx)("h4",{className:"ww:text-xs ww:font-medium ww:uppercase ww:tracking-wide ww:text-muted-foreground",children:o.tool.error}),(0,me.jsx)("div",{className:"ww:rounded-lg ww:bg-destructive/10 ww:p-3 ww:text-xs ww:text-destructive",children:a})]}):(0,me.jsx)(GE,{data:l,label:o.tool.response,className:e,...r}):null}var lu=z(te(),1);function JE(e){return e.type==="text"||e.type==="reasoning"||e.type==="file"||"toolCallId"in e}function eR(e){return e.parts.some(JE)}function tR(e,t,a){if(t!=="submitted"&&t!=="streaming")return!1;let n=e[e.length-1];return!n||n.role!=="assistant"?!0:!n.parts.some(o=>!(!JE(o)||a?.ignoreToolParts&&"toolCallId"in o||a?.ignoreReasoningParts&&o.type==="reasoning"))}function aR({className:e,...t}){let{t:a}=Re();return(0,lu.jsxs)("div",{"aria-live":"polite",className:V("ww:mb-4 ww:flex ww:w-full ww:items-center ww:gap-2 ww:text-sm ww:text-muted-foreground",e),style:{animation:"ww-fade-in 0.2s ease-out"},...t,children:[(0,lu.jsx)(Is,{className:"ww:size-4 ww:shrink-0"}),(0,lu.jsx)(sn,{duration:1.6,children:a.workingIndicator.default})]})}var et=z(Me(),1);function Jl(e){if(!e)return!1;let t=Array.isArray(e.content)&&e.content.length>0,a=typeof e.structuredContent=="object"&&e.structuredContent!==null&&Object.keys(e.structuredContent).length>0;return t||a}function nR(e,t){return!Jl(e)&&!Jl(t)?null:Jl(e)?Jl(t)?{...e.content||t.content?{content:[...e.content??[],...t.content??[]]}:{},...e.structuredContent||t.structuredContent?{structuredContent:{...e.structuredContent??{},...t.structuredContent??{}}}:{}}:{...e.content?{content:[...e.content]}:{},...e.structuredContent?{structuredContent:{...e.structuredContent}}:{}}:{...t?.content?{content:[...t.content]}:{},...t?.structuredContent?{structuredContent:{...t.structuredContent}}:{}}}var oR=z(te(),1),w5="/api/mcp/resource",x5=500,v5=0,b5=16,S5="2026-01-26",I5=300,C5=3e3,k5=3;function L5(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function T5(e,t,a){return ou(e,t,a)?!1:t._meta?.["waniwani/autoInjectResultText"]!==!1}function rR({resourceUri:e,toolInput:t,toolResult:a,resourceEndpoint:n=w5,chatSessionId:r,isDark:o=!1,className:l,autoHeight:i=!1,onOpenLink:s,onFollowUp:u,onCallTool:c,onDisplayModeChange:d,isFullscreen:f=!1,toolDefinitions:p}){let m=(0,et.useRef)(null),x=(0,et.useRef)(t),b=(0,et.useRef)(a),y=(0,et.useRef)({width:0,height:0}),w=(0,et.useRef)(null),g=(0,et.useRef)(!1),v=(0,et.useRef)(0),M=(0,et.useRef)("inline"),[I,A]=(0,et.useState)(v5),[E,_]=(0,et.useState)(void 0),L=(0,et.useRef)(s),W=(0,et.useRef)(u),U=(0,et.useRef)(c),R=(0,et.useRef)(d),B=(0,et.useRef)(r),q=(0,et.useRef)(p);x.current=t,b.current=a,L.current=s,W.current=u,U.current=c,R.current=d,B.current=r,q.current=p;let j=(0,et.useCallback)(S=>i?Math.max(S+b5,0):Math.min(Math.max(S,50),x5),[i]),Y=(0,et.useMemo)(()=>{let S=n.includes("?")?"&":"?";return`${n}${S}uri=${encodeURIComponent(e)}`},[n,e]),fe=(0,et.useRef)(o);fe.current=o;let He=(0,et.useRef)(f);return(0,et.useEffect)(()=>{He.current=f,y.current.height=-1,w.current&&(w.current.cancel(),w.current=null)},[f]),(0,et.useEffect)(()=>{if(!g.current)return;let S=m.current;S?.contentWindow&&S.contentWindow.postMessage({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:{theme:o?"dark":"light"}},"*")},[o]),(0,et.useEffect)(()=>{let S=m.current;if(!S)return;let Be=!1,rt=!1,k=null,De=null,ie=setTimeout(()=>{if(Be||rt||v.current>=k5)return;v.current+=1;let pe=new URL(S.src);pe.searchParams.set("_retry",String(v.current)),S.src=pe.toString()},C5),be=pe=>{S.contentWindow?.postMessage(pe,"*")},Tt=pe=>{if(Be||pe.source!==S.contentWindow)return;let he=pe.data;if(!he||typeof he!="object"||he.jsonrpc!=="2.0")return;let Se=he.method,_e=he.id;if(Se==="ui/initialize"&&_e!=null){rt=!0,clearTimeout(ie),be({jsonrpc:"2.0",id:_e,result:{protocolVersion:he.params?.protocolVersion??S5,hostInfo:{name:"Waniwani Chat",version:"1.0.0"},hostCapabilities:{openLinks:{},message:{text:{}},tools:{},updateModelContext:{text:{},structuredContent:{}}},hostContext:{theme:fe.current?"dark":"light",displayMode:M.current}}});return}if(Se==="ui/notifications/initialized"){g.current=!0;let Ie=x.current,Ue=b.current,Le=Ue._meta&&typeof Ue._meta=="object"?Ue._meta:null,$=L5(B.current),oe=Le&&typeof Le.waniwani=="object"&&Le.waniwani!==null?Le.waniwani:null,je=oe||$?{...oe??{},...$?{sessionId:$}:{}}:void 0,Bt=Le||je?{...Le??{},...je?{waniwani:je}:{}}:void 0;be({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:Ie}});let xa=Ue.content??[{type:"text",text:JSON.stringify(Ue)}];be({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:{content:xa,structuredContent:Ue.structuredContent,_meta:Bt,meta:Bt}});return}if(Se==="ui/notifications/size-changed"){let Ie=he.params,Ue=typeof Ie?.height=="number"?Ie.height:void 0,Le=typeof Ie?.width=="number"?Ie.width:void 0,$=y.current,oe=Ue!==void 0&&Ue!==$.height,je=Le!==void 0&&Le!==$.width;if(!oe&&!je)return;if(oe&&Ue!==void 0){if($.height=Ue,He.current)return;let Bt=j(Ue),xa=S.getBoundingClientRect().height;if(w.current&&(w.current.cancel(),w.current=null),A(Bt),S.animate&&Math.abs(xa-Bt)>2){let ia=S.animate([{height:`${xa}px`},{height:`${Bt}px`}],{duration:I5,easing:"ease-out",fill:"forwards"});w.current=ia,ia.onfinish=()=>{w.current===ia&&(ia.cancel(),w.current=null)}}}je&&i&&Le!==void 0&&($.width=Le,_(Le));return}if(Se==="ui/open-link"&&_e!=null){let Ie=he.params?.url;typeof Ie=="string"&&(L.current?L.current(Ie):window.open(Ie,"_blank","noopener,noreferrer")),be({jsonrpc:"2.0",id:_e,result:{}});return}if(Se==="ui/message"&&_e!=null){if(W.current&&he.params){let Ie=he.params,Ue=k;if(k=null,De){clearTimeout(De.timer);let Le=De.text;De=null;let $=(Ie.content??[]).map(oe=>oe.text??"").join("").trim();Ie={...Ie,content:[{type:"text",text:`${$}
|
|
122
122
|
|
|
123
|
-
${Le}`}]}}W.current({...Se,...Ue?{modelContext:Ue}:{}})}ve({jsonrpc:"2.0",id:De,result:{}});return}if(be==="ui/update-model-context"&&De!=null){L=EE(L,me.params),ve({jsonrpc:"2.0",id:De,result:{}});return}if(be==="tools/call"&&De!=null){let Se=U.current;if(!Se){ve({jsonrpc:"2.0",id:De,error:{code:-32601,message:"tools/call not supported"}});return}let Ue=me.params?.name;Se({name:Ue,arguments:me.params?.arguments??{}}).then(Le=>{ve({jsonrpc:"2.0",id:De,result:Le});let $=Le.content?.map(re=>re.text??"").join("").trim();$&&S5(Ue,Le,F.current)&&(Re&&clearTimeout(Re.timer),Re={text:$,timer:setTimeout(()=>{if(Be)return;let re=L;L=null,Re=null,W.current?.({role:"user",content:[{type:"text",text:$}],...re?{modelContext:re}:{}})},500)})}).catch(Le=>{let $=Le instanceof Error?Le.message:"Tool call failed";ve({jsonrpc:"2.0",id:De,error:{code:-32e3,message:$}})});return}if(be==="ui/request-display-mode"&&De!=null){let Se=me.params?.mode,Ue=Se==="fullscreen"||Se==="inline"||Se==="pip"?Se:"inline";M.current=Ue,ve({jsonrpc:"2.0",id:De,result:{mode:Ue}}),ve({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:{displayMode:Ue}}),R.current?.(Ue);return}if(be==="ui/resource-teardown"&&De!=null){ve({jsonrpc:"2.0",id:De,result:{}});return}be==="ping"&&De!=null&&ve({jsonrpc:"2.0",id:De,result:{}})};return window.addEventListener("message",kt),()=>{Be=!0,clearTimeout(le),Re&&clearTimeout(Re.timer),window.removeEventListener("message",kt)}},[i,j]),(0,DE.jsx)("iframe",{ref:m,src:K,sandbox:"allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox",className:V(!f&&"ww:rounded-md ww:border ww:border-border",l),style:{height:f?"100%":C,minWidth:f||!E?void 0:`min(${E}px, 100%)`,width:"100%",border:"none",colorScheme:o?"dark":"auto"},title:"MCP App"})}var $r=q(ee(),1);function _E({icon:e,title:t,description:a,suggestions:n,onSuggestionSelect:r}){return(0,$r.jsxs)("div",{className:"ww:flex ww:flex-col ww:items-center ww:justify-center ww:py-12 ww:px-6 ww:text-center ww:min-h-full",children:[e&&(0,$r.jsx)("div",{className:"ww:mb-4 ww:flex ww:items-center ww:justify-center ww:size-12 ww:rounded-xl ww:bg-foreground ww:text-background",children:e}),(0,$r.jsx)("h2",{className:"ww:text-lg ww:font-semibold ww:text-foreground",children:t}),a&&(0,$r.jsx)("p",{className:"ww:mt-1 ww:text-sm ww:text-muted-foreground ww:max-w-sm",children:a}),n&&n.length>0&&(0,$r.jsx)("div",{className:"ww:mt-6 ww:w-full ww:max-w-md ww:flex ww:flex-col ww:gap-2",children:n.map((o,l)=>(0,$r.jsx)("button",{type:"button",onClick:()=>r?.(o),className:V("ww:w-full ww:text-left ww:rounded-xl ww:border ww:border-border ww:bg-background ww:px-4 ww:py-3 ww:text-sm","ww:text-foreground ww:hover:bg-accent ww:hover:border-primary/30","ww:transition-all ww:duration-200 ww:ease-out ww:cursor-pointer","ww:animate-[ww-fade-in_0.2s_ease-out_both]"),style:{animationDelay:`${l*50}ms`},children:o},o))})]})}var OE=q(Ae(),1);var Kl=q(ee(),1);function C5({onRetry:e}){let{t}=Ee();return(0,Kl.jsxs)("div",{className:"ww:flex ww:items-center ww:justify-between ww:rounded-md ww:border ww:border-border ww:bg-muted/50 ww:px-4 ww:py-3 ww:text-sm ww:text-muted-foreground",children:[(0,Kl.jsx)("span",{children:t.widgetErrorBoundary.failedToLoad}),(0,Kl.jsx)("button",{type:"button",onClick:e,className:"ww:text-xs ww:font-medium ww:text-primary ww:hover:underline",children:t.widgetErrorBoundary.retry})]})}var mf=class extends OE.Component{constructor(){super(...arguments);_e(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){console.warn("[Waniwani] Widget failed to render:",a.message)}render(){return this.state.hasError?(0,Kl.jsx)(C5,{onRetry:()=>this.setState({hasError:!1})}):this.props.children}};var ge=q(ee(),1);function xw(e){return e?e.replace(/[-_]/g," ").replace(/^\w/,t=>t.toUpperCase()):"Tool"}function PE(e){return e&&/search|find|lookup|query|web|browse|google/i.test(e)?ms:xo}function NE({messages:e,status:t,welcomeMessage:a,welcome:n,onSuggestionSelect:r,resourceEndpoint:o,chatSessionId:l,isDark:i,onFollowUp:s,onCallTool:u,onWidgetDisplayModeChange:c,fullscreenToolCallId:d,debug:f,showToolCalls:p=!0,toolDefinitions:m}){let{t:x}=Ee(),b=e[e.length-1],y=e.length>0,w=d!=null,g=!w&&AE(e,t,{ignoreToolParts:p===!1,ignoreReasoningParts:p===!1});return(0,ge.jsxs)(ge.Fragment,{children:[!w&&(!y&&n?(0,ge.jsx)(_E,{...n,onSuggestionSelect:r}):a&&(0,ge.jsx)(pw,{from:"assistant",children:(0,ge.jsx)(mw,{children:(0,ge.jsx)(pf,{children:a})})})),e.map(v=>{let M=v.parts.filter(B=>B.type==="text"),C=v.parts.filter(B=>B.type==="reasoning"),A=v.parts.filter(B=>B.type==="file"),E=v.parts.filter(B=>"toolCallId"in B),_=v.parts.filter(B=>B.type==="reasoning"||"toolCallId"in B),k=v===b&&v.role==="assistant",W=M.length>0,U=w?E.some(B=>B.toolCallId===d):!1,R=p!==!1&&!U&&_.length>=2;return w&&!U?(0,ge.jsx)("div",{style:{display:"none"}},v.id):v.role==="assistant"&&!TE(v)?(0,ge.jsx)("div",{style:{display:"none"}},v.id):p===!1&&v.role==="assistant"&&!W&&A.length===0&&E.every(B=>{let F="output"in B?B.output:void 0;return F===void 0||!o||!tu(B.toolName,F,m)})?(0,ge.jsx)("div",{style:{display:"none"}},v.id):(0,ge.jsxs)(pw,{from:v.role,children:[p!==!1&&!U&&!R&&C.map((B,F)=>(0,ge.jsxs)(Ks,{isStreaming:B.state==="streaming",children:[(0,ge.jsx)(Ys,{}),(0,ge.jsx)(Js,{children:B.text})]},`reasoning-${v.id}-${F}`)),R&&(()=>{let B=_[_.length-1],F=B.type==="reasoning"?{icon:Wn,label:x.reasoning.thinking}:{icon:PE(B.toolName),label:B.title??xw(B.toolName)};return(0,ge.jsxs)(iE,{isWorking:k&&(t==="streaming"||t==="submitted"),activeStep:F,children:[(0,ge.jsx)(sE,{workingLabel:x.chainOfThought.working,label:x.chainOfThought.done}),(0,ge.jsx)(uE,{children:_.map((j,K)=>{let de=K===_.length-1;if(j.type==="reasoning")return(0,ge.jsx)(dE,{isStreaming:j.state==="streaming",isLast:de,children:j.text},`reasoning-${v.id}-${K}`);let He=j.title??xw(j.toolName),S=PE(j.toolName);if(p==="titles-only")return(0,ge.jsx)(dw,{icon:S,title:He,state:j.state,isLast:de},j.toolCallId);let Be="output"in j?j.output:void 0;return(0,ge.jsxs)(dw,{icon:S,title:He,state:j.state,isLast:de,children:[(0,ge.jsx)(yw,{input:j.input,debug:f}),Be!==void 0&&(0,ge.jsx)(ww,{output:Be,errorText:"errorText"in j?j.errorText:void 0,debug:f})]},j.toolCallId)})})]})})(),p!==!1&&!U&&!R&&E.length===1&&(()=>{let B=E[0],F=B.title??xw(B.toolName);if(p==="titles-only")return(0,ge.jsx)(bE,{title:F,state:B.state});let j="output"in B?B.output:void 0;return(0,ge.jsxs)(xE,{children:[(0,ge.jsx)(vE,{title:F,state:B.state}),(0,ge.jsxs)(SE,{children:[(0,ge.jsx)(yw,{input:B.input,debug:f}),j!==void 0&&(0,ge.jsx)(ww,{output:j,errorText:"errorText"in B?B.errorText:void 0,debug:f})]})]})})(),E.map(B=>{let F="output"in B?B.output:void 0,j=tu(B.toolName,F,m),K=LE(B.toolName,F,m),de=B.toolCallId===d;return j&&o&&F!==void 0?(0,ge.jsx)("div",{style:de?{position:"absolute",inset:0,zIndex:10,display:"flex",flexDirection:"column",overflow:"hidden",background:"var(--ww-color-background)"}:void 0,children:j&&o&&F!==void 0&&(0,ge.jsx)(mf,{children:(0,ge.jsx)(RE,{isFullscreen:de,resourceUri:j,toolInput:B.input??{},toolResult:{content:F.content,structuredContent:F.structuredContent,_meta:F._meta},resourceEndpoint:o,chatSessionId:l,isDark:i,autoHeight:K,toolDefinitions:m,onFollowUp:s,onCallTool:u,onDisplayModeChange:c?He=>c(He,{toolCallId:B.toolCallId,resourceUri:j,toolInput:B.input??{},toolResult:{content:F.content,structuredContent:F.structuredContent,_meta:F._meta},autoHeight:K}):void 0})})},B.toolCallId):null}),!U&&(0,ge.jsx)("div",{children:(0,ge.jsxs)(mw,{children:[A.length>0&&(0,ge.jsx)(CC,{files:A}),W?M.map((B,F)=>{let j=k&&t==="streaming"&&F===M.length-1;return(0,ge.jsx)(pf,{isStreaming:j,children:B.type==="text"?B.text:""},`${v.id}-${F}`)}):null]})})]},v.id)}),g&&(0,ge.jsx)(ME,{})]})}var nu=q(ee(),1),I5="https://app.waniwani.ai/assets/waniwani-logo.svg",L5="https://waniwani.ai";function BE(){let{t:e}=Ee();return(0,nu.jsxs)("a",{href:L5,target:"_blank",rel:"noopener noreferrer",className:"ww:flex ww:items-center ww:gap-1.5 ww:whitespace-nowrap ww:text-[10px] ww:sm:text-[11px] ww:text-muted-foreground ww:opacity-70 hover:ww:opacity-100 ww:transition-opacity",children:[(0,nu.jsx)("span",{children:e.poweredBy.label}),(0,nu.jsx)("img",{src:I5,alt:"Waniwani",width:72,height:10,"data-waniwani-logo":"",className:"ww:h-2.5 ww:w-auto"})]})}var Yl=q(Ae(),1);var Ne=q(ee(),1),UE=20;function k5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Ne.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function T5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),(0,Ne.jsx)("polyline",{points:"3 4 3 9 8 9"}),(0,Ne.jsx)("line",{x1:"12",y1:"7",x2:"12",y2:"12"}),(0,Ne.jsx)("line",{x1:"12",y1:"12",x2:"15",y2:"14"})]})}function A5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,Ne.jsx)("path",{d:"M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6"}),(0,Ne.jsx)("path",{d:"M10 11v6"}),(0,Ne.jsx)("path",{d:"M14 11v6"})]})}function zE({threads:e,activeThreadId:t,onNewThread:a,onSelectThread:n,onDeleteThread:r}){let{locale:o,t:l}=Ee(),[i,s]=(0,Yl.useState)(!1),u=(0,Yl.useRef)(null);(0,Yl.useEffect)(()=>{if(!i)return;let f=p=>{let m=u.current;m&&(p.composedPath().includes(m)||s(!1))};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[i]);let c=e.slice(0,UE),d=Math.max(0,e.length-UE);return(0,Ne.jsxs)("div",{ref:u,className:"ww:relative ww:flex ww:items-center ww:gap-1",children:[(0,Ne.jsx)("button",{type:"button",onClick:a,title:l.threadMenu.newChat,"aria-label":l.threadMenu.newChat,className:"ww:p-1.5 ww:rounded-md ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/5 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(k5,{label:l.threadMenu.newChat})}),(0,Ne.jsx)("button",{type:"button",onClick:()=>s(f=>!f),title:l.threadMenu.threadHistory,"aria-label":l.threadMenu.threadHistory,"aria-expanded":i,className:"ww:p-1.5 ww:rounded-md ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/5 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(T5,{label:l.threadMenu.threadHistory})}),i&&(0,Ne.jsxs)("div",{role:"menu",className:"ww:absolute ww:right-0 ww:top-full ww:mt-1 ww:w-72 ww:max-h-80 ww:overflow-y-auto ww:rounded-lg ww:border ww:border-border ww:bg-background ww:shadow-lg ww:z-50",children:[c.length===0&&(0,Ne.jsx)("div",{className:"ww:px-3 ww:py-3 ww:text-xs ww:text-muted-foreground",children:l.threadMenu.noPreviousChats}),c.map(f=>{let p=f.threadId===t,m=Date.parse(f.updatedAt);return(0,Ne.jsxs)("div",{className:`ww:flex ww:items-center ww:gap-2 ww:px-3 ww:py-2 ww:text-xs hover:ww:bg-foreground/5 ${p?"ww:bg-foreground/5":""}`,children:[(0,Ne.jsxs)("button",{type:"button",onClick:()=>{n(f.threadId),s(!1)},className:"ww:flex-1 ww:min-w-0 ww:text-left ww:cursor-pointer",children:[(0,Ne.jsx)("div",{className:"ww:truncate ww:text-foreground ww:font-medium",children:f.title}),(0,Ne.jsx)("div",{className:"ww:text-[10px] ww:text-muted-foreground",children:Number.isNaN(m)?"":Bh(m,o)})]}),(0,Ne.jsx)("button",{type:"button",onClick:x=>{x.stopPropagation(),r(f.threadId)},title:l.threadMenu.deleteThread,"aria-label":l.threadMenu.deleteThread,className:"ww:p-1 ww:rounded ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/10 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(A5,{label:l.threadMenu.deleteThread})})]},f.threadId)}),d>0&&(0,Ne.jsx)("div",{className:"ww:px-3 ww:py-2 ww:text-[10px] ww:text-muted-foreground ww:border-t ww:border-border",children:l.threadMenu.hiddenThreads(d)})]})]})}var hf=q(Ae(),1);function qE(e){let t=(0,hf.useRef)(e);return t.current=e,(0,hf.useCallback)(async a=>{let{api:n,headers:r,onCallTool:o,sessionId:l}=t.current;if(o)return o(a);let i=`${n??"/api/waniwani"}/tool`,s=typeof l=="string"&&l.trim().length>0?l.trim():void 0,u=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",...s?{"X-Session-Id":s}:{},...r},body:JSON.stringify(a)});if(!u.ok)throw new Error(`Tool call failed: ${u.status} ${u.statusText}`);return u.json()},[])}var Ka=q(Ae(),1);var h2="vercel.ai.error",M5=Symbol.for(h2),FE,HE,Te=class g2 extends(HE=Error,FE=M5,HE){constructor({name:t,message:a,cause:n}){super(a),this[FE]=!0,this.name=t,this.cause=n}static isInstance(t){return g2.hasMarker(t,h2)}static hasMarker(t,a){let n=Symbol.for(a);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}},y2="AI_APICallError",w2=`vercel.ai.error.${y2}`,E5=Symbol.for(w2),jE,VE,_te=class extends(VE=Te,jE=E5,VE){constructor({message:e,url:t,requestBodyValues:a,statusCode:n,responseHeaders:r,responseBody:o,cause:l,isRetryable:i=n!=null&&(n===408||n===409||n===429||n>=500),data:s}){super({name:y2,message:e,cause:l}),this[jE]=!0,this.url=t,this.requestBodyValues=a,this.statusCode=n,this.responseHeaders=r,this.responseBody=o,this.isRetryable=i,this.data=s}static isInstance(e){return Te.hasMarker(e,w2)}},x2="AI_EmptyResponseBodyError",v2=`vercel.ai.error.${x2}`,R5=Symbol.for(v2),GE,$E,Ote=class extends($E=Te,GE=R5,$E){constructor({message:e="Empty response body"}={}){super({name:x2,message:e}),this[GE]=!0}static isInstance(e){return Te.hasMarker(e,v2)}};function b2(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var S2="AI_InvalidArgumentError",C2=`vercel.ai.error.${S2}`,D5=Symbol.for(C2),WE,XE,I2=class extends(XE=Te,WE=D5,XE){constructor({message:e,cause:t,argument:a}){super({name:S2,message:e,cause:t}),this[WE]=!0,this.argument=a}static isInstance(e){return Te.hasMarker(e,C2)}},L2="AI_InvalidPromptError",k2=`vercel.ai.error.${L2}`,_5=Symbol.for(k2),ZE,QE,Pte=class extends(QE=Te,ZE=_5,QE){constructor({prompt:e,message:t,cause:a}){super({name:L2,message:`Invalid prompt: ${t}`,cause:a}),this[ZE]=!0,this.prompt=e}static isInstance(e){return Te.hasMarker(e,k2)}},T2="AI_InvalidResponseDataError",A2=`vercel.ai.error.${T2}`,O5=Symbol.for(A2),KE,YE,Nte=class extends(YE=Te,KE=O5,YE){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:T2,message:t}),this[KE]=!0,this.data=e}static isInstance(e){return Te.hasMarker(e,A2)}},M2="AI_JSONParseError",E2=`vercel.ai.error.${M2}`,P5=Symbol.for(E2),JE,e2,bw=class extends(e2=Te,JE=P5,e2){constructor({text:e,cause:t}){super({name:M2,message:`JSON parsing failed: Text: ${e}.
|
|
124
|
-
Error message: ${
|
|
125
|
-
Error message: ${
|
|
126
|
-
`;break;case"id":i=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?n(parseInt(b,10)):a(new
|
|
127
|
-
`)?s.slice(0,-1):s}),i=void 0,s="",u=""}function m(x={}){o&&x.consume&&d(o),l=!0,i=void 0,s="",u="",o=""}return{feed:c,reset:m}}function
|
|
123
|
+
${Le}`}]}}W.current({...Ie,...Ue?{modelContext:Ue}:{}})}be({jsonrpc:"2.0",id:_e,result:{}});return}if(Se==="ui/update-model-context"&&_e!=null){k=nR(k,he.params),be({jsonrpc:"2.0",id:_e,result:{}});return}if(Se==="tools/call"&&_e!=null){let Ie=U.current;if(!Ie){be({jsonrpc:"2.0",id:_e,error:{code:-32601,message:"tools/call not supported"}});return}let Ue=he.params?.name;Ie({name:Ue,arguments:he.params?.arguments??{}}).then(Le=>{be({jsonrpc:"2.0",id:_e,result:Le});let $=Le.content?.map(oe=>oe.text??"").join("").trim();$&&T5(Ue,Le,q.current)&&(De&&clearTimeout(De.timer),De={text:$,timer:setTimeout(()=>{if(Be)return;let oe=k;k=null,De=null,W.current?.({role:"user",content:[{type:"text",text:$}],...oe?{modelContext:oe}:{}})},500)})}).catch(Le=>{let $=Le instanceof Error?Le.message:"Tool call failed";be({jsonrpc:"2.0",id:_e,error:{code:-32e3,message:$}})});return}if(Se==="ui/request-display-mode"&&_e!=null){let Ie=he.params?.mode,Ue=Ie==="fullscreen"||Ie==="inline"||Ie==="pip"?Ie:"inline";M.current=Ue,be({jsonrpc:"2.0",id:_e,result:{mode:Ue}}),be({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:{displayMode:Ue}}),R.current?.(Ue);return}if(Se==="ui/resource-teardown"&&_e!=null){be({jsonrpc:"2.0",id:_e,result:{}});return}Se==="ping"&&_e!=null&&be({jsonrpc:"2.0",id:_e,result:{}})};return window.addEventListener("message",Tt),()=>{Be=!0,clearTimeout(ie),De&&clearTimeout(De.timer),window.removeEventListener("message",Tt)}},[i,j]),(0,oR.jsx)("iframe",{ref:m,src:Y,sandbox:"allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox",className:V(!f&&"ww:rounded-md ww:border ww:border-border",l),style:{height:f?"100%":I,minWidth:f||!E?void 0:`min(${E}px, 100%)`,width:"100%",border:"none",colorScheme:o?"dark":"auto"},title:"MCP App"})}var Wr=z(te(),1);function lR({icon:e,title:t,description:a,suggestions:n,onSuggestionSelect:r}){return(0,Wr.jsxs)("div",{className:"ww:flex ww:flex-col ww:items-center ww:justify-center ww:py-12 ww:px-6 ww:text-center ww:min-h-full",children:[e&&(0,Wr.jsx)("div",{className:"ww:mb-4 ww:flex ww:items-center ww:justify-center ww:size-12 ww:rounded-xl ww:bg-foreground ww:text-background",children:e}),(0,Wr.jsx)("h2",{className:"ww:text-lg ww:font-semibold ww:text-foreground",children:t}),a&&(0,Wr.jsx)("p",{className:"ww:mt-1 ww:text-sm ww:text-muted-foreground ww:max-w-sm",children:a}),n&&n.length>0&&(0,Wr.jsx)("div",{className:"ww:mt-6 ww:w-full ww:max-w-md ww:flex ww:flex-col ww:gap-2",children:n.map((o,l)=>(0,Wr.jsx)("button",{type:"button",onClick:()=>r?.(o),className:V("ww:w-full ww:text-left ww:rounded-xl ww:border ww:border-border ww:bg-background ww:px-4 ww:py-3 ww:text-sm","ww:text-foreground ww:hover:bg-accent ww:hover:border-primary/30","ww:transition-all ww:duration-200 ww:ease-out ww:cursor-pointer","ww:animate-[ww-fade-in_0.2s_ease-out_both]"),style:{animationDelay:`${l*50}ms`},children:o},o))})]})}var iR=z(Me(),1);var ei=z(te(),1);function A5({onRetry:e}){let{t}=Re();return(0,ei.jsxs)("div",{className:"ww:flex ww:items-center ww:justify-between ww:rounded-md ww:border ww:border-border ww:bg-muted/50 ww:px-4 ww:py-3 ww:text-sm ww:text-muted-foreground",children:[(0,ei.jsx)("span",{children:t.widgetErrorBoundary.failedToLoad}),(0,ei.jsx)("button",{type:"button",onClick:e,className:"ww:text-xs ww:font-medium ww:text-primary ww:hover:underline",children:t.widgetErrorBoundary.retry})]})}var xf=class extends iR.Component{constructor(){super(...arguments);Z(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){console.warn("[Waniwani] Widget failed to render:",a.message)}render(){return this.state.hasError?(0,ei.jsx)(A5,{onRetry:()=>this.setState({hasError:!1})}):this.props.children}};var ye=z(te(),1);function Dw(e){return e?e.replace(/[-_]/g," ").replace(/^\w/,t=>t.toUpperCase()):"Tool"}function sR(e){return e&&/search|find|lookup|query|web|browse|google/i.test(e)?ws:bo}function uR({messages:e,status:t,welcomeMessage:a,welcome:n,onSuggestionSelect:r,resourceEndpoint:o,chatSessionId:l,isDark:i,onFollowUp:s,onCallTool:u,onWidgetDisplayModeChange:c,fullscreenToolCallId:d,debug:f,showToolCalls:p=!0,toolDefinitions:m}){let{t:x}=Re(),b=e[e.length-1],y=e.length>0,w=d!=null,g=!w&&tR(e,t,{ignoreToolParts:p===!1,ignoreReasoningParts:p===!1});return(0,ye.jsxs)(ye.Fragment,{children:[!w&&(!y&&n?(0,ye.jsx)(lR,{...n,onSuggestionSelect:r}):a&&(0,ye.jsx)(Lw,{from:"assistant",children:(0,ye.jsx)(Tw,{children:(0,ye.jsx)(wf,{children:a})})})),e.map(v=>{let M=v.parts.filter(B=>B.type==="text"),I=v.parts.filter(B=>B.type==="reasoning"),A=v.parts.filter(B=>B.type==="file"),E=v.parts.filter(B=>"toolCallId"in B),_=v.parts.filter(B=>B.type==="reasoning"||"toolCallId"in B),L=v===b&&v.role==="assistant",W=M.length>0,U=w?E.some(B=>B.toolCallId===d):!1,R=p!==!1&&!U&&_.length>=2;return w&&!U?(0,ye.jsx)("div",{style:{display:"none"}},v.id):v.role==="assistant"&&!eR(v)?(0,ye.jsx)("div",{style:{display:"none"}},v.id):p===!1&&v.role==="assistant"&&!W&&A.length===0&&E.every(B=>{let q="output"in B?B.output:void 0;return q===void 0||!o||!ou(B.toolName,q,m)})?(0,ye.jsx)("div",{style:{display:"none"}},v.id):(0,ye.jsxs)(Lw,{from:v.role,children:[p!==!1&&!U&&!R&&I.map((B,q)=>(0,ye.jsxs)(tu,{isStreaming:B.state==="streaming",children:[(0,ye.jsx)(au,{}),(0,ye.jsx)(nu,{children:B.text})]},`reasoning-${v.id}-${q}`)),R&&(()=>{let B=_[_.length-1],q=B.type==="reasoning"?{icon:Xn,label:x.reasoning.thinking}:{icon:sR(B.toolName),label:B.title??Dw(B.toolName)};return(0,ye.jsxs)(OE,{isWorking:L&&(t==="streaming"||t==="submitted"),activeStep:q,children:[(0,ye.jsx)(PE,{workingLabel:x.chainOfThought.working,label:x.chainOfThought.done}),(0,ye.jsx)(NE,{children:_.map((j,Y)=>{let fe=Y===_.length-1;if(j.type==="reasoning")return(0,ye.jsx)(UE,{isStreaming:j.state==="streaming",isLast:fe,children:j.text},`reasoning-${v.id}-${Y}`);let He=j.title??Dw(j.toolName),S=sR(j.toolName);if(p==="titles-only")return(0,ye.jsx)(Cw,{icon:S,title:He,state:j.state,isLast:fe},j.toolCallId);let Be="output"in j?j.output:void 0;return(0,ye.jsxs)(Cw,{icon:S,title:He,state:j.state,isLast:fe,children:[(0,ye.jsx)(Ew,{input:j.input,debug:f}),Be!==void 0&&(0,ye.jsx)(Rw,{output:Be,errorText:"errorText"in j?j.errorText:void 0,debug:f})]},j.toolCallId)})})]})})(),p!==!1&&!U&&!R&&E.length===1&&(()=>{let B=E[0],q=B.title??Dw(B.toolName);if(p==="titles-only")return(0,ye.jsx)(XE,{title:q,state:B.state});let j="output"in B?B.output:void 0;return(0,ye.jsxs)($E,{children:[(0,ye.jsx)(WE,{title:q,state:B.state}),(0,ye.jsxs)(KE,{children:[(0,ye.jsx)(Ew,{input:B.input,debug:f}),j!==void 0&&(0,ye.jsx)(Rw,{output:j,errorText:"errorText"in B?B.errorText:void 0,debug:f})]})]})})(),E.map(B=>{let q="output"in B?B.output:void 0,j=ou(B.toolName,q,m),Y=YE(B.toolName,q,m),fe=B.toolCallId===d;return j&&o&&q!==void 0?(0,ye.jsx)("div",{style:fe?{position:"absolute",inset:0,zIndex:10,display:"flex",flexDirection:"column",overflow:"hidden",background:"var(--ww-color-background)"}:void 0,children:j&&o&&q!==void 0&&(0,ye.jsx)(xf,{children:(0,ye.jsx)(rR,{isFullscreen:fe,resourceUri:j,toolInput:B.input??{},toolResult:{content:q.content,structuredContent:q.structuredContent,_meta:q._meta},resourceEndpoint:o,chatSessionId:l,isDark:i,autoHeight:Y,toolDefinitions:m,onFollowUp:s,onCallTool:u,onDisplayModeChange:c?He=>c(He,{toolCallId:B.toolCallId,resourceUri:j,toolInput:B.input??{},toolResult:{content:q.content,structuredContent:q.structuredContent,_meta:q._meta},autoHeight:Y}):void 0})})},B.toolCallId):null}),!U&&(0,ye.jsx)("div",{children:(0,ye.jsxs)(Tw,{children:[A.length>0&&(0,ye.jsx)(ZI,{files:A}),W?M.map((B,q)=>{let j=L&&t==="streaming"&&q===M.length-1;return(0,ye.jsx)(wf,{isStreaming:j,children:B.type==="text"?B.text:""},`${v.id}-${q}`)}):null]})})]},v.id)}),g&&(0,ye.jsx)(aR,{})]})}var iu=z(te(),1),M5="https://app.waniwani.ai/assets/waniwani-logo.svg",E5="https://waniwani.ai";function cR(){let{t:e}=Re();return(0,iu.jsxs)("a",{href:E5,target:"_blank",rel:"noopener noreferrer",className:"ww:flex ww:items-center ww:gap-1.5 ww:whitespace-nowrap ww:text-[10px] ww:sm:text-[11px] ww:text-muted-foreground ww:opacity-70 hover:ww:opacity-100 ww:transition-opacity",children:[(0,iu.jsx)("span",{children:e.poweredBy.label}),(0,iu.jsx)("img",{src:M5,alt:"Waniwani",width:72,height:10,"data-waniwani-logo":"",className:"ww:h-2.5 ww:w-auto"})]})}var ti=z(Me(),1);var Ne=z(te(),1),dR=20;function R5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Ne.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function D5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),(0,Ne.jsx)("polyline",{points:"3 4 3 9 8 9"}),(0,Ne.jsx)("line",{x1:"12",y1:"7",x2:"12",y2:"12"}),(0,Ne.jsx)("line",{x1:"12",y1:"12",x2:"15",y2:"14"})]})}function _5({label:e}){return(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":e,children:[(0,Ne.jsx)("title",{children:e}),(0,Ne.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,Ne.jsx)("path",{d:"M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6"}),(0,Ne.jsx)("path",{d:"M10 11v6"}),(0,Ne.jsx)("path",{d:"M14 11v6"})]})}function fR({threads:e,activeThreadId:t,onNewThread:a,onSelectThread:n,onDeleteThread:r}){let{locale:o,t:l}=Re(),[i,s]=(0,ti.useState)(!1),u=(0,ti.useRef)(null);(0,ti.useEffect)(()=>{if(!i)return;let f=p=>{let m=u.current;m&&(p.composedPath().includes(m)||s(!1))};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[i]);let c=e.slice(0,dR),d=Math.max(0,e.length-dR);return(0,Ne.jsxs)("div",{ref:u,className:"ww:relative ww:flex ww:items-center ww:gap-1",children:[(0,Ne.jsx)("button",{type:"button",onClick:a,title:l.threadMenu.newChat,"aria-label":l.threadMenu.newChat,className:"ww:p-1.5 ww:rounded-md ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/5 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(R5,{label:l.threadMenu.newChat})}),(0,Ne.jsx)("button",{type:"button",onClick:()=>s(f=>!f),title:l.threadMenu.threadHistory,"aria-label":l.threadMenu.threadHistory,"aria-expanded":i,className:"ww:p-1.5 ww:rounded-md ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/5 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(D5,{label:l.threadMenu.threadHistory})}),i&&(0,Ne.jsxs)("div",{role:"menu",className:"ww:absolute ww:right-0 ww:top-full ww:mt-1 ww:w-72 ww:max-h-80 ww:overflow-y-auto ww:rounded-lg ww:border ww:border-border ww:bg-background ww:shadow-lg ww:z-50",children:[c.length===0&&(0,Ne.jsx)("div",{className:"ww:px-3 ww:py-3 ww:text-xs ww:text-muted-foreground",children:l.threadMenu.noPreviousChats}),c.map(f=>{let p=f.threadId===t,m=Date.parse(f.updatedAt);return(0,Ne.jsxs)("div",{className:`ww:flex ww:items-center ww:gap-2 ww:px-3 ww:py-2 ww:text-xs hover:ww:bg-foreground/5 ${p?"ww:bg-foreground/5":""}`,children:[(0,Ne.jsxs)("button",{type:"button",onClick:()=>{n(f.threadId),s(!1)},className:"ww:flex-1 ww:min-w-0 ww:text-left ww:cursor-pointer",children:[(0,Ne.jsx)("div",{className:"ww:truncate ww:text-foreground ww:font-medium",children:f.title}),(0,Ne.jsx)("div",{className:"ww:text-[10px] ww:text-muted-foreground",children:Number.isNaN(m)?"":Zh(m,o)})]}),(0,Ne.jsx)("button",{type:"button",onClick:x=>{x.stopPropagation(),r(f.threadId)},title:l.threadMenu.deleteThread,"aria-label":l.threadMenu.deleteThread,className:"ww:p-1 ww:rounded ww:text-muted-foreground hover:ww:text-foreground hover:ww:bg-foreground/10 ww:transition-colors ww:cursor-pointer",children:(0,Ne.jsx)(_5,{label:l.threadMenu.deleteThread})})]},f.threadId)}),d>0&&(0,Ne.jsx)("div",{className:"ww:px-3 ww:py-2 ww:text-[10px] ww:text-muted-foreground ww:border-t ww:border-border",children:l.threadMenu.hiddenThreads(d)})]})]})}var vf=z(Me(),1);function pR(e){let t=(0,vf.useRef)(e);return t.current=e,(0,vf.useCallback)(async a=>{let{api:n,headers:r,onCallTool:o,sessionId:l}=t.current;if(o)return o(a);let i=`${n??"/api/waniwani"}/tool`,s=typeof l=="string"&&l.trim().length>0?l.trim():void 0,u=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",...s?{"X-Session-Id":s}:{},...r},body:JSON.stringify(a)});if(!u.ok)throw new Error(`Tool call failed: ${u.status} ${u.statusText}`);return u.json()},[])}var Ya=z(Me(),1);var HR="vercel.ai.error",O5=Symbol.for(HR),mR,hR,Ae=class jR extends(hR=Error,mR=O5,hR){constructor({name:t,message:a,cause:n}){super(a),this[mR]=!0,this.name=t,this.cause=n}static isInstance(t){return jR.hasMarker(t,HR)}static hasMarker(t,a){let n=Symbol.for(a);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}},VR="AI_APICallError",GR=`vercel.ai.error.${VR}`,P5=Symbol.for(GR),gR,yR,Hae=class extends(yR=Ae,gR=P5,yR){constructor({message:e,url:t,requestBodyValues:a,statusCode:n,responseHeaders:r,responseBody:o,cause:l,isRetryable:i=n!=null&&(n===408||n===409||n===429||n>=500),data:s}){super({name:VR,message:e,cause:l}),this[gR]=!0,this.url=t,this.requestBodyValues=a,this.statusCode=n,this.responseHeaders=r,this.responseBody=o,this.isRetryable=i,this.data=s}static isInstance(e){return Ae.hasMarker(e,GR)}},$R="AI_EmptyResponseBodyError",WR=`vercel.ai.error.${$R}`,N5=Symbol.for(WR),wR,xR,jae=class extends(xR=Ae,wR=N5,xR){constructor({message:e="Empty response body"}={}){super({name:$R,message:e}),this[wR]=!0}static isInstance(e){return Ae.hasMarker(e,WR)}};function XR(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var KR="AI_InvalidArgumentError",ZR=`vercel.ai.error.${KR}`,B5=Symbol.for(ZR),vR,bR,QR=class extends(bR=Ae,vR=B5,bR){constructor({message:e,cause:t,argument:a}){super({name:KR,message:e,cause:t}),this[vR]=!0,this.argument=a}static isInstance(e){return Ae.hasMarker(e,ZR)}},YR="AI_InvalidPromptError",JR=`vercel.ai.error.${YR}`,U5=Symbol.for(JR),SR,IR,Vae=class extends(IR=Ae,SR=U5,IR){constructor({prompt:e,message:t,cause:a}){super({name:YR,message:`Invalid prompt: ${t}`,cause:a}),this[SR]=!0,this.prompt=e}static isInstance(e){return Ae.hasMarker(e,JR)}},e2="AI_InvalidResponseDataError",t2=`vercel.ai.error.${e2}`,F5=Symbol.for(t2),CR,kR,Gae=class extends(kR=Ae,CR=F5,kR){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:e2,message:t}),this[CR]=!0,this.data=e}static isInstance(e){return Ae.hasMarker(e,t2)}},a2="AI_JSONParseError",n2=`vercel.ai.error.${a2}`,z5=Symbol.for(n2),LR,TR,Ow=class extends(TR=Ae,LR=z5,TR){constructor({text:e,cause:t}){super({name:a2,message:`JSON parsing failed: Text: ${e}.
|
|
124
|
+
Error message: ${XR(t)}`,cause:t}),this[LR]=!0,this.text=e}static isInstance(e){return Ae.hasMarker(e,n2)}},r2="AI_LoadAPIKeyError",o2=`vercel.ai.error.${r2}`,q5=Symbol.for(o2),AR,MR,$ae=class extends(MR=Ae,AR=q5,MR){constructor({message:e}){super({name:r2,message:e}),this[AR]=!0}static isInstance(e){return Ae.hasMarker(e,o2)}},l2="AI_LoadSettingError",i2=`vercel.ai.error.${l2}`,H5=Symbol.for(i2),ER,RR,Wae=class extends(RR=Ae,ER=H5,RR){constructor({message:e}){super({name:l2,message:e}),this[ER]=!0}static isInstance(e){return Ae.hasMarker(e,i2)}},s2="AI_NoContentGeneratedError",u2=`vercel.ai.error.${s2}`,j5=Symbol.for(u2),DR,_R,Xae=class extends(_R=Ae,DR=j5,_R){constructor({message:e="No content generated."}={}){super({name:s2,message:e}),this[DR]=!0}static isInstance(e){return Ae.hasMarker(e,u2)}},c2="AI_NoSuchModelError",d2=`vercel.ai.error.${c2}`,V5=Symbol.for(d2),OR,PR,Kae=class extends(PR=Ae,OR=V5,PR){constructor({errorName:e=c2,modelId:t,modelType:a,message:n=`No such ${a}: ${t}`}){super({name:e,message:n}),this[OR]=!0,this.modelId=t,this.modelType=a}static isInstance(e){return Ae.hasMarker(e,d2)}},f2="AI_TooManyEmbeddingValuesForCallError",p2=`vercel.ai.error.${f2}`,G5=Symbol.for(p2),NR,BR,Zae=class extends(BR=Ae,NR=G5,BR){constructor(e){super({name:f2,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[NR]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return Ae.hasMarker(e,p2)}},m2="AI_TypeValidationError",h2=`vercel.ai.error.${m2}`,$5=Symbol.for(h2),UR,FR,Sn=class _w extends(FR=Ae,UR=$5,FR){constructor({value:t,cause:a,context:n}){let r="Type validation failed";if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=" (";let o=[];n.entityName&&o.push(n.entityName),n.entityId&&o.push(`id: "${n.entityId}"`),r+=o.join(", "),r+=")"}super({name:m2,message:`${r}: Value: ${JSON.stringify(t)}.
|
|
125
|
+
Error message: ${XR(a)}`,cause:a}),this[UR]=!0,this.value=t,this.context=n}static isInstance(t){return Ae.hasMarker(t,h2)}static wrap({value:t,cause:a,context:n}){var r,o,l;return _w.isInstance(a)&&a.value===t&&((r=a.context)==null?void 0:r.field)===n?.field&&((o=a.context)==null?void 0:o.entityName)===n?.entityName&&((l=a.context)==null?void 0:l.entityId)===n?.entityId?a:new _w({value:t,cause:a,context:n})}},g2="AI_UnsupportedFunctionalityError",y2=`vercel.ai.error.${g2}`,W5=Symbol.for(y2),zR,qR,Qae=class extends(qR=Ae,zR=W5,qR){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:g2,message:t}),this[zR]=!0,this.functionality=e}static isInstance(e){return Ae.hasMarker(e,y2)}};var bf=()=>Nw,Nw=new Proxy(bf,{get(e,t){return t==="parse"||t==="parseAsync"?a=>a:t==="safeParse"||t==="safeParseAsync"?a=>({success:!0,data:a}):t==="_def"?{}:t==="jsonSchema"?{}:bf},apply(){return Nw}}),Pw=class extends Error{constructor(){super(...arguments);Z(this,"issues",[])}},h=new Proxy(bf,{get(e,t){return t==="ZodError"?Pw:t==="NEVER"?Symbol("NEVER"):bf},apply(){return Nw}});var se={};var Sf=class extends Error{constructor(t,a){super(t),this.name="ParseError",this.type=a.type,this.field=a.field,this.value=a.value,this.line=a.line}};function Bw(e){}function w2(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=Bw,onError:a=Bw,onRetry:n=Bw,onComment:r}=e,o="",l=!0,i,s="",u="";function c(x){let b=l?x.replace(/^\xEF\xBB\xBF/,""):x,[y,w]=X5(`${o}${b}`);for(let g of y)d(g);o=w,l=!1}function d(x){if(x===""){p();return}if(x.startsWith(":")){r&&r(x.slice(x.startsWith(": ")?2:1));return}let b=x.indexOf(":");if(b!==-1){let y=x.slice(0,b),w=x[b+1]===" "?2:1,g=x.slice(b+w);f(y,g,x);return}f(x,"",x)}function f(x,b,y){switch(x){case"event":u=b;break;case"data":s=`${s}${b}
|
|
126
|
+
`;break;case"id":i=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?n(parseInt(b,10)):a(new Sf(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:y}));break;default:a(new Sf(`Unknown field "${x.length>20?`${x.slice(0,20)}\u2026`:x}"`,{type:"unknown-field",field:x,value:b,line:y}));break}}function p(){s.length>0&&t({id:i,event:u||void 0,data:s.endsWith(`
|
|
127
|
+
`)?s.slice(0,-1):s}),i=void 0,s="",u=""}function m(x={}){o&&x.consume&&d(o),l=!0,i=void 0,s="",u="",o=""}return{feed:c,reset:m}}function X5(e){let t=[],a="",n=0;for(;n<e.length;){let r=e.indexOf("\r",n),o=e.indexOf(`
|
|
128
128
|
`,n),l=-1;if(r!==-1&&o!==-1?l=Math.min(r,o):r!==-1?r===e.length-1?l=-1:l=r:o!==-1&&(l=o),l===-1){a=e.slice(n);break}else{let i=e.slice(n,l);t.push(i),n=l+1,e[n-1]==="\r"&&e[n]===`
|
|
129
|
-
`&&n++}}return[t,a]}var wf=class extends TransformStream{constructor({onError:t,onRetry:a,onComment:n}={}){let r;super({start(o){r=G2({onEvent:l=>{o.enqueue(l)},onError(l){t==="terminate"?o.error(l):typeof t=="function"&&t(l)},onRetry:a,onComment:n})},transform(o){r.feed(o)}})}};var{btoa:lae,atob:iae}=globalThis;var K2="AI_DownloadError",Y2=`vercel.ai.error.${K2}`,V5=Symbol.for(Y2),$2,W2,Za=class extends(W2=Te,$2=V5,W2){constructor({url:e,statusCode:t,statusText:a,cause:n,message:r=n==null?`Failed to download ${e}: ${t} ${a}`:`Failed to download ${e}: ${n}`}){super({name:K2,message:r,cause:n}),this[$2]=!0,this.url=e,this.statusCode=t,this.statusText=a}static isInstance(e){return Te.hasMarker(e,Y2)}},Ew=2*1024*1024*1024;async function J2({response:e,url:t,maxBytes:a=Ew}){let n=e.headers.get("content-length");if(n!=null){let c=parseInt(n,10);if(!isNaN(c)&&c>a)throw new Za({url:t,message:`Download of ${t} exceeded maximum size of ${a} bytes (Content-Length: ${c}).`})}let r=e.body;if(r==null)return new Uint8Array(0);let o=r.getReader(),l=[],i=0;try{for(;;){let{done:c,value:d}=await o.read();if(c)break;if(i+=d.length,i>a)throw new Za({url:t,message:`Download of ${t} exceeded maximum size of ${a} bytes.`});l.push(d)}}finally{try{await o.cancel()}finally{o.releaseLock()}}let s=new Uint8Array(i),u=0;for(let c of l)s.set(c,u),u+=c.length;return s}function Rw(e){let t;try{t=new URL(e)}catch{throw new Za({url:e,message:`Invalid URL: ${e}`})}if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Za({url:e,message:`URL scheme must be http or https, got ${t.protocol}`});let a=t.hostname;if(!a)throw new Za({url:e,message:"URL must have a hostname"});if(a==="localhost"||a.endsWith(".local")||a.endsWith(".localhost"))throw new Za({url:e,message:`URL with hostname ${a} is not allowed`});if(a.startsWith("[")&&a.endsWith("]")){let n=a.slice(1,-1);if(G5(n))throw new Za({url:e,message:`URL with IPv6 address ${a} is not allowed`});return}if(eR(a)){if(Tw(a))throw new Za({url:e,message:`URL with IP address ${a} is not allowed`});return}}function eR(e){let t=e.split(".");return t.length!==4?!1:t.every(a=>{let n=Number(a);return Number.isInteger(n)&&n>=0&&n<=255&&String(n)===a})}function Tw(e){let t=e.split(".").map(Number),[a,n]=t;return a===0||a===10||a===127||a===169&&n===254||a===172&&n>=16&&n<=31||a===192&&n===168}function G5(e){let t=e.toLowerCase();if(t==="::1"||t==="::")return!0;if(t.startsWith("::ffff:")){let a=t.slice(7);if(eR(a))return Tw(a);let n=a.split(":");if(n.length===2){let r=parseInt(n[0],16),o=parseInt(n[1],16);if(!isNaN(r)&&!isNaN(o)){let l=r>>8&255,i=r&255,s=o>>8&255,u=o&255;return Tw(`${l}.${i}.${s}.${u}`)}}}return!!(t.startsWith("fc")||t.startsWith("fd")||t.startsWith("fe80"))}var nr=({prefix:e,size:t=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{let r=()=>{let o=a.length,l=new Array(t);for(let i=0;i<t;i++)l[i]=a[Math.random()*o|0];return l.join("")};if(e==null)return r;if(a.includes(n))throw new I2({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${a}".`});return()=>`${e}${n}${r()}`},tR=nr();function aR(e=globalThis){var t,a,n;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(n=(a=e.process)==null?void 0:a.versions)!=null&&n.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Wr(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((a,n)=>{t[n.toLowerCase()]=a});else{Array.isArray(e)||(e=Object.entries(e));for(let[a,n]of e)n!=null&&(t[a.toLowerCase()]=n)}return t}function xf(e,...t){let a=new Headers(Wr(e)),n=a.get("user-agent")||"";return a.set("user-agent",[n,...t].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var $5=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,W5=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function X2(e){let t=JSON.parse(e);return t===null||typeof t!="object"||$5.test(e)===!1&&W5.test(e)===!1?t:X5(t)}function X5(e){let t=[e];for(;t.length;){let a=t;t=[];for(let n of a){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor!==null&&typeof n.constructor=="object"&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let r in n){let o=n[r];o&&typeof o=="object"&&t.push(o)}}}return e}function Z5(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return X2(e)}try{return X2(e)}finally{Error.stackTraceLimit=t}}function Dw(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;let{properties:a}=e;if(a!=null)for(let n of Object.keys(a))a[n]=zo(a[n])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(zo):zo(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(zo)),e.allOf!=null&&(e.allOf=e.allOf.map(zo)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(zo));let{definitions:t}=e;if(t!=null)for(let a of Object.keys(t))t[a]=zo(t[a]);return e}function zo(e){return typeof e=="boolean"?e:Dw(e)}var Q5=Symbol("Let zodToJsonSchema decide on which parser to use"),Z2={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},K5=e=>typeof e=="string"?{...Z2,name:e}:{...Z2,...e};function Da(){return{}}function Y5(e,t){var a,n,r;let o={type:"array"};return(a=e.type)!=null&&a._def&&((r=(n=e.type)==null?void 0:n._def)==null?void 0:r.typeName)!==ie.ZodAny&&(o.items=We(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(o.minItems=e.minLength.value),e.maxLength&&(o.maxItems=e.maxLength.value),e.exactLength&&(o.minItems=e.exactLength.value,o.maxItems=e.exactLength.value),o}function J5(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let a of e.checks)switch(a.kind){case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function eF(){return{type:"boolean"}}function nR(e,t){return We(e.type._def,t)}var tF=(e,t)=>We(e.innerType._def,t);function rR(e,t,a){let n=a??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,o)=>rR(e,t,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return aF(e)}}var aF=e=>{let t={type:"integer",format:"unix-time"};for(let a of e.checks)switch(a.kind){case"min":t.minimum=a.value;break;case"max":t.maximum=a.value;break}return t};function nF(e,t){return{...We(e.innerType._def,t),default:e.defaultValue()}}function rF(e,t){return t.effectStrategy==="input"?We(e.schema._def,t):Da()}function oF(e){return{type:"string",enum:Array.from(e.values)}}var lF=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function iF(e,t){let a=[We(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),We(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(r=>!!r),n=[];return a.forEach(r=>{if(lF(r))n.push(...r.allOf);else{let o=r;if("additionalProperties"in r&&r.additionalProperties===!1){let{additionalProperties:l,...i}=r;o=i}n.push(o)}}),n.length?{allOf:n}:void 0}function sF(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Lw=void 0,sn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Lw===void 0&&(Lw=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Lw),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function oR(e,t){let a={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":un(a,"email",n.message,t);break;case"format:idn-email":un(a,"idn-email",n.message,t);break;case"pattern:zod":oa(a,sn.email,n.message,t);break}break;case"url":un(a,"uri",n.message,t);break;case"uuid":un(a,"uuid",n.message,t);break;case"regex":oa(a,n.regex,n.message,t);break;case"cuid":oa(a,sn.cuid,n.message,t);break;case"cuid2":oa(a,sn.cuid2,n.message,t);break;case"startsWith":oa(a,RegExp(`^${kw(n.value,t)}`),n.message,t);break;case"endsWith":oa(a,RegExp(`${kw(n.value,t)}$`),n.message,t);break;case"datetime":un(a,"date-time",n.message,t);break;case"date":un(a,"date",n.message,t);break;case"time":un(a,"time",n.message,t);break;case"duration":un(a,"duration",n.message,t);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value;break;case"includes":{oa(a,RegExp(kw(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&un(a,"ipv4",n.message,t),n.version!=="v4"&&un(a,"ipv6",n.message,t);break}case"base64url":oa(a,sn.base64url,n.message,t);break;case"jwt":oa(a,sn.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&oa(a,sn.ipv4Cidr,n.message,t),n.version!=="v4"&&oa(a,sn.ipv6Cidr,n.message,t);break}case"emoji":oa(a,sn.emoji(),n.message,t);break;case"ulid":{oa(a,sn.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{un(a,"binary",n.message,t);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{oa(a,sn.base64,n.message,t);break}}break}case"nanoid":oa(a,sn.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return a}function kw(e,t){return t.patternStrategy==="escape"?cF(e):e}var uF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function cF(e){let t="";for(let a=0;a<e.length;a++)uF.has(e[a])||(t+="\\"),t+=e[a];return t}function un(e,t,a,n){var r;e.format||(r=e.anyOf)!=null&&r.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...a&&n.errorMessages&&{errorMessage:{format:a}}})):e.format=t}function oa(e,t,a,n){var r;e.pattern||(r=e.allOf)!=null&&r.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Q2(t,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):e.pattern=Q2(t,n)}function Q2(e,t){var a;if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},r=n.i?e.source.toLowerCase():e.source,o="",l=!1,i=!1,s=!1;for(let u=0;u<r.length;u++){if(l){o+=r[u],l=!1;continue}if(n.i){if(i){if(r[u].match(/[a-z]/)){s?(o+=r[u],o+=`${r[u-2]}-${r[u]}`.toUpperCase(),s=!1):r[u+1]==="-"&&((a=r[u+2])!=null&&a.match(/[a-z]/))?(o+=r[u],s=!0):o+=`${r[u]}${r[u].toUpperCase()}`;continue}}else if(r[u].match(/[a-z]/)){o+=`[${r[u]}${r[u].toUpperCase()}]`;continue}}if(n.m){if(r[u]==="^"){o+=`(^|(?<=[\r
|
|
129
|
+
`&&n++}}return[t,a]}var If=class extends TransformStream{constructor({onError:t,onRetry:a,onComment:n}={}){let r;super({start(o){r=w2({onEvent:l=>{o.enqueue(l)},onError(l){t==="terminate"?o.error(l):typeof t=="function"&&t(l)},onRetry:a,onComment:n})},transform(o){r.feed(o)}})}};var{btoa:hne,atob:gne}=globalThis;var C2="AI_DownloadError",k2=`vercel.ai.error.${C2}`,K5=Symbol.for(k2),x2,v2,Za=class extends(v2=Ae,x2=K5,v2){constructor({url:e,statusCode:t,statusText:a,cause:n,message:r=n==null?`Failed to download ${e}: ${t} ${a}`:`Failed to download ${e}: ${n}`}){super({name:C2,message:r,cause:n}),this[x2]=!0,this.url=e,this.statusCode=t,this.statusText=a}static isInstance(e){return Ae.hasMarker(e,k2)}},jw=2*1024*1024*1024;async function L2({response:e,url:t,maxBytes:a=jw}){let n=e.headers.get("content-length");if(n!=null){let c=parseInt(n,10);if(!isNaN(c)&&c>a)throw new Za({url:t,message:`Download of ${t} exceeded maximum size of ${a} bytes (Content-Length: ${c}).`})}let r=e.body;if(r==null)return new Uint8Array(0);let o=r.getReader(),l=[],i=0;try{for(;;){let{done:c,value:d}=await o.read();if(c)break;if(i+=d.length,i>a)throw new Za({url:t,message:`Download of ${t} exceeded maximum size of ${a} bytes.`});l.push(d)}}finally{try{await o.cancel()}finally{o.releaseLock()}}let s=new Uint8Array(i),u=0;for(let c of l)s.set(c,u),u+=c.length;return s}function Vw(e){let t;try{t=new URL(e)}catch{throw new Za({url:e,message:`Invalid URL: ${e}`})}if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Za({url:e,message:`URL scheme must be http or https, got ${t.protocol}`});let a=t.hostname;if(!a)throw new Za({url:e,message:"URL must have a hostname"});if(a==="localhost"||a.endsWith(".local")||a.endsWith(".localhost"))throw new Za({url:e,message:`URL with hostname ${a} is not allowed`});if(a.startsWith("[")&&a.endsWith("]")){let n=a.slice(1,-1);if(Z5(n))throw new Za({url:e,message:`URL with IPv6 address ${a} is not allowed`});return}if(T2(a)){if(zw(a))throw new Za({url:e,message:`URL with IP address ${a} is not allowed`});return}}function T2(e){let t=e.split(".");return t.length!==4?!1:t.every(a=>{let n=Number(a);return Number.isInteger(n)&&n>=0&&n<=255&&String(n)===a})}function zw(e){let t=e.split(".").map(Number),[a,n]=t;return a===0||a===10||a===127||a===169&&n===254||a===172&&n>=16&&n<=31||a===192&&n===168}function Z5(e){let t=e.toLowerCase();if(t==="::1"||t==="::")return!0;if(t.startsWith("::ffff:")){let a=t.slice(7);if(T2(a))return zw(a);let n=a.split(":");if(n.length===2){let r=parseInt(n[0],16),o=parseInt(n[1],16);if(!isNaN(r)&&!isNaN(o)){let l=r>>8&255,i=r&255,s=o>>8&255,u=o&255;return zw(`${l}.${i}.${s}.${u}`)}}}return!!(t.startsWith("fc")||t.startsWith("fd")||t.startsWith("fe80"))}var rr=({prefix:e,size:t=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{let r=()=>{let o=a.length,l=new Array(t);for(let i=0;i<t;i++)l[i]=a[Math.random()*o|0];return l.join("")};if(e==null)return r;if(a.includes(n))throw new QR({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${a}".`});return()=>`${e}${n}${r()}`},A2=rr();function M2(e=globalThis){var t,a,n;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(n=(a=e.process)==null?void 0:a.versions)!=null&&n.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Xr(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((a,n)=>{t[n.toLowerCase()]=a});else{Array.isArray(e)||(e=Object.entries(e));for(let[a,n]of e)n!=null&&(t[a.toLowerCase()]=n)}return t}function Cf(e,...t){let a=new Headers(Xr(e)),n=a.get("user-agent")||"";return a.set("user-agent",[n,...t].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var Q5=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Y5=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function b2(e){let t=JSON.parse(e);return t===null||typeof t!="object"||Q5.test(e)===!1&&Y5.test(e)===!1?t:J5(t)}function J5(e){let t=[e];for(;t.length;){let a=t;t=[];for(let n of a){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor!==null&&typeof n.constructor=="object"&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let r in n){let o=n[r];o&&typeof o=="object"&&t.push(o)}}}return e}function e6(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return b2(e)}try{return b2(e)}finally{Error.stackTraceLimit=t}}function Gw(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;let{properties:a}=e;if(a!=null)for(let n of Object.keys(a))a[n]=qo(a[n])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(qo):qo(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(qo)),e.allOf!=null&&(e.allOf=e.allOf.map(qo)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(qo));let{definitions:t}=e;if(t!=null)for(let a of Object.keys(t))t[a]=qo(t[a]);return e}function qo(e){return typeof e=="boolean"?e:Gw(e)}var t6=Symbol("Let zodToJsonSchema decide on which parser to use"),S2={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},a6=e=>typeof e=="string"?{...S2,name:e}:{...S2,...e};function Oa(){return{}}function n6(e,t){var a,n,r;let o={type:"array"};return(a=e.type)!=null&&a._def&&((r=(n=e.type)==null?void 0:n._def)==null?void 0:r.typeName)!==se.ZodAny&&(o.items=We(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(o.minItems=e.minLength.value),e.maxLength&&(o.maxItems=e.maxLength.value),e.exactLength&&(o.minItems=e.exactLength.value,o.maxItems=e.exactLength.value),o}function r6(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let a of e.checks)switch(a.kind){case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function o6(){return{type:"boolean"}}function E2(e,t){return We(e.type._def,t)}var l6=(e,t)=>We(e.innerType._def,t);function R2(e,t,a){let n=a??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,o)=>R2(e,t,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return i6(e)}}var i6=e=>{let t={type:"integer",format:"unix-time"};for(let a of e.checks)switch(a.kind){case"min":t.minimum=a.value;break;case"max":t.maximum=a.value;break}return t};function s6(e,t){return{...We(e.innerType._def,t),default:e.defaultValue()}}function u6(e,t){return t.effectStrategy==="input"?We(e.schema._def,t):Oa()}function c6(e){return{type:"string",enum:Array.from(e.values)}}var d6=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function f6(e,t){let a=[We(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),We(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(r=>!!r),n=[];return a.forEach(r=>{if(d6(r))n.push(...r.allOf);else{let o=r;if("additionalProperties"in r&&r.additionalProperties===!1){let{additionalProperties:l,...i}=r;o=i}n.push(o)}}),n.length?{allOf:n}:void 0}function p6(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Uw=void 0,un={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Uw===void 0&&(Uw=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Uw),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function D2(e,t){let a={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":cn(a,"email",n.message,t);break;case"format:idn-email":cn(a,"idn-email",n.message,t);break;case"pattern:zod":oa(a,un.email,n.message,t);break}break;case"url":cn(a,"uri",n.message,t);break;case"uuid":cn(a,"uuid",n.message,t);break;case"regex":oa(a,n.regex,n.message,t);break;case"cuid":oa(a,un.cuid,n.message,t);break;case"cuid2":oa(a,un.cuid2,n.message,t);break;case"startsWith":oa(a,RegExp(`^${Fw(n.value,t)}`),n.message,t);break;case"endsWith":oa(a,RegExp(`${Fw(n.value,t)}$`),n.message,t);break;case"datetime":cn(a,"date-time",n.message,t);break;case"date":cn(a,"date",n.message,t);break;case"time":cn(a,"time",n.message,t);break;case"duration":cn(a,"duration",n.message,t);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value;break;case"includes":{oa(a,RegExp(Fw(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&cn(a,"ipv4",n.message,t),n.version!=="v4"&&cn(a,"ipv6",n.message,t);break}case"base64url":oa(a,un.base64url,n.message,t);break;case"jwt":oa(a,un.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&oa(a,un.ipv4Cidr,n.message,t),n.version!=="v4"&&oa(a,un.ipv6Cidr,n.message,t);break}case"emoji":oa(a,un.emoji(),n.message,t);break;case"ulid":{oa(a,un.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{cn(a,"binary",n.message,t);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{oa(a,un.base64,n.message,t);break}}break}case"nanoid":oa(a,un.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return a}function Fw(e,t){return t.patternStrategy==="escape"?h6(e):e}var m6=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function h6(e){let t="";for(let a=0;a<e.length;a++)m6.has(e[a])||(t+="\\"),t+=e[a];return t}function cn(e,t,a,n){var r;e.format||(r=e.anyOf)!=null&&r.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...a&&n.errorMessages&&{errorMessage:{format:a}}})):e.format=t}function oa(e,t,a,n){var r;e.pattern||(r=e.allOf)!=null&&r.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:I2(t,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):e.pattern=I2(t,n)}function I2(e,t){var a;if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},r=n.i?e.source.toLowerCase():e.source,o="",l=!1,i=!1,s=!1;for(let u=0;u<r.length;u++){if(l){o+=r[u],l=!1;continue}if(n.i){if(i){if(r[u].match(/[a-z]/)){s?(o+=r[u],o+=`${r[u-2]}-${r[u]}`.toUpperCase(),s=!1):r[u+1]==="-"&&((a=r[u+2])!=null&&a.match(/[a-z]/))?(o+=r[u],s=!0):o+=`${r[u]}${r[u].toUpperCase()}`;continue}}else if(r[u].match(/[a-z]/)){o+=`[${r[u]}${r[u].toUpperCase()}]`;continue}}if(n.m){if(r[u]==="^"){o+=`(^|(?<=[\r
|
|
130
130
|
]))`;continue}else if(r[u]==="$"){o+=`($|(?=[\r
|
|
131
131
|
]))`;continue}}if(n.s&&r[u]==="."){o+=i?`${r[u]}\r
|
|
132
132
|
`:`[${r[u]}\r
|
|
133
|
-
]`;continue}o+=r[u],r[u]==="\\"?l=!0:i&&r[u]==="]"?i=!1:!i&&r[u]==="["&&(i=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function lR(e,t){var a,n,r,o,l,i;let s={type:"object",additionalProperties:(a=We(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?a:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ie.ZodString&&((r=e.keyType._def.checks)!=null&&r.length)){let{type:u,...c}=oR(e.keyType._def,t);return{...s,propertyNames:c}}else{if(((o=e.keyType)==null?void 0:o._def.typeName)===ie.ZodEnum)return{...s,propertyNames:{enum:e.keyType._def.values}};if(((l=e.keyType)==null?void 0:l._def.typeName)===ie.ZodBranded&&e.keyType._def.type._def.typeName===ie.ZodString&&((i=e.keyType._def.type._def.checks)!=null&&i.length)){let{type:u,...c}=nR(e.keyType._def,t);return{...s,propertyNames:c}}}return s}function dF(e,t){if(t.mapStrategy==="record")return lR(e,t);let a=We(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Da(),n=We(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Da();return{type:"array",maxItems:125,items:{type:"array",items:[a,n],minItems:2,maxItems:2}}}function fF(e){let t=e.values,n=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),r=Array.from(new Set(n.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:n}}function pF(){return{not:Da()}}function mF(){return{type:"null"}}var Aw={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function hF(e,t){let a=e.options instanceof Map?Array.from(e.options.values()):e.options;if(a.every(n=>n._def.typeName in Aw&&(!n._def.checks||!n._def.checks.length))){let n=a.reduce((r,o)=>{let l=Aw[o._def.typeName];return l&&!r.includes(l)?[...r,l]:r},[]);return{type:n.length>1?n:n[0]}}else if(a.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=a.reduce((r,o)=>{let l=typeof o._def.value;switch(l){case"string":case"number":case"boolean":return[...r,l];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(n.length===a.length){let r=n.filter((o,l,i)=>i.indexOf(o)===l);return{type:r.length>1?r:r[0],enum:a.reduce((o,l)=>o.includes(l._def.value)?o:[...o,l._def.value],[])}}}else if(a.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:a.reduce((n,r)=>[...n,...r._def.values.filter(o=>!n.includes(o))],[])};return gF(e,t)}var gF=(e,t)=>{let a=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,r)=>We(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return a.length?{anyOf:a}:void 0};function yF(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Aw[e.innerType._def.typeName],"null"]};let a=We(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function wF(e){let t={type:"number"};if(!e.checks)return t;for(let a of e.checks)switch(a.kind){case"int":t.type="integer";break;case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function xF(e,t){let a={type:"object",properties:{}},n=[],r=e.shape();for(let l in r){let i=r[l];if(i===void 0||i._def===void 0)continue;let s=bF(i),u=We(i._def,{...t,currentPath:[...t.currentPath,"properties",l],propertyPath:[...t.currentPath,"properties",l]});u!==void 0&&(a.properties[l]=u,s||n.push(l))}n.length&&(a.required=n);let o=vF(e,t);return o!==void 0&&(a.additionalProperties=o),a}function vF(e,t){if(e.catchall._def.typeName!=="ZodNever")return We(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function bF(e){try{return e.isOptional()}catch{return!0}}var SF=(e,t)=>{var a;if(t.currentPath.toString()===((a=t.propertyPath)==null?void 0:a.toString()))return We(e.innerType._def,t);let n=We(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Da()},n]}:Da()},CF=(e,t)=>{if(t.pipeStrategy==="input")return We(e.in._def,t);if(t.pipeStrategy==="output")return We(e.out._def,t);let a=We(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=We(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,n].filter(r=>r!==void 0)}};function IF(e,t){return We(e.type._def,t)}function LF(e,t){let n={type:"array",uniqueItems:!0,items:We(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function kF(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((a,n)=>We(a._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((a,n)=>n===void 0?a:[...a,n],[]),additionalItems:We(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((a,n)=>We(a._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((a,n)=>n===void 0?a:[...a,n],[])}}function TF(){return{not:Da()}}function AF(){return Da()}var MF=(e,t)=>We(e.innerType._def,t),EF=(e,t,a)=>{switch(t){case ie.ZodString:return oR(e,a);case ie.ZodNumber:return wF(e);case ie.ZodObject:return xF(e,a);case ie.ZodBigInt:return J5(e);case ie.ZodBoolean:return eF();case ie.ZodDate:return rR(e,a);case ie.ZodUndefined:return TF();case ie.ZodNull:return mF();case ie.ZodArray:return Y5(e,a);case ie.ZodUnion:case ie.ZodDiscriminatedUnion:return hF(e,a);case ie.ZodIntersection:return iF(e,a);case ie.ZodTuple:return kF(e,a);case ie.ZodRecord:return lR(e,a);case ie.ZodLiteral:return sF(e);case ie.ZodEnum:return oF(e);case ie.ZodNativeEnum:return fF(e);case ie.ZodNullable:return yF(e,a);case ie.ZodOptional:return SF(e,a);case ie.ZodMap:return dF(e,a);case ie.ZodSet:return LF(e,a);case ie.ZodLazy:return()=>e.getter()._def;case ie.ZodPromise:return IF(e,a);case ie.ZodNaN:case ie.ZodNever:return pF();case ie.ZodEffects:return rF(e,a);case ie.ZodAny:return Da();case ie.ZodUnknown:return AF();case ie.ZodDefault:return nF(e,a);case ie.ZodBranded:return nR(e,a);case ie.ZodReadonly:return MF(e,a);case ie.ZodCatch:return tF(e,a);case ie.ZodPipeline:return CF(e,a);case ie.ZodFunction:case ie.ZodVoid:case ie.ZodSymbol:return;default:return(n=>{})(t)}},RF=(e,t)=>{let a=0;for(;a<e.length&&a<t.length&&e[a]===t[a];a++);return[(e.length-a).toString(),...t.slice(a)].join("/")};function We(e,t,a=!1){var n;let r=t.seen.get(e);if(t.override){let s=(n=t.override)==null?void 0:n.call(t,e,t,r,a);if(s!==Q5)return s}if(r&&!a){let s=DF(r,t);if(s!==void 0)return s}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let l=EF(e,e.typeName,t),i=typeof l=="function"?We(l(),t):l;if(i&&_F(e,t,i),t.postProcess){let s=t.postProcess(i,e,t);return o.jsonSchema=i,s}return o.jsonSchema=i,i}var DF=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:RF(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((a,n)=>t.currentPath[n]===a)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Da()):t.$refStrategy==="seen"?Da():void 0}},_F=(e,t,a)=>(e.description&&(a.description=e.description),a),OF=e=>{let t=K5(e),a=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},PF=(e,t)=>{var a;let n=OF(t),r=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[c,d])=>{var f;return{...u,[c]:(f=We(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?f:Da()}},{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,l=(a=We(e._def,o===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,o]},!1))!=null?a:Da(),i=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;i!==void 0&&(l.title=i);let s=o===void 0?r?{...l,[n.definitionPath]:r}:l:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:{...r,[o]:l}};return s.$schema="http://json-schema.org/draft-07/schema#",s},Mw=Symbol.for("vercel.ai.schema");function vf(e){let t;return()=>(t==null&&(t=e()),t)}function bf(e,{validate:t}={}){return{[Mw]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function NF(e){return typeof e=="object"&&e!==null&&Mw in e&&e[Mw]===!0&&"jsonSchema"in e&&"validate"in e}function Sf(e){return e==null?bf({properties:{},additionalProperties:!1}):NF(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?ou(e):BF(e):e()}function BF(e){return bf(()=>Dw(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{let a=await e["~standard"].validate(t);return"value"in a?{success:!0,value:a.value}:{success:!1,error:new bn({value:t,cause:a.issues})}}})}function UF(e,t){var a;let n=(a=t?.useReferences)!=null?a:!1;return bf(()=>PF(e,{$refStrategy:n?"root":"none"}),{validate:async r=>{let o=await e.safeParseAsync(r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function zF(e,t){var a;let n=(a=t?.useReferences)!=null?a:!1;return bf(()=>Dw((void 0)(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async r=>{let o=await(void 0)(e,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function qF(e){return"_zod"in e}function ou(e,t){return qF(e)?zF(e,t):UF(e,t)}async function Cf({value:e,schema:t,context:a}){let n=await Jl({value:e,schema:t,context:a});if(!n.success)throw bn.wrap({value:e,cause:n.error,context:a});return n.value}async function Jl({value:e,schema:t,context:a}){let n=Sf(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};let r=await n.validate(e);return r.success?{success:!0,value:r.value,rawValue:e}:{success:!1,error:bn.wrap({value:e,cause:r.error,context:a}),rawValue:e}}catch(r){return{success:!1,error:bn.wrap({value:e,cause:r,context:a}),rawValue:e}}}async function rr({text:e,schema:t}){try{let a=Z5(e);return t==null?{success:!0,value:a,rawValue:a}:await Jl({value:a,schema:t})}catch(a){return{success:!1,error:bw.isInstance(a)?a:new bw({text:e,cause:a}),rawValue:void 0}}}function iR({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new wf).pipeThrough(new TransformStream({async transform({data:a},n){a!=="[DONE]"&&n.enqueue(await rr({text:a,schema:t}))}}))}async function Sn(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var HF=Object.defineProperty,jF=(e,t)=>{for(var a in t)HF(e,a,{get:t[a],enumerable:!0})},VF="AI_InvalidArgumentError",GF=`vercel.ai.error.${VF}`,$F=Symbol.for(GF),WF;WF=$F;var XF="AI_InvalidStreamPartError",ZF=`vercel.ai.error.${XF}`,QF=Symbol.for(ZF),KF;KF=QF;var YF="AI_InvalidToolApprovalError",JF=`vercel.ai.error.${YF}`,e6=Symbol.for(JF),t6;t6=e6;var a6="AI_InvalidToolInputError",n6=`vercel.ai.error.${a6}`,r6=Symbol.for(n6),o6;o6=r6;var l6="AI_ToolCallNotFoundForApprovalError",i6=`vercel.ai.error.${l6}`,s6=Symbol.for(i6),u6;u6=s6;var c6="AI_MissingToolResultsError",d6=`vercel.ai.error.${c6}`,f6=Symbol.for(d6),p6;p6=f6;var m6="AI_NoImageGeneratedError",h6=`vercel.ai.error.${m6}`,g6=Symbol.for(h6),y6;y6=g6;var uR="AI_NoObjectGeneratedError",cR=`vercel.ai.error.${uR}`,w6=Symbol.for(cR),dR,Xr=class extends Te{constructor({message:e="No object generated.",cause:t,text:a,response:n,usage:r,finishReason:o}){super({name:uR,message:e,cause:t}),this[dR]=!0,this.text=a,this.response=n,this.usage=r,this.finishReason=o}static isInstance(e){return Te.hasMarker(e,cR)}};dR=w6;var x6="AI_NoOutputGeneratedError",v6=`vercel.ai.error.${x6}`,b6=Symbol.for(v6),S6;S6=b6;var C6="AI_NoSpeechGeneratedError",I6=`vercel.ai.error.${C6}`,L6=Symbol.for(I6),k6;k6=L6;var T6="AI_NoTranscriptGeneratedError",A6=`vercel.ai.error.${T6}`,M6=Symbol.for(A6),E6;E6=M6;var R6="AI_NoVideoGeneratedError",D6=`vercel.ai.error.${R6}`,_6=Symbol.for(D6),O6;O6=_6;var P6="AI_NoSuchToolError",N6=`vercel.ai.error.${P6}`,B6=Symbol.for(N6),U6;U6=B6;var z6="AI_ToolCallRepairError",q6=`vercel.ai.error.${z6}`,F6=Symbol.for(q6),H6;H6=F6;var fR="AI_UIMessageStreamError",pR=`vercel.ai.error.${fR}`,j6=Symbol.for(pR),mR,ei=class extends Te{constructor({chunkType:e,chunkId:t,message:a}){super({name:fR,message:a}),this[mR]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Te.hasMarker(e,pR)}};mR=j6;var V6="AI_InvalidDataContentError",G6=`vercel.ai.error.${V6}`,$6=Symbol.for(G6),W6;W6=$6;var X6="AI_InvalidMessageRoleError",Z6=`vercel.ai.error.${X6}`,Q6=Symbol.for(Z6),K6;K6=Q6;var Y6="AI_MessageConversionError",J6=`vercel.ai.error.${Y6}`,eH=Symbol.for(J6),tH;tH=eH;var aH="AI_RetryError",nH=`vercel.ai.error.${aH}`,rH=Symbol.for(nH),oH;oH=rH;var lH="6.0.141",iH=async({url:e,maxBytes:t,abortSignal:a})=>{var n;let r=e.toString();Rw(r);try{let o=await fetch(r,{headers:xf({},`ai-sdk/${lH}`,aR()),signal:a});if(o.redirected&&Rw(o.url),!o.ok)throw new Za({url:r,statusCode:o.status,statusText:o.statusText});return{data:await J2({response:o,url:r,maxBytes:t??Ew}),mediaType:(n=o.headers.get("content-type"))!=null?n:void 0}}catch(o){throw Za.isInstance(o)?o:new Za({url:r,cause:o})}};var hR=h.union([h.string(),h.instanceof(Uint8Array),h.instanceof(ArrayBuffer),h.custom(e=>{var t,a;return(a=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?a:!1},{message:"Must be a Buffer"})]);var lu=h.lazy(()=>h.union([h.null(),h.string(),h.number(),h.boolean(),h.record(h.string(),lu.optional()),h.array(lu)])),X=h.record(h.string(),h.record(h.string(),lu.optional())),gR=h.object({type:h.literal("text"),text:h.string(),providerOptions:X.optional()}),sH=h.object({type:h.literal("image"),image:h.union([hR,h.instanceof(URL)]),mediaType:h.string().optional(),providerOptions:X.optional()}),yR=h.object({type:h.literal("file"),data:h.union([hR,h.instanceof(URL)]),filename:h.string().optional(),mediaType:h.string(),providerOptions:X.optional()}),uH=h.object({type:h.literal("reasoning"),text:h.string(),providerOptions:X.optional()}),cH=h.object({type:h.literal("tool-call"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerOptions:X.optional(),providerExecuted:h.boolean().optional()}),dH=h.discriminatedUnion("type",[h.object({type:h.literal("text"),value:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("json"),value:lu,providerOptions:X.optional()}),h.object({type:h.literal("execution-denied"),reason:h.string().optional(),providerOptions:X.optional()}),h.object({type:h.literal("error-text"),value:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("error-json"),value:lu,providerOptions:X.optional()}),h.object({type:h.literal("content"),value:h.array(h.union([h.object({type:h.literal("text"),text:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("media"),data:h.string(),mediaType:h.string()}),h.object({type:h.literal("file-data"),data:h.string(),mediaType:h.string(),filename:h.string().optional(),providerOptions:X.optional()}),h.object({type:h.literal("file-url"),url:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("file-id"),fileId:h.union([h.string(),h.record(h.string(),h.string())]),providerOptions:X.optional()}),h.object({type:h.literal("image-data"),data:h.string(),mediaType:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("image-url"),url:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("image-file-id"),fileId:h.union([h.string(),h.record(h.string(),h.string())]),providerOptions:X.optional()}),h.object({type:h.literal("custom"),providerOptions:X.optional()})]))})]),wR=h.object({type:h.literal("tool-result"),toolCallId:h.string(),toolName:h.string(),output:dH,providerOptions:X.optional()}),fH=h.object({type:h.literal("tool-approval-request"),approvalId:h.string(),toolCallId:h.string()}),pH=h.object({type:h.literal("tool-approval-response"),approvalId:h.string(),approved:h.boolean(),reason:h.string().optional()}),mH=h.object({role:h.literal("system"),content:h.string(),providerOptions:X.optional()}),hH=h.object({role:h.literal("user"),content:h.union([h.string(),h.array(h.union([gR,sH,yR]))]),providerOptions:X.optional()}),gH=h.object({role:h.literal("assistant"),content:h.union([h.string(),h.array(h.union([gR,yR,uH,cH,wR,fH]))]),providerOptions:X.optional()}),yH=h.object({role:h.literal("tool"),content:h.array(h.union([wR,pH])),providerOptions:X.optional()}),Dae=h.union([mH,hH,gH,yH]);function xR(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let a={...e};for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];if(r===void 0)continue;let o=n in e?e[n]:void 0,l=r!==null&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof RegExp),i=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);l&&i?a[n]=xR(o,r):a[n]=r}return a}var wH={};jF(wH,{array:()=>SH,choice:()=>CH,json:()=>IH,object:()=>bH,text:()=>vH});function xH(e){let t=["ROOT"],a=-1,n=null;function r(s,u,c){switch(s){case'"':{a=u,t.pop(),t.push(c),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{a=u,n=u,t.pop(),t.push(c),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=u,t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"{":{a=u,t.pop(),t.push(c),t.push("INSIDE_OBJECT_START");break}case"[":{a=u,t.pop(),t.push(c),t.push("INSIDE_ARRAY_START");break}}}function o(s,u){switch(s){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{a=u,t.pop();break}}}function l(s,u){switch(s){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=u,t.pop();break}}}for(let s=0;s<e.length;s++){let u=e[s];switch(t[t.length-1]){case"ROOT":r(u,s,"FINISH");break;case"INSIDE_OBJECT_START":{switch(u){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{a=s,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{u===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{r(u,s,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(u,s);break}case"INSIDE_STRING":{switch(u){case'"':{t.pop(),a=s;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:a=s}break}case"INSIDE_ARRAY_START":{u==="]"?(a=s,t.pop()):(a=s,r(u,s,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=s,t.pop();break}default:{a=s;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{r(u,s,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),a=s;break}case"INSIDE_NUMBER":{switch(u){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=s;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,s);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,s);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{let d=e.substring(n,s+1);!"false".startsWith(d)&&!"true".startsWith(d)&&!"null".startsWith(d)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(u,s):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s)):a=s;break}}}let i=e.slice(0,a+1);for(let s=t.length-1;s>=0;s--)switch(t[s]){case"INSIDE_STRING":{i+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{i+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{i+="]";break}case"INSIDE_LITERAL":{let c=e.substring(n,e.length);"true".startsWith(c)?i+="true".slice(c.length):"false".startsWith(c)?i+="false".slice(c.length):"null".startsWith(c)&&(i+="null".slice(c.length))}}return i}async function iu(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await rr({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await rr({text:xH(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var vH=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),bH=({schema:e,name:t,description:a})=>{let n=Sf(e);return{name:"object",responseFormat:Sn(n.jsonSchema).then(r=>({type:"json",schema:r,...t!=null&&{name:t},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){let l=await rr({text:r});if(!l.success)throw new Xr({message:"No object generated: could not parse the response.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let i=await Jl({value:l.value,schema:n});if(!i.success)throw new Xr({message:"No object generated: response did not match schema.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return i.value},async parsePartialOutput({text:r}){let o=await iu(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},SH=({element:e,name:t,description:a})=>{let n=Sf(e);return{name:"array",responseFormat:Sn(n.jsonSchema).then(r=>{let{$schema:o,...l}=r;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:l}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...a!=null&&{description:a}}}),async parseCompleteOutput({text:r},o){let l=await rr({text:r});if(!l.success)throw new Xr({message:"No object generated: could not parse the response.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let i=l.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))throw new Xr({message:"No object generated: response did not match schema.",cause:new bn({value:i,cause:"response must be an object with an elements array"}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});for(let s of i.elements){let u=await Jl({value:s,schema:n});if(!u.success)throw new Xr({message:"No object generated: response did not match schema.",cause:u.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason})}return i.elements},async parsePartialOutput({text:r}){let o=await iu(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let l=o.value;if(l==null||typeof l!="object"||!("elements"in l)||!Array.isArray(l.elements))return;let i=o.state==="repaired-parse"&&l.elements.length>0?l.elements.slice(0,-1):l.elements,s=[];for(let u of i){let c=await Jl({value:u,schema:n});c.success&&s.push(c.value)}return{partial:s}}}},createElementStreamTransform(){let r=0;return new TransformStream({transform({partialOutput:o},l){if(o!=null)for(;r<o.length;r++)l.enqueue(o[r])}})}}},CH=({options:e,name:t,description:a})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...a!=null&&{description:a}}),async parseCompleteOutput({text:n},r){let o=await rr({text:n});if(!o.success)throw new Xr({message:"No object generated: could not parse the response.",cause:o.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});let l=o.value;if(l==null||typeof l!="object"||!("result"in l)||typeof l.result!="string"||!e.includes(l.result))throw new Xr({message:"No object generated: response did not match schema.",cause:new bn({value:l,cause:"response must be an object that contains a choice value."}),text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return l.result},async parsePartialOutput({text:n}){let r=await iu(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let o=r.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string")return;let l=e.filter(i=>i.startsWith(o.result));return r.state==="successful-parse"?l.includes(o.result)?{partial:o.result}:void 0:l.length===1?{partial:l[0]}:void 0}}},createElementStreamTransform(){}}),IH=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:a},n){let r=await rr({text:a});if(!r.success)throw new Xr({message:"No object generated: could not parse the response.",cause:r.error,text:a,response:n.response,usage:n.usage,finishReason:n.finishReason});return r.value},async parsePartialOutput({text:a}){let n=await iu(a);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return n.value===void 0?void 0:{partial:n.value}}},createElementStreamTransform(){}});var Nae=nr({prefix:"aitxt",size:24});var Uae=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
|
|
133
|
+
]`;continue}o+=r[u],r[u]==="\\"?l=!0:i&&r[u]==="]"?i=!1:!i&&r[u]==="["&&(i=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function _2(e,t){var a,n,r,o,l,i;let s={type:"object",additionalProperties:(a=We(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?a:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===se.ZodString&&((r=e.keyType._def.checks)!=null&&r.length)){let{type:u,...c}=D2(e.keyType._def,t);return{...s,propertyNames:c}}else{if(((o=e.keyType)==null?void 0:o._def.typeName)===se.ZodEnum)return{...s,propertyNames:{enum:e.keyType._def.values}};if(((l=e.keyType)==null?void 0:l._def.typeName)===se.ZodBranded&&e.keyType._def.type._def.typeName===se.ZodString&&((i=e.keyType._def.type._def.checks)!=null&&i.length)){let{type:u,...c}=E2(e.keyType._def,t);return{...s,propertyNames:c}}}return s}function g6(e,t){if(t.mapStrategy==="record")return _2(e,t);let a=We(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Oa(),n=We(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Oa();return{type:"array",maxItems:125,items:{type:"array",items:[a,n],minItems:2,maxItems:2}}}function y6(e){let t=e.values,n=Object.keys(e.values).filter(o=>typeof t[t[o]]!="number").map(o=>t[o]),r=Array.from(new Set(n.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:n}}function w6(){return{not:Oa()}}function x6(){return{type:"null"}}var qw={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function v6(e,t){let a=e.options instanceof Map?Array.from(e.options.values()):e.options;if(a.every(n=>n._def.typeName in qw&&(!n._def.checks||!n._def.checks.length))){let n=a.reduce((r,o)=>{let l=qw[o._def.typeName];return l&&!r.includes(l)?[...r,l]:r},[]);return{type:n.length>1?n:n[0]}}else if(a.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=a.reduce((r,o)=>{let l=typeof o._def.value;switch(l){case"string":case"number":case"boolean":return[...r,l];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(n.length===a.length){let r=n.filter((o,l,i)=>i.indexOf(o)===l);return{type:r.length>1?r:r[0],enum:a.reduce((o,l)=>o.includes(l._def.value)?o:[...o,l._def.value],[])}}}else if(a.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:a.reduce((n,r)=>[...n,...r._def.values.filter(o=>!n.includes(o))],[])};return b6(e,t)}var b6=(e,t)=>{let a=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,r)=>We(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return a.length?{anyOf:a}:void 0};function S6(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[qw[e.innerType._def.typeName],"null"]};let a=We(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function I6(e){let t={type:"number"};if(!e.checks)return t;for(let a of e.checks)switch(a.kind){case"int":t.type="integer";break;case"min":a.inclusive?t.minimum=a.value:t.exclusiveMinimum=a.value;break;case"max":a.inclusive?t.maximum=a.value:t.exclusiveMaximum=a.value;break;case"multipleOf":t.multipleOf=a.value;break}return t}function C6(e,t){let a={type:"object",properties:{}},n=[],r=e.shape();for(let l in r){let i=r[l];if(i===void 0||i._def===void 0)continue;let s=L6(i),u=We(i._def,{...t,currentPath:[...t.currentPath,"properties",l],propertyPath:[...t.currentPath,"properties",l]});u!==void 0&&(a.properties[l]=u,s||n.push(l))}n.length&&(a.required=n);let o=k6(e,t);return o!==void 0&&(a.additionalProperties=o),a}function k6(e,t){if(e.catchall._def.typeName!=="ZodNever")return We(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function L6(e){try{return e.isOptional()}catch{return!0}}var T6=(e,t)=>{var a;if(t.currentPath.toString()===((a=t.propertyPath)==null?void 0:a.toString()))return We(e.innerType._def,t);let n=We(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Oa()},n]}:Oa()},A6=(e,t)=>{if(t.pipeStrategy==="input")return We(e.in._def,t);if(t.pipeStrategy==="output")return We(e.out._def,t);let a=We(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=We(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,n].filter(r=>r!==void 0)}};function M6(e,t){return We(e.type._def,t)}function E6(e,t){let n={type:"array",uniqueItems:!0,items:We(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function R6(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((a,n)=>We(a._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((a,n)=>n===void 0?a:[...a,n],[]),additionalItems:We(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((a,n)=>We(a._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((a,n)=>n===void 0?a:[...a,n],[])}}function D6(){return{not:Oa()}}function _6(){return Oa()}var O6=(e,t)=>We(e.innerType._def,t),P6=(e,t,a)=>{switch(t){case se.ZodString:return D2(e,a);case se.ZodNumber:return I6(e);case se.ZodObject:return C6(e,a);case se.ZodBigInt:return r6(e);case se.ZodBoolean:return o6();case se.ZodDate:return R2(e,a);case se.ZodUndefined:return D6();case se.ZodNull:return x6();case se.ZodArray:return n6(e,a);case se.ZodUnion:case se.ZodDiscriminatedUnion:return v6(e,a);case se.ZodIntersection:return f6(e,a);case se.ZodTuple:return R6(e,a);case se.ZodRecord:return _2(e,a);case se.ZodLiteral:return p6(e);case se.ZodEnum:return c6(e);case se.ZodNativeEnum:return y6(e);case se.ZodNullable:return S6(e,a);case se.ZodOptional:return T6(e,a);case se.ZodMap:return g6(e,a);case se.ZodSet:return E6(e,a);case se.ZodLazy:return()=>e.getter()._def;case se.ZodPromise:return M6(e,a);case se.ZodNaN:case se.ZodNever:return w6();case se.ZodEffects:return u6(e,a);case se.ZodAny:return Oa();case se.ZodUnknown:return _6();case se.ZodDefault:return s6(e,a);case se.ZodBranded:return E2(e,a);case se.ZodReadonly:return O6(e,a);case se.ZodCatch:return l6(e,a);case se.ZodPipeline:return A6(e,a);case se.ZodFunction:case se.ZodVoid:case se.ZodSymbol:return;default:return(n=>{})(t)}},N6=(e,t)=>{let a=0;for(;a<e.length&&a<t.length&&e[a]===t[a];a++);return[(e.length-a).toString(),...t.slice(a)].join("/")};function We(e,t,a=!1){var n;let r=t.seen.get(e);if(t.override){let s=(n=t.override)==null?void 0:n.call(t,e,t,r,a);if(s!==t6)return s}if(r&&!a){let s=B6(r,t);if(s!==void 0)return s}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let l=P6(e,e.typeName,t),i=typeof l=="function"?We(l(),t):l;if(i&&U6(e,t,i),t.postProcess){let s=t.postProcess(i,e,t);return o.jsonSchema=i,s}return o.jsonSchema=i,i}var B6=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:N6(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((a,n)=>t.currentPath[n]===a)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Oa()):t.$refStrategy==="seen"?Oa():void 0}},U6=(e,t,a)=>(e.description&&(a.description=e.description),a),F6=e=>{let t=a6(e),a=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},z6=(e,t)=>{var a;let n=F6(t),r=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[c,d])=>{var f;return{...u,[c]:(f=We(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?f:Oa()}},{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,l=(a=We(e._def,o===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,o]},!1))!=null?a:Oa(),i=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;i!==void 0&&(l.title=i);let s=o===void 0?r?{...l,[n.definitionPath]:r}:l:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:{...r,[o]:l}};return s.$schema="http://json-schema.org/draft-07/schema#",s},Hw=Symbol.for("vercel.ai.schema");function kf(e){let t;return()=>(t==null&&(t=e()),t)}function Lf(e,{validate:t}={}){return{[Hw]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function q6(e){return typeof e=="object"&&e!==null&&Hw in e&&e[Hw]===!0&&"jsonSchema"in e&&"validate"in e}function Tf(e){return e==null?Lf({properties:{},additionalProperties:!1}):q6(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?uu(e):H6(e):e()}function H6(e){return Lf(()=>Gw(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{let a=await e["~standard"].validate(t);return"value"in a?{success:!0,value:a.value}:{success:!1,error:new Sn({value:t,cause:a.issues})}}})}function j6(e,t){var a;let n=(a=t?.useReferences)!=null?a:!1;return Lf(()=>z6(e,{$refStrategy:n?"root":"none"}),{validate:async r=>{let o=await e.safeParseAsync(r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function V6(e,t){var a;let n=(a=t?.useReferences)!=null?a:!1;return Lf(()=>Gw((void 0)(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async r=>{let o=await(void 0)(e,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function G6(e){return"_zod"in e}function uu(e,t){return G6(e)?V6(e,t):j6(e,t)}async function Af({value:e,schema:t,context:a}){let n=await ai({value:e,schema:t,context:a});if(!n.success)throw Sn.wrap({value:e,cause:n.error,context:a});return n.value}async function ai({value:e,schema:t,context:a}){let n=Tf(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};let r=await n.validate(e);return r.success?{success:!0,value:r.value,rawValue:e}:{success:!1,error:Sn.wrap({value:e,cause:r.error,context:a}),rawValue:e}}catch(r){return{success:!1,error:Sn.wrap({value:e,cause:r,context:a}),rawValue:e}}}async function or({text:e,schema:t}){try{let a=e6(e);return t==null?{success:!0,value:a,rawValue:a}:await ai({value:a,schema:t})}catch(a){return{success:!1,error:Ow.isInstance(a)?a:new Ow({text:e,cause:a}),rawValue:void 0}}}function O2({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new If).pipeThrough(new TransformStream({async transform({data:a},n){a!=="[DONE]"&&n.enqueue(await or({text:a,schema:t}))}}))}async function In(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var W6=Object.defineProperty,X6=(e,t)=>{for(var a in t)W6(e,a,{get:t[a],enumerable:!0})},K6="AI_InvalidArgumentError",Z6=`vercel.ai.error.${K6}`,Q6=Symbol.for(Z6),Y6;Y6=Q6;var J6="AI_InvalidStreamPartError",eH=`vercel.ai.error.${J6}`,tH=Symbol.for(eH),aH;aH=tH;var nH="AI_InvalidToolApprovalError",rH=`vercel.ai.error.${nH}`,oH=Symbol.for(rH),lH;lH=oH;var iH="AI_InvalidToolInputError",sH=`vercel.ai.error.${iH}`,uH=Symbol.for(sH),cH;cH=uH;var dH="AI_ToolCallNotFoundForApprovalError",fH=`vercel.ai.error.${dH}`,pH=Symbol.for(fH),mH;mH=pH;var hH="AI_MissingToolResultsError",gH=`vercel.ai.error.${hH}`,yH=Symbol.for(gH),wH;wH=yH;var xH="AI_NoImageGeneratedError",vH=`vercel.ai.error.${xH}`,bH=Symbol.for(vH),SH;SH=bH;var N2="AI_NoObjectGeneratedError",B2=`vercel.ai.error.${N2}`,IH=Symbol.for(B2),U2,Kr=class extends Ae{constructor({message:e="No object generated.",cause:t,text:a,response:n,usage:r,finishReason:o}){super({name:N2,message:e,cause:t}),this[U2]=!0,this.text=a,this.response=n,this.usage=r,this.finishReason=o}static isInstance(e){return Ae.hasMarker(e,B2)}};U2=IH;var CH="AI_NoOutputGeneratedError",kH=`vercel.ai.error.${CH}`,LH=Symbol.for(kH),TH;TH=LH;var AH="AI_NoSpeechGeneratedError",MH=`vercel.ai.error.${AH}`,EH=Symbol.for(MH),RH;RH=EH;var DH="AI_NoTranscriptGeneratedError",_H=`vercel.ai.error.${DH}`,OH=Symbol.for(_H),PH;PH=OH;var NH="AI_NoVideoGeneratedError",BH=`vercel.ai.error.${NH}`,UH=Symbol.for(BH),FH;FH=UH;var zH="AI_NoSuchToolError",qH=`vercel.ai.error.${zH}`,HH=Symbol.for(qH),jH;jH=HH;var VH="AI_ToolCallRepairError",GH=`vercel.ai.error.${VH}`,$H=Symbol.for(GH),WH;WH=$H;var F2="AI_UIMessageStreamError",z2=`vercel.ai.error.${F2}`,XH=Symbol.for(z2),q2,ni=class extends Ae{constructor({chunkType:e,chunkId:t,message:a}){super({name:F2,message:a}),this[q2]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Ae.hasMarker(e,z2)}};q2=XH;var KH="AI_InvalidDataContentError",ZH=`vercel.ai.error.${KH}`,QH=Symbol.for(ZH),YH;YH=QH;var JH="AI_InvalidMessageRoleError",e9=`vercel.ai.error.${JH}`,t9=Symbol.for(e9),a9;a9=t9;var n9="AI_MessageConversionError",r9=`vercel.ai.error.${n9}`,o9=Symbol.for(r9),l9;l9=o9;var i9="AI_RetryError",s9=`vercel.ai.error.${i9}`,u9=Symbol.for(s9),c9;c9=u9;var d9="6.0.141",f9=async({url:e,maxBytes:t,abortSignal:a})=>{var n;let r=e.toString();Vw(r);try{let o=await fetch(r,{headers:Cf({},`ai-sdk/${d9}`,M2()),signal:a});if(o.redirected&&Vw(o.url),!o.ok)throw new Za({url:r,statusCode:o.status,statusText:o.statusText});return{data:await L2({response:o,url:r,maxBytes:t??jw}),mediaType:(n=o.headers.get("content-type"))!=null?n:void 0}}catch(o){throw Za.isInstance(o)?o:new Za({url:r,cause:o})}};var H2=h.union([h.string(),h.instanceof(Uint8Array),h.instanceof(ArrayBuffer),h.custom(e=>{var t,a;return(a=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?a:!1},{message:"Must be a Buffer"})]);var cu=h.lazy(()=>h.union([h.null(),h.string(),h.number(),h.boolean(),h.record(h.string(),cu.optional()),h.array(cu)])),X=h.record(h.string(),h.record(h.string(),cu.optional())),j2=h.object({type:h.literal("text"),text:h.string(),providerOptions:X.optional()}),p9=h.object({type:h.literal("image"),image:h.union([H2,h.instanceof(URL)]),mediaType:h.string().optional(),providerOptions:X.optional()}),V2=h.object({type:h.literal("file"),data:h.union([H2,h.instanceof(URL)]),filename:h.string().optional(),mediaType:h.string(),providerOptions:X.optional()}),m9=h.object({type:h.literal("reasoning"),text:h.string(),providerOptions:X.optional()}),h9=h.object({type:h.literal("tool-call"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerOptions:X.optional(),providerExecuted:h.boolean().optional()}),g9=h.discriminatedUnion("type",[h.object({type:h.literal("text"),value:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("json"),value:cu,providerOptions:X.optional()}),h.object({type:h.literal("execution-denied"),reason:h.string().optional(),providerOptions:X.optional()}),h.object({type:h.literal("error-text"),value:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("error-json"),value:cu,providerOptions:X.optional()}),h.object({type:h.literal("content"),value:h.array(h.union([h.object({type:h.literal("text"),text:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("media"),data:h.string(),mediaType:h.string()}),h.object({type:h.literal("file-data"),data:h.string(),mediaType:h.string(),filename:h.string().optional(),providerOptions:X.optional()}),h.object({type:h.literal("file-url"),url:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("file-id"),fileId:h.union([h.string(),h.record(h.string(),h.string())]),providerOptions:X.optional()}),h.object({type:h.literal("image-data"),data:h.string(),mediaType:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("image-url"),url:h.string(),providerOptions:X.optional()}),h.object({type:h.literal("image-file-id"),fileId:h.union([h.string(),h.record(h.string(),h.string())]),providerOptions:X.optional()}),h.object({type:h.literal("custom"),providerOptions:X.optional()})]))})]),G2=h.object({type:h.literal("tool-result"),toolCallId:h.string(),toolName:h.string(),output:g9,providerOptions:X.optional()}),y9=h.object({type:h.literal("tool-approval-request"),approvalId:h.string(),toolCallId:h.string()}),w9=h.object({type:h.literal("tool-approval-response"),approvalId:h.string(),approved:h.boolean(),reason:h.string().optional()}),x9=h.object({role:h.literal("system"),content:h.string(),providerOptions:X.optional()}),v9=h.object({role:h.literal("user"),content:h.union([h.string(),h.array(h.union([j2,p9,V2]))]),providerOptions:X.optional()}),b9=h.object({role:h.literal("assistant"),content:h.union([h.string(),h.array(h.union([j2,V2,m9,h9,G2,y9]))]),providerOptions:X.optional()}),S9=h.object({role:h.literal("tool"),content:h.array(h.union([G2,w9])),providerOptions:X.optional()}),qne=h.union([x9,v9,b9,S9]);function $2(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let a={...e};for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];if(r===void 0)continue;let o=n in e?e[n]:void 0,l=r!==null&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof RegExp),i=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);l&&i?a[n]=$2(o,r):a[n]=r}return a}var I9={};X6(I9,{array:()=>T9,choice:()=>A9,json:()=>M9,object:()=>L9,text:()=>k9});function C9(e){let t=["ROOT"],a=-1,n=null;function r(s,u,c){switch(s){case'"':{a=u,t.pop(),t.push(c),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{a=u,n=u,t.pop(),t.push(c),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=u,t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"{":{a=u,t.pop(),t.push(c),t.push("INSIDE_OBJECT_START");break}case"[":{a=u,t.pop(),t.push(c),t.push("INSIDE_ARRAY_START");break}}}function o(s,u){switch(s){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{a=u,t.pop();break}}}function l(s,u){switch(s){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=u,t.pop();break}}}for(let s=0;s<e.length;s++){let u=e[s];switch(t[t.length-1]){case"ROOT":r(u,s,"FINISH");break;case"INSIDE_OBJECT_START":{switch(u){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{a=s,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{u===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{r(u,s,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(u,s);break}case"INSIDE_STRING":{switch(u){case'"':{t.pop(),a=s;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:a=s}break}case"INSIDE_ARRAY_START":{u==="]"?(a=s,t.pop()):(a=s,r(u,s,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=s,t.pop();break}default:{a=s;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{r(u,s,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),a=s;break}case"INSIDE_NUMBER":{switch(u){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=s;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,s);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(u,s);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{let d=e.substring(n,s+1);!"false".startsWith(d)&&!"true".startsWith(d)&&!"null".startsWith(d)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(u,s):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&l(u,s)):a=s;break}}}let i=e.slice(0,a+1);for(let s=t.length-1;s>=0;s--)switch(t[s]){case"INSIDE_STRING":{i+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{i+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{i+="]";break}case"INSIDE_LITERAL":{let c=e.substring(n,e.length);"true".startsWith(c)?i+="true".slice(c.length):"false".startsWith(c)?i+="false".slice(c.length):"null".startsWith(c)&&(i+="null".slice(c.length))}}return i}async function du(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await or({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await or({text:C9(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var k9=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),L9=({schema:e,name:t,description:a})=>{let n=Tf(e);return{name:"object",responseFormat:In(n.jsonSchema).then(r=>({type:"json",schema:r,...t!=null&&{name:t},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){let l=await or({text:r});if(!l.success)throw new Kr({message:"No object generated: could not parse the response.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let i=await ai({value:l.value,schema:n});if(!i.success)throw new Kr({message:"No object generated: response did not match schema.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return i.value},async parsePartialOutput({text:r}){let o=await du(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},T9=({element:e,name:t,description:a})=>{let n=Tf(e);return{name:"array",responseFormat:In(n.jsonSchema).then(r=>{let{$schema:o,...l}=r;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:l}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...a!=null&&{description:a}}}),async parseCompleteOutput({text:r},o){let l=await or({text:r});if(!l.success)throw new Kr({message:"No object generated: could not parse the response.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});let i=l.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))throw new Kr({message:"No object generated: response did not match schema.",cause:new Sn({value:i,cause:"response must be an object with an elements array"}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});for(let s of i.elements){let u=await ai({value:s,schema:n});if(!u.success)throw new Kr({message:"No object generated: response did not match schema.",cause:u.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason})}return i.elements},async parsePartialOutput({text:r}){let o=await du(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let l=o.value;if(l==null||typeof l!="object"||!("elements"in l)||!Array.isArray(l.elements))return;let i=o.state==="repaired-parse"&&l.elements.length>0?l.elements.slice(0,-1):l.elements,s=[];for(let u of i){let c=await ai({value:u,schema:n});c.success&&s.push(c.value)}return{partial:s}}}},createElementStreamTransform(){let r=0;return new TransformStream({transform({partialOutput:o},l){if(o!=null)for(;r<o.length;r++)l.enqueue(o[r])}})}}},A9=({options:e,name:t,description:a})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...a!=null&&{description:a}}),async parseCompleteOutput({text:n},r){let o=await or({text:n});if(!o.success)throw new Kr({message:"No object generated: could not parse the response.",cause:o.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});let l=o.value;if(l==null||typeof l!="object"||!("result"in l)||typeof l.result!="string"||!e.includes(l.result))throw new Kr({message:"No object generated: response did not match schema.",cause:new Sn({value:l,cause:"response must be an object that contains a choice value."}),text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return l.result},async parsePartialOutput({text:n}){let r=await du(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let o=r.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string")return;let l=e.filter(i=>i.startsWith(o.result));return r.state==="successful-parse"?l.includes(o.result)?{partial:o.result}:void 0:l.length===1?{partial:l[0]}:void 0}}},createElementStreamTransform(){}}),M9=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:a},n){let r=await or({text:a});if(!r.success)throw new Kr({message:"No object generated: could not parse the response.",cause:r.error,text:a,response:n.response,usage:n.usage,finishReason:n.finishReason});return r.value},async parsePartialOutput({text:a}){let n=await du(a);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return n.value===void 0?void 0:{partial:n.value}}},createElementStreamTransform(){}});var Gne=rr({prefix:"aitxt",size:24});var Wne=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
|
|
134
134
|
|
|
135
135
|
`)},flush(e){e.enqueue(`data: [DONE]
|
|
136
136
|
|
|
137
|
-
`)}})}};var Ow=vf(()=>ou(h.union([h.strictObject({type:h.literal("text-start"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("text-delta"),id:h.string(),delta:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("text-end"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("error"),errorText:h.string()}),h.strictObject({type:h.literal("tool-input-start"),toolCallId:h.string(),toolName:h.string(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-input-delta"),toolCallId:h.string(),inputTextDelta:h.string()}),h.strictObject({type:h.literal("tool-input-available"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-input-error"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),errorText:h.string(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-approval-request"),approvalId:h.string(),toolCallId:h.string()}),h.strictObject({type:h.literal("tool-output-available"),toolCallId:h.string(),output:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),preliminary:h.boolean().optional()}),h.strictObject({type:h.literal("tool-output-error"),toolCallId:h.string(),errorText:h.string(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional()}),h.strictObject({type:h.literal("tool-output-denied"),toolCallId:h.string()}),h.strictObject({type:h.literal("reasoning-start"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("reasoning-delta"),id:h.string(),delta:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("reasoning-end"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("source-url"),sourceId:h.string(),url:h.string(),title:h.string().optional(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("source-document"),sourceId:h.string(),mediaType:h.string(),title:h.string(),filename:h.string().optional(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("file"),url:h.string(),mediaType:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:h.string().optional(),data:h.unknown(),transient:h.boolean().optional()}),h.strictObject({type:h.literal("start-step")}),h.strictObject({type:h.literal("finish-step")}),h.strictObject({type:h.literal("start"),messageId:h.string().optional(),messageMetadata:h.unknown().optional()}),h.strictObject({type:h.literal("finish"),finishReason:h.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:h.unknown().optional()}),h.strictObject({type:h.literal("abort"),reason:h.string().optional()}),h.strictObject({type:h.literal("message-metadata"),messageMetadata:h.unknown()})])));function LH(e){return e.type.startsWith("data-")}function _w(e){return e.type.startsWith("tool-")}function kH(e){return e.type==="dynamic-tool"}function If(e){return _w(e)||kH(e)}function sR(e){return e.type.split("-").slice(1).join("-")}function TH({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function AH({stream:e,messageMetadataSchema:t,dataPartSchemas:a,runUpdateMessageJob:n,onError:r,onToolCall:o,onData:l}){return e.pipeThrough(new TransformStream({async transform(i,s){await n(async({state:u,write:c})=>{var d,f,p,m;function x(g){let M=u.message.parts.filter(If).find(C=>C.toolCallId===g);if(M==null)throw new ei({chunkType:"tool-invocation",chunkId:g,message:`No tool invocation found for tool call ID "${g}".`});return M}function b(g){var v;let M=u.message.parts.find(E=>_w(E)&&E.toolCallId===g.toolCallId),C=g,A=M;if(M!=null){M.state=g.state,A.input=C.input,A.output=C.output,A.errorText=C.errorText,A.rawInput=C.rawInput,A.preliminary=C.preliminary,g.title!==void 0&&(A.title=g.title),A.providerExecuted=(v=C.providerExecuted)!=null?v:M.providerExecuted;let E=C.providerMetadata;if(E!=null)if(g.state==="output-available"||g.state==="output-error"){let _=M;_.resultProviderMetadata=E}else M.callProviderMetadata=E}else u.message.parts.push({type:`tool-${g.toolName}`,toolCallId:g.toolCallId,state:g.state,title:g.title,input:C.input,output:C.output,rawInput:C.rawInput,errorText:C.errorText,providerExecuted:C.providerExecuted,preliminary:C.preliminary,...C.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:C.providerMetadata}:{},...C.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:C.providerMetadata}:{}})}function y(g){var v,M;let C=u.message.parts.find(_=>_.type==="dynamic-tool"&&_.toolCallId===g.toolCallId),A=g,E=C;if(C!=null){C.state=g.state,E.toolName=g.toolName,E.input=A.input,E.output=A.output,E.errorText=A.errorText,E.rawInput=(v=A.rawInput)!=null?v:E.rawInput,E.preliminary=A.preliminary,g.title!==void 0&&(E.title=g.title),E.providerExecuted=(M=A.providerExecuted)!=null?M:C.providerExecuted;let _=A.providerMetadata;if(_!=null)if(g.state==="output-available"||g.state==="output-error"){let k=C;k.resultProviderMetadata=_}else C.callProviderMetadata=_}else u.message.parts.push({type:"dynamic-tool",toolName:g.toolName,toolCallId:g.toolCallId,state:g.state,input:A.input,output:A.output,errorText:A.errorText,preliminary:A.preliminary,providerExecuted:A.providerExecuted,title:g.title,...A.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:A.providerMetadata}:{},...A.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:A.providerMetadata}:{}})}async function w(g){if(g!=null){let v=u.message.metadata!=null?xR(u.message.metadata,g):g;t!=null&&await Cf({value:v,schema:t,context:{field:"message.metadata",entityId:u.message.id}}),u.message.metadata=v}}switch(i.type){case"text-start":{let g={type:"text",text:"",providerMetadata:i.providerMetadata,state:"streaming"};u.activeTextParts[i.id]=g,u.message.parts.push(g),c();break}case"text-delta":{let g=u.activeTextParts[i.id];if(g==null)throw new ei({chunkType:"text-delta",chunkId:i.id,message:`Received text-delta for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});g.text+=i.delta,g.providerMetadata=(d=i.providerMetadata)!=null?d:g.providerMetadata,c();break}case"text-end":{let g=u.activeTextParts[i.id];if(g==null)throw new ei({chunkType:"text-end",chunkId:i.id,message:`Received text-end for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});g.state="done",g.providerMetadata=(f=i.providerMetadata)!=null?f:g.providerMetadata,delete u.activeTextParts[i.id],c();break}case"reasoning-start":{let g={type:"reasoning",text:"",providerMetadata:i.providerMetadata,state:"streaming"};u.activeReasoningParts[i.id]=g,u.message.parts.push(g),c();break}case"reasoning-delta":{let g=u.activeReasoningParts[i.id];if(g==null)throw new ei({chunkType:"reasoning-delta",chunkId:i.id,message:`Received reasoning-delta for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});g.text+=i.delta,g.providerMetadata=(p=i.providerMetadata)!=null?p:g.providerMetadata,c();break}case"reasoning-end":{let g=u.activeReasoningParts[i.id];if(g==null)throw new ei({chunkType:"reasoning-end",chunkId:i.id,message:`Received reasoning-end for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});g.providerMetadata=(m=i.providerMetadata)!=null?m:g.providerMetadata,g.state="done",delete u.activeReasoningParts[i.id],c();break}case"file":{u.message.parts.push({type:"file",mediaType:i.mediaType,url:i.url,...i.providerMetadata!=null?{providerMetadata:i.providerMetadata}:{}}),c();break}case"source-url":{u.message.parts.push({type:"source-url",sourceId:i.sourceId,url:i.url,title:i.title,providerMetadata:i.providerMetadata}),c();break}case"source-document":{u.message.parts.push({type:"source-document",sourceId:i.sourceId,mediaType:i.mediaType,title:i.title,filename:i.filename,providerMetadata:i.providerMetadata}),c();break}case"tool-input-start":{let g=u.message.parts.filter(_w);u.partialToolCalls[i.toolCallId]={text:"",toolName:i.toolName,index:g.length,dynamic:i.dynamic,title:i.title},i.dynamic?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-streaming",input:void 0,providerExecuted:i.providerExecuted,title:i.title,providerMetadata:i.providerMetadata}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-streaming",input:void 0,providerExecuted:i.providerExecuted,title:i.title,providerMetadata:i.providerMetadata}),c();break}case"tool-input-delta":{let g=u.partialToolCalls[i.toolCallId];if(g==null)throw new ei({chunkType:"tool-input-delta",chunkId:i.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${i.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});g.text+=i.inputTextDelta;let{value:v}=await iu(g.text);g.dynamic?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"input-streaming",input:v,title:g.title}):b({toolCallId:i.toolCallId,toolName:g.toolName,state:"input-streaming",input:v,title:g.title}),c();break}case"tool-input-available":{i.dynamic?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-available",input:i.input,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:i.title}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-available",input:i.input,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:i.title}),c(),o&&!i.providerExecuted&&await o({toolCall:i});break}case"tool-input-error":{let g=u.message.parts.filter(If).find(M=>M.toolCallId===i.toolCallId);(g!=null?g.type==="dynamic-tool":!!i.dynamic)?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"output-error",input:i.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"output-error",input:void 0,rawInput:i.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata}),c();break}case"tool-approval-request":{let g=x(i.toolCallId);g.state="approval-requested",g.approval={id:i.approvalId},c();break}case"tool-output-denied":{let g=x(i.toolCallId);g.state="output-denied",c();break}case"tool-output-available":{let g=x(i.toolCallId);g.type==="dynamic-tool"?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"output-available",input:g.input,output:i.output,preliminary:i.preliminary,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}):b({toolCallId:i.toolCallId,toolName:sR(g),state:"output-available",input:g.input,output:i.output,providerExecuted:i.providerExecuted,preliminary:i.preliminary,providerMetadata:i.providerMetadata,title:g.title}),c();break}case"tool-output-error":{let g=x(i.toolCallId);g.type==="dynamic-tool"?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"output-error",input:g.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}):b({toolCallId:i.toolCallId,toolName:sR(g),state:"output-error",input:g.input,rawInput:g.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}),c();break}case"start-step":{u.message.parts.push({type:"step-start"});break}case"finish-step":{u.activeTextParts={},u.activeReasoningParts={};break}case"start":{i.messageId!=null&&(u.message.id=i.messageId),await w(i.messageMetadata),(i.messageId!=null||i.messageMetadata!=null)&&c();break}case"finish":{i.finishReason!=null&&(u.finishReason=i.finishReason),await w(i.messageMetadata),i.messageMetadata!=null&&c();break}case"message-metadata":{await w(i.messageMetadata),i.messageMetadata!=null&&c();break}case"error":{r?.(new Error(i.errorText));break}default:if(LH(i)){if(a?.[i.type]!=null){let M=u.message.parts.findIndex(A=>"id"in A&&"data"in A&&A.id===i.id&&A.type===i.type),C=M>=0?M:u.message.parts.length;await Cf({value:i.data,schema:a[i.type],context:{field:`message.parts[${C}].data`,entityName:i.type,entityId:i.id}})}let g=i;if(g.transient){l?.(g);break}let v=g.id!=null?u.message.parts.find(M=>g.type===M.type&&g.id===M.id):void 0;v!=null?v.data=g.data:u.message.parts.push(g),l?.(g),c()}}s.enqueue(i)})}}))}async function MH({stream:e,onError:t}){let a=e.getReader();try{for(;;){let{done:n}=await a.read();if(n)break}}catch(n){t?.(n)}finally{a.releaseLock()}}var Hae=nr({prefix:"aitxt",size:24});var Gae=vf(()=>ou(h.array(h.object({id:h.string(),role:h.enum(["system","user","assistant"]),metadata:h.unknown().optional(),parts:h.array(h.union([h.object({type:h.literal("text"),text:h.string(),state:h.enum(["streaming","done"]).optional(),providerMetadata:X.optional()}),h.object({type:h.literal("reasoning"),text:h.string(),state:h.enum(["streaming","done"]).optional(),providerMetadata:X.optional()}),h.object({type:h.literal("source-url"),sourceId:h.string(),url:h.string(),title:h.string().optional(),providerMetadata:X.optional()}),h.object({type:h.literal("source-document"),sourceId:h.string(),mediaType:h.string(),title:h.string(),filename:h.string().optional(),providerMetadata:X.optional()}),h.object({type:h.literal("file"),mediaType:h.string(),filename:h.string().optional(),url:h.string(),providerMetadata:X.optional()}),h.object({type:h.literal("step-start")}),h.object({type:h.string().startsWith("data-"),id:h.string().optional(),data:h.unknown()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("input-streaming"),input:h.unknown().optional(),providerExecuted:h.boolean().optional(),callProviderMetadata:X.optional(),output:h.never().optional(),errorText:h.never().optional(),approval:h.never().optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("input-available"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.never().optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("approval-requested"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.never().optional(),reason:h.never().optional()})}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("approval-responded"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.boolean(),reason:h.string().optional()})}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-available"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.unknown(),errorText:h.never().optional(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),preliminary:h.boolean().optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-error"),input:h.unknown(),rawInput:h.unknown().optional(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.string(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-denied"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!1),reason:h.string().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("input-streaming"),providerExecuted:h.boolean().optional(),callProviderMetadata:X.optional(),input:h.unknown().optional(),output:h.never().optional(),errorText:h.never().optional(),approval:h.never().optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("input-available"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.never().optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("approval-requested"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.never().optional(),reason:h.never().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("approval-responded"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.boolean(),reason:h.string().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-available"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.unknown(),errorText:h.never().optional(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),preliminary:h.boolean().optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-error"),providerExecuted:h.boolean().optional(),input:h.unknown(),rawInput:h.unknown().optional(),output:h.never().optional(),errorText:h.string(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-denied"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!1),reason:h.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var Wae=nr({prefix:"aiobj",size:24});function vR(e){return({url:t,abortSignal:a})=>iH({url:t,maxBytes:e?.maxBytes,abortSignal:a})}var EH=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,a)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){a(n)}}),this.processQueue()})}};var Zae=nr({prefix:"aiobj",size:24});var Qae=vR();var RH="AI_NoSuchProviderError",DH=`vercel.ai.error.${RH}`,_H=Symbol.for(DH),OH;OH=_H;var Kae=vR();async function PH(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{let{name:a,type:n}=t,r=await new Promise((o,l)=>{let i=new FileReader;i.onload=s=>{var u;o((u=s.target)==null?void 0:u.result)},i.onerror=s=>l(s),i.readAsDataURL(t)});return{type:"file",mediaType:n,filename:a,url:r}}))}var NH=class{constructor({api:e="/api/chat",credentials:t,headers:a,body:n,fetch:r,prepareSendMessagesRequest:o,prepareReconnectToStreamRequest:l}){this.api=e,this.credentials=t,this.headers=a,this.body=n,this.fetch=r,this.prepareSendMessagesRequest=o,this.prepareReconnectToStreamRequest=l}async sendMessages({abortSignal:e,...t}){var a,n,r,o,l;let i=await Sn(this.body),s=await Sn(this.headers),u=await Sn(this.credentials),c={...Wr(s),...Wr(t.headers)},d=await((a=this.prepareSendMessagesRequest)==null?void 0:a.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...i,...t.body},headers:c,credentials:u,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),f=(n=d?.api)!=null?n:this.api,p=d?.headers!==void 0?Wr(d.headers):c,m=d?.body!==void 0?d.body:{...i,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},x=(r=d?.credentials)!=null?r:u,y=await((o=this.fetch)!=null?o:globalThis.fetch)(f,{method:"POST",headers:{"Content-Type":"application/json",...p},body:JSON.stringify(m),credentials:x,signal:e});if(!y.ok)throw new Error((l=await y.text())!=null?l:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}async reconnectToStream(e){var t,a,n,r,o;let l=await Sn(this.body),i=await Sn(this.headers),s=await Sn(this.credentials),u={...Wr(i),...Wr(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...l,...e.body},headers:u,credentials:s,requestMetadata:e.metadata})),d=(a=c?.api)!=null?a:`${this.api}/${e.chatId}/stream`,f=c?.headers!==void 0?Wr(c.headers):u,p=(n=c?.credentials)!=null?n:s,x=await((r=this.fetch)!=null?r:globalThis.fetch)(d,{method:"GET",headers:f,credentials:p});if(x.status===204)return null;if(!x.ok)throw new Error((o=await x.text())!=null?o:"Failed to fetch the chat response.");if(!x.body)throw new Error("The response body is empty.");return this.processResponseStream(x.body)}},Pw=class extends NH{constructor(e={}){super(e)}processResponseStream(e){return iR({stream:e,schema:Ow}).pipeThrough(new TransformStream({async transform(t,a){if(!t.success)throw t.error;a.enqueue(t.value)}}))}},bR=class{constructor({generateId:e=tR,id:t=e(),transport:a=new Pw,messageMetadataSchema:n,dataPartSchemas:r,state:o,onError:l,onToolCall:i,onFinish:s,onData:u,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new EH,this.sendMessage=async(d,f)=>{var p,m,x,b;if(d==null){await this.makeRequest({trigger:"submit-message",messageId:(p=this.lastMessage)==null?void 0:p.id,...f});return}let y;if("text"in d||"files"in d?y={parts:[...Array.isArray(d.files)?d.files:await PH(d.files),..."text"in d&&d.text!=null?[{type:"text",text:d.text}]:[]]}:y=d,d.messageId!=null){let w=this.state.messages.findIndex(g=>g.id===d.messageId);if(w===-1)throw new Error(`message with id ${d.messageId} not found`);if(this.state.messages[w].role!=="user")throw new Error(`message with id ${d.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,w+1),this.state.replaceMessage(w,{...y,id:d.messageId,role:(m=y.role)!=null?m:"user",metadata:d.metadata})}else this.state.pushMessage({...y,id:(x=y.id)!=null?x:this.generateId(),role:(b=y.role)!=null?b:"user",metadata:d.metadata});await this.makeRequest({trigger:"submit-message",messageId:d.messageId,...f})},this.regenerate=async({messageId:d,...f}={})=>{let p=d==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===d);if(p===-1)throw new Error(`message ${d} not found`);this.state.messages=this.state.messages.slice(0,this.messages[p].role==="assistant"?p:p+1),await this.makeRequest({trigger:"regenerate-message",messageId:d,...f})},this.resumeStream=async(d={})=>{await this.makeRequest({trigger:"resume-stream",...d})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:d,approved:f,reason:p,options:m})=>this.jobExecutor.run(async()=>{let x=this.state.messages,b=x[x.length-1],y=w=>If(w)&&w.state==="approval-requested"&&w.approval.id===d?{...w,state:"approval-responded",approval:{id:d,approved:f,reason:p}}:w;this.state.replaceMessage(x.length-1,{...b,parts:b.parts.map(y)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(y)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(w=>{var g;w&&this.makeRequest({trigger:"submit-message",messageId:(g=this.lastMessage)==null?void 0:g.id,...m})})}),this.addToolOutput=async({state:d="output-available",toolCallId:f,output:p,errorText:m,options:x})=>this.jobExecutor.run(async()=>{let b=this.state.messages,y=b[b.length-1],w=g=>If(g)&&g.toolCallId===f?{...g,state:d,output:p,errorText:m}:g;this.state.replaceMessage(b.length-1,{...y,parts:y.parts.map(w)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(w)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(g=>{var v;g&&this.makeRequest({trigger:"submit-message",messageId:(v=this.lastMessage)==null?void 0:v.id,...x})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var d;this.status!=="streaming"&&this.status!=="submitted"||(d=this.activeResponse)!=null&&d.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=a,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=r,this.state=o,this.onError=l,this.onToolCall=i,this.onFinish=s,this.onData=u,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:a,body:n,messageId:r}){var o,l,i;let s;if(e==="resume-stream")try{let p=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:a,body:n});if(p==null)return;s=p}catch(p){this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p});return}this.setStatus({status:"submitted",error:void 0});let u=this.lastMessage,c=!1,d=!1,f=!1;try{let p={state:TH({lastMessage:this.state.snapshot(u),messageId:this.generateId()}),abortController:new AbortController};p.abortController.signal.addEventListener("abort",()=>{c=!0}),this.activeResponse=p;let m;e==="resume-stream"?m=s:m=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:p.abortController.signal,metadata:t,headers:a,body:n,trigger:e,messageId:r});let x=b=>this.jobExecutor.run(()=>b({state:p.state,write:()=>{var y;this.setStatus({status:"streaming"}),p.state.message.id===((y=this.lastMessage)==null?void 0:y.id)?this.state.replaceMessage(this.state.messages.length-1,p.state.message):this.state.pushMessage(p.state.message)}}));await MH({stream:AH({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:x,onError:b=>{throw b}}),onError:b=>{throw b}}),this.setStatus({status:"ready"})}catch(p){if(c||p.name==="AbortError")return c=!0,this.setStatus({status:"ready"}),null;f=!0,p instanceof TypeError&&(p.message.toLowerCase().includes("fetch")||p.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p})}finally{try{(l=this.onFinish)==null||l.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:d,isError:f,finishReason:(o=this.activeResponse)==null?void 0:o.state.finishReason})}catch(p){console.error(p)}this.activeResponse=void 0}!f&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(i=this.lastMessage)==null?void 0:i.id,metadata:t,headers:a,body:n})}};var kR=q(CR(),1);var du=q(Ae(),1);var Tf=q(Ae(),1);var LR=(e,t,a)=>{if(!t.has(e))throw TypeError("Cannot "+a)},ct=(e,t,a)=>(LR(e,t,"read from private field"),a?a.call(e):t.get(e)),Cn=(e,t,a)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,a)},Zr=(e,t,a,n)=>(LR(e,t,"write to private field"),n?n.call(e,a):t.set(e,a),a);function UH(e,t){return t!=null?(0,kR.default)(e,t):e}var Qa,Lf,kf,su,uu,cu,ti,Nw,Bw,zH=class{constructor(e=[]){Cn(this,Qa,void 0),Cn(this,Lf,"ready"),Cn(this,kf,void 0),Cn(this,su,new Set),Cn(this,uu,new Set),Cn(this,cu,new Set),this.pushMessage=t=>{Zr(this,Qa,ct(this,Qa).concat(t)),ct(this,ti).call(this)},this.popMessage=()=>{Zr(this,Qa,ct(this,Qa).slice(0,-1)),ct(this,ti).call(this)},this.replaceMessage=(t,a)=>{Zr(this,Qa,[...ct(this,Qa).slice(0,t),this.snapshot(a),...ct(this,Qa).slice(t+1)]),ct(this,ti).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,a)=>{let n=a?UH(t,a):t;return ct(this,su).add(n),()=>{ct(this,su).delete(n)}},this["~registerStatusCallback"]=t=>(ct(this,uu).add(t),()=>{ct(this,uu).delete(t)}),this["~registerErrorCallback"]=t=>(ct(this,cu).add(t),()=>{ct(this,cu).delete(t)}),Cn(this,ti,()=>{ct(this,su).forEach(t=>t())}),Cn(this,Nw,()=>{ct(this,uu).forEach(t=>t())}),Cn(this,Bw,()=>{ct(this,cu).forEach(t=>t())}),Zr(this,Qa,e)}get status(){return ct(this,Lf)}set status(e){Zr(this,Lf,e),ct(this,Nw).call(this)}get error(){return ct(this,kf)}set error(e){Zr(this,kf,e),ct(this,Bw).call(this)}get messages(){return ct(this,Qa)}set messages(e){Zr(this,Qa,[...e]),ct(this,ti).call(this)}};Qa=new WeakMap;Lf=new WeakMap;kf=new WeakMap;su=new WeakMap;uu=new WeakMap;cu=new WeakMap;ti=new WeakMap;Nw=new WeakMap;Bw=new WeakMap;var ai,IR=class extends bR{constructor({messages:e,...t}){let a=new zH(e);super({...t,state:a}),Cn(this,ai,void 0),this["~registerMessagesCallback"]=(n,r)=>ct(this,ai)["~registerMessagesCallback"](n,r),this["~registerStatusCallback"]=n=>ct(this,ai)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>ct(this,ai)["~registerErrorCallback"](n),Zr(this,ai,a)}};ai=new WeakMap;function TR({experimental_throttle:e,resume:t=!1,...a}={}){let n=(0,Ka.useRef)("chat"in a?{}:{onToolCall:a.onToolCall,onData:a.onData,onFinish:a.onFinish,onError:a.onError,sendAutomaticallyWhen:a.sendAutomaticallyWhen});"chat"in a||(n.current={onToolCall:a.onToolCall,onData:a.onData,onFinish:a.onFinish,onError:a.onError,sendAutomaticallyWhen:a.sendAutomaticallyWhen});let r={...a,onToolCall:f=>{var p,m;return(m=(p=n.current).onToolCall)==null?void 0:m.call(p,f)},onData:f=>{var p,m;return(m=(p=n.current).onData)==null?void 0:m.call(p,f)},onFinish:f=>{var p,m;return(m=(p=n.current).onFinish)==null?void 0:m.call(p,f)},onError:f=>{var p,m;return(m=(p=n.current).onError)==null?void 0:m.call(p,f)},sendAutomaticallyWhen:f=>{var p,m,x;return(x=(m=(p=n.current).sendAutomaticallyWhen)==null?void 0:m.call(p,f))!=null?x:!1}},o=(0,Ka.useRef)("chat"in a?a.chat:new IR(r));("chat"in a&&a.chat!==o.current||"id"in a&&o.current.id!==a.id)&&(o.current="chat"in a?a.chat:new IR(r));let i=(0,Ka.useCallback)(f=>o.current["~registerMessagesCallback"](f,e),[e,o.current.id]),s=(0,Ka.useSyncExternalStore)(i,()=>o.current.messages,()=>o.current.messages),u=(0,Ka.useSyncExternalStore)(o.current["~registerStatusCallback"],()=>o.current.status,()=>o.current.status),c=(0,Ka.useSyncExternalStore)(o.current["~registerErrorCallback"],()=>o.current.error,()=>o.current.error),d=(0,Ka.useCallback)(f=>{typeof f=="function"&&(f=f(o.current.messages)),o.current.messages=f},[o]);return(0,Ka.useEffect)(()=>{t&&o.current.resumeStream()},[t,o]),{id:o.current.id,messages:s,setMessages:d,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:u,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}var Z=q(Ae(),1);function ni(e,t,a){let[n,r=""]=e.split("?"),o=n.replace(/\/$/,""),l=new URLSearchParams(r);if(a)for(let[s,u]of Object.entries(a))l.set(s,u);let i=l.toString();return`${o}${t}${i?`?${i}`:""}`}function qH(e){let t=e?.cause,a=t?.issues??t?.errors;if(!Array.isArray(a))return null;let n=a.find(r=>r.code==="invalid_union");if(!n?.errors)return null;for(let r of n.errors){if(!Array.isArray(r)||r.some(i=>(i.code==="invalid_value"||i.code==="invalid_literal")&&i.path?.[0]==="type"))continue;let l=r.filter(i=>i.code==="unrecognized_keys").flatMap(i=>i.keys??[]);if(l.length>0)return l}return null}var Af=class extends Pw{processResponseStream(t){let a="",n=Ow(),r=n.validate?.bind(n);return t.pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({async transform(o,l){a+=o;let i=a.split(`
|
|
138
|
-
`);a=i.pop()??"";for(let s of i){let u=s.trim();if(!u.startsWith("data:"))continue;let c=u.slice(5).trim();if(c!=="[DONE]")try{let d=JSON.parse(c);if(!r){l.enqueue(d);continue}let f=await r(d);if(f.success){l.enqueue(f.value);continue}let p=qH(f.error);if(p?.length){let m={...d};for(let b of p)delete m[b];let x=await r(m);x.success&&l.enqueue(x.value)}}catch{}}}}))}};var FH="waniwani-memory";var _a="threads",Mf="by_memoryUserId",HH="by_updatedAt";var MR="memoryUserId",AR="waniwani-memory-user-id",Uw=null;function zw(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function jH(e,t){if(t<1&&(e.objectStoreNames.contains("ids")||e.createObjectStore("ids")),t<2&&!e.objectStoreNames.contains(_a)){let a=e.createObjectStore(_a,{keyPath:"threadId"});a.createIndex(Mf,"memoryUserId",{unique:!1}),a.createIndex(HH,"updatedAt",{unique:!1})}}async function qw(){return new Promise((e,t)=>{let a=indexedDB.open(FH,2);a.onupgradeneeded=n=>{jH(a.result,n.oldVersion)},a.onsuccess=()=>e(a.result),a.onerror=()=>t(a.error)})}async function VH(){return qw()}async function GH(e){return new Promise((t,a)=>{let o=e.transaction("ids","readonly").objectStore("ids").get(MR);o.onsuccess=()=>t(typeof o.result=="string"?o.result:null),o.onerror=()=>a(o.error)})}async function $H(e,t){return new Promise((a,n)=>{let l=e.transaction("ids","readwrite").objectStore("ids").put(t,MR);l.onsuccess=()=>a(),l.onerror=()=>n(l.error)})}async function WH(){if(typeof indexedDB>"u")return null;try{let e=await VH();try{let t=await GH(e);if(t)return t;let a=zw();return await $H(e,a),a}finally{e.close()}}catch{return null}}function XH(){try{let e=localStorage.getItem(AR);if(e)return e;let t=zw();return localStorage.setItem(AR,t),t}catch{return null}}async function ER(){let e=await WH();if(e)return e;let t=XH();return t||(Uw||(Uw=zw()),Uw)}var RR=50,DR=1e3;function Ef(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.threadId=="string"&&typeof t.memoryUserId=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"}async function Rf(e){if(typeof indexedDB>"u")return null;let t=null;try{return t=await qw(),await e(t)}catch{return null}finally{try{t?.close()}catch{}}}function Fw(e){return new Promise((t,a)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>a(e.error)})}async function Hw(e){return await Rf(async a=>{let o=a.transaction(_a,"readonly").objectStore(_a).index(Mf),i=(await Fw(o.getAll(e))??[]).filter(Ef);return i.sort((s,u)=>s.updatedAt<u.updatedAt?1:-1),i})??[]}async function Df(e){return await Rf(async a=>{let r=a.transaction(_a,"readonly").objectStore(_a),o=await Fw(r.get(e));return Ef(o)?o:null})??null}async function jw(e){if(!Ef(e))return;let t=e.messages.length>DR?{...e,messages:e.messages.slice(e.messages.length-DR)}:e;await Rf(async a=>{await new Promise((s,u)=>{let c=a.transaction(_a,"readwrite");c.oncomplete=()=>s(),c.onerror=()=>u(c.error),c.onabort=()=>u(c.error),c.objectStore(_a).put(t)});let n=a.transaction(_a,"readwrite"),r=n.objectStore(_a),o=r.index(Mf),i=(await Fw(o.getAll(t.memoryUserId))??[]).filter(Ef);if(i.length>RR){i.sort((u,c)=>u.updatedAt<c.updatedAt?-1:1);let s=i.slice(0,i.length-RR);for(let u of s)r.delete(u.threadId)}return await new Promise((s,u)=>{n.oncomplete=()=>s(),n.onerror=()=>u(n.error),n.onabort=()=>u(n.error)}),null})}async function _R(e){await Rf(async t=>(await new Promise((a,n)=>{let r=t.transaction(_a,"readwrite");r.oncomplete=()=>a(),r.onerror=()=>n(r.error),r.onabort=()=>n(r.error),r.objectStore(_a).delete(e)}),null))}async function Vw(e){return(await Hw(e))[0]?.threadId??null}function OR(e){let t=e.trim();if(!t)return`Conversation on ${new Date().toISOString().slice(0,10)}`;let a=t.split(/\r?\n/,1)[0]??t;return a.length<=60?a:`${a.slice(0,60).trimEnd()}\u2026`}var PR="waniwani-visitor-id";function NR(e,t){return e.match(t)?.[1]??null}function ZH(e){let t=[["Edge",/Edg(?:e|A|iOS)?\/(\S+)/],["Opera",/(?:OPR|Opera)\/(\S+)/],["Samsung Internet",/SamsungBrowser\/(\S+)/],["Firefox",/Firefox\/(\S+)/],["Chrome",/Chrome\/(\S+)/],["Safari",/Version\/(\S+).*Safari/]];for(let[a,n]of t){let r=NR(e,n);if(r)return{name:a,version:r}}return null}function QH(e){let t=[["iOS",/(?:iPhone|iPad|iPod).+?OS (\d+[_.\d]*)/],["Android",/Android (\d+[.\d]*)/],["macOS",/Mac OS X (\d+[_.\d]*)/],["Windows",/Windows NT (\d+[.\d]*)/],["ChromeOS",/CrOS \S+ (\d+[.\d]*)/],["Linux",/Linux/]];for(let[a,n]of t){let r=NR(e,n);if(r)return{name:a,version:r.replace(/_/g,".")};if(a==="Linux"&&n.test(e))return{name:a,version:""}}return null}function KH(e){return typeof navigator<"u"&&"userAgentData"in navigator&&navigator.userAgentData?.mobile?"mobile":/iPad|tablet|PlayBook/i.test(e)?"tablet":/Mobi|Android.*Mobile|iPhone|iPod/i.test(e)?"mobile":"desktop"}async function YH(e){let t=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(a)).map(n=>n.toString(16).padStart(2,"0")).join("")}async function JH(){try{let a=localStorage.getItem(PR);if(a)return a}catch{}let e=[navigator.userAgent,screen.width,screen.height,screen.colorDepth,Intl.DateTimeFormat().resolvedOptions().timeZone,navigator.language,navigator.hardwareConcurrency??"",navigator.platform??""].join("|"),t=await YH(e);try{localStorage.setItem(PR,t)}catch{}return t}async function fu(){let e=navigator.userAgent,[t,a]=await Promise.all([JH(),ER()]);return{userAgent:e,browser:ZH(e),os:QH(e),deviceType:KH(e),language:navigator.language,languages:[...navigator.languages],timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:screen.width,screenHeight:screen.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio??1,touchSupport:"ontouchstart"in window||navigator.maxTouchPoints>0,connectionType:navigator.connection?.effectiveType??"unknown",referrer:document.referrer,visitorId:t,memoryUserId:a}}var e9="x-session-id",t9=250;function BR(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Cs()}function _f(){return new Date().toISOString()}function UR(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}async function a9(e,t){let a=ni(e,"/tools"),n=await fetch(a,{method:"GET",headers:t?{...t}:void 0});if(!n.ok)throw new Error(`[Waniwani] Failed to fetch /tools: ${n.status} ${n.statusText}`);let r=await n.json();if(!r||!Array.isArray(r.tools))return{};let o={};for(let l of r.tools)l&&typeof l.name=="string"&&(o[l.name]=l);return o}function zR(e){let{api:t="/api/waniwani",headers:a,body:n,onMessageSent:r,onResponseReceived:o,enableThreadHistory:l=!1,activeThreadId:i,onThreadChange:s}=e,u=(0,Z.useRef)(a),c=(0,Z.useRef)(n),d=(0,Z.useRef)(l);(0,Z.useEffect)(()=>{d.current=l},[l]);let f=(0,Z.useRef)(void 0),p=(0,Z.useRef)(null),[m,x]=(0,Z.useState)(void 0),b=(0,Z.useRef)(m),[y,w]=(0,Z.useState)(i),g=(0,Z.useRef)(y),[v,M]=(0,Z.useState)([]),[C,A]=(0,Z.useState)(!l),E=(0,Z.useRef)(void 0),_=(0,Z.useRef)(void 0),k=(0,Z.useRef)(void 0),W=(0,Z.useRef)(void 0),U=(0,Z.useRef)(0),R=(0,Z.useRef)(s);(0,Z.useEffect)(()=>{R.current=s},[s]);let B=(0,Z.useCallback)(N=>{g.current=N,w(N),N&&R.current?.(N)},[]),F=(0,Z.useCallback)(async()=>{if(!l)return;let N=p.current?.memoryUserId;if(!N)return;let ae=await Hw(N);M(ae)},[l]),j=(0,Z.useCallback)(()=>b.current,[]),K=(0,Z.useCallback)(N=>{let ae=UR(N);ae&&b.current!==ae&&(b.current=ae,x(ae))},[]),de=(0,Z.useCallback)(()=>{b.current=void 0,x(void 0)},[]);(0,Z.useEffect)(()=>{u.current=a},[a]),(0,Z.useEffect)(()=>{c.current=n},[n]),(0,Z.useEffect)(()=>{let N=!1,ae=U.current;return(async()=>{try{let mt=await fu();if(N)return;p.current=mt}catch{}if(!l)return;let J=p.current?.memoryUserId;if(!J){A(!0);return}try{let mt=i??await Vw(J);if(N||ae!==U.current)return;if(mt){let Qe=await Df(mt);if(N||ae!==U.current)return;Qe&&Qe.memoryUserId===J&&(g.current=Qe.threadId,w(Qe.threadId),E.current=Qe.createdAt,_.current=Qe.title,Qe.sessionId&&(b.current=Qe.sessionId,x(Qe.sessionId)),me(Qe.messages))}await F()}finally{N||A(!0)}})(),()=>{N=!0}},[]);let He=(0,Z.useRef)(new Af({api:t,headers:()=>({...u.current}),body:()=>{let N={...c.current??{}},ae=Object.hasOwn(N,"sessionId"),J=UR(N.sessionId);if(J)K(J),N.sessionId=J;else if(ae)de(),delete N.sessionId;else{let Oa=j();Oa&&(N.sessionId=Oa)}if(Ql(f.current)&&(N.modelContext=f.current),p.current){let Oa=p.current;N.visitorContext={timezone:Oa.timezone,language:Oa.language,languages:Oa.languages,deviceType:Oa.deviceType,referrer:Oa.referrer,visitorId:Oa.visitorId};let kn=typeof N.visitor=="object"&&N.visitor!==null?N.visitor:{},nD=typeof kn.client=="object"&&kn.client!==null?kn.client:{};N.visitor={...kn,id:Oa.visitorId,client:{...nD,memoryUserId:Oa.memoryUserId}}}let mt=typeof N.extra=="object"&&N.extra!==null&&!Array.isArray(N.extra)?N.extra:void 0,Qe=p.current?.memoryUserId,Rt=p.current?.language,gu={};if(Qe&&(gu.memoryUserId=Qe),Rt&&(gu.locale=Rt),(Object.keys(gu).length>0||mt)&&(N.extra={...gu,...mt??{}}),d.current)if(Object.hasOwn(N,"threadId"))typeof N.threadId=="string"&&(g.current=N.threadId);else{let kn=g.current;kn||(kn=BR(),E.current=_f(),_.current=void 0,B(kn)),N.threadId=kn}return N},fetch:(async(N,ae)=>{let J=await fetch(N,ae);return f.current=void 0,K(J.headers.get(e9)),J})})),S=(0,Z.useRef)(null),Be=(0,Z.useRef)(null),rt=(0,Z.useRef)({}),[L,Re]=(0,Z.useState)(0),le=e.skipRemoteConfig===!0,ve=(0,Z.useCallback)(async()=>{if(!le)try{let N=await a9(t,u.current);rt.current=N,Re(ae=>ae+1)}catch(N){console.warn("[Waniwani] Failed to fetch tool definitions:",N instanceof Error?N.message:N)}},[t,le]);(0,Z.useEffect)(()=>{ve()},[ve]);let{messages:kt,sendMessage:fe,setMessages:me,status:be}=TR({messages:e.initialMessages,transport:He.current,onFinish({message:N}){o?.(),S.current&&(Be.current=N)},onError(N){console.warn("[Waniwani] Chat error:",N.message),S.current&&(S.current.reject(N),S.current=null)}}),De=(0,Z.useRef)(kt);(0,Z.useEffect)(()=>{De.current=kt},[kt]);let Se=(0,Z.useRef)(l);(0,Z.useEffect)(()=>{if(!l||Se.current||(Se.current=!0,De.current.length>0))return;let N=!1,ae=U.current;return A(!1),(async()=>{try{let J=p.current;if(!J)try{J=await fu(),p.current=J}catch{}let mt=J?.memoryUserId;if(!mt||N||ae!==U.current){N||A(!0);return}let Qe=i??await Vw(mt);if(N||ae!==U.current)return;if(Qe){let Rt=await Df(Qe);if(N||ae!==U.current)return;Rt&&Rt.memoryUserId===mt&&(g.current=Rt.threadId,w(Rt.threadId),E.current=Rt.createdAt,_.current=Rt.title,Rt.sessionId&&(b.current=Rt.sessionId,x(Rt.sessionId)),me(Rt.messages))}await F()}finally{N||A(!0)}})(),()=>{N=!0}},[l]),(0,Z.useEffect)(()=>{if(be==="ready"&&S.current&&Be.current){let N=S.current,ae=Be.current;S.current=null,Be.current=null,N.resolve(ae)}},[be]);let[Ue,Le]=(0,Z.useState)(""),[$,re]=(0,Z.useState)([]),je=be==="submitted"||be==="streaming",Nt=(0,Z.useCallback)(N=>{re(ae=>ae.filter(J=>J.id!==N))},[]),xa=je&&$.length>0,ia=(0,Z.useCallback)(N=>{let ae=!!N.text?.trim(),J=!!N.files?.length;if(ae||J){if(je){if($.length>0)return;re(mt=>[...mt,{id:Cs(),text:N.text||"",files:N.files??[],modelContext:N.modelContext}]),Le("");return}f.current=N.modelContext,fe({text:N.text||"",files:N.files}),r?.(N.text||""),Le("")}},[fe,r,je,$.length]),oi=(0,Z.useCallback)(N=>new Promise((ae,J)=>{S.current={resolve:ae,reject:J},fe({text:N}),r?.(N)}),[fe,r]);(0,Z.useEffect)(()=>{if(be!=="ready"||$.length===0)return;let[N,...ae]=$;re(ae),f.current=N.modelContext,fe({text:N.text,files:N.files.length>0?N.files:void 0}),r?.(N.text)},[be,fe,r,$]);let jf=(0,Z.useCallback)(()=>{me([]),re([]),de(),Le(""),rt.current={},Re(N=>N+1),ve()},[me,de,ve]),qo=(0,Z.useCallback)(()=>{if(!d.current)return;let N=p.current?.memoryUserId,ae=g.current,J=De.current;if(!(!N||!ae||J.length===0)){if(E.current||(E.current=_f()),!_.current){let mt=J.find(Rt=>Rt.role==="user"),Qe=mt?mt.parts.map(Rt=>"text"in Rt&&typeof Rt.text=="string"?Rt.text:"").join(" "):"";_.current=OR(Qe)}return{threadId:ae,memoryUserId:N,title:_.current,messages:J,sessionId:b.current,createdAt:E.current,updatedAt:_f()}}},[]),hu=(0,Z.useCallback)(async()=>{let N=qo();N&&(await jw(N),await F())},[qo,F]);(0,Z.useEffect)(()=>{if(l&&C&&!(be==="submitted"||be==="streaming")&&kt.length!==0)return k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{k.current=void 0;let N=hu().finally(()=>{W.current===N&&(W.current=void 0)});W.current=N},t9),()=>{k.current&&clearTimeout(k.current)}},[l,C,kt,be,hu]);let Fo=(0,Z.useCallback)(()=>{let N=W.current,ae=k.current,J=ae?qo():void 0;return ae&&(clearTimeout(ae),k.current=void 0),(async()=>{N&&await N,J&&(await jw(J),await F())})()},[qo,F]),O=(0,Z.useCallback)(()=>{U.current+=1,Fo(),me([]),re([]),de(),Le("");let N=BR();return E.current=_f(),_.current=void 0,B(N),F(),N},[me,de,B,F,Fo]),H=(0,Z.useCallback)(async N=>{U.current+=1;let ae=U.current;if(await Fo(),ae!==U.current)return;let J=await Df(N);ae===U.current&&J&&(B(J.threadId),E.current=J.createdAt,_.current=J.title,J.sessionId?(b.current=J.sessionId,x(J.sessionId)):de(),me(J.messages),re([]),Le(""))},[me,de,B,Fo]),oe=(0,Z.useCallback)(async N=>{if(g.current===N){U.current+=1,k.current&&(clearTimeout(k.current),k.current=void 0);let ae=W.current;ae&&await ae}await _R(N),await F(),g.current===N&&(me([]),re([]),de(),Le(""),g.current=void 0,w(void 0),E.current=void 0,_.current=void 0)},[me,de,F]);(0,Z.useEffect)(()=>{l&&C&&i!==void 0&&i!==g.current&&H(i)},[i,l,C,H]);let ye=(0,Z.useCallback)(N=>{Le(N.target.value)},[]),Fe=kt[kt.length-1],sa=kt.length>0,Ln=je&&(!sa||Fe.role==="user"),Ya=rt.current;return{messages:kt,status:be,text:Ue,setText:Le,handleSubmit:ia,handleTextChange:ye,isLoading:je,showLoaderBubble:Ln,lastMessage:Fe,hasMessages:sa,sendMessage:fe,sendMessageAndWait:oi,reset:jf,queuedMessages:$,queueFull:xa,removeQueuedMessage:Nt,sessionId:m,toolDefinitions:Ya,refreshToolDefinitions:ve,threads:v,activeThreadId:y,isThreadHistoryReady:C,startNewThread:O,switchThread:H,deleteThread:oe}}var In=q(Ae(),1);function n9(e){for(let t of e.parts){let a=t;if(a.type==="data"||a.type==="data-suggestions"){let n=a.data;if(n&&Array.isArray(n.suggestions))return n.suggestions}}return null}function qR(e){return typeof e=="object"&&e!==null&&"initial"in e}function FR(e){let{messages:t,status:a,config:n}=e,r=qR(n)&&n.initial?n.initial:void 0,[o,l]=(0,In.useState)(r??[]),i=(0,In.useRef)(a),s=n===!0||qR(n)&&n.dynamic!==!1,u=(0,In.useCallback)(()=>{l([])},[]),c=t.length>0;(0,In.useEffect)(()=>{!c&&r&&r.length>0&&l(r)},[r,c]);let d=t[t.length-1];return(0,In.useEffect)(()=>{d?.role==="user"&&u()},[d,u]),(0,In.useEffect)(()=>{let f=i.current;if(i.current=a,f==="streaming"&&a==="ready"&&s){let p=[...t].reverse().find(x=>x.role==="assistant");if(!p)return;let m=n9(p);m&&l(m)}},[a,s,t]),{suggestions:o,isLoading:!1,clear:u}}function HR(e,t){let a=t?.Authorization,n=typeof a=="string"&&a.startsWith("Bearer ")?a.slice(7):null;return ni(e,"/resource",n?{token:n}:void 0)}var r9={primaryColor:["--ww-primary","--ww-color-primary"],primaryForeground:["--ww-primary-fg","--ww-color-primary-foreground"],backgroundColor:["--ww-bg","--ww-color-background"],textColor:["--ww-text","--ww-color-foreground","--ww-color-accent-foreground"],mutedColor:["--ww-muted","--ww-color-muted-foreground"],borderColor:["--ww-border","--ww-color-border"],borderWidth:["--ww-border-width"],boxShadow:["--ww-shadow"],assistantBubbleColor:["--ww-assistant-bubble","--ww-color-accent"],userBubbleColor:["--ww-user-bubble"],inputBackgroundColor:["--ww-input-bg","--ww-color-input"],borderRadius:["--ww-radius"],messageBorderRadius:["--ww-msg-radius"],fontFamily:["--ww-font"],headerBackgroundColor:["--ww-header-bg"],headerTextColor:["--ww-header-text"],statusColor:["--ww-status"],toolCardColor:["--ww-tool-card","--ww-color-tool-card"]};function Of(e){let t={};for(let[a,n]of Object.entries(r9)){let r=e[a];if(r===void 0)continue;let o=typeof r=="number"?`${r}px`:String(r);for(let l of n)t[l]=o}return t}var Xe=q(ee(),1),Pf=(0,tt.forwardRef)(function(t,a){let{locale:n,messages:r}=t;return(0,Xe.jsx)(Ss,{locale:n,messages:r,children:(0,Xe.jsx)(o9,{...t,ref:a})})}),o9=(0,tt.forwardRef)(function(t,a){let{t:n,ready:r}=Ee(),{appearance:o,className:l,allowAttachments:i=!1,welcomeMessage:s,welcome:u,placeholder:c=n.promptInput.placeholder,triggerEvent:d="triggerDemoRequest",api:f,mcp:p,debug:m=!1,readOnly:x=!1,title:b,headerActions:y,hideHeader:w=!1,enableThreadHistory:g=!1,showToolCalls:v=!0,initializing:M=!1,disclaimer:C}=t,A=o?.theme,E=o?.variables,_=E?Of(E):{},[k,W]=(0,tt.useState)(!1);(0,tt.useEffect)(()=>{if(A!=="auto"||typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");W($.matches);let re=()=>W($.matches);return $.addEventListener("change",re),()=>$.removeEventListener("change",re)},[A]);let U=A==="dark"||A==="auto"&&k,R=zR({...t,api:f}),B=qE({...t,api:f,sessionId:R.sessionId,onCallTool:p?.onCallTool}),F=p?.resourceEndpoint??HR(f,t.headers),j=td(c,!R.text),[K,de]=(0,tt.useState)(null),[He,S]=(0,tt.useState)(null),Be=(0,tt.useRef)(null),rt=(0,tt.useRef)(null),L=(0,tt.useRef)(null),Re=(0,tt.useRef)(null),[le,ve]=(0,tt.useState)(!0),kt=(0,tt.useRef)(le);kt.current=le;let fe=(0,tt.useCallback)(()=>{let $=Be.current;if(!$)return;let re=$.querySelector("textarea");re&&re.focus()},[]),me=(0,tt.useCallback)(($="smooth")=>{let re=rt.current;re&&re.scrollTo({top:re.scrollHeight,behavior:$})},[]);(0,tt.useEffect)(()=>{let $=Re.current,re=rt.current;if(!$||!re)return;let je=new IntersectionObserver(([Nt])=>ve(Nt.isIntersecting),{root:re,rootMargin:"0px 0px 200px 0px",threshold:0});return je.observe($),()=>je.disconnect()},[]),(0,tt.useEffect)(()=>{(R.messages[R.messages.length-1]?.role==="user"||kt.current)&&me("smooth")},[R.messages.length,R.messages[R.messages.length-1]]),(0,tt.useEffect)(()=>{me("auto")},[me]),(0,tt.useEffect)(()=>{if(typeof ResizeObserver>"u")return;let $=rt.current,re=L.current;if(!$&&!re)return;let je=$?.scrollHeight??0,Nt=$?.clientHeight??0,xa=new ResizeObserver(()=>{let ia=rt.current;if(!ia)return;let oi=ia.scrollTop+Nt>=je-5;je=ia.scrollHeight,Nt=ia.clientHeight,oi&&me("auto")});return $&&xa.observe($),re&&xa.observe(re),()=>xa.disconnect()},[me]);let be=FR({messages:R.messages,status:R.status,config:t.suggestions}),De=(0,tt.useCallback)($=>{let re=$.content.map(je=>je.text??"").join("").trim();re&&R.handleSubmit({text:re,files:[],modelContext:$.modelContext})},[R.handleSubmit]),Se=(0,tt.useCallback)($=>{be.clear(),R.handleSubmit({text:$,files:[]})},[be.clear,R.handleSubmit]);(0,tt.useImperativeHandle)(a,()=>({sendMessage:$=>{R.handleSubmit({text:$,files:[]}),fe()},sendMessageAndWait:$=>R.sendMessageAndWait($),reset:R.reset,focus:fe,get messages(){return R.messages},get sessionId(){return R.sessionId}}),[R.handleSubmit,R.sendMessageAndWait,R.reset,R.messages,R.sessionId,fe]),(0,tt.useEffect)(()=>{if(!d)return;let $=re=>{let je=re.detail,Nt=typeof je?.message=="string"?je.message:void 0;Nt&&R.handleSubmit({text:Nt,files:[]}),fe()};return window.addEventListener(d,$),()=>window.removeEventListener(d,$)},[d,R.handleSubmit,fe]);let Ue=!w&&!!(b||g||y),Le=M||!r;return(0,Xe.jsxs)("div",{ref:Be,style:{..._,maxHeight:"inherit",...K&&He?{height:He}:{},opacity:Le?0:1,transition:"opacity 220ms ease-out"},"data-waniwani-chat":"","data-waniwani-layout":"embed","data-color-scheme":A==="auto"?"auto":void 0,...Le?{"data-waniwani-initializing":""}:{},...U?{"data-waniwani-dark":""}:{},className:V("ww:relative ww:w-full ww:h-full ww:flex ww:flex-col ww:bg-background ww:text-foreground ww:font-[family-name:var(--ww-font)] ww:overflow-hidden",A==="dark"&&"dark",l),children:[Ue&&(0,Xe.jsxs)("div",{className:"ww:shrink-0 ww:flex ww:items-center ww:gap-2 ww:pl-4 ww:pr-3 ww:py-3 ww:border-b ww:border-border",style:{backgroundColor:"var(--ww-color-card-header)",color:"var(--ww-color-card-header-foreground)"},children:[b&&(0,Xe.jsx)("div",{className:"ww:text-sm ww:font-semibold ww:truncate ww:flex-1 ww:min-w-0",children:b}),!b&&(0,Xe.jsx)("div",{className:"ww:flex-1"}),g&&(0,Xe.jsx)(zE,{threads:R.threads,activeThreadId:R.activeThreadId,onNewThread:R.startNewThread,onSelectThread:$=>{R.switchThread($)},onDeleteThread:$=>{R.deleteThread($)}}),y]}),(0,Xe.jsxs)("div",{ref:rt,className:V("ww:relative ww:flex-1 ww:min-h-0",K?"ww:overflow-hidden":"ww:overflow-y-auto"),children:[(0,Xe.jsxs)("div",{ref:L,className:V("ww:mx-auto ww:w-full ww:max-w-3xl ww:px-4 ww:py-6 ww:flex ww:flex-col ww:gap-6",K&&"ww:!py-0"),children:[(0,Xe.jsx)(NE,{messages:R.messages,status:R.status,welcomeMessage:s,welcome:u,onSuggestionSelect:Se,resourceEndpoint:F,chatSessionId:R.sessionId,isDark:U,onFollowUp:De,onCallTool:B,fullscreenToolCallId:K,debug:m,showToolCalls:v,toolDefinitions:R.toolDefinitions,onWidgetDisplayModeChange:($,re)=>{if($==="fullscreen"){let je=Be.current?.getBoundingClientRect().height??0;S(je>0?je:null),de(re.toolCallId)}else S(null),de(null)}}),(0,Xe.jsx)("div",{ref:Re,"aria-hidden":!0,style:{height:1}})]}),!le&&!K&&(0,Xe.jsx)("div",{className:"ww:sticky ww:bottom-2 ww:flex ww:justify-center ww:pointer-events-none",children:(0,Xe.jsx)(yn,{type:"button",onClick:()=>me("smooth"),size:"icon",variant:"outline",className:"ww:rounded-full ww:shadow ww:pointer-events-auto","aria-label":"Scroll to latest",children:(0,Xe.jsx)(us,{className:"ww:size-4"})})})]}),!x&&(0,Xe.jsxs)("div",{className:"ww:shrink-0 ww:bg-background",style:K?{display:"none"}:void 0,children:[(0,Xe.jsx)(ed,{suggestions:be.suggestions,isLoading:be.isLoading,onSelect:Se}),(0,Xe.jsx)(SC,{queuedMessages:R.queuedMessages,onRemove:R.removeQueuedMessage}),(0,Xe.jsx)("div",{className:"ww:px-4 ww:pb-2 ww:pt-2",children:(0,Xe.jsxs)("div",{className:"ww:mx-auto ww:w-full ww:max-w-3xl",children:[(0,Xe.jsx)(uC,{onSubmit:R.handleSubmit,globalDrop:i,multiple:i,className:"ww:rounded-2xl ww:border-border ww:bg-input",children:(0,Xe.jsxs)("div",{className:"ww:flex ww:items-center ww:gap-1 ww:pl-4 ww:pr-3 ww:py-2.5",children:[i&&(0,Xe.jsx)(fC,{}),(0,Xe.jsx)(cC,{onChange:R.handleTextChange,value:R.text,placeholder:j,className:"ww:min-h-0 ww:py-1 ww:px-0"}),(0,Xe.jsx)(dC,{status:R.status,disabled:R.queueFull})]})}),(0,Xe.jsxs)("div",{className:"ww:pt-2 ww:pb-1 ww:flex ww:flex-nowrap ww:justify-center ww:items-center ww:gap-1.5",children:[(0,Xe.jsx)(BE,{}),(0,Xe.jsx)(pC,{text:C})]})]})})]})]})});var pu=q(Ae(),1);function l9(){if(typeof window>"u")return!1;try{return window.WANIWANI_DEBUG?!0:!!window.localStorage?.getItem("WANIWANI_DEBUG")}catch{return!1}}function ri(...e){l9()&&console.log("[Waniwani]",...e)}var Gw=new Set;function i9(e,t,a){return`${e}|${t}|${a??""}`}function s9(e){try{return`${new URL(e).origin}/api/mcp/events/v2/batch`}catch{return e.replace(/\/$/,"").replace(/\/chat$/,"/events/v2/batch")}}async function jR(e){let{api:t,token:a,channelId:n,mode:r,source:o}=e;if(typeof window>"u"||!t||!a)return;let l=i9(t,a,n);if(!Gw.has(l)){Gw.add(l);try{let i=await fu(),s=new Date().toISOString(),u=JSON.stringify({sentAt:s,source:{sdk:"@waniwani/sdk",version:"0.1.0"},events:[{id:crypto.randomUUID(),type:"mcp.event",name:"page.viewed",source:o,timestamp:s,correlation:{visitorId:i.visitorId},properties:{channelId:n,mode:r,url:window.location.href,referrer:i.referrer,deviceType:i.deviceType,language:i.language,timezone:i.timezone},metadata:{}}]});await fetch(s9(t),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:u,keepalive:!0})}catch{Gw.delete(l)}}}var u9="waniwani:config:";function VR(e,t,a){return`${u9}${e}|${t}|${a??""}`}function $w(e,t,a){if(typeof window>"u")return null;try{let n=window.sessionStorage.getItem(VR(e,t,a));if(!n)return null;let r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function c9(e,t,a,n){if(!(typeof window>"u"))try{window.sessionStorage.setItem(VR(e,t,a),JSON.stringify(n))}catch{}}var d9=600;async function f9(e,t,a,n){try{let r=ni(e,"/config",n?{channel:n}:void 0),o=await fetch(r,{method:"GET",headers:{Authorization:`Bearer ${t}`},signal:a});if(!o.ok)return{};let l=await o.json(),i=l&&typeof l=="object"&&"data"in l&&l.data?l.data:l;return i?p9(i):{}}catch{return{}}}function p9(e){let t={};return e.source!=null&&(t.source=e.source),e.title!=null&&(t.title=e.title),e.welcomeMessage!=null&&(t.welcomeMessage=e.welcomeMessage),e.placeholder!=null&&(t.placeholder=e.placeholder),e.suggestions!=null&&e.suggestions.length>0&&(t.suggestions=e.suggestions),typeof e.enableThreadHistory=="boolean"&&(t.enableThreadHistory=e.enableThreadHistory),e.toolCallDisplay==="full"?t.showToolCalls=!0:e.toolCallDisplay==="titles-only"?t.showToolCalls="titles-only":e.toolCallDisplay==="hidden"&&(t.showToolCalls=!1),e.visibility&&(t.visibility=e.visibility),t}function Nf(e,t,a){let[n,r]=(0,pu.useState)(e),[o,l]=(0,pu.useState)(!1);return(0,pu.useEffect)(()=>{let i=e.api,s=e.token,u=e.channelId;if(!i||!s){l(!0);return}let c=m=>{e.disablePageView||jR({api:i,token:s,channelId:u,mode:e.mode,source:m})},d=$w(i,s,u);if(d)try{let m=is(t,d,a);r(m),l(!0),ri("config resolved (sessionStorage cache)",{config:m,visibility:m.visibility}),c(d.source)}catch{}let f=new AbortController,p=setTimeout(()=>l(!0),d9);return f9(i,s,f.signal,u).then(m=>{if(!f.signal.aborted){if(ri("remote /config response",m),Object.keys(m).length>0){c9(i,s,u,m);try{let x=is(t,m,a);r(x),ri("config resolved (remote)",{config:x,visibility:x.visibility})}catch(x){console.error("[Waniwani] Failed to apply remote config:",x)}}l(!0),c(m.source)}}).catch(m=>{console.error("[Waniwani] Remote config fetch failed:",m),l(!0)}).finally(()=>clearTimeout(p)),()=>{f.abort(),clearTimeout(p)}},[e.api,e.token,e.channelId]),{config:n,ready:o}}var Uf=q(Ae(),1);function m9(e){return e?.patterns??e?.rules??[]}var GR="\0\0";function h9(e){let a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\\\*\\\*/g,GR).replace(/\\\*/g,"[^/]*").split(GR).join(".*");return new RegExp(`^${a}$`)}function $R(e,t){try{return h9(e).test(t)}catch{return!1}}function Bf(e,t){if(!e)return!0;let a=!1;for(let n of m9(e))if($R(n.glob,t)){if(n.action==="hide")return!1;a=!0}return a?!0:(e.default??"show")!=="hide"}function WR(e,t){for(let a of e?.appearRules??[])if($R(a.glob,t))return a.appearAfter;return null}var Ww="waniwani:locationchange",XR=!1;function g9(){if(!(XR||typeof history>"u")){XR=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...n){let r=t.apply(this,n);return window.dispatchEvent(new Event(Ww)),r}}}}function y9(e){return g9(),window.addEventListener(Ww,e),window.addEventListener("popstate",e),()=>{window.removeEventListener(Ww,e),window.removeEventListener("popstate",e)}}function w9(){return window.location.pathname}function x9(){return"/"}function Xw(){return(0,Uf.useSyncExternalStore)(y9,w9,x9)}function zf(e,t){let a=Xw(),n=t&&Bf(e,a);return(0,Uf.useEffect)(()=>{ri("visibility gate",{pathname:a,ready:t,visible:n,rules:e})},[a,t,n]),n}var qf=q(Ae(),1),v9=3e3,b9=120,S9=24;function ZR(e){let[t,a]=(0,qf.useState)(!1);return(0,qf.useEffect)(()=>{if(!e||typeof document>"u"){a(!1);return}let n=!1,r=null,o=null,l=null,i=u=>{r=new IntersectionObserver(c=>{let d=c[0];d&&a(!d.isIntersecting&&d.boundingClientRect.bottom<=0)},{rootMargin:`0px 0px -${S9}px 0px`,threshold:0}),r.observe(u)},s=()=>{if(n)return;let u=null;try{u=document.querySelector(e)}catch{a(!0);return}if(u){i(u);return}o=setTimeout(s,b9)};return s(),l=setTimeout(()=>{n||r||(o&&clearTimeout(o),a(!0))},v9),()=>{n=!0,r?.disconnect(),o&&clearTimeout(o),l&&clearTimeout(l)}},[e]),t}var pt=q(ee(),1),C9=2e3,I9=90,L9=1e3,QR=(0,Ze.forwardRef)(function(t,a){return(0,pt.jsx)(Ss,{locale:t.config.locale,children:(0,pt.jsx)(k9,{...t,ref:a})})}),k9=(0,Ze.forwardRef)(function({config:t,programmatic:a,scriptConfig:n},r){let{t:o}=Ee(),{config:l,ready:i}=Nf(t,a,n),s=zf(l.visibility,i),u=Xw(),c=s?WR(l.visibility,u):null,d=ZR(c),f=(0,Ze.useRef)(null),p=(0,Ze.useRef)(null),m=(0,Ze.useRef)(null),x=(0,Ze.useRef)(!1),[b,y]=(0,Ze.useState)("input"),[w,g]=(0,Ze.useState)(""),[v,M]=(0,Ze.useState)(!1),[C,A]=(0,Ze.useState)(!1),[E,_]=(0,Ze.useState)(0),k=l.appearance?.theme,W=l.appearance?.variables,U=(0,Ze.useMemo)(()=>W?Of(W):{},[W]),R=l.suggestions??[],B=l.launcherText??l.placeholder??o.launcher.prompt,F=td(B,w.length===0),j="var(--ww-shadow, 0 10px 30px rgba(0, 0, 0, 0.08))";(0,Ze.useEffect)(()=>{if(!s){M(!1);return}if(c){M(d);return}let le=l.appearDelay??C9,ve=setTimeout(()=>M(!0),Math.max(0,le));return()=>clearTimeout(ve)},[s,l.appearDelay,c,d]),(0,Ze.useEffect)(()=>{if(!v||R.length===0)return;let le=setTimeout(()=>{x.current||y(ve=>ve==="input"?"expanded":ve)},L9);return()=>clearTimeout(le)},[v,R.length]),(0,Ze.useEffect)(()=>{E>0&&b==="open"&&f.current?.focus()},[E,b]);let K=(0,Ze.useCallback)(()=>{y("open")},[]),de=(0,Ze.useCallback)(()=>{x.current=!0,y("input")},[]);(0,Ze.useEffect)(()=>{if(b!=="expanded"){A(!1);return}let le=setTimeout(()=>A(!0),I9);return()=>clearTimeout(le)},[b]);let He=(0,Ze.useCallback)(le=>{K();let ve=le.trim();ve&&f.current?.sendMessage(ve)},[K]);(0,Ze.useImperativeHandle)(r,()=>({open:()=>K(),close:()=>de(),toggle:()=>{y(le=>le==="open"?"input":"open")},sendMessage:le=>He(le),sendMessageAndWait:async le=>{K();let ve=f.current;if(ve)return await ve.sendMessageAndWait(le)},reset:()=>f.current?.reset(),focus:()=>{K(),_(le=>le+1)},getMessages:()=>f.current?.messages??[],getSessionId:()=>f.current?.sessionId}),[He,K,de]);let S=(0,Ze.useCallback)(()=>{w.trim()&&(He(w),g(""))},[w,He]),Be=(0,Ze.useCallback)(()=>{(f.current?.messages.length??0)>0?(y("open"),_(le=>le+1)):(x.current=!1,y(le=>le==="input"?"expanded":le))},[]),rt={mode:"floating"};l.mcpServerUrl&&(rt.mcpServerUrl=l.mcpServerUrl),l.channelId&&(rt.channelId=l.channelId);let L=R.length>0&&b!=="input",Re=(0,pt.jsx)("button",{type:"button",onClick:de,"aria-label":o.launcher.close,className:"ww:flex ww:size-7 ww:items-center ww:justify-center ww:rounded-md ww:text-muted-foreground ww:transition-colors hover:ww:bg-accent hover:ww:text-foreground ww:cursor-pointer",children:(0,pt.jsx)(gs,{className:"ww:size-4"})});return(0,pt.jsx)("div",{"data-waniwani-chat":"","data-color-scheme":k==="auto"?"auto":void 0,className:V("ww:contents ww:font-[family-name:var(--ww-font-sans)]",k==="dark"&&"dark"),style:U,children:s&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("div",{ref:m,"data-waniwani-floating":"dock","data-state":b==="open"?"hidden":"shown","data-appeared":v?"true":"false",className:V("ww:fixed ww:bottom-3 ww:sm:bottom-4 ww:left-0 ww:right-0 ww:mx-auto ww:z-[2147483002] ww:flex ww:flex-col","ww:w-[calc(100vw-2rem)] ww:transition-[max-width] ww:duration-300 ww:ease-out",L?"ww:max-w-[720px]":"ww:max-w-[440px]"),children:(0,pt.jsxs)("div",{className:V("ww:relative ww:flex ww:flex-col ww:rounded-[20px] ww:border ww:transition-all ww:duration-300 ww:ease-out",L?"ww:p-2 ww:backdrop-blur-xl ww:backdrop-saturate-150":"ww:border-transparent ww:p-0"),style:L?{boxShadow:j,backgroundColor:"var(--ww-glass)",borderColor:"var(--ww-glass-border)"}:void 0,children:[L&&b!=="open"&&(0,pt.jsx)("button",{type:"button",onClick:de,"aria-label":o.launcher.close,className:"ww:absolute ww:right-2 ww:top-2 ww:z-10 ww:flex ww:size-7 ww:items-center ww:justify-center ww:rounded-md ww:text-muted-foreground ww:transition-colors hover:ww:bg-accent hover:ww:text-foreground ww:cursor-pointer",children:(0,pt.jsx)(Xn,{className:"ww:size-4"})}),R.length>0&&(0,pt.jsx)("div",{className:V("ww:grid ww:transition-all ww:duration-300 ww:ease-out",C?"ww:grid-rows-[1fr] ww:opacity-100":"ww:pointer-events-none ww:grid-rows-[0fr] ww:opacity-0"),children:(0,pt.jsx)("div",{className:"ww:overflow-hidden",children:(0,pt.jsx)(ed,{suggestions:R,onSelect:He,className:"ww:pl-1 ww:pr-9 ww:pt-1 ww:pb-2.5"})})}),(0,pt.jsx)(K0,{animated:v,backgroundColor:"var(--ww-color-input)",borderRadius:16,edgeSensitivity:30,coneSpread:25,colors:["#c084fc","#f472b6","#38bdf8"],className:"ww:border-border",style:{boxShadow:j},children:(0,pt.jsxs)("div",{className:"ww:flex ww:items-center ww:gap-1 ww:pl-3.5 ww:pr-1.5 ww:py-1.5 ww:sm:pl-4 ww:sm:pr-2 ww:sm:py-2",children:[(0,pt.jsx)("input",{ref:p,type:"text",value:w,placeholder:F,onChange:le=>g(le.target.value),onFocus:Be,onKeyDown:le=>{le.key==="Enter"&&!le.shiftKey&&(le.preventDefault(),S())},className:"ww:min-w-0 ww:flex-1 ww:bg-transparent ww:py-1 ww:text-base ww:sm:text-sm ww:text-foreground ww:outline-none ww:placeholder:text-muted-foreground"}),(0,pt.jsx)("button",{type:"button",onClick:S,disabled:!w.trim(),"aria-label":o.promptInput.submit,className:"ww:relative ww:flex ww:size-8 ww:shrink-0 ww:items-center ww:justify-center ww:rounded-full ww:bg-foreground ww:text-background ww:transition-opacity hover:ww:opacity-90 disabled:ww:opacity-40",children:(0,pt.jsx)(wo,{className:"ww:size-4"})})]})})]})}),(0,pt.jsx)("div",{role:"dialog","aria-label":l.title??B,"data-waniwani-floating":"panel","data-state":b==="open"?"shown":"hidden",style:{boxShadow:j},className:V("ww:fixed ww:z-[2147483002] ww:flex ww:flex-col ww:overflow-hidden ww:bg-background","ww:inset-0 ww:w-full ww:rounded-none","ww:sm:inset-auto ww:sm:bottom-4 ww:sm:left-0 ww:sm:right-0 ww:sm:mx-auto ww:sm:h-[720px] ww:sm:max-h-[calc(100dvh-2rem)] ww:sm:w-[calc(100vw-2rem)] ww:sm:max-w-[1000px] ww:sm:rounded-2xl ww:sm:border ww:sm:border-border"),children:(0,pt.jsx)(Pf,{ref:f,api:l.api??"",headers:{Authorization:`Bearer ${l.token}`},skipRemoteConfig:!0,body:rt,appearance:l.appearance,title:l.title,headerActions:Re,hideHeader:!1,welcomeMessage:l.welcomeMessage,placeholder:l.placeholder,suggestions:l.suggestions?{initial:l.suggestions}:void 0,enableThreadHistory:l.enableThreadHistory,showToolCalls:l.showToolCalls,locale:l.locale,initializing:!i})})]})})});var or=q(Ae(),1);var YR=q(ee(),1),KR=(0,or.forwardRef)(function({config:t,programmatic:a,scriptConfig:n,onReady:r,onVisibilityChange:o},l){let{config:i,ready:s}=Nf(t,a,n),u=(0,or.useRef)(null);(0,or.useEffect)(()=>{r?.()},[]);let c=zf(i.visibility,s);(0,or.useEffect)(()=>{o?.(c)},[c,o]),(0,or.useImperativeHandle)(l,()=>({get chat(){return u.current}}),[]);let d={mode:"inline"};return i.mcpServerUrl&&(d.mcpServerUrl=i.mcpServerUrl),i.channelId&&(d.channelId=i.channelId),(0,YR.jsx)(Pf,{ref:u,api:i.api??"",headers:{Authorization:`Bearer ${i.token}`},skipRemoteConfig:!0,body:d,appearance:i.appearance,title:i.title,hideHeader:i.hideHeader,welcomeMessage:i.welcomeMessage,placeholder:i.placeholder,suggestions:i.suggestions?{initial:i.suggestions}:void 0,enableThreadHistory:i.enableThreadHistory,showToolCalls:i.showToolCalls,locale:i.locale,initializing:!s})});var Zw="/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--ww-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--ww-color-blue-400:oklch(70.7% .165 254.624);--ww-spacing:.25rem;--ww-container-sm:24rem;--ww-container-md:28rem;--ww-container-3xl:48rem;--ww-text-xs:.75rem;--ww-text-xs--line-height:calc(1/.75);--ww-text-sm:.875rem;--ww-text-sm--line-height:calc(1.25/.875);--ww-text-base:1rem;--ww-text-base--line-height:calc(1.5/1);--ww-text-lg:1.125rem;--ww-text-lg--line-height:calc(1.75/1.125);--ww-font-weight-medium:500;--ww-font-weight-semibold:600;--ww-tracking-wide:.025em;--ww-tracking-wider:.05em;--ww-radius-md:.375rem;--ww-radius-lg:.5rem;--ww-radius-xl:.75rem;--ww-radius-2xl:1rem;--ww-ease-out:cubic-bezier(0,0,.2,1);--ww-animate-spin:spin 1s linear infinite;--ww-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--ww-blur-xl:24px;--ww-default-transition-duration:.15s;--ww-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--ww-default-font-family:var(--ww-font-sans,system-ui,-apple-system,\"Segoe UI\",sans-serif);--ww-default-mono-font-family:var(--ww-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--ww-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--ww-default-font-feature-settings,normal);font-variation-settings:var(--ww-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ww-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--ww-default-mono-font-feature-settings,normal);font-variation-settings:var(--ww-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.ww\\:pointer-events-auto{pointer-events:auto}.ww\\:pointer-events-none{pointer-events:none}.ww\\:\\!relative{position:relative!important}.ww\\:absolute{position:absolute}.ww\\:fixed{position:fixed}.ww\\:relative{position:relative}.ww\\:sticky{position:sticky}.ww\\:inset-0{inset:calc(var(--ww-spacing)*0)}.ww\\:top-2{top:calc(var(--ww-spacing)*2)}.ww\\:top-full{top:100%}.ww\\:right-0{right:calc(var(--ww-spacing)*0)}.ww\\:right-2{right:calc(var(--ww-spacing)*2)}.ww\\:bottom-2{bottom:calc(var(--ww-spacing)*2)}.ww\\:bottom-3{bottom:calc(var(--ww-spacing)*3)}.ww\\:bottom-4{bottom:calc(var(--ww-spacing)*4)}.ww\\:left-0{left:calc(var(--ww-spacing)*0)}.ww\\:left-\\[50\\%\\]{left:50%}.ww\\:isolate{isolation:isolate}.ww\\:-z-\\[1\\]{z-index:calc(1*-1)}.ww\\:z-10{z-index:10}.ww\\:z-50{z-index:50}.ww\\:z-\\[1\\]{z-index:1}.ww\\:z-\\[2147483002\\]{z-index:2147483002}.ww\\:mx-auto{margin-inline:auto}.ww\\:mt-0\\.5{margin-top:calc(var(--ww-spacing)*.5)}.ww\\:mt-1{margin-top:calc(var(--ww-spacing)*1)}.ww\\:mt-2{margin-top:calc(var(--ww-spacing)*2)}.ww\\:mt-6{margin-top:calc(var(--ww-spacing)*6)}.ww\\:mb-0{margin-bottom:calc(var(--ww-spacing)*0)}.ww\\:mb-4{margin-bottom:calc(var(--ww-spacing)*4)}.ww\\:mb-6{margin-bottom:calc(var(--ww-spacing)*6)}.ww\\:ml-auto{margin-left:auto}.ww\\:line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ww\\:contents{display:contents}.ww\\:flex{display:flex}.ww\\:grid{display:grid}.ww\\:hidden{display:none}.ww\\:inline-block{display:inline-block}.ww\\:inline-flex{display:inline-flex}.ww\\:field-sizing-content{field-sizing:content}.ww\\:size-2{width:calc(var(--ww-spacing)*2);height:calc(var(--ww-spacing)*2)}.ww\\:size-3{width:calc(var(--ww-spacing)*3);height:calc(var(--ww-spacing)*3)}.ww\\:size-3\\.5{width:calc(var(--ww-spacing)*3.5);height:calc(var(--ww-spacing)*3.5)}.ww\\:size-4{width:calc(var(--ww-spacing)*4);height:calc(var(--ww-spacing)*4)}.ww\\:size-5{width:calc(var(--ww-spacing)*5);height:calc(var(--ww-spacing)*5)}.ww\\:size-7{width:calc(var(--ww-spacing)*7);height:calc(var(--ww-spacing)*7)}.ww\\:size-8{width:calc(var(--ww-spacing)*8);height:calc(var(--ww-spacing)*8)}.ww\\:size-9{width:calc(var(--ww-spacing)*9);height:calc(var(--ww-spacing)*9)}.ww\\:size-12{width:calc(var(--ww-spacing)*12);height:calc(var(--ww-spacing)*12)}.ww\\:size-auto{width:auto;height:auto}.ww\\:size-full{width:100%;height:100%}.ww\\:h-2\\.5{height:calc(var(--ww-spacing)*2.5)}.ww\\:h-5{height:calc(var(--ww-spacing)*5)}.ww\\:h-8{height:calc(var(--ww-spacing)*8)}.ww\\:h-9{height:calc(var(--ww-spacing)*9)}.ww\\:h-16{height:calc(var(--ww-spacing)*16)}.ww\\:h-auto{height:auto}.ww\\:h-full{height:100%}.ww\\:max-h-48{max-height:calc(var(--ww-spacing)*48)}.ww\\:max-h-80{max-height:calc(var(--ww-spacing)*80)}.ww\\:min-h-0{min-height:calc(var(--ww-spacing)*0)}.ww\\:min-h-5{min-height:calc(var(--ww-spacing)*5)}.ww\\:min-h-full{min-height:100%}.ww\\:w-72{width:calc(var(--ww-spacing)*72)}.ww\\:w-\\[calc\\(100vw-2rem\\)\\]{width:calc(100vw - 2rem)}.ww\\:w-auto{width:auto}.ww\\:w-fit{width:fit-content}.ww\\:w-full{width:100%}.ww\\:w-px{width:1px}.ww\\:max-w-3xl{max-width:var(--ww-container-3xl)}.ww\\:max-w-24{max-width:calc(var(--ww-spacing)*24)}.ww\\:max-w-32{max-width:calc(var(--ww-spacing)*32)}.ww\\:max-w-\\[80\\%\\]{max-width:80%}.ww\\:max-w-\\[440px\\]{max-width:440px}.ww\\:max-w-\\[720px\\]{max-width:720px}.ww\\:max-w-full{max-width:100%}.ww\\:max-w-md{max-width:var(--ww-container-md)}.ww\\:max-w-sm{max-width:var(--ww-container-sm)}.ww\\:min-w-0{min-width:calc(var(--ww-spacing)*0)}.ww\\:flex-1{flex:1}.ww\\:shrink-0{flex-shrink:0}.ww\\:grow{flex-grow:1}.ww\\:translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.ww\\:rotate-90{rotate:90deg}.ww\\:rotate-180{rotate:180deg}.ww\\:animate-\\[ww-fade-in_0\\.2s_ease-out_both\\]{animation:.2s ease-out both ww-fade-in}.ww\\:animate-pulse{animation:var(--ww-animate-pulse)}.ww\\:animate-spin{animation:var(--ww-animate-spin)}.ww\\:cursor-pointer{cursor:pointer}.ww\\:resize-none{resize:none}.ww\\:grid-rows-\\[0fr\\]{grid-template-rows:0fr}.ww\\:grid-rows-\\[1fr\\]{grid-template-rows:1fr}.ww\\:flex-col{flex-direction:column}.ww\\:flex-nowrap{flex-wrap:nowrap}.ww\\:flex-wrap{flex-wrap:wrap}.ww\\:items-center{align-items:center}.ww\\:items-end{align-items:flex-end}.ww\\:items-start{align-items:flex-start}.ww\\:justify-between{justify-content:space-between}.ww\\:justify-center{justify-content:center}.ww\\:gap-1{gap:calc(var(--ww-spacing)*1)}.ww\\:gap-1\\.5{gap:calc(var(--ww-spacing)*1.5)}.ww\\:gap-2{gap:calc(var(--ww-spacing)*2)}.ww\\:gap-3{gap:calc(var(--ww-spacing)*3)}.ww\\:gap-6{gap:calc(var(--ww-spacing)*6)}:where(.ww\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ww-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ww-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.ww\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ww-spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ww-spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}.ww\\:self-stretch{align-self:stretch}.ww\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ww\\:\\!overflow-hidden{overflow:hidden!important}.ww\\:overflow-auto{overflow:auto}.ww\\:overflow-hidden{overflow:hidden}.ww\\:overflow-x-auto{overflow-x:auto}.ww\\:overflow-y-auto{overflow-y:auto}.ww\\:overflow-y-hidden{overflow-y:hidden}.ww\\:\\!rounded-full{border-radius:3.40282e38px!important}.ww\\:rounded{border-radius:var(--ww-radius,16px)}.ww\\:rounded-2xl{border-radius:var(--ww-radius-2xl)}.ww\\:rounded-\\[20px\\]{border-radius:20px}.ww\\:rounded-\\[inherit\\]{border-radius:inherit}.ww\\:rounded-\\[var\\(--ww-radius\\)\\]{border-radius:var(--ww-radius)}.ww\\:rounded-full{border-radius:3.40282e38px}.ww\\:rounded-lg{border-radius:var(--ww-radius-lg)}.ww\\:rounded-md{border-radius:var(--ww-radius-md)}.ww\\:rounded-none{border-radius:0}.ww\\:rounded-xl{border-radius:var(--ww-radius-xl)}.ww\\:border{border-style:var(--tw-border-style);border-width:1px}.ww\\:border-0{border-style:var(--tw-border-style);border-width:0}.ww\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ww\\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ww\\:border-border{border-color:var(--ww-color-border,#e5e7eb)}.ww\\:border-muted-foreground\\/50{border-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:border-muted-foreground\\/50{border-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)50%,transparent)}}.ww\\:border-transparent{border-color:#0000}.ww\\:bg-accent{background-color:var(--ww-color-accent,#f3f4f6)}.ww\\:bg-background,.ww\\:bg-background\\/20{background-color:var(--ww-color-background,#fff)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-background\\/20{background-color:color-mix(in oklab,var(--ww-color-background,#fff)20%,transparent)}}.ww\\:bg-border{background-color:var(--ww-color-border,#e5e7eb)}.ww\\:bg-foreground,.ww\\:bg-foreground\\/5{background-color:var(--ww-color-foreground,#1f2937)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-foreground\\/5{background-color:color-mix(in oklab,var(--ww-color-foreground,#1f2937)5%,transparent)}}.ww\\:bg-input{background-color:var(--ww-color-input,#f9fafb)}.ww\\:bg-muted{background-color:var(--ww-color-muted,#f1f5f9)}.ww\\:bg-muted-foreground\\/60{background-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-muted-foreground\\/60{background-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)60%,transparent)}}.ww\\:bg-muted\\/50{background-color:var(--ww-color-muted,#f1f5f9)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-muted\\/50{background-color:color-mix(in oklab,var(--ww-color-muted,#f1f5f9)50%,transparent)}}.ww\\:bg-primary{background-color:var(--ww-color-primary,#6366f1)}.ww\\:bg-tool-card{background-color:var(--ww-color-tool-card,#f4f4f5)}.ww\\:bg-transparent{background-color:#0000}.ww\\:object-cover{object-fit:cover}.ww\\:p-0{padding:calc(var(--ww-spacing)*0)}.ww\\:p-1{padding:calc(var(--ww-spacing)*1)}.ww\\:p-1\\.5{padding:calc(var(--ww-spacing)*1.5)}.ww\\:p-2{padding:calc(var(--ww-spacing)*2)}.ww\\:p-3{padding:calc(var(--ww-spacing)*3)}.ww\\:px-0{padding-inline:calc(var(--ww-spacing)*0)}.ww\\:px-1\\.5{padding-inline:calc(var(--ww-spacing)*1.5)}.ww\\:px-2{padding-inline:calc(var(--ww-spacing)*2)}.ww\\:px-3{padding-inline:calc(var(--ww-spacing)*3)}.ww\\:px-3\\.5{padding-inline:calc(var(--ww-spacing)*3.5)}.ww\\:px-4{padding-inline:calc(var(--ww-spacing)*4)}.ww\\:px-6{padding-inline:calc(var(--ww-spacing)*6)}.ww\\:\\!py-0{padding-block:calc(var(--ww-spacing)*0)!important}.ww\\:py-0\\.5{padding-block:calc(var(--ww-spacing)*.5)}.ww\\:py-1{padding-block:calc(var(--ww-spacing)*1)}.ww\\:py-1\\.5{padding-block:calc(var(--ww-spacing)*1.5)}.ww\\:py-2{padding-block:calc(var(--ww-spacing)*2)}.ww\\:py-2\\.5{padding-block:calc(var(--ww-spacing)*2.5)}.ww\\:py-3{padding-block:calc(var(--ww-spacing)*3)}.ww\\:py-6{padding-block:calc(var(--ww-spacing)*6)}.ww\\:py-12{padding-block:calc(var(--ww-spacing)*12)}.ww\\:pt-1{padding-top:calc(var(--ww-spacing)*1)}.ww\\:pt-2{padding-top:calc(var(--ww-spacing)*2)}.ww\\:pt-2\\.5{padding-top:calc(var(--ww-spacing)*2.5)}.ww\\:pt-3{padding-top:calc(var(--ww-spacing)*3)}.ww\\:pr-1\\.5{padding-right:calc(var(--ww-spacing)*1.5)}.ww\\:pr-3{padding-right:calc(var(--ww-spacing)*3)}.ww\\:pr-9{padding-right:calc(var(--ww-spacing)*9)}.ww\\:pb-1{padding-bottom:calc(var(--ww-spacing)*1)}.ww\\:pb-1\\.5{padding-bottom:calc(var(--ww-spacing)*1.5)}.ww\\:pb-2{padding-bottom:calc(var(--ww-spacing)*2)}.ww\\:pb-2\\.5{padding-bottom:calc(var(--ww-spacing)*2.5)}.ww\\:pb-3{padding-bottom:calc(var(--ww-spacing)*3)}.ww\\:pb-8{padding-bottom:calc(var(--ww-spacing)*8)}.ww\\:pl-1{padding-left:calc(var(--ww-spacing)*1)}.ww\\:pl-3\\.5{padding-left:calc(var(--ww-spacing)*3.5)}.ww\\:pl-4{padding-left:calc(var(--ww-spacing)*4)}.ww\\:text-center{text-align:center}.ww\\:text-left{text-align:left}.ww\\:font-\\[family-name\\:var\\(--ww-font\\)\\]{font-family:var(--ww-font)}.ww\\:font-\\[family-name\\:var\\(--ww-font-sans\\)\\]{font-family:var(--ww-font-sans)}.ww\\:font-mono{font-family:var(--ww-font-mono)}.ww\\:text-base{font-size:var(--ww-text-base);line-height:var(--tw-leading,var(--ww-text-base--line-height))}.ww\\:text-lg{font-size:var(--ww-text-lg);line-height:var(--tw-leading,var(--ww-text-lg--line-height))}.ww\\:text-sm{font-size:var(--ww-text-sm);line-height:var(--tw-leading,var(--ww-text-sm--line-height))}.ww\\:text-xs{font-size:var(--ww-text-xs);line-height:var(--tw-leading,var(--ww-text-xs--line-height))}.ww\\:text-\\[10px\\]{font-size:10px}.ww\\:text-\\[11px\\]{font-size:11px}.ww\\:font-medium{--tw-font-weight:var(--ww-font-weight-medium);font-weight:var(--ww-font-weight-medium)}.ww\\:font-semibold{--tw-font-weight:var(--ww-font-weight-semibold);font-weight:var(--ww-font-weight-semibold)}.ww\\:tracking-wide{--tw-tracking:var(--ww-tracking-wide);letter-spacing:var(--ww-tracking-wide)}.ww\\:tracking-wider{--tw-tracking:var(--ww-tracking-wider);letter-spacing:var(--ww-tracking-wider)}.ww\\:break-words{overflow-wrap:break-word}.ww\\:break-all{word-break:break-all}.ww\\:whitespace-nowrap{white-space:nowrap}.ww\\:whitespace-pre-wrap{white-space:pre-wrap}.ww\\:text-background{color:var(--ww-color-background,#fff)}.ww\\:text-foreground,.ww\\:text-foreground\\/80{color:var(--ww-color-foreground,#1f2937)}@supports (color:color-mix(in lab, red, red)){.ww\\:text-foreground\\/80{color:color-mix(in oklab,var(--ww-color-foreground,#1f2937)80%,transparent)}}.ww\\:text-muted-foreground{color:var(--ww-color-muted-foreground,#6b7280)}.ww\\:text-primary{color:var(--ww-color-primary,#6366f1)}.ww\\:text-primary-foreground{color:var(--ww-color-primary-foreground,#1f2937)}.ww\\:uppercase{text-transform:uppercase}.ww\\:italic{font-style:italic}.ww\\:opacity-0{opacity:0}.ww\\:opacity-70{opacity:.7}.ww\\:opacity-100{opacity:1}.ww\\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:ring-blue-400\\/70{--tw-ring-color:var(--ww-color-blue-400)}@supports (color:color-mix(in lab, red, red)){.ww\\:ring-blue-400\\/70{--tw-ring-color:color-mix(in oklab,var(--ww-color-blue-400)70%,transparent)}}.ww\\:ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ww\\:ring-offset-background{--tw-ring-offset-color:var(--ww-color-background,#fff)}.ww\\:backdrop-blur-xl{--tw-backdrop-blur:blur(var(--ww-blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.ww\\:backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.ww\\:transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-\\[max-width\\]{transition-property:max-width;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.ww\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.ww\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ww\\:ease-out{--tw-ease:var(--ww-ease-out);transition-timing-function:var(--ww-ease-out)}.ww\\:outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.ww\\:group-hover\\:opacity-0:is(:where(.ww\\:group):hover *){opacity:0}.ww\\:group-hover\\:opacity-100:is(:where(.ww\\:group):hover *){opacity:1}}.ww\\:group-\\[\\.is-assistant\\]\\:text-foreground:is(:where(.ww\\:group).is-assistant *){color:var(--ww-color-foreground,#1f2937)}.ww\\:group-\\[\\.is-user\\]\\:ml-auto:is(:where(.ww\\:group).is-user *){margin-left:auto}.ww\\:group-\\[\\.is-user\\]\\:rounded-lg:is(:where(.ww\\:group).is-user *){border-radius:var(--ww-radius-lg)}.ww\\:group-\\[\\.is-user\\]\\:bg-user-bubble:is(:where(.ww\\:group).is-user *){background-color:var(--ww-color-user-bubble,#f4f4f4)}.ww\\:group-\\[\\.is-user\\]\\:px-4:is(:where(.ww\\:group).is-user *){padding-inline:calc(var(--ww-spacing)*4)}.ww\\:group-\\[\\.is-user\\]\\:py-3:is(:where(.ww\\:group).is-user *){padding-block:calc(var(--ww-spacing)*3)}.ww\\:group-\\[\\.is-user\\]\\:text-primary-foreground:is(:where(.ww\\:group).is-user *){color:var(--ww-color-primary-foreground,#1f2937)}.ww\\:placeholder\\:text-muted-foreground::placeholder{color:var(--ww-color-muted-foreground,#6b7280)}@media (hover:hover){.ww\\:hover\\:border-primary\\/30:hover{border-color:var(--ww-color-primary,#6366f1)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:border-primary\\/30:hover{border-color:color-mix(in oklab,var(--ww-color-primary,#6366f1)30%,transparent)}}.ww\\:hover\\:bg-accent:hover{background-color:var(--ww-color-accent,#f3f4f6)}.ww\\:hover\\:bg-foreground:hover{background-color:var(--ww-color-foreground,#1f2937)}.ww\\:hover\\:bg-muted:hover{background-color:var(--ww-color-muted,#f1f5f9)}.ww\\:hover\\:bg-muted-foreground\\/10:hover{background-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:bg-muted-foreground\\/10:hover{background-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)10%,transparent)}}.ww\\:hover\\:bg-primary\\/90:hover{background-color:var(--ww-color-primary,#6366f1)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--ww-color-primary,#6366f1)90%,transparent)}}.ww\\:hover\\:text-accent-foreground:hover{color:var(--ww-color-accent-foreground,#1f2937)}.ww\\:hover\\:text-foreground:hover{color:var(--ww-color-foreground,#1f2937)}.ww\\:hover\\:underline:hover{text-decoration-line:underline}}.ww\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.ww\\:disabled\\:opacity-40:disabled{opacity:.4}.ww\\:disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.ww\\:sm\\:inset-auto{inset:auto}.ww\\:sm\\:right-0{right:calc(var(--ww-spacing)*0)}.ww\\:sm\\:bottom-4{bottom:calc(var(--ww-spacing)*4)}.ww\\:sm\\:left-0{left:calc(var(--ww-spacing)*0)}.ww\\:sm\\:mx-auto{margin-inline:auto}.ww\\:sm\\:h-\\[720px\\]{height:720px}.ww\\:sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.ww\\:sm\\:w-\\[calc\\(100vw-2rem\\)\\]{width:calc(100vw - 2rem)}.ww\\:sm\\:max-w-\\[1000px\\]{max-width:1000px}.ww\\:sm\\:rounded-2xl{border-radius:var(--ww-radius-2xl)}.ww\\:sm\\:border{border-style:var(--tw-border-style);border-width:1px}.ww\\:sm\\:border-border{border-color:var(--ww-color-border,#e5e7eb)}.ww\\:sm\\:py-2{padding-block:calc(var(--ww-spacing)*2)}.ww\\:sm\\:pr-2{padding-right:calc(var(--ww-spacing)*2)}.ww\\:sm\\:pl-4{padding-left:calc(var(--ww-spacing)*4)}.ww\\:sm\\:text-sm{font-size:var(--ww-text-sm);line-height:var(--tw-leading,var(--ww-text-sm--line-height))}.ww\\:sm\\:text-\\[11px\\]{font-size:11px}}.ww\\:\\[\\&\\>\\*\\:first-child\\]\\:mt-0>:first-child{margin-top:calc(var(--ww-spacing)*0)}.ww\\:\\[\\&\\>\\*\\:last-child\\]\\:mb-0>:last-child{margin-bottom:calc(var(--ww-spacing)*0)}}@keyframes ww-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes ww-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes ww-pulse{0%,80%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}@keyframes ww-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){[data-waniwani-chat] [data-waniwani-shimmer]{color:var(--ww-color-muted-foreground)!important;animation:none!important}}[data-waniwani-floating=dock]{transition:opacity .32s,transform .42s cubic-bezier(.22,1,.36,1),max-width .3s,visibility 0s linear .42s}[data-waniwani-floating=dock][data-appeared=true][data-state=shown]{visibility:visible;opacity:1;pointer-events:auto;transition:opacity .32s,transform .42s cubic-bezier(.22,1,.36,1),max-width .3s,visibility;transform:translateY(0)}[data-waniwani-floating=dock][data-appeared=false],[data-waniwani-floating=dock][data-state=hidden]{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(1rem)}[data-waniwani-floating=panel]{transition:clip-path .44s cubic-bezier(.22,1,.36,1),opacity .26s,visibility 0s linear .44s}[data-waniwani-floating=panel][data-state=shown]{visibility:visible;opacity:1;pointer-events:auto;clip-path:inset(-40px round 18px);transition:clip-path .44s cubic-bezier(.22,1,.36,1),opacity .26s,visibility}[data-waniwani-floating=panel][data-state=hidden]{opacity:0;visibility:hidden;pointer-events:none;clip-path:inset(calc(100% - 60px) 12% 0 round 24px)}@media (max-width:639px){[data-waniwani-floating=panel][data-state=shown]{clip-path:inset(0)}[data-waniwani-floating=panel][data-state=hidden]{clip-path:inset(calc(100% - 72px) 6% 0 round 22px)}}@media (prefers-reduced-motion:reduce){[data-waniwani-floating=dock],[data-waniwani-floating=panel]{clip-path:none;transition:visibility 0s linear 10ms}[data-waniwani-floating=dock][data-appeared=true][data-state=shown],[data-waniwani-floating=panel][data-state=shown]{transition:visibility}}[data-waniwani-chat] ::-webkit-scrollbar{width:8px}[data-waniwani-chat] ::-webkit-scrollbar-track{background:0 0}[data-waniwani-chat] ::-webkit-scrollbar-thumb{background:var(--ww-color-border);border-radius:9999px}[data-waniwani-chat] ::-webkit-scrollbar-thumb:hover{background:var(--ww-color-muted-foreground)}[data-waniwani-chat] *{scrollbar-width:thin;scrollbar-color:var(--ww-color-border)transparent}[data-waniwani-chat]{--ww-color-background:var(--ww-bg,#fff);--ww-color-foreground:var(--ww-text,#1f2937);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#1f2937);--ww-color-muted-foreground:var(--ww-muted,#6b7280);--ww-color-border:var(--ww-border,#e5e7eb);--ww-color-input:var(--ww-input-bg,#f9fafb);--ww-color-accent:var(--ww-assistant-bubble,#f3f4f6);--ww-color-accent-foreground:var(--ww-text,#1f2937);--ww-color-user-bubble:var(--ww-user-bubble,#f4f4f4);--ww-color-card:var(--ww-bg,#fff);--ww-color-card-foreground:var(--ww-text,#1f2937);--ww-color-card-header:var(--ww-header-bg,#fff);--ww-color-card-header-foreground:var(--ww-header-text,#1f2937);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#f4f4f5);--ww-radius:var(--ww-radius,16px);--ww-font-sans:var(--ww-font,system-ui,-apple-system,\"Segoe UI\",sans-serif);--ww-glass:#eceef499;--ww-glass-border:#0000000f;border-style:solid;border-width:var(--ww-border-width,0);border-color:var(--ww-color-border);box-shadow:var(--ww-shadow,none)}.dark [data-waniwani-chat],[data-waniwani-chat].dark{--ww-color-background:var(--ww-bg,#212121);--ww-color-foreground:var(--ww-text,#ececec);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#fff);--ww-color-muted-foreground:var(--ww-muted,#8e8ea0);--ww-color-border:var(--ww-border,#444);--ww-color-input:var(--ww-input-bg,#2f2f2f);--ww-color-accent:var(--ww-assistant-bubble,#2f2f2f);--ww-color-accent-foreground:var(--ww-text,#ececec);--ww-color-user-bubble:var(--ww-user-bubble,#303030);--ww-color-card:var(--ww-bg,#212121);--ww-color-card-foreground:var(--ww-text,#ececec);--ww-color-card-header:var(--ww-header-bg,#1e1e1e);--ww-color-card-header-foreground:var(--ww-header-text,#ececec);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#262626);--ww-glass:#282a3480;--ww-glass-border:#ffffff1f}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto]{--ww-color-background:var(--ww-bg,#212121);--ww-color-foreground:var(--ww-text,#ececec);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#fff);--ww-color-muted-foreground:var(--ww-muted,#8e8ea0);--ww-color-border:var(--ww-border,#444);--ww-color-input:var(--ww-input-bg,#2f2f2f);--ww-color-accent:var(--ww-assistant-bubble,#2f2f2f);--ww-color-accent-foreground:var(--ww-text,#ececec);--ww-color-user-bubble:var(--ww-user-bubble,#303030);--ww-color-card:var(--ww-bg,#212121);--ww-color-card-foreground:var(--ww-text,#ececec);--ww-color-card-header:var(--ww-header-bg,#1e1e1e);--ww-color-card-header-foreground:var(--ww-header-text,#ececec);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#262626);--ww-glass:#282a3480;--ww-glass-border:#ffffff1f}}[data-waniwani-chat] [data-streamdown=table-wrapper]{flex-direction:column;gap:.5rem;margin-top:1rem;margin-bottom:1rem;display:flex}[data-waniwani-chat] [data-streamdown=table-wrapper]>div:first-child:has(button){justify-content:flex-end;align-items:center;gap:.25rem;display:flex}[data-waniwani-chat] [data-streamdown=table-wrapper]>div:last-child{overflow-x:auto}[data-waniwani-chat] [data-streamdown=table]{border-collapse:collapse;border:1px solid var(--ww-color-border);border-radius:.75rem;width:100%;overflow:hidden}[data-waniwani-chat] [data-streamdown=table-header]{background-color:var(--ww-color-accent)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=table-header]{background-color:color-mix(in srgb,var(--ww-color-accent)80%,transparent)}}[data-waniwani-chat] [data-streamdown=table-body]{background-color:var(--ww-color-accent)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=table-body]{background-color:color-mix(in srgb,var(--ww-color-accent)40%,transparent)}}[data-waniwani-chat] [data-streamdown=table-body]>tr+tr{border-top:1px solid var(--ww-color-border)}[data-waniwani-chat] [data-streamdown=table-row]{border-bottom:1px solid var(--ww-color-border)}[data-waniwani-chat] [data-streamdown=table-header-cell]{white-space:nowrap;text-align:left;padding:.5rem 1rem;font-size:.875rem;font-weight:600}[data-waniwani-chat] [data-streamdown=table-cell]{padding:.5rem 1rem;font-size:.875rem}[data-waniwani-chat] [data-streamdown=link]{color:var(--ww-color-primary);overflow-wrap:anywhere;cursor:pointer;font-weight:500;text-decoration:underline}[data-waniwani-chat].dark [data-streamdown=link],.dark [data-waniwani-chat] [data-streamdown=link]{color:var(--ww-color-primary)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat].dark [data-streamdown=link],.dark [data-waniwani-chat] [data-streamdown=link]{color:color-mix(in oklab,var(--ww-color-primary)55%,white)}}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto] [data-streamdown=link]{color:var(--ww-color-primary)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat][data-color-scheme=auto] [data-streamdown=link]{color:color-mix(in oklab,var(--ww-color-primary)55%,white)}}}[data-waniwani-chat].dark [data-waniwani-logo],.dark [data-waniwani-chat] [data-waniwani-logo]{filter:invert()}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto] [data-waniwani-logo]{filter:invert()}}[data-waniwani-chat] [data-streamdown=link-safety-modal]{z-index:50;background-color:var(--ww-color-background);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=link-safety-modal]{background-color:color-mix(in srgb,var(--ww-color-background)50%,transparent)}}[data-waniwani-chat] [data-streamdown=link-safety-modal]{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div{border:1px solid var(--ww-color-border);background-color:var(--ww-color-background);width:100%;max-width:28rem;color:var(--ww-color-foreground);border-radius:.75rem;flex-direction:column;gap:1rem;margin:0 1rem;padding:1.5rem;display:flex;position:relative;box-shadow:0 10px 25px #0000001a}[data-waniwani-chat] [data-streamdown=link-safety-modal] button{cursor:pointer}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>button:first-child{color:var(--ww-color-muted-foreground);background:0 0;border:none;border-radius:.375rem;padding:.25rem;transition:background-color .15s,color .15s;position:absolute;top:1rem;right:1rem}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>button:first-child:hover{background-color:var(--ww-color-accent);color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type{flex-direction:column;gap:.5rem;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type>div{align-items:center;gap:.5rem;font-size:1.125rem;font-weight:600;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type>p{color:var(--ww-color-muted-foreground);font-size:.875rem}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:nth-child(3){word-break:break-all;background-color:var(--ww-color-accent);border-radius:.375rem;max-height:8rem;padding:.75rem;font-family:ui-monospace,monospace;font-size:.875rem;overflow-y:auto}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child{gap:.5rem;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button{border:none;border-radius:.375rem;flex:1;justify-content:center;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;font-weight:500;transition:background-color .15s;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:first-child{border:1px solid var(--ww-color-border);background-color:var(--ww-color-background);color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:first-child:hover{background-color:var(--ww-color-accent)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:last-child{background-color:var(--ww-color-primary);color:#fff}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:last-child:hover{opacity:.9}[data-waniwani-chat] [data-streamdown=ordered-list]{white-space:normal;list-style-type:decimal;list-style-position:inside}[data-waniwani-chat] li [data-streamdown=ordered-list]{padding-left:1.5rem}[data-waniwani-chat] [data-streamdown=unordered-list]{white-space:normal;list-style-type:disc;list-style-position:inside}[data-waniwani-chat] li [data-streamdown=unordered-list]{padding-left:1.5rem}[data-waniwani-chat] [data-streamdown=list-item]{padding-top:.25rem;padding-bottom:.25rem}[data-waniwani-chat] [data-streamdown=list-item]>p{display:inline}[data-waniwani-chat] [data-streamdown=inline-code]{background-color:var(--ww-color-accent);border-radius:.25rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,monospace;font-size:.875rem}[data-waniwani-chat] [data-streamdown=heading-1]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.875rem;font-weight:600;line-height:2.25rem}[data-waniwani-chat] [data-streamdown=heading-2]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.5rem;font-weight:600;line-height:2rem}[data-waniwani-chat] [data-streamdown=heading-3]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.25rem;font-weight:600;line-height:1.75rem}[data-waniwani-chat] [data-streamdown=heading-4]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.125rem;font-weight:600;line-height:1.75rem}[data-waniwani-chat] [data-streamdown=heading-5]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1rem;font-weight:600;line-height:1.5rem}[data-waniwani-chat] [data-streamdown=heading-6]{margin-top:1.5rem;margin-bottom:.5rem;font-size:.875rem;font-weight:600;line-height:1.25rem}[data-waniwani-chat] [data-streamdown=blockquote]{border-left:4px solid var(--ww-color-muted-foreground);margin-top:1rem;margin-bottom:1rem}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=blockquote]{border-left:4px solid color-mix(in srgb,var(--ww-color-muted-foreground)30%,transparent)}}[data-waniwani-chat] [data-streamdown=blockquote]{color:var(--ww-color-muted-foreground);padding-left:1rem;font-style:italic}[data-waniwani-chat] [data-streamdown=horizontal-rule]{border-color:var(--ww-color-border);margin-top:1.5rem;margin-bottom:1.5rem}[data-waniwani-chat] [data-streamdown=strong]{font-weight:600}[data-waniwani-chat] [data-streamdown=image-wrapper]{margin-top:1rem;margin-bottom:1rem;display:inline-block;position:relative}[data-waniwani-chat] [data-streamdown=image]{border-radius:.5rem;max-width:100%}[data-waniwani-chat] [data-streamdown=code-block]{border:1px solid var(--ww-color-border);border-radius:.75rem;width:100%;margin-top:1rem;margin-bottom:1rem;overflow:hidden}[data-waniwani-chat] [data-streamdown=code-block-header]{background-color:var(--ww-color-accent);justify-content:space-between;align-items:center;display:flex}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=code-block-header]{background-color:color-mix(in srgb,var(--ww-color-accent)80%,transparent)}}[data-waniwani-chat] [data-streamdown=code-block-header]{color:var(--ww-color-muted-foreground);padding:.75rem;font-size:.75rem}[data-waniwani-chat] [data-streamdown=code-block-body]{padding:1rem;font-size:.875rem;overflow-x:auto}[data-waniwani-chat] [data-streamdown=code-block-copy-button],[data-waniwani-chat] [data-streamdown=code-block-download-button]{cursor:pointer;color:var(--ww-color-muted-foreground);background:0 0;border:none;padding:.25rem;transition:color .15s}[data-waniwani-chat] [data-streamdown=code-block-copy-button]:hover,[data-waniwani-chat] [data-streamdown=code-block-download-button]:hover{color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=mermaid-block]{border:1px solid var(--ww-color-border);border-radius:.75rem;height:auto;margin-top:1rem;margin-bottom:1rem;padding:1rem;position:relative}[data-waniwani-chat] [data-streamdown=mermaid]{width:100%;height:100%}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}",Ft=null,Qr=null,la=null,Ff=null,T9="waniwani-chat-sizing",A9="waniwani-chat-defaults",M9="waniwani-chat-chrome",E9="waniwani-chat-auto-card",R9=`:where([data-waniwani-embed]){height:${H0}}`,D9=":where([data-waniwani-embed]){border-radius:16px;overflow:hidden}",_9=":where([data-waniwani-embed]){border-style:solid;border-width:var(--ww-border-width,0);border-color:var(--ww-border,transparent);box-shadow:var(--ww-shadow,none)}",O9=":where([data-waniwani-embed][data-waniwani-auto]){width:100%;max-width:28rem;margin-inline:auto;border-radius:16px;overflow:hidden;border-style:solid;border-width:var(--ww-border-width,1px);border-color:var(--ww-border,rgba(0,0,0,0.1));box-shadow:var(--ww-shadow,0 10px 30px rgba(0,0,0,0.08))}";function Hf(e,t){if(typeof document>"u"||document.getElementById(e))return;let a=document.createElement("style");a.id=e,a.textContent=t,document.head.appendChild(a)}function P9(e,t){let a=t.appearance?.variables;!a||!(e instanceof HTMLElement)||(typeof a.borderWidth=="number"&&e.style.setProperty("--ww-border-width",`${a.borderWidth}px`),a.borderColor&&e.style.setProperty("--ww-border",a.borderColor),a.boxShadow&&e.style.setProperty("--ww-shadow",a.boxShadow))}function tD(e,t){if(Zw&&Zw!=="__WANIWANI_EMBED_CSS__"){let n=document.createElement("style");n.textContent=Zw,e.appendChild(n)}let a=document.createElement("style");if(a.textContent="[data-waniwani-chat]{border-width:0;box-shadow:none}",e.appendChild(a),t.css)try{let n=new URL(t.css,window.location.href);if(n.protocol==="https:"||n.protocol==="http:"){let r=document.createElement("link");r.rel="stylesheet",r.href=n.href,e.appendChild(r)}else console.warn("[Waniwani] Custom CSS URL must use http or https protocol.")}catch{console.warn("[Waniwani] Invalid custom CSS URL:",t.css)}}var JR="data-waniwani-embed",Qw="data-waniwani-auto";function N9(e){let t=document.querySelector(`[${JR}]`);if(t)return t;let a=document.createElement("div");a.setAttribute(JR,""),a.setAttribute(Qw,"");let n=e?!!document.head?.contains(e):!1;return e?.parentNode&&!n?e.parentNode.insertBefore(a,e):document.body.appendChild(a),a}function B9(e){return/^\d+$/.test(e.trim())?`${e.trim()}px`:e.trim()}function U9(e,t,a,n){let r=N9(n);Hf(T9,R9),e.height&&r instanceof HTMLElement&&(r.style.height=B9(e.height)),e.appearance?.theme&&Hf(A9,D9),Hf(M9,_9),r.hasAttribute(Qw)&&Hf(E9,O9),P9(r,e),la=document.createElement("div"),la.id="waniwani-chat-embed",la.style.cssText="width:100%;height:100%;max-height:inherit;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;",r.appendChild(la);let o=la,l=()=>{let d=getComputedStyle(r);if(!d.maxHeight.endsWith("px")){o.style.removeProperty("max-height");return}let f=Number.parseFloat(d.maxHeight);if(!Number.isFinite(f)){o.style.removeProperty("max-height");return}let p=f;d.boxSizing==="border-box"&&(p-=(Number.parseFloat(d.paddingTop)||0)+(Number.parseFloat(d.paddingBottom)||0)+(Number.parseFloat(d.borderTopWidth)||0)+(Number.parseFloat(d.borderBottomWidth)||0)),p>0?o.style.maxHeight=`${p}px`:o.style.removeProperty("max-height")};l(),Ff=new ResizeObserver(l),Ff.observe(r);let i=la.attachShadow({mode:"open"});tD(i,e);let s=document.createElement("div");s.className="ww:contents",i.appendChild(s);let u=mu.default.createRef(),c=d=>{r instanceof HTMLElement&&(r.style.display=d?"":"none")};if(e.token){let d=$w(e.api??"",e.token,e.channelId);d?.visibility&&!Bf(d.visibility,window.location.pathname)&&c(!1)}return Qr=Kw.default.createRoot(s),Qr.render(mu.default.createElement(KR,{ref:u,config:e,programmatic:t,scriptConfig:a,onVisibilityChange:c})),{destroy:()=>{Ff?.disconnect(),Ff=null,Qr?.unmount(),Qr=null,la?.remove(),la=null,r.hasAttribute(Qw)&&r.remove(),Ft=null},open:()=>{},close:()=>{},toggle:()=>{},sendMessage:d=>u.current?.chat?.sendMessage(d),sendMessageAndWait:async d=>{let f=u.current?.chat;if(f)return await f.sendMessageAndWait(d)},reset:()=>u.current?.chat?.reset(),focus:()=>u.current?.chat?.focus(),getMessages:()=>u.current?.chat?.messages??[],getSessionId:()=>u.current?.chat?.sessionId}}function z9(e,t,a){la=document.createElement("div"),la.id="waniwani-chat-embed",la.style.cssText="position:fixed;inset:0;z-index:2147483000;pointer-events:none;",document.body.appendChild(la);let n=la.attachShadow({mode:"open"});tD(n,e);let r=document.createElement("div");r.className="ww:contents",n.appendChild(r);let o=mu.default.createRef();return Qr=Kw.default.createRoot(r),Qr.render(mu.default.createElement(QR,{ref:o,config:e,programmatic:t,scriptConfig:a})),{destroy:()=>{Qr?.unmount(),Qr=null,la?.remove(),la=null,Ft=null},open:()=>o.current?.open(),close:()=>o.current?.close(),toggle:()=>o.current?.toggle(),sendMessage:l=>o.current?.sendMessage(l),sendMessageAndWait:async l=>{if(o.current)return o.current.sendMessageAndWait(l)},reset:()=>o.current?.reset(),focus:()=>o.current?.focus(),getMessages:()=>o.current?.getMessages()??[],getSessionId:()=>o.current?.getSessionId()}}function aD(e){if(Ft)return console.warn("[Waniwani] Chat widget is already initialized. Call destroy() first to re-initialize."),Ft;let t=Eh(),a=Zc(),n=is(e,void 0,a);return Ft=n.mode==="floating"?z9(n,e,a):U9(n,e,a,t),Ft}function q9(){Ft&&Ft.destroy()}window.WaniWani=window.WaniWani||{};window.WaniWani.chat={init:aD,destroy:q9,open:()=>Ft?.open(),close:()=>Ft?.close(),toggle:()=>Ft?.toggle(),sendMessage:e=>Ft?.sendMessage(e),sendMessageAndWait:async e=>{if(Ft)return Ft.sendMessageAndWait(e)},reset:()=>Ft?.reset(),focus:()=>Ft?.focus(),getMessages:()=>Ft?.getMessages()??[],getSessionId:()=>Ft?.getSessionId()};function eD(){if(Zc().token)try{aD()}catch(t){console.error("[Waniwani] Auto-initialization failed:",t)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",eD):eD();})();
|
|
137
|
+
`)}})}};var Ww=kf(()=>uu(h.union([h.strictObject({type:h.literal("text-start"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("text-delta"),id:h.string(),delta:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("text-end"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("error"),errorText:h.string()}),h.strictObject({type:h.literal("tool-input-start"),toolCallId:h.string(),toolName:h.string(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-input-delta"),toolCallId:h.string(),inputTextDelta:h.string()}),h.strictObject({type:h.literal("tool-input-available"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-input-error"),toolCallId:h.string(),toolName:h.string(),input:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),errorText:h.string(),title:h.string().optional()}),h.strictObject({type:h.literal("tool-approval-request"),approvalId:h.string(),toolCallId:h.string()}),h.strictObject({type:h.literal("tool-output-available"),toolCallId:h.string(),output:h.unknown(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional(),preliminary:h.boolean().optional()}),h.strictObject({type:h.literal("tool-output-error"),toolCallId:h.string(),errorText:h.string(),providerExecuted:h.boolean().optional(),providerMetadata:X.optional(),dynamic:h.boolean().optional()}),h.strictObject({type:h.literal("tool-output-denied"),toolCallId:h.string()}),h.strictObject({type:h.literal("reasoning-start"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("reasoning-delta"),id:h.string(),delta:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("reasoning-end"),id:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("source-url"),sourceId:h.string(),url:h.string(),title:h.string().optional(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("source-document"),sourceId:h.string(),mediaType:h.string(),title:h.string(),filename:h.string().optional(),providerMetadata:X.optional()}),h.strictObject({type:h.literal("file"),url:h.string(),mediaType:h.string(),providerMetadata:X.optional()}),h.strictObject({type:h.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:h.string().optional(),data:h.unknown(),transient:h.boolean().optional()}),h.strictObject({type:h.literal("start-step")}),h.strictObject({type:h.literal("finish-step")}),h.strictObject({type:h.literal("start"),messageId:h.string().optional(),messageMetadata:h.unknown().optional()}),h.strictObject({type:h.literal("finish"),finishReason:h.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:h.unknown().optional()}),h.strictObject({type:h.literal("abort"),reason:h.string().optional()}),h.strictObject({type:h.literal("message-metadata"),messageMetadata:h.unknown()})])));function E9(e){return e.type.startsWith("data-")}function $w(e){return e.type.startsWith("tool-")}function R9(e){return e.type==="dynamic-tool"}function Mf(e){return $w(e)||R9(e)}function P2(e){return e.type.split("-").slice(1).join("-")}function D9({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function _9({stream:e,messageMetadataSchema:t,dataPartSchemas:a,runUpdateMessageJob:n,onError:r,onToolCall:o,onData:l}){return e.pipeThrough(new TransformStream({async transform(i,s){await n(async({state:u,write:c})=>{var d,f,p,m;function x(g){let M=u.message.parts.filter(Mf).find(I=>I.toolCallId===g);if(M==null)throw new ni({chunkType:"tool-invocation",chunkId:g,message:`No tool invocation found for tool call ID "${g}".`});return M}function b(g){var v;let M=u.message.parts.find(E=>$w(E)&&E.toolCallId===g.toolCallId),I=g,A=M;if(M!=null){M.state=g.state,A.input=I.input,A.output=I.output,A.errorText=I.errorText,A.rawInput=I.rawInput,A.preliminary=I.preliminary,g.title!==void 0&&(A.title=g.title),A.providerExecuted=(v=I.providerExecuted)!=null?v:M.providerExecuted;let E=I.providerMetadata;if(E!=null)if(g.state==="output-available"||g.state==="output-error"){let _=M;_.resultProviderMetadata=E}else M.callProviderMetadata=E}else u.message.parts.push({type:`tool-${g.toolName}`,toolCallId:g.toolCallId,state:g.state,title:g.title,input:I.input,output:I.output,rawInput:I.rawInput,errorText:I.errorText,providerExecuted:I.providerExecuted,preliminary:I.preliminary,...I.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:I.providerMetadata}:{},...I.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:I.providerMetadata}:{}})}function y(g){var v,M;let I=u.message.parts.find(_=>_.type==="dynamic-tool"&&_.toolCallId===g.toolCallId),A=g,E=I;if(I!=null){I.state=g.state,E.toolName=g.toolName,E.input=A.input,E.output=A.output,E.errorText=A.errorText,E.rawInput=(v=A.rawInput)!=null?v:E.rawInput,E.preliminary=A.preliminary,g.title!==void 0&&(E.title=g.title),E.providerExecuted=(M=A.providerExecuted)!=null?M:I.providerExecuted;let _=A.providerMetadata;if(_!=null)if(g.state==="output-available"||g.state==="output-error"){let L=I;L.resultProviderMetadata=_}else I.callProviderMetadata=_}else u.message.parts.push({type:"dynamic-tool",toolName:g.toolName,toolCallId:g.toolCallId,state:g.state,input:A.input,output:A.output,errorText:A.errorText,preliminary:A.preliminary,providerExecuted:A.providerExecuted,title:g.title,...A.providerMetadata!=null&&(g.state==="output-available"||g.state==="output-error")?{resultProviderMetadata:A.providerMetadata}:{},...A.providerMetadata!=null&&!(g.state==="output-available"||g.state==="output-error")?{callProviderMetadata:A.providerMetadata}:{}})}async function w(g){if(g!=null){let v=u.message.metadata!=null?$2(u.message.metadata,g):g;t!=null&&await Af({value:v,schema:t,context:{field:"message.metadata",entityId:u.message.id}}),u.message.metadata=v}}switch(i.type){case"text-start":{let g={type:"text",text:"",providerMetadata:i.providerMetadata,state:"streaming"};u.activeTextParts[i.id]=g,u.message.parts.push(g),c();break}case"text-delta":{let g=u.activeTextParts[i.id];if(g==null)throw new ni({chunkType:"text-delta",chunkId:i.id,message:`Received text-delta for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});g.text+=i.delta,g.providerMetadata=(d=i.providerMetadata)!=null?d:g.providerMetadata,c();break}case"text-end":{let g=u.activeTextParts[i.id];if(g==null)throw new ni({chunkType:"text-end",chunkId:i.id,message:`Received text-end for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});g.state="done",g.providerMetadata=(f=i.providerMetadata)!=null?f:g.providerMetadata,delete u.activeTextParts[i.id],c();break}case"reasoning-start":{let g={type:"reasoning",text:"",providerMetadata:i.providerMetadata,state:"streaming"};u.activeReasoningParts[i.id]=g,u.message.parts.push(g),c();break}case"reasoning-delta":{let g=u.activeReasoningParts[i.id];if(g==null)throw new ni({chunkType:"reasoning-delta",chunkId:i.id,message:`Received reasoning-delta for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});g.text+=i.delta,g.providerMetadata=(p=i.providerMetadata)!=null?p:g.providerMetadata,c();break}case"reasoning-end":{let g=u.activeReasoningParts[i.id];if(g==null)throw new ni({chunkType:"reasoning-end",chunkId:i.id,message:`Received reasoning-end for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});g.providerMetadata=(m=i.providerMetadata)!=null?m:g.providerMetadata,g.state="done",delete u.activeReasoningParts[i.id],c();break}case"file":{u.message.parts.push({type:"file",mediaType:i.mediaType,url:i.url,...i.providerMetadata!=null?{providerMetadata:i.providerMetadata}:{}}),c();break}case"source-url":{u.message.parts.push({type:"source-url",sourceId:i.sourceId,url:i.url,title:i.title,providerMetadata:i.providerMetadata}),c();break}case"source-document":{u.message.parts.push({type:"source-document",sourceId:i.sourceId,mediaType:i.mediaType,title:i.title,filename:i.filename,providerMetadata:i.providerMetadata}),c();break}case"tool-input-start":{let g=u.message.parts.filter($w);u.partialToolCalls[i.toolCallId]={text:"",toolName:i.toolName,index:g.length,dynamic:i.dynamic,title:i.title},i.dynamic?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-streaming",input:void 0,providerExecuted:i.providerExecuted,title:i.title,providerMetadata:i.providerMetadata}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-streaming",input:void 0,providerExecuted:i.providerExecuted,title:i.title,providerMetadata:i.providerMetadata}),c();break}case"tool-input-delta":{let g=u.partialToolCalls[i.toolCallId];if(g==null)throw new ni({chunkType:"tool-input-delta",chunkId:i.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${i.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});g.text+=i.inputTextDelta;let{value:v}=await du(g.text);g.dynamic?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"input-streaming",input:v,title:g.title}):b({toolCallId:i.toolCallId,toolName:g.toolName,state:"input-streaming",input:v,title:g.title}),c();break}case"tool-input-available":{i.dynamic?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-available",input:i.input,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:i.title}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"input-available",input:i.input,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:i.title}),c(),o&&!i.providerExecuted&&await o({toolCall:i});break}case"tool-input-error":{let g=u.message.parts.filter(Mf).find(M=>M.toolCallId===i.toolCallId);(g!=null?g.type==="dynamic-tool":!!i.dynamic)?y({toolCallId:i.toolCallId,toolName:i.toolName,state:"output-error",input:i.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata}):b({toolCallId:i.toolCallId,toolName:i.toolName,state:"output-error",input:void 0,rawInput:i.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata}),c();break}case"tool-approval-request":{let g=x(i.toolCallId);g.state="approval-requested",g.approval={id:i.approvalId},c();break}case"tool-output-denied":{let g=x(i.toolCallId);g.state="output-denied",c();break}case"tool-output-available":{let g=x(i.toolCallId);g.type==="dynamic-tool"?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"output-available",input:g.input,output:i.output,preliminary:i.preliminary,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}):b({toolCallId:i.toolCallId,toolName:P2(g),state:"output-available",input:g.input,output:i.output,providerExecuted:i.providerExecuted,preliminary:i.preliminary,providerMetadata:i.providerMetadata,title:g.title}),c();break}case"tool-output-error":{let g=x(i.toolCallId);g.type==="dynamic-tool"?y({toolCallId:i.toolCallId,toolName:g.toolName,state:"output-error",input:g.input,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}):b({toolCallId:i.toolCallId,toolName:P2(g),state:"output-error",input:g.input,rawInput:g.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,providerMetadata:i.providerMetadata,title:g.title}),c();break}case"start-step":{u.message.parts.push({type:"step-start"});break}case"finish-step":{u.activeTextParts={},u.activeReasoningParts={};break}case"start":{i.messageId!=null&&(u.message.id=i.messageId),await w(i.messageMetadata),(i.messageId!=null||i.messageMetadata!=null)&&c();break}case"finish":{i.finishReason!=null&&(u.finishReason=i.finishReason),await w(i.messageMetadata),i.messageMetadata!=null&&c();break}case"message-metadata":{await w(i.messageMetadata),i.messageMetadata!=null&&c();break}case"error":{r?.(new Error(i.errorText));break}default:if(E9(i)){if(a?.[i.type]!=null){let M=u.message.parts.findIndex(A=>"id"in A&&"data"in A&&A.id===i.id&&A.type===i.type),I=M>=0?M:u.message.parts.length;await Af({value:i.data,schema:a[i.type],context:{field:`message.parts[${I}].data`,entityName:i.type,entityId:i.id}})}let g=i;if(g.transient){l?.(g);break}let v=g.id!=null?u.message.parts.find(M=>g.type===M.type&&g.id===M.id):void 0;v!=null?v.data=g.data:u.message.parts.push(g),l?.(g),c()}}s.enqueue(i)})}}))}async function O9({stream:e,onError:t}){let a=e.getReader();try{for(;;){let{done:n}=await a.read();if(n)break}}catch(n){t?.(n)}finally{a.releaseLock()}}var Qne=rr({prefix:"aitxt",size:24});var ere=kf(()=>uu(h.array(h.object({id:h.string(),role:h.enum(["system","user","assistant"]),metadata:h.unknown().optional(),parts:h.array(h.union([h.object({type:h.literal("text"),text:h.string(),state:h.enum(["streaming","done"]).optional(),providerMetadata:X.optional()}),h.object({type:h.literal("reasoning"),text:h.string(),state:h.enum(["streaming","done"]).optional(),providerMetadata:X.optional()}),h.object({type:h.literal("source-url"),sourceId:h.string(),url:h.string(),title:h.string().optional(),providerMetadata:X.optional()}),h.object({type:h.literal("source-document"),sourceId:h.string(),mediaType:h.string(),title:h.string(),filename:h.string().optional(),providerMetadata:X.optional()}),h.object({type:h.literal("file"),mediaType:h.string(),filename:h.string().optional(),url:h.string(),providerMetadata:X.optional()}),h.object({type:h.literal("step-start")}),h.object({type:h.string().startsWith("data-"),id:h.string().optional(),data:h.unknown()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("input-streaming"),input:h.unknown().optional(),providerExecuted:h.boolean().optional(),callProviderMetadata:X.optional(),output:h.never().optional(),errorText:h.never().optional(),approval:h.never().optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("input-available"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.never().optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("approval-requested"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.never().optional(),reason:h.never().optional()})}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("approval-responded"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.boolean(),reason:h.string().optional()})}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-available"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.unknown(),errorText:h.never().optional(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),preliminary:h.boolean().optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-error"),input:h.unknown(),rawInput:h.unknown().optional(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.string(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.literal("dynamic-tool"),toolName:h.string(),toolCallId:h.string(),state:h.literal("output-denied"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!1),reason:h.string().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("input-streaming"),providerExecuted:h.boolean().optional(),callProviderMetadata:X.optional(),input:h.unknown().optional(),output:h.never().optional(),errorText:h.never().optional(),approval:h.never().optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("input-available"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.never().optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("approval-requested"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.never().optional(),reason:h.never().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("approval-responded"),input:h.unknown(),providerExecuted:h.boolean().optional(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.boolean(),reason:h.string().optional()})}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-available"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.unknown(),errorText:h.never().optional(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),preliminary:h.boolean().optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-error"),providerExecuted:h.boolean().optional(),input:h.unknown(),rawInput:h.unknown().optional(),output:h.never().optional(),errorText:h.string(),callProviderMetadata:X.optional(),resultProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!0),reason:h.string().optional()}).optional()}),h.object({type:h.string().startsWith("tool-"),toolCallId:h.string(),state:h.literal("output-denied"),providerExecuted:h.boolean().optional(),input:h.unknown(),output:h.never().optional(),errorText:h.never().optional(),callProviderMetadata:X.optional(),approval:h.object({id:h.string(),approved:h.literal(!1),reason:h.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var are=rr({prefix:"aiobj",size:24});function W2(e){return({url:t,abortSignal:a})=>f9({url:t,maxBytes:e?.maxBytes,abortSignal:a})}var P9=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,a)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){a(n)}}),this.processQueue()})}};var rre=rr({prefix:"aiobj",size:24});var ore=W2();var N9="AI_NoSuchProviderError",B9=`vercel.ai.error.${N9}`,U9=Symbol.for(B9),F9;F9=U9;var lre=W2();async function z9(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{let{name:a,type:n}=t,r=await new Promise((o,l)=>{let i=new FileReader;i.onload=s=>{var u;o((u=s.target)==null?void 0:u.result)},i.onerror=s=>l(s),i.readAsDataURL(t)});return{type:"file",mediaType:n,filename:a,url:r}}))}var q9=class{constructor({api:e="/api/chat",credentials:t,headers:a,body:n,fetch:r,prepareSendMessagesRequest:o,prepareReconnectToStreamRequest:l}){this.api=e,this.credentials=t,this.headers=a,this.body=n,this.fetch=r,this.prepareSendMessagesRequest=o,this.prepareReconnectToStreamRequest=l}async sendMessages({abortSignal:e,...t}){var a,n,r,o,l;let i=await In(this.body),s=await In(this.headers),u=await In(this.credentials),c={...Xr(s),...Xr(t.headers)},d=await((a=this.prepareSendMessagesRequest)==null?void 0:a.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...i,...t.body},headers:c,credentials:u,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),f=(n=d?.api)!=null?n:this.api,p=d?.headers!==void 0?Xr(d.headers):c,m=d?.body!==void 0?d.body:{...i,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},x=(r=d?.credentials)!=null?r:u,y=await((o=this.fetch)!=null?o:globalThis.fetch)(f,{method:"POST",headers:{"Content-Type":"application/json",...p},body:JSON.stringify(m),credentials:x,signal:e});if(!y.ok)throw new Error((l=await y.text())!=null?l:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}async reconnectToStream(e){var t,a,n,r,o;let l=await In(this.body),i=await In(this.headers),s=await In(this.credentials),u={...Xr(i),...Xr(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...l,...e.body},headers:u,credentials:s,requestMetadata:e.metadata})),d=(a=c?.api)!=null?a:`${this.api}/${e.chatId}/stream`,f=c?.headers!==void 0?Xr(c.headers):u,p=(n=c?.credentials)!=null?n:s,x=await((r=this.fetch)!=null?r:globalThis.fetch)(d,{method:"GET",headers:f,credentials:p});if(x.status===204)return null;if(!x.ok)throw new Error((o=await x.text())!=null?o:"Failed to fetch the chat response.");if(!x.body)throw new Error("The response body is empty.");return this.processResponseStream(x.body)}},Xw=class extends q9{constructor(e={}){super(e)}processResponseStream(e){return O2({stream:e,schema:Ww}).pipeThrough(new TransformStream({async transform(t,a){if(!t.success)throw t.error;a.enqueue(t.value)}}))}},X2=class{constructor({generateId:e=A2,id:t=e(),transport:a=new Xw,messageMetadataSchema:n,dataPartSchemas:r,state:o,onError:l,onToolCall:i,onFinish:s,onData:u,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new P9,this.sendMessage=async(d,f)=>{var p,m,x,b;if(d==null){await this.makeRequest({trigger:"submit-message",messageId:(p=this.lastMessage)==null?void 0:p.id,...f});return}let y;if("text"in d||"files"in d?y={parts:[...Array.isArray(d.files)?d.files:await z9(d.files),..."text"in d&&d.text!=null?[{type:"text",text:d.text}]:[]]}:y=d,d.messageId!=null){let w=this.state.messages.findIndex(g=>g.id===d.messageId);if(w===-1)throw new Error(`message with id ${d.messageId} not found`);if(this.state.messages[w].role!=="user")throw new Error(`message with id ${d.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,w+1),this.state.replaceMessage(w,{...y,id:d.messageId,role:(m=y.role)!=null?m:"user",metadata:d.metadata})}else this.state.pushMessage({...y,id:(x=y.id)!=null?x:this.generateId(),role:(b=y.role)!=null?b:"user",metadata:d.metadata});await this.makeRequest({trigger:"submit-message",messageId:d.messageId,...f})},this.regenerate=async({messageId:d,...f}={})=>{let p=d==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===d);if(p===-1)throw new Error(`message ${d} not found`);this.state.messages=this.state.messages.slice(0,this.messages[p].role==="assistant"?p:p+1),await this.makeRequest({trigger:"regenerate-message",messageId:d,...f})},this.resumeStream=async(d={})=>{await this.makeRequest({trigger:"resume-stream",...d})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:d,approved:f,reason:p,options:m})=>this.jobExecutor.run(async()=>{let x=this.state.messages,b=x[x.length-1],y=w=>Mf(w)&&w.state==="approval-requested"&&w.approval.id===d?{...w,state:"approval-responded",approval:{id:d,approved:f,reason:p}}:w;this.state.replaceMessage(x.length-1,{...b,parts:b.parts.map(y)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(y)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(w=>{var g;w&&this.makeRequest({trigger:"submit-message",messageId:(g=this.lastMessage)==null?void 0:g.id,...m})})}),this.addToolOutput=async({state:d="output-available",toolCallId:f,output:p,errorText:m,options:x})=>this.jobExecutor.run(async()=>{let b=this.state.messages,y=b[b.length-1],w=g=>Mf(g)&&g.toolCallId===f?{...g,state:d,output:p,errorText:m}:g;this.state.replaceMessage(b.length-1,{...y,parts:y.parts.map(w)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(w)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(g=>{var v;g&&this.makeRequest({trigger:"submit-message",messageId:(v=this.lastMessage)==null?void 0:v.id,...x})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var d;this.status!=="streaming"&&this.status!=="submitted"||(d=this.activeResponse)!=null&&d.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=a,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=r,this.state=o,this.onError=l,this.onToolCall=i,this.onFinish=s,this.onData=u,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:a,body:n,messageId:r}){var o,l,i;let s;if(e==="resume-stream")try{let p=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:a,body:n});if(p==null)return;s=p}catch(p){this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p});return}this.setStatus({status:"submitted",error:void 0});let u=this.lastMessage,c=!1,d=!1,f=!1;try{let p={state:D9({lastMessage:this.state.snapshot(u),messageId:this.generateId()}),abortController:new AbortController};p.abortController.signal.addEventListener("abort",()=>{c=!0}),this.activeResponse=p;let m;e==="resume-stream"?m=s:m=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:p.abortController.signal,metadata:t,headers:a,body:n,trigger:e,messageId:r});let x=b=>this.jobExecutor.run(()=>b({state:p.state,write:()=>{var y;this.setStatus({status:"streaming"}),p.state.message.id===((y=this.lastMessage)==null?void 0:y.id)?this.state.replaceMessage(this.state.messages.length-1,p.state.message):this.state.pushMessage(p.state.message)}}));await O9({stream:_9({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:x,onError:b=>{throw b}}),onError:b=>{throw b}}),this.setStatus({status:"ready"})}catch(p){if(c||p.name==="AbortError")return c=!0,this.setStatus({status:"ready"}),null;f=!0,p instanceof TypeError&&(p.message.toLowerCase().includes("fetch")||p.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p})}finally{try{(l=this.onFinish)==null||l.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:d,isError:f,finishReason:(o=this.activeResponse)==null?void 0:o.state.finishReason})}catch(p){console.error(p)}this.activeResponse=void 0}!f&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(i=this.lastMessage)==null?void 0:i.id,metadata:t,headers:a,body:n})}};var J2=z(Z2(),1);var hu=z(Me(),1);var Df=z(Me(),1);var Y2=(e,t,a)=>{if(!t.has(e))throw TypeError("Cannot "+a)},ct=(e,t,a)=>(Y2(e,t,"read from private field"),a?a.call(e):t.get(e)),Cn=(e,t,a)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,a)},Zr=(e,t,a,n)=>(Y2(e,t,"write to private field"),n?n.call(e,a):t.set(e,a),a);function j9(e,t){return t!=null?(0,J2.default)(e,t):e}var Qa,Ef,Rf,fu,pu,mu,ri,Kw,Zw,V9=class{constructor(e=[]){Cn(this,Qa,void 0),Cn(this,Ef,"ready"),Cn(this,Rf,void 0),Cn(this,fu,new Set),Cn(this,pu,new Set),Cn(this,mu,new Set),this.pushMessage=t=>{Zr(this,Qa,ct(this,Qa).concat(t)),ct(this,ri).call(this)},this.popMessage=()=>{Zr(this,Qa,ct(this,Qa).slice(0,-1)),ct(this,ri).call(this)},this.replaceMessage=(t,a)=>{Zr(this,Qa,[...ct(this,Qa).slice(0,t),this.snapshot(a),...ct(this,Qa).slice(t+1)]),ct(this,ri).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,a)=>{let n=a?j9(t,a):t;return ct(this,fu).add(n),()=>{ct(this,fu).delete(n)}},this["~registerStatusCallback"]=t=>(ct(this,pu).add(t),()=>{ct(this,pu).delete(t)}),this["~registerErrorCallback"]=t=>(ct(this,mu).add(t),()=>{ct(this,mu).delete(t)}),Cn(this,ri,()=>{ct(this,fu).forEach(t=>t())}),Cn(this,Kw,()=>{ct(this,pu).forEach(t=>t())}),Cn(this,Zw,()=>{ct(this,mu).forEach(t=>t())}),Zr(this,Qa,e)}get status(){return ct(this,Ef)}set status(e){Zr(this,Ef,e),ct(this,Kw).call(this)}get error(){return ct(this,Rf)}set error(e){Zr(this,Rf,e),ct(this,Zw).call(this)}get messages(){return ct(this,Qa)}set messages(e){Zr(this,Qa,[...e]),ct(this,ri).call(this)}};Qa=new WeakMap;Ef=new WeakMap;Rf=new WeakMap;fu=new WeakMap;pu=new WeakMap;mu=new WeakMap;ri=new WeakMap;Kw=new WeakMap;Zw=new WeakMap;var oi,Q2=class extends X2{constructor({messages:e,...t}){let a=new V9(e);super({...t,state:a}),Cn(this,oi,void 0),this["~registerMessagesCallback"]=(n,r)=>ct(this,oi)["~registerMessagesCallback"](n,r),this["~registerStatusCallback"]=n=>ct(this,oi)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>ct(this,oi)["~registerErrorCallback"](n),Zr(this,oi,a)}};oi=new WeakMap;function eD({experimental_throttle:e,resume:t=!1,...a}={}){let n=(0,Ya.useRef)("chat"in a?{}:{onToolCall:a.onToolCall,onData:a.onData,onFinish:a.onFinish,onError:a.onError,sendAutomaticallyWhen:a.sendAutomaticallyWhen});"chat"in a||(n.current={onToolCall:a.onToolCall,onData:a.onData,onFinish:a.onFinish,onError:a.onError,sendAutomaticallyWhen:a.sendAutomaticallyWhen});let r={...a,onToolCall:f=>{var p,m;return(m=(p=n.current).onToolCall)==null?void 0:m.call(p,f)},onData:f=>{var p,m;return(m=(p=n.current).onData)==null?void 0:m.call(p,f)},onFinish:f=>{var p,m;return(m=(p=n.current).onFinish)==null?void 0:m.call(p,f)},onError:f=>{var p,m;return(m=(p=n.current).onError)==null?void 0:m.call(p,f)},sendAutomaticallyWhen:f=>{var p,m,x;return(x=(m=(p=n.current).sendAutomaticallyWhen)==null?void 0:m.call(p,f))!=null?x:!1}},o=(0,Ya.useRef)("chat"in a?a.chat:new Q2(r));("chat"in a&&a.chat!==o.current||"id"in a&&o.current.id!==a.id)&&(o.current="chat"in a?a.chat:new Q2(r));let i=(0,Ya.useCallback)(f=>o.current["~registerMessagesCallback"](f,e),[e,o.current.id]),s=(0,Ya.useSyncExternalStore)(i,()=>o.current.messages,()=>o.current.messages),u=(0,Ya.useSyncExternalStore)(o.current["~registerStatusCallback"],()=>o.current.status,()=>o.current.status),c=(0,Ya.useSyncExternalStore)(o.current["~registerErrorCallback"],()=>o.current.error,()=>o.current.error),d=(0,Ya.useCallback)(f=>{typeof f=="function"&&(f=f(o.current.messages)),o.current.messages=f},[o]);return(0,Ya.useEffect)(()=>{t&&o.current.resumeStream()},[t,o]),{id:o.current.id,messages:s,setMessages:d,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:u,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}var K=z(Me(),1);function li(e,t,a){let[n,r=""]=e.split("?"),o=n.replace(/\/$/,""),l=new URLSearchParams(r);if(a)for(let[s,u]of Object.entries(a))l.set(s,u);let i=l.toString();return`${o}${t}${i?`?${i}`:""}`}function G9(e){let t=e?.cause,a=t?.issues??t?.errors;if(!Array.isArray(a))return null;let n=a.find(r=>r.code==="invalid_union");if(!n?.errors)return null;for(let r of n.errors){if(!Array.isArray(r)||r.some(i=>(i.code==="invalid_value"||i.code==="invalid_literal")&&i.path?.[0]==="type"))continue;let l=r.filter(i=>i.code==="unrecognized_keys").flatMap(i=>i.keys??[]);if(l.length>0)return l}return null}var _f=class extends Xw{processResponseStream(t){let a="",n=Ww(),r=n.validate?.bind(n);return t.pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({async transform(o,l){a+=o;let i=a.split(`
|
|
138
|
+
`);a=i.pop()??"";for(let s of i){let u=s.trim();if(!u.startsWith("data:"))continue;let c=u.slice(5).trim();if(c!=="[DONE]")try{let d=JSON.parse(c);if(!r){l.enqueue(d);continue}let f=await r(d);if(f.success){l.enqueue(f.value);continue}let p=G9(f.error);if(p?.length){let m={...d};for(let b of p)delete m[b];let x=await r(m);x.success&&l.enqueue(x.value)}}catch{}}}}))}};var tD=50,aD=1e3;function Of(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.threadId=="string"&&typeof t.memoryUserId=="string"&&typeof t.title=="string"&&Array.isArray(t.messages)&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string"}async function Pf(e){if(typeof indexedDB>"u")return null;let t=null;try{return t=await Uh(),await e(t)}catch{return null}finally{try{t?.close()}catch{}}}function Qw(e){return new Promise((t,a)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>a(e.error)})}async function Yw(e){return await Pf(async a=>{let o=a.transaction(Ra,"readonly").objectStore(Ra).index(Jc),i=(await Qw(o.getAll(e))??[]).filter(Of);return i.sort((s,u)=>s.updatedAt<u.updatedAt?1:-1),i})??[]}async function Nf(e){return await Pf(async a=>{let r=a.transaction(Ra,"readonly").objectStore(Ra),o=await Qw(r.get(e));return Of(o)?o:null})??null}async function Jw(e){if(!Of(e))return;let t=e.messages.length>aD?{...e,messages:e.messages.slice(e.messages.length-aD)}:e;await Pf(async a=>{await new Promise((s,u)=>{let c=a.transaction(Ra,"readwrite");c.oncomplete=()=>s(),c.onerror=()=>u(c.error),c.onabort=()=>u(c.error),c.objectStore(Ra).put(t)});let n=a.transaction(Ra,"readwrite"),r=n.objectStore(Ra),o=r.index(Jc),i=(await Qw(o.getAll(t.memoryUserId))??[]).filter(Of);if(i.length>tD){i.sort((u,c)=>u.updatedAt<c.updatedAt?-1:1);let s=i.slice(0,i.length-tD);for(let u of s)r.delete(u.threadId)}return await new Promise((s,u)=>{n.oncomplete=()=>s(),n.onerror=()=>u(n.error),n.onabort=()=>u(n.error)}),null})}async function nD(e){await Pf(async t=>(await new Promise((a,n)=>{let r=t.transaction(Ra,"readwrite");r.oncomplete=()=>a(),r.onerror=()=>n(r.error),r.onabort=()=>n(r.error),r.objectStore(Ra).delete(e)}),null))}async function ex(e){return(await Yw(e))[0]?.threadId??null}function rD(e){let t=e.trim();if(!t)return`Conversation on ${new Date().toISOString().slice(0,10)}`;let a=t.split(/\r?\n/,1)[0]??t;return a.length<=60?a:`${a.slice(0,60).trimEnd()}\u2026`}var $9="x-session-id",W9=250;function oD(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Ts()}function Bf(){return new Date().toISOString()}function lD(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}async function X9(e,t){let a=li(e,"/tools"),n=await fetch(a,{method:"GET",headers:t?{...t}:void 0});if(!n.ok)throw new Error(`[Waniwani] Failed to fetch /tools: ${n.status} ${n.statusText}`);let r=await n.json();if(!r||!Array.isArray(r.tools))return{};let o={};for(let l of r.tools)l&&typeof l.name=="string"&&(o[l.name]=l);return o}function iD(e){let{api:t="/api/waniwani",headers:a,body:n,onMessageSent:r,onResponseReceived:o,enableThreadHistory:l=!1,activeThreadId:i,onThreadChange:s}=e,u=(0,K.useRef)(a),c=(0,K.useRef)(n),d=(0,K.useRef)(l);(0,K.useEffect)(()=>{d.current=l},[l]);let f=(0,K.useRef)(void 0),p=(0,K.useRef)(null),[m,x]=(0,K.useState)(void 0),b=(0,K.useRef)(m),[y,w]=(0,K.useState)(i),g=(0,K.useRef)(y),[v,M]=(0,K.useState)([]),[I,A]=(0,K.useState)(!l),E=(0,K.useRef)(void 0),_=(0,K.useRef)(void 0),L=(0,K.useRef)(void 0),W=(0,K.useRef)(void 0),U=(0,K.useRef)(0),R=(0,K.useRef)(s);(0,K.useEffect)(()=>{R.current=s},[s]);let B=(0,K.useCallback)(N=>{g.current=N,w(N),N&&R.current?.(N)},[]),q=(0,K.useCallback)(async()=>{if(!l)return;let N=p.current?.memoryUserId;if(!N)return;let ne=await Yw(N);M(ne)},[l]),j=(0,K.useCallback)(()=>b.current,[]),Y=(0,K.useCallback)(N=>{let ne=lD(N);ne&&b.current!==ne&&(b.current=ne,x(ne))},[]),fe=(0,K.useCallback)(()=>{b.current=void 0,x(void 0)},[]);(0,K.useEffect)(()=>{u.current=a},[a]),(0,K.useEffect)(()=>{c.current=n},[n]),(0,K.useEffect)(()=>{let N=!1,ne=U.current;return(async()=>{try{let mt=await xo();if(N)return;p.current=mt}catch{}if(!l)return;let ee=p.current?.memoryUserId;if(!ee){A(!0);return}try{let mt=i??await ex(ee);if(N||ne!==U.current)return;if(mt){let Ze=await Nf(mt);if(N||ne!==U.current)return;Ze&&Ze.memoryUserId===ee&&(g.current=Ze.threadId,w(Ze.threadId),E.current=Ze.createdAt,_.current=Ze.title,Ze.sessionId&&(b.current=Ze.sessionId,x(Ze.sessionId)),he(Ze.messages))}await q()}finally{N||A(!0)}})(),()=>{N=!0}},[]);let He=(0,K.useRef)(new _f({api:t,headers:()=>({...u.current}),body:()=>{let N={...c.current??{}},ne=Object.hasOwn(N,"sessionId"),ee=lD(N.sessionId);if(ee)Y(ee),N.sessionId=ee;else if(ne)fe(),delete N.sessionId;else{let Pa=j();Pa&&(N.sessionId=Pa)}if(Jl(f.current)&&(N.modelContext=f.current),p.current){let Pa=p.current;N.visitorContext={timezone:Pa.timezone,language:Pa.language,languages:Pa.languages,deviceType:Pa.deviceType,referrer:Pa.referrer,visitorId:Pa.visitorId};let Tn=typeof N.visitor=="object"&&N.visitor!==null?N.visitor:{},kD=typeof Tn.client=="object"&&Tn.client!==null?Tn.client:{};N.visitor={...Tn,id:Pa.visitorId,client:{...kD,memoryUserId:Pa.memoryUserId}}}let mt=typeof N.extra=="object"&&N.extra!==null&&!Array.isArray(N.extra)?N.extra:void 0,Ze=p.current?.memoryUserId,Dt=p.current?.language,xu={};if(Ze&&(xu.memoryUserId=Ze),Dt&&(xu.locale=Dt),(Object.keys(xu).length>0||mt)&&(N.extra={...xu,...mt??{}}),d.current)if(Object.hasOwn(N,"threadId"))typeof N.threadId=="string"&&(g.current=N.threadId);else{let Tn=g.current;Tn||(Tn=oD(),E.current=Bf(),_.current=void 0,B(Tn)),N.threadId=Tn}return N},fetch:(async(N,ne)=>{let ee=await fetch(N,ne);return f.current=void 0,Y(ee.headers.get($9)),ee})})),S=(0,K.useRef)(null),Be=(0,K.useRef)(null),rt=(0,K.useRef)({}),[k,De]=(0,K.useState)(0),ie=e.skipRemoteConfig===!0,be=(0,K.useCallback)(async()=>{if(!ie)try{let N=await X9(t,u.current);rt.current=N,De(ne=>ne+1)}catch(N){console.warn("[Waniwani] Failed to fetch tool definitions:",N instanceof Error?N.message:N)}},[t,ie]);(0,K.useEffect)(()=>{be()},[be]);let{messages:Tt,sendMessage:pe,setMessages:he,status:Se}=eD({messages:e.initialMessages,transport:He.current,onFinish({message:N}){o?.(),S.current&&(Be.current=N)},onError(N){console.warn("[Waniwani] Chat error:",N.message),S.current&&(S.current.reject(N),S.current=null)}}),_e=(0,K.useRef)(Tt);(0,K.useEffect)(()=>{_e.current=Tt},[Tt]);let Ie=(0,K.useRef)(l);(0,K.useEffect)(()=>{if(!l||Ie.current||(Ie.current=!0,_e.current.length>0))return;let N=!1,ne=U.current;return A(!1),(async()=>{try{let ee=p.current;if(!ee)try{ee=await xo(),p.current=ee}catch{}let mt=ee?.memoryUserId;if(!mt||N||ne!==U.current){N||A(!0);return}let Ze=i??await ex(mt);if(N||ne!==U.current)return;if(Ze){let Dt=await Nf(Ze);if(N||ne!==U.current)return;Dt&&Dt.memoryUserId===mt&&(g.current=Dt.threadId,w(Dt.threadId),E.current=Dt.createdAt,_.current=Dt.title,Dt.sessionId&&(b.current=Dt.sessionId,x(Dt.sessionId)),he(Dt.messages))}await q()}finally{N||A(!0)}})(),()=>{N=!0}},[l]),(0,K.useEffect)(()=>{if(Se==="ready"&&S.current&&Be.current){let N=S.current,ne=Be.current;S.current=null,Be.current=null,N.resolve(ne)}},[Se]);let[Ue,Le]=(0,K.useState)(""),[$,oe]=(0,K.useState)([]),je=Se==="submitted"||Se==="streaming",Bt=(0,K.useCallback)(N=>{oe(ne=>ne.filter(ee=>ee.id!==N))},[]),xa=je&&$.length>0,ia=(0,K.useCallback)(N=>{let ne=!!N.text?.trim(),ee=!!N.files?.length;if(ne||ee){if(je){if($.length>0)return;oe(mt=>[...mt,{id:Ts(),text:N.text||"",files:N.files??[],modelContext:N.modelContext}]),Le("");return}f.current=N.modelContext,pe({text:N.text||"",files:N.files}),r?.(N.text||""),Le("")}},[pe,r,je,$.length]),ui=(0,K.useCallback)(N=>new Promise((ne,ee)=>{S.current={resolve:ne,reject:ee},pe({text:N}),r?.(N)}),[pe,r]);(0,K.useEffect)(()=>{if(Se!=="ready"||$.length===0)return;let[N,...ne]=$;oe(ne),f.current=N.modelContext,pe({text:N.text,files:N.files.length>0?N.files:void 0}),r?.(N.text)},[Se,pe,r,$]);let Xf=(0,K.useCallback)(()=>{he([]),oe([]),fe(),Le(""),rt.current={},De(N=>N+1),be()},[he,fe,be]),Ho=(0,K.useCallback)(()=>{if(!d.current)return;let N=p.current?.memoryUserId,ne=g.current,ee=_e.current;if(!(!N||!ne||ee.length===0)){if(E.current||(E.current=Bf()),!_.current){let mt=ee.find(Dt=>Dt.role==="user"),Ze=mt?mt.parts.map(Dt=>"text"in Dt&&typeof Dt.text=="string"?Dt.text:"").join(" "):"";_.current=rD(Ze)}return{threadId:ne,memoryUserId:N,title:_.current,messages:ee,sessionId:b.current,createdAt:E.current,updatedAt:Bf()}}},[]),wu=(0,K.useCallback)(async()=>{let N=Ho();N&&(await Jw(N),await q())},[Ho,q]);(0,K.useEffect)(()=>{if(l&&I&&!(Se==="submitted"||Se==="streaming")&&Tt.length!==0)return L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{L.current=void 0;let N=wu().finally(()=>{W.current===N&&(W.current=void 0)});W.current=N},W9),()=>{L.current&&clearTimeout(L.current)}},[l,I,Tt,Se,wu]);let jo=(0,K.useCallback)(()=>{let N=W.current,ne=L.current,ee=ne?Ho():void 0;return ne&&(clearTimeout(ne),L.current=void 0),(async()=>{N&&await N,ee&&(await Jw(ee),await q())})()},[Ho,q]),O=(0,K.useCallback)(()=>{U.current+=1,jo(),he([]),oe([]),fe(),Le("");let N=oD();return E.current=Bf(),_.current=void 0,B(N),q(),N},[he,fe,B,q,jo]),H=(0,K.useCallback)(async N=>{U.current+=1;let ne=U.current;if(await jo(),ne!==U.current)return;let ee=await Nf(N);ne===U.current&&ee&&(B(ee.threadId),E.current=ee.createdAt,_.current=ee.title,ee.sessionId?(b.current=ee.sessionId,x(ee.sessionId)):fe(),he(ee.messages),oe([]),Le(""))},[he,fe,B,jo]),le=(0,K.useCallback)(async N=>{if(g.current===N){U.current+=1,L.current&&(clearTimeout(L.current),L.current=void 0);let ne=W.current;ne&&await ne}await nD(N),await q(),g.current===N&&(he([]),oe([]),fe(),Le(""),g.current=void 0,w(void 0),E.current=void 0,_.current=void 0)},[he,fe,q]);(0,K.useEffect)(()=>{l&&I&&i!==void 0&&i!==g.current&&H(i)},[i,l,I,H]);let we=(0,K.useCallback)(N=>{Le(N.target.value)},[]),qe=Tt[Tt.length-1],sa=Tt.length>0,Ln=je&&(!sa||qe.role==="user"),Ja=rt.current;return{messages:Tt,status:Se,text:Ue,setText:Le,handleSubmit:ia,handleTextChange:we,isLoading:je,showLoaderBubble:Ln,lastMessage:qe,hasMessages:sa,sendMessage:pe,sendMessageAndWait:ui,reset:Xf,queuedMessages:$,queueFull:xa,removeQueuedMessage:Bt,sessionId:m,toolDefinitions:Ja,refreshToolDefinitions:be,threads:v,activeThreadId:y,isThreadHistoryReady:I,startNewThread:O,switchThread:H,deleteThread:le}}var kn=z(Me(),1);function K9(e){for(let t of e.parts){let a=t;if(a.type==="data"||a.type==="data-suggestions"){let n=a.data;if(n&&Array.isArray(n.suggestions))return n.suggestions}}return null}function sD(e){return typeof e=="object"&&e!==null&&"initial"in e}function uD(e){let{messages:t,status:a,config:n}=e,r=sD(n)&&n.initial?n.initial:void 0,[o,l]=(0,kn.useState)(r??[]),i=(0,kn.useRef)(a),s=n===!0||sD(n)&&n.dynamic!==!1,u=(0,kn.useCallback)(()=>{l([])},[]),c=t.length>0;(0,kn.useEffect)(()=>{!c&&r&&r.length>0&&l(r)},[r,c]);let d=t[t.length-1];return(0,kn.useEffect)(()=>{d?.role==="user"&&u()},[d,u]),(0,kn.useEffect)(()=>{let f=i.current;if(i.current=a,f==="streaming"&&a==="ready"&&s){let p=[...t].reverse().find(x=>x.role==="assistant");if(!p)return;let m=K9(p);m&&l(m)}},[a,s,t]),{suggestions:o,isLoading:!1,clear:u}}function cD(e,t){let a=t?.Authorization,n=typeof a=="string"&&a.startsWith("Bearer ")?a.slice(7):null;return li(e,"/resource",n?{token:n}:void 0)}var Z9={primaryColor:["--ww-primary","--ww-color-primary"],primaryForeground:["--ww-primary-fg","--ww-color-primary-foreground"],backgroundColor:["--ww-bg","--ww-color-background"],textColor:["--ww-text","--ww-color-foreground","--ww-color-accent-foreground"],mutedColor:["--ww-muted","--ww-color-muted-foreground"],borderColor:["--ww-border","--ww-color-border"],borderWidth:["--ww-border-width"],boxShadow:["--ww-shadow"],assistantBubbleColor:["--ww-assistant-bubble","--ww-color-accent"],userBubbleColor:["--ww-user-bubble"],inputBackgroundColor:["--ww-input-bg","--ww-color-input"],borderRadius:["--ww-radius"],messageBorderRadius:["--ww-msg-radius"],fontFamily:["--ww-font"],headerBackgroundColor:["--ww-header-bg"],headerTextColor:["--ww-header-text"],statusColor:["--ww-status"],toolCardColor:["--ww-tool-card","--ww-color-tool-card"]};function Uf(e){let t={};for(let[a,n]of Object.entries(Z9)){let r=e[a];if(r===void 0)continue;let o=typeof r=="number"?`${r}px`:String(r);for(let l of n)t[l]=o}return t}var Xe=z(te(),1),Ff=(0,tt.forwardRef)(function(t,a){let{locale:n,messages:r}=t;return(0,Xe.jsx)(Ls,{locale:n,messages:r,children:(0,Xe.jsx)(Q9,{...t,ref:a})})}),Q9=(0,tt.forwardRef)(function(t,a){let{t:n,ready:r}=Re(),{appearance:o,className:l,allowAttachments:i=!1,welcomeMessage:s,welcome:u,placeholder:c=n.promptInput.placeholder,triggerEvent:d="triggerDemoRequest",api:f,mcp:p,debug:m=!1,readOnly:x=!1,title:b,headerActions:y,hideHeader:w=!1,enableThreadHistory:g=!1,showToolCalls:v=!0,initializing:M=!1,disclaimer:I}=t,A=o?.theme,E=o?.variables,_=E?Uf(E):{},[L,W]=(0,tt.useState)(!1);(0,tt.useEffect)(()=>{if(A!=="auto"||typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");W($.matches);let oe=()=>W($.matches);return $.addEventListener("change",oe),()=>$.removeEventListener("change",oe)},[A]);let U=A==="dark"||A==="auto"&&L,R=iD({...t,api:f}),B=pR({...t,api:f,sessionId:R.sessionId,onCallTool:p?.onCallTool}),q=p?.resourceEndpoint??cD(f,t.headers),j=ld(c,!R.text),[Y,fe]=(0,tt.useState)(null),[He,S]=(0,tt.useState)(null),Be=(0,tt.useRef)(null),rt=(0,tt.useRef)(null),k=(0,tt.useRef)(null),De=(0,tt.useRef)(null),[ie,be]=(0,tt.useState)(!0),Tt=(0,tt.useRef)(ie);Tt.current=ie;let pe=(0,tt.useCallback)(()=>{let $=Be.current;if(!$)return;let oe=$.querySelector("textarea");oe&&oe.focus()},[]),he=(0,tt.useCallback)(($="smooth")=>{let oe=rt.current;oe&&oe.scrollTo({top:oe.scrollHeight,behavior:$})},[]);(0,tt.useEffect)(()=>{let $=De.current,oe=rt.current;if(!$||!oe)return;let je=new IntersectionObserver(([Bt])=>be(Bt.isIntersecting),{root:oe,rootMargin:"0px 0px 200px 0px",threshold:0});return je.observe($),()=>je.disconnect()},[]),(0,tt.useEffect)(()=>{(R.messages[R.messages.length-1]?.role==="user"||Tt.current)&&he("smooth")},[R.messages.length,R.messages[R.messages.length-1]]),(0,tt.useEffect)(()=>{he("auto")},[he]),(0,tt.useEffect)(()=>{if(typeof ResizeObserver>"u")return;let $=rt.current,oe=k.current;if(!$&&!oe)return;let je=$?.scrollHeight??0,Bt=$?.clientHeight??0,xa=new ResizeObserver(()=>{let ia=rt.current;if(!ia)return;let ui=ia.scrollTop+Bt>=je-5;je=ia.scrollHeight,Bt=ia.clientHeight,ui&&he("auto")});return $&&xa.observe($),oe&&xa.observe(oe),()=>xa.disconnect()},[he]);let Se=uD({messages:R.messages,status:R.status,config:t.suggestions}),_e=(0,tt.useCallback)($=>{let oe=$.content.map(je=>je.text??"").join("").trim();oe&&R.handleSubmit({text:oe,files:[],modelContext:$.modelContext})},[R.handleSubmit]),Ie=(0,tt.useCallback)($=>{Se.clear(),R.handleSubmit({text:$,files:[]})},[Se.clear,R.handleSubmit]);(0,tt.useImperativeHandle)(a,()=>({sendMessage:$=>{R.handleSubmit({text:$,files:[]}),pe()},sendMessageAndWait:$=>R.sendMessageAndWait($),reset:R.reset,focus:pe,get messages(){return R.messages},get sessionId(){return R.sessionId}}),[R.handleSubmit,R.sendMessageAndWait,R.reset,R.messages,R.sessionId,pe]),(0,tt.useEffect)(()=>{if(!d)return;let $=oe=>{let je=oe.detail,Bt=typeof je?.message=="string"?je.message:void 0;Bt&&R.handleSubmit({text:Bt,files:[]}),pe()};return window.addEventListener(d,$),()=>window.removeEventListener(d,$)},[d,R.handleSubmit,pe]);let Ue=!w&&!!(b||g||y),Le=M||!r;return(0,Xe.jsxs)("div",{ref:Be,style:{..._,maxHeight:"inherit",...Y&&He?{height:He}:{},opacity:Le?0:1,transition:"opacity 220ms ease-out"},"data-waniwani-chat":"","data-waniwani-layout":"embed","data-color-scheme":A==="auto"?"auto":void 0,...Le?{"data-waniwani-initializing":""}:{},...U?{"data-waniwani-dark":""}:{},className:V("ww:relative ww:w-full ww:h-full ww:flex ww:flex-col ww:bg-background ww:text-foreground ww:font-[family-name:var(--ww-font)] ww:overflow-hidden",A==="dark"&&"dark",l),children:[Ue&&(0,Xe.jsxs)("div",{className:"ww:shrink-0 ww:flex ww:items-center ww:gap-2 ww:pl-4 ww:pr-3 ww:py-3 ww:border-b ww:border-border",style:{backgroundColor:"var(--ww-color-card-header)",color:"var(--ww-color-card-header-foreground)"},children:[b&&(0,Xe.jsx)("div",{className:"ww:text-sm ww:font-semibold ww:truncate ww:flex-1 ww:min-w-0",children:b}),!b&&(0,Xe.jsx)("div",{className:"ww:flex-1"}),g&&(0,Xe.jsx)(fR,{threads:R.threads,activeThreadId:R.activeThreadId,onNewThread:R.startNewThread,onSelectThread:$=>{R.switchThread($)},onDeleteThread:$=>{R.deleteThread($)}}),y]}),(0,Xe.jsxs)("div",{ref:rt,className:V("ww:relative ww:flex-1 ww:min-h-0",Y?"ww:overflow-hidden":"ww:overflow-y-auto"),children:[(0,Xe.jsxs)("div",{ref:k,className:V("ww:mx-auto ww:w-full ww:max-w-3xl ww:px-4 ww:py-6 ww:flex ww:flex-col ww:gap-6",Y&&"ww:!py-0"),children:[(0,Xe.jsx)(uR,{messages:R.messages,status:R.status,welcomeMessage:s,welcome:u,onSuggestionSelect:Ie,resourceEndpoint:q,chatSessionId:R.sessionId,isDark:U,onFollowUp:_e,onCallTool:B,fullscreenToolCallId:Y,debug:m,showToolCalls:v,toolDefinitions:R.toolDefinitions,onWidgetDisplayModeChange:($,oe)=>{if($==="fullscreen"){let je=Be.current?.getBoundingClientRect().height??0;S(je>0?je:null),fe(oe.toolCallId)}else S(null),fe(null)}}),(0,Xe.jsx)("div",{ref:De,"aria-hidden":!0,style:{height:1}})]}),!ie&&!Y&&(0,Xe.jsx)("div",{className:"ww:sticky ww:bottom-2 ww:flex ww:justify-center ww:pointer-events-none",children:(0,Xe.jsx)(wn,{type:"button",onClick:()=>he("smooth"),size:"icon",variant:"outline",className:"ww:rounded-full ww:shadow ww:pointer-events-auto","aria-label":"Scroll to latest",children:(0,Xe.jsx)(ps,{className:"ww:size-4"})})})]}),!x&&(0,Xe.jsxs)("div",{className:"ww:shrink-0 ww:bg-background",style:Y?{display:"none"}:void 0,children:[(0,Xe.jsx)(od,{suggestions:Se.suggestions,isLoading:Se.isLoading,onSelect:Ie}),(0,Xe.jsx)(KI,{queuedMessages:R.queuedMessages,onRemove:R.removeQueuedMessage}),(0,Xe.jsx)("div",{className:"ww:px-4 ww:pb-2 ww:pt-2",children:(0,Xe.jsxs)("div",{className:"ww:mx-auto ww:w-full ww:max-w-3xl",children:[(0,Xe.jsx)(NI,{onSubmit:R.handleSubmit,globalDrop:i,multiple:i,className:"ww:rounded-2xl ww:border-border ww:bg-input",children:(0,Xe.jsxs)("div",{className:"ww:flex ww:items-center ww:gap-1 ww:pl-4 ww:pr-3 ww:py-2.5",children:[i&&(0,Xe.jsx)(FI,{}),(0,Xe.jsx)(BI,{onChange:R.handleTextChange,value:R.text,placeholder:j,className:"ww:min-h-0 ww:py-1 ww:px-0"}),(0,Xe.jsx)(UI,{status:R.status,disabled:R.queueFull})]})}),(0,Xe.jsxs)("div",{className:"ww:pt-2 ww:pb-1 ww:flex ww:flex-nowrap ww:justify-center ww:items-center ww:gap-1.5",children:[(0,Xe.jsx)(cR,{}),(0,Xe.jsx)(zI,{text:I})]})]})})]})]})});var gu=z(Me(),1);function Y9(){if(typeof window>"u")return!1;try{return window.WANIWANI_DEBUG?!0:!!window.localStorage?.getItem("WANIWANI_DEBUG")}catch{return!1}}function ii(...e){Y9()&&console.log("[Waniwani]",...e)}var J9="waniwani:config:";function dD(e,t,a){return`${J9}${e}|${t}|${a??""}`}function zf(e,t,a){if(typeof window>"u")return null;try{let n=window.sessionStorage.getItem(dD(e,t,a));if(!n)return null;let r=JSON.parse(n);return r&&typeof r=="object"?r:null}catch{return null}}function ej(e,t,a,n){if(!(typeof window>"u"))try{window.sessionStorage.setItem(dD(e,t,a),JSON.stringify(n))}catch{}}var tj=600;async function aj(e,t,a,n){try{let r=li(e,"/config",n?{channel:n}:void 0),o=await fetch(r,{method:"GET",headers:{Authorization:`Bearer ${t}`},signal:a});if(!o.ok)return{};let l=await o.json(),i=l&&typeof l=="object"&&"data"in l&&l.data?l.data:l;return i?nj(i):{}}catch{return{}}}function nj(e){let t={};return e.source!=null&&(t.source=e.source),e.title!=null&&(t.title=e.title),e.welcomeMessage!=null&&(t.welcomeMessage=e.welcomeMessage),e.placeholder!=null&&(t.placeholder=e.placeholder),e.suggestions!=null&&e.suggestions.length>0&&(t.suggestions=e.suggestions),typeof e.enableThreadHistory=="boolean"&&(t.enableThreadHistory=e.enableThreadHistory),e.toolCallDisplay==="full"?t.showToolCalls=!0:e.toolCallDisplay==="titles-only"?t.showToolCalls="titles-only":e.toolCallDisplay==="hidden"&&(t.showToolCalls=!1),e.visibility&&(t.visibility=e.visibility),t}function qf(e,t,a){let[n,r]=(0,gu.useState)(e),[o,l]=(0,gu.useState)(!1);return(0,gu.useEffect)(()=>{let i=e.api,s=e.token,u=e.channelId;if(!i||!s){l(!0);return}let c=m=>{e.disablePageView||pI({api:i,token:s,channelId:u,mode:e.mode,source:m})},d=zf(i,s,u);if(d)try{let m=ds(t,d,a);r(m),l(!0),ii("config resolved (sessionStorage cache)",{config:m,visibility:m.visibility}),c(d.source)}catch{}let f=new AbortController,p=setTimeout(()=>l(!0),tj);return aj(i,s,f.signal,u).then(m=>{if(!f.signal.aborted){if(ii("remote /config response",m),Object.keys(m).length>0){ej(i,s,u,m);try{let x=ds(t,m,a);r(x),ii("config resolved (remote)",{config:x,visibility:x.visibility})}catch(x){console.error("[Waniwani] Failed to apply remote config:",x)}}l(!0),c(m.source)}}).catch(m=>{console.error("[Waniwani] Remote config fetch failed:",m),l(!0)}).finally(()=>clearTimeout(p)),()=>{f.abort(),clearTimeout(p)}},[e.api,e.token,e.channelId]),{config:n,ready:o}}var jf=z(Me(),1);function rj(e){return e?.patterns??e?.rules??[]}var fD="\0\0";function oj(e){let a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\\\*\\\*/g,fD).replace(/\\\*/g,"[^/]*").split(fD).join(".*");return new RegExp(`^${a}$`)}function pD(e,t){try{return oj(e).test(t)}catch{return!1}}function Hf(e,t){if(!e)return!0;let a=!1;for(let n of rj(e))if(pD(n.glob,t)){if(n.action==="hide")return!1;a=!0}return a?!0:(e.default??"show")!=="hide"}function mD(e,t){for(let a of e?.appearRules??[])if(pD(a.glob,t))return a.appearAfter;return null}var tx="waniwani:locationchange",hD=!1;function lj(){if(!(hD||typeof history>"u")){hD=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...n){let r=t.apply(this,n);return window.dispatchEvent(new Event(tx)),r}}}}function ij(e){return lj(),window.addEventListener(tx,e),window.addEventListener("popstate",e),()=>{window.removeEventListener(tx,e),window.removeEventListener("popstate",e)}}function sj(){return window.location.pathname}function uj(){return"/"}function ax(){return(0,jf.useSyncExternalStore)(ij,sj,uj)}function Vf(e,t){let a=ax(),n=t&&Hf(e,a);return(0,jf.useEffect)(()=>{ii("visibility gate",{pathname:a,ready:t,visible:n,rules:e})},[a,t,n]),n}var Gf=z(Me(),1),cj=3e3,dj=120,fj=24;function gD(e){let[t,a]=(0,Gf.useState)(!1);return(0,Gf.useEffect)(()=>{if(!e||typeof document>"u"){a(!1);return}let n=!1,r=null,o=null,l=null,i=u=>{r=new IntersectionObserver(c=>{let d=c[0];d&&a(!d.isIntersecting&&d.boundingClientRect.bottom<=0)},{rootMargin:`0px 0px -${fj}px 0px`,threshold:0}),r.observe(u)},s=()=>{if(n)return;let u=null;try{u=document.querySelector(e)}catch{a(!0);return}if(u){i(u);return}o=setTimeout(s,dj)};return s(),l=setTimeout(()=>{n||r||(o&&clearTimeout(o),a(!0))},cj),()=>{n=!0,r?.disconnect(),o&&clearTimeout(o),l&&clearTimeout(l)}},[e]),t}var pt=z(te(),1),pj=2e3,mj=90,hj=1e3,yD=(0,Ke.forwardRef)(function(t,a){return(0,pt.jsx)(Ls,{locale:t.config.locale,children:(0,pt.jsx)(gj,{...t,ref:a})})}),gj=(0,Ke.forwardRef)(function({config:t,programmatic:a,scriptConfig:n},r){let{t:o}=Re(),{config:l,ready:i}=qf(t,a,n),s=Vf(l.visibility,i),u=ax(),c=s?mD(l.visibility,u):null,d=gD(c),f=(0,Ke.useRef)(null),p=(0,Ke.useRef)(null),m=(0,Ke.useRef)(null),x=(0,Ke.useRef)(!1),[b,y]=(0,Ke.useState)("input"),[w,g]=(0,Ke.useState)(""),[v,M]=(0,Ke.useState)(!1),[I,A]=(0,Ke.useState)(!1),[E,_]=(0,Ke.useState)(0),L=l.appearance?.theme,W=l.appearance?.variables,U=(0,Ke.useMemo)(()=>W?Uf(W):{},[W]),R=l.suggestions??[],B=l.launcherText??l.placeholder??o.launcher.prompt,q=ld(B,w.length===0),j="var(--ww-shadow, 0 10px 30px rgba(0, 0, 0, 0.08))";(0,Ke.useEffect)(()=>{if(!s){M(!1);return}if(c){M(d);return}let ie=l.appearDelay??pj,be=setTimeout(()=>M(!0),Math.max(0,ie));return()=>clearTimeout(be)},[s,l.appearDelay,c,d]),(0,Ke.useEffect)(()=>{if(!v||R.length===0)return;let ie=setTimeout(()=>{x.current||y(be=>be==="input"?"expanded":be)},hj);return()=>clearTimeout(ie)},[v,R.length]),(0,Ke.useEffect)(()=>{E>0&&b==="open"&&f.current?.focus()},[E,b]);let Y=(0,Ke.useCallback)(()=>{y("open")},[]),fe=(0,Ke.useCallback)(()=>{x.current=!0,y("input")},[]);(0,Ke.useEffect)(()=>{if(b!=="expanded"){A(!1);return}let ie=setTimeout(()=>A(!0),mj);return()=>clearTimeout(ie)},[b]);let He=(0,Ke.useCallback)(ie=>{Y();let be=ie.trim();be&&f.current?.sendMessage(be)},[Y]);(0,Ke.useImperativeHandle)(r,()=>({open:()=>Y(),close:()=>fe(),toggle:()=>{y(ie=>ie==="open"?"input":"open")},sendMessage:ie=>He(ie),sendMessageAndWait:async ie=>{Y();let be=f.current;if(be)return await be.sendMessageAndWait(ie)},reset:()=>f.current?.reset(),focus:()=>{Y(),_(ie=>ie+1)},getMessages:()=>f.current?.messages??[],getSessionId:()=>f.current?.sessionId}),[He,Y,fe]);let S=(0,Ke.useCallback)(()=>{w.trim()&&(He(w),g(""))},[w,He]),Be=(0,Ke.useCallback)(()=>{(f.current?.messages.length??0)>0?(y("open"),_(ie=>ie+1)):(x.current=!1,y(ie=>ie==="input"?"expanded":ie))},[]),rt={mode:"floating"};l.mcpServerUrl&&(rt.mcpServerUrl=l.mcpServerUrl),l.channelId&&(rt.channelId=l.channelId);let k=R.length>0&&b!=="input",De=(0,pt.jsx)("button",{type:"button",onClick:fe,"aria-label":o.launcher.close,className:"ww:flex ww:size-7 ww:items-center ww:justify-center ww:rounded-md ww:text-muted-foreground ww:transition-colors hover:ww:bg-accent hover:ww:text-foreground ww:cursor-pointer",children:(0,pt.jsx)(vs,{className:"ww:size-4"})});return(0,pt.jsx)("div",{"data-waniwani-chat":"","data-color-scheme":L==="auto"?"auto":void 0,className:V("ww:contents ww:font-[family-name:var(--ww-font-sans)]",L==="dark"&&"dark"),style:U,children:s&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("div",{ref:m,"data-waniwani-floating":"dock","data-state":b==="open"?"hidden":"shown","data-appeared":v?"true":"false",className:V("ww:fixed ww:bottom-3 ww:sm:bottom-4 ww:left-0 ww:right-0 ww:mx-auto ww:z-[2147483002] ww:flex ww:flex-col","ww:w-[calc(100vw-2rem)] ww:transition-[max-width] ww:duration-300 ww:ease-out",k?"ww:max-w-[720px]":"ww:max-w-[440px]"),children:(0,pt.jsxs)("div",{className:V("ww:relative ww:flex ww:flex-col ww:rounded-[20px] ww:border ww:transition-all ww:duration-300 ww:ease-out",k?"ww:p-2 ww:backdrop-blur-xl ww:backdrop-saturate-150":"ww:border-transparent ww:p-0"),style:k?{boxShadow:j,backgroundColor:"var(--ww-glass)",borderColor:"var(--ww-glass-border)"}:void 0,children:[k&&b!=="open"&&(0,pt.jsx)("button",{type:"button",onClick:fe,"aria-label":o.launcher.close,className:"ww:absolute ww:right-2 ww:top-2 ww:z-10 ww:flex ww:size-7 ww:items-center ww:justify-center ww:rounded-md ww:text-muted-foreground ww:transition-colors hover:ww:bg-accent hover:ww:text-foreground ww:cursor-pointer",children:(0,pt.jsx)(Kn,{className:"ww:size-4"})}),R.length>0&&(0,pt.jsx)("div",{className:V("ww:grid ww:transition-all ww:duration-300 ww:ease-out",I?"ww:grid-rows-[1fr] ww:opacity-100":"ww:pointer-events-none ww:grid-rows-[0fr] ww:opacity-0"),children:(0,pt.jsx)("div",{className:"ww:overflow-hidden",children:(0,pt.jsx)(od,{suggestions:R,onSelect:He,className:"ww:pl-1 ww:pr-9 ww:pt-1 ww:pb-2.5"})})}),(0,pt.jsx)(CI,{animated:v,backgroundColor:"var(--ww-color-input)",borderRadius:16,edgeSensitivity:30,coneSpread:25,colors:["#c084fc","#f472b6","#38bdf8"],className:"ww:border-border",style:{boxShadow:j},children:(0,pt.jsxs)("div",{className:"ww:flex ww:items-center ww:gap-1 ww:pl-3.5 ww:pr-1.5 ww:py-1.5 ww:sm:pl-4 ww:sm:pr-2 ww:sm:py-2",children:[(0,pt.jsx)("input",{ref:p,type:"text",value:w,placeholder:q,onChange:ie=>g(ie.target.value),onFocus:Be,onKeyDown:ie=>{ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),S())},className:"ww:min-w-0 ww:flex-1 ww:bg-transparent ww:py-1 ww:text-base ww:sm:text-sm ww:text-foreground ww:outline-none ww:placeholder:text-muted-foreground"}),(0,pt.jsx)("button",{type:"button",onClick:S,disabled:!w.trim(),"aria-label":o.promptInput.submit,className:"ww:relative ww:flex ww:size-8 ww:shrink-0 ww:items-center ww:justify-center ww:rounded-full ww:bg-foreground ww:text-background ww:transition-opacity hover:ww:opacity-90 disabled:ww:opacity-40",children:(0,pt.jsx)(vo,{className:"ww:size-4"})})]})})]})}),(0,pt.jsx)("div",{role:"dialog","aria-label":l.title??B,"data-waniwani-floating":"panel","data-state":b==="open"?"shown":"hidden",style:{boxShadow:j},className:V("ww:fixed ww:z-[2147483002] ww:flex ww:flex-col ww:overflow-hidden ww:bg-background","ww:inset-0 ww:w-full ww:rounded-none","ww:sm:inset-auto ww:sm:bottom-4 ww:sm:left-0 ww:sm:right-0 ww:sm:mx-auto ww:sm:h-[720px] ww:sm:max-h-[calc(100dvh-2rem)] ww:sm:w-[calc(100vw-2rem)] ww:sm:max-w-[1000px] ww:sm:rounded-2xl ww:sm:border ww:sm:border-border"),children:(0,pt.jsx)(Ff,{ref:f,api:l.api??"",headers:{Authorization:`Bearer ${l.token}`},skipRemoteConfig:!0,body:rt,appearance:l.appearance,title:l.title,headerActions:De,hideHeader:!1,welcomeMessage:l.welcomeMessage,placeholder:l.placeholder,suggestions:l.suggestions?{initial:l.suggestions}:void 0,enableThreadHistory:l.enableThreadHistory,showToolCalls:l.showToolCalls,locale:l.locale,initializing:!i})})]})})});var lr=z(Me(),1);var xD=z(te(),1),wD=(0,lr.forwardRef)(function({config:t,programmatic:a,scriptConfig:n,onReady:r,onVisibilityChange:o},l){let{config:i,ready:s}=qf(t,a,n),u=(0,lr.useRef)(null);(0,lr.useEffect)(()=>{r?.()},[]);let c=Vf(i.visibility,s);(0,lr.useEffect)(()=>{o?.(c)},[c,o]),(0,lr.useImperativeHandle)(l,()=>({get chat(){return u.current}}),[]);let d={mode:"inline"};return i.mcpServerUrl&&(d.mcpServerUrl=i.mcpServerUrl),i.channelId&&(d.channelId=i.channelId),(0,xD.jsx)(Ff,{ref:u,api:i.api??"",headers:{Authorization:`Bearer ${i.token}`},skipRemoteConfig:!0,body:d,appearance:i.appearance,title:i.title,hideHeader:i.hideHeader,welcomeMessage:i.welcomeMessage,placeholder:i.placeholder,suggestions:i.suggestions?{initial:i.suggestions}:void 0,enableThreadHistory:i.enableThreadHistory,showToolCalls:i.showToolCalls,locale:i.locale,initializing:!s})});var nx="/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--ww-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--ww-color-blue-400:oklch(70.7% .165 254.624);--ww-spacing:.25rem;--ww-container-sm:24rem;--ww-container-md:28rem;--ww-container-3xl:48rem;--ww-text-xs:.75rem;--ww-text-xs--line-height:calc(1/.75);--ww-text-sm:.875rem;--ww-text-sm--line-height:calc(1.25/.875);--ww-text-base:1rem;--ww-text-base--line-height:calc(1.5/1);--ww-text-lg:1.125rem;--ww-text-lg--line-height:calc(1.75/1.125);--ww-font-weight-medium:500;--ww-font-weight-semibold:600;--ww-tracking-wide:.025em;--ww-tracking-wider:.05em;--ww-radius-md:.375rem;--ww-radius-lg:.5rem;--ww-radius-xl:.75rem;--ww-radius-2xl:1rem;--ww-ease-out:cubic-bezier(0,0,.2,1);--ww-animate-spin:spin 1s linear infinite;--ww-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--ww-blur-xl:24px;--ww-default-transition-duration:.15s;--ww-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--ww-default-font-family:var(--ww-font-sans,system-ui,-apple-system,\"Segoe UI\",sans-serif);--ww-default-mono-font-family:var(--ww-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--ww-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--ww-default-font-feature-settings,normal);font-variation-settings:var(--ww-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ww-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--ww-default-mono-font-feature-settings,normal);font-variation-settings:var(--ww-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.ww\\:pointer-events-auto{pointer-events:auto}.ww\\:pointer-events-none{pointer-events:none}.ww\\:\\!relative{position:relative!important}.ww\\:absolute{position:absolute}.ww\\:fixed{position:fixed}.ww\\:relative{position:relative}.ww\\:sticky{position:sticky}.ww\\:inset-0{inset:calc(var(--ww-spacing)*0)}.ww\\:top-2{top:calc(var(--ww-spacing)*2)}.ww\\:top-full{top:100%}.ww\\:right-0{right:calc(var(--ww-spacing)*0)}.ww\\:right-2{right:calc(var(--ww-spacing)*2)}.ww\\:bottom-2{bottom:calc(var(--ww-spacing)*2)}.ww\\:bottom-3{bottom:calc(var(--ww-spacing)*3)}.ww\\:bottom-4{bottom:calc(var(--ww-spacing)*4)}.ww\\:left-0{left:calc(var(--ww-spacing)*0)}.ww\\:left-\\[50\\%\\]{left:50%}.ww\\:isolate{isolation:isolate}.ww\\:-z-\\[1\\]{z-index:calc(1*-1)}.ww\\:z-10{z-index:10}.ww\\:z-50{z-index:50}.ww\\:z-\\[1\\]{z-index:1}.ww\\:z-\\[2147483002\\]{z-index:2147483002}.ww\\:mx-auto{margin-inline:auto}.ww\\:mt-0\\.5{margin-top:calc(var(--ww-spacing)*.5)}.ww\\:mt-1{margin-top:calc(var(--ww-spacing)*1)}.ww\\:mt-2{margin-top:calc(var(--ww-spacing)*2)}.ww\\:mt-6{margin-top:calc(var(--ww-spacing)*6)}.ww\\:mb-0{margin-bottom:calc(var(--ww-spacing)*0)}.ww\\:mb-4{margin-bottom:calc(var(--ww-spacing)*4)}.ww\\:mb-6{margin-bottom:calc(var(--ww-spacing)*6)}.ww\\:ml-auto{margin-left:auto}.ww\\:line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ww\\:contents{display:contents}.ww\\:flex{display:flex}.ww\\:grid{display:grid}.ww\\:hidden{display:none}.ww\\:inline-block{display:inline-block}.ww\\:inline-flex{display:inline-flex}.ww\\:field-sizing-content{field-sizing:content}.ww\\:size-2{width:calc(var(--ww-spacing)*2);height:calc(var(--ww-spacing)*2)}.ww\\:size-3{width:calc(var(--ww-spacing)*3);height:calc(var(--ww-spacing)*3)}.ww\\:size-3\\.5{width:calc(var(--ww-spacing)*3.5);height:calc(var(--ww-spacing)*3.5)}.ww\\:size-4{width:calc(var(--ww-spacing)*4);height:calc(var(--ww-spacing)*4)}.ww\\:size-5{width:calc(var(--ww-spacing)*5);height:calc(var(--ww-spacing)*5)}.ww\\:size-7{width:calc(var(--ww-spacing)*7);height:calc(var(--ww-spacing)*7)}.ww\\:size-8{width:calc(var(--ww-spacing)*8);height:calc(var(--ww-spacing)*8)}.ww\\:size-9{width:calc(var(--ww-spacing)*9);height:calc(var(--ww-spacing)*9)}.ww\\:size-12{width:calc(var(--ww-spacing)*12);height:calc(var(--ww-spacing)*12)}.ww\\:size-auto{width:auto;height:auto}.ww\\:size-full{width:100%;height:100%}.ww\\:h-2\\.5{height:calc(var(--ww-spacing)*2.5)}.ww\\:h-5{height:calc(var(--ww-spacing)*5)}.ww\\:h-8{height:calc(var(--ww-spacing)*8)}.ww\\:h-9{height:calc(var(--ww-spacing)*9)}.ww\\:h-16{height:calc(var(--ww-spacing)*16)}.ww\\:h-auto{height:auto}.ww\\:h-full{height:100%}.ww\\:max-h-48{max-height:calc(var(--ww-spacing)*48)}.ww\\:max-h-80{max-height:calc(var(--ww-spacing)*80)}.ww\\:min-h-0{min-height:calc(var(--ww-spacing)*0)}.ww\\:min-h-5{min-height:calc(var(--ww-spacing)*5)}.ww\\:min-h-full{min-height:100%}.ww\\:w-72{width:calc(var(--ww-spacing)*72)}.ww\\:w-\\[calc\\(100vw-2rem\\)\\]{width:calc(100vw - 2rem)}.ww\\:w-auto{width:auto}.ww\\:w-fit{width:fit-content}.ww\\:w-full{width:100%}.ww\\:w-px{width:1px}.ww\\:max-w-3xl{max-width:var(--ww-container-3xl)}.ww\\:max-w-24{max-width:calc(var(--ww-spacing)*24)}.ww\\:max-w-32{max-width:calc(var(--ww-spacing)*32)}.ww\\:max-w-\\[80\\%\\]{max-width:80%}.ww\\:max-w-\\[440px\\]{max-width:440px}.ww\\:max-w-\\[720px\\]{max-width:720px}.ww\\:max-w-full{max-width:100%}.ww\\:max-w-md{max-width:var(--ww-container-md)}.ww\\:max-w-sm{max-width:var(--ww-container-sm)}.ww\\:min-w-0{min-width:calc(var(--ww-spacing)*0)}.ww\\:flex-1{flex:1}.ww\\:shrink-0{flex-shrink:0}.ww\\:grow{flex-grow:1}.ww\\:translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.ww\\:rotate-90{rotate:90deg}.ww\\:rotate-180{rotate:180deg}.ww\\:animate-\\[ww-fade-in_0\\.2s_ease-out_both\\]{animation:.2s ease-out both ww-fade-in}.ww\\:animate-pulse{animation:var(--ww-animate-pulse)}.ww\\:animate-spin{animation:var(--ww-animate-spin)}.ww\\:cursor-pointer{cursor:pointer}.ww\\:resize-none{resize:none}.ww\\:grid-rows-\\[0fr\\]{grid-template-rows:0fr}.ww\\:grid-rows-\\[1fr\\]{grid-template-rows:1fr}.ww\\:flex-col{flex-direction:column}.ww\\:flex-nowrap{flex-wrap:nowrap}.ww\\:flex-wrap{flex-wrap:wrap}.ww\\:items-center{align-items:center}.ww\\:items-end{align-items:flex-end}.ww\\:items-start{align-items:flex-start}.ww\\:justify-between{justify-content:space-between}.ww\\:justify-center{justify-content:center}.ww\\:gap-1{gap:calc(var(--ww-spacing)*1)}.ww\\:gap-1\\.5{gap:calc(var(--ww-spacing)*1.5)}.ww\\:gap-2{gap:calc(var(--ww-spacing)*2)}.ww\\:gap-3{gap:calc(var(--ww-spacing)*3)}.ww\\:gap-6{gap:calc(var(--ww-spacing)*6)}:where(.ww\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ww-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ww-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.ww\\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ww-spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ww-spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}.ww\\:self-stretch{align-self:stretch}.ww\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ww\\:\\!overflow-hidden{overflow:hidden!important}.ww\\:overflow-auto{overflow:auto}.ww\\:overflow-hidden{overflow:hidden}.ww\\:overflow-x-auto{overflow-x:auto}.ww\\:overflow-y-auto{overflow-y:auto}.ww\\:overflow-y-hidden{overflow-y:hidden}.ww\\:\\!rounded-full{border-radius:3.40282e38px!important}.ww\\:rounded{border-radius:var(--ww-radius,16px)}.ww\\:rounded-2xl{border-radius:var(--ww-radius-2xl)}.ww\\:rounded-\\[20px\\]{border-radius:20px}.ww\\:rounded-\\[inherit\\]{border-radius:inherit}.ww\\:rounded-\\[var\\(--ww-radius\\)\\]{border-radius:var(--ww-radius)}.ww\\:rounded-full{border-radius:3.40282e38px}.ww\\:rounded-lg{border-radius:var(--ww-radius-lg)}.ww\\:rounded-md{border-radius:var(--ww-radius-md)}.ww\\:rounded-none{border-radius:0}.ww\\:rounded-xl{border-radius:var(--ww-radius-xl)}.ww\\:border{border-style:var(--tw-border-style);border-width:1px}.ww\\:border-0{border-style:var(--tw-border-style);border-width:0}.ww\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ww\\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ww\\:border-border{border-color:var(--ww-color-border,#e5e7eb)}.ww\\:border-muted-foreground\\/50{border-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:border-muted-foreground\\/50{border-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)50%,transparent)}}.ww\\:border-transparent{border-color:#0000}.ww\\:bg-accent{background-color:var(--ww-color-accent,#f3f4f6)}.ww\\:bg-background,.ww\\:bg-background\\/20{background-color:var(--ww-color-background,#fff)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-background\\/20{background-color:color-mix(in oklab,var(--ww-color-background,#fff)20%,transparent)}}.ww\\:bg-border{background-color:var(--ww-color-border,#e5e7eb)}.ww\\:bg-foreground,.ww\\:bg-foreground\\/5{background-color:var(--ww-color-foreground,#1f2937)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-foreground\\/5{background-color:color-mix(in oklab,var(--ww-color-foreground,#1f2937)5%,transparent)}}.ww\\:bg-input{background-color:var(--ww-color-input,#f9fafb)}.ww\\:bg-muted{background-color:var(--ww-color-muted,#f1f5f9)}.ww\\:bg-muted-foreground\\/60{background-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-muted-foreground\\/60{background-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)60%,transparent)}}.ww\\:bg-muted\\/50{background-color:var(--ww-color-muted,#f1f5f9)}@supports (color:color-mix(in lab, red, red)){.ww\\:bg-muted\\/50{background-color:color-mix(in oklab,var(--ww-color-muted,#f1f5f9)50%,transparent)}}.ww\\:bg-primary{background-color:var(--ww-color-primary,#6366f1)}.ww\\:bg-tool-card{background-color:var(--ww-color-tool-card,#f4f4f5)}.ww\\:bg-transparent{background-color:#0000}.ww\\:object-cover{object-fit:cover}.ww\\:p-0{padding:calc(var(--ww-spacing)*0)}.ww\\:p-1{padding:calc(var(--ww-spacing)*1)}.ww\\:p-1\\.5{padding:calc(var(--ww-spacing)*1.5)}.ww\\:p-2{padding:calc(var(--ww-spacing)*2)}.ww\\:p-3{padding:calc(var(--ww-spacing)*3)}.ww\\:px-0{padding-inline:calc(var(--ww-spacing)*0)}.ww\\:px-1\\.5{padding-inline:calc(var(--ww-spacing)*1.5)}.ww\\:px-2{padding-inline:calc(var(--ww-spacing)*2)}.ww\\:px-3{padding-inline:calc(var(--ww-spacing)*3)}.ww\\:px-3\\.5{padding-inline:calc(var(--ww-spacing)*3.5)}.ww\\:px-4{padding-inline:calc(var(--ww-spacing)*4)}.ww\\:px-6{padding-inline:calc(var(--ww-spacing)*6)}.ww\\:\\!py-0{padding-block:calc(var(--ww-spacing)*0)!important}.ww\\:py-0\\.5{padding-block:calc(var(--ww-spacing)*.5)}.ww\\:py-1{padding-block:calc(var(--ww-spacing)*1)}.ww\\:py-1\\.5{padding-block:calc(var(--ww-spacing)*1.5)}.ww\\:py-2{padding-block:calc(var(--ww-spacing)*2)}.ww\\:py-2\\.5{padding-block:calc(var(--ww-spacing)*2.5)}.ww\\:py-3{padding-block:calc(var(--ww-spacing)*3)}.ww\\:py-6{padding-block:calc(var(--ww-spacing)*6)}.ww\\:py-12{padding-block:calc(var(--ww-spacing)*12)}.ww\\:pt-1{padding-top:calc(var(--ww-spacing)*1)}.ww\\:pt-2{padding-top:calc(var(--ww-spacing)*2)}.ww\\:pt-2\\.5{padding-top:calc(var(--ww-spacing)*2.5)}.ww\\:pt-3{padding-top:calc(var(--ww-spacing)*3)}.ww\\:pr-1\\.5{padding-right:calc(var(--ww-spacing)*1.5)}.ww\\:pr-3{padding-right:calc(var(--ww-spacing)*3)}.ww\\:pr-9{padding-right:calc(var(--ww-spacing)*9)}.ww\\:pb-1{padding-bottom:calc(var(--ww-spacing)*1)}.ww\\:pb-1\\.5{padding-bottom:calc(var(--ww-spacing)*1.5)}.ww\\:pb-2{padding-bottom:calc(var(--ww-spacing)*2)}.ww\\:pb-2\\.5{padding-bottom:calc(var(--ww-spacing)*2.5)}.ww\\:pb-3{padding-bottom:calc(var(--ww-spacing)*3)}.ww\\:pb-8{padding-bottom:calc(var(--ww-spacing)*8)}.ww\\:pl-1{padding-left:calc(var(--ww-spacing)*1)}.ww\\:pl-3\\.5{padding-left:calc(var(--ww-spacing)*3.5)}.ww\\:pl-4{padding-left:calc(var(--ww-spacing)*4)}.ww\\:text-center{text-align:center}.ww\\:text-left{text-align:left}.ww\\:font-\\[family-name\\:var\\(--ww-font\\)\\]{font-family:var(--ww-font)}.ww\\:font-\\[family-name\\:var\\(--ww-font-sans\\)\\]{font-family:var(--ww-font-sans)}.ww\\:font-mono{font-family:var(--ww-font-mono)}.ww\\:text-base{font-size:var(--ww-text-base);line-height:var(--tw-leading,var(--ww-text-base--line-height))}.ww\\:text-lg{font-size:var(--ww-text-lg);line-height:var(--tw-leading,var(--ww-text-lg--line-height))}.ww\\:text-sm{font-size:var(--ww-text-sm);line-height:var(--tw-leading,var(--ww-text-sm--line-height))}.ww\\:text-xs{font-size:var(--ww-text-xs);line-height:var(--tw-leading,var(--ww-text-xs--line-height))}.ww\\:text-\\[10px\\]{font-size:10px}.ww\\:text-\\[11px\\]{font-size:11px}.ww\\:font-medium{--tw-font-weight:var(--ww-font-weight-medium);font-weight:var(--ww-font-weight-medium)}.ww\\:font-semibold{--tw-font-weight:var(--ww-font-weight-semibold);font-weight:var(--ww-font-weight-semibold)}.ww\\:tracking-wide{--tw-tracking:var(--ww-tracking-wide);letter-spacing:var(--ww-tracking-wide)}.ww\\:tracking-wider{--tw-tracking:var(--ww-tracking-wider);letter-spacing:var(--ww-tracking-wider)}.ww\\:break-words{overflow-wrap:break-word}.ww\\:break-all{word-break:break-all}.ww\\:whitespace-nowrap{white-space:nowrap}.ww\\:whitespace-pre-wrap{white-space:pre-wrap}.ww\\:text-background{color:var(--ww-color-background,#fff)}.ww\\:text-foreground,.ww\\:text-foreground\\/80{color:var(--ww-color-foreground,#1f2937)}@supports (color:color-mix(in lab, red, red)){.ww\\:text-foreground\\/80{color:color-mix(in oklab,var(--ww-color-foreground,#1f2937)80%,transparent)}}.ww\\:text-muted-foreground{color:var(--ww-color-muted-foreground,#6b7280)}.ww\\:text-primary{color:var(--ww-color-primary,#6366f1)}.ww\\:text-primary-foreground{color:var(--ww-color-primary-foreground,#1f2937)}.ww\\:uppercase{text-transform:uppercase}.ww\\:italic{font-style:italic}.ww\\:opacity-0{opacity:0}.ww\\:opacity-70{opacity:.7}.ww\\:opacity-100{opacity:1}.ww\\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ww\\:ring-blue-400\\/70{--tw-ring-color:var(--ww-color-blue-400)}@supports (color:color-mix(in lab, red, red)){.ww\\:ring-blue-400\\/70{--tw-ring-color:color-mix(in oklab,var(--ww-color-blue-400)70%,transparent)}}.ww\\:ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ww\\:ring-offset-background{--tw-ring-offset-color:var(--ww-color-background,#fff)}.ww\\:backdrop-blur-xl{--tw-backdrop-blur:blur(var(--ww-blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.ww\\:backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.ww\\:transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-\\[max-width\\]{transition-property:max-width;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ww-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ww-default-transition-duration))}.ww\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.ww\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.ww\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ww\\:ease-out{--tw-ease:var(--ww-ease-out);transition-timing-function:var(--ww-ease-out)}.ww\\:outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.ww\\:group-hover\\:opacity-0:is(:where(.ww\\:group):hover *){opacity:0}.ww\\:group-hover\\:opacity-100:is(:where(.ww\\:group):hover *){opacity:1}}.ww\\:group-\\[\\.is-assistant\\]\\:text-foreground:is(:where(.ww\\:group).is-assistant *){color:var(--ww-color-foreground,#1f2937)}.ww\\:group-\\[\\.is-user\\]\\:ml-auto:is(:where(.ww\\:group).is-user *){margin-left:auto}.ww\\:group-\\[\\.is-user\\]\\:rounded-lg:is(:where(.ww\\:group).is-user *){border-radius:var(--ww-radius-lg)}.ww\\:group-\\[\\.is-user\\]\\:bg-user-bubble:is(:where(.ww\\:group).is-user *){background-color:var(--ww-color-user-bubble,#f4f4f4)}.ww\\:group-\\[\\.is-user\\]\\:px-4:is(:where(.ww\\:group).is-user *){padding-inline:calc(var(--ww-spacing)*4)}.ww\\:group-\\[\\.is-user\\]\\:py-3:is(:where(.ww\\:group).is-user *){padding-block:calc(var(--ww-spacing)*3)}.ww\\:group-\\[\\.is-user\\]\\:text-primary-foreground:is(:where(.ww\\:group).is-user *){color:var(--ww-color-primary-foreground,#1f2937)}.ww\\:placeholder\\:text-muted-foreground::placeholder{color:var(--ww-color-muted-foreground,#6b7280)}@media (hover:hover){.ww\\:hover\\:border-primary\\/30:hover{border-color:var(--ww-color-primary,#6366f1)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:border-primary\\/30:hover{border-color:color-mix(in oklab,var(--ww-color-primary,#6366f1)30%,transparent)}}.ww\\:hover\\:bg-accent:hover{background-color:var(--ww-color-accent,#f3f4f6)}.ww\\:hover\\:bg-foreground:hover{background-color:var(--ww-color-foreground,#1f2937)}.ww\\:hover\\:bg-muted:hover{background-color:var(--ww-color-muted,#f1f5f9)}.ww\\:hover\\:bg-muted-foreground\\/10:hover{background-color:var(--ww-color-muted-foreground,#6b7280)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:bg-muted-foreground\\/10:hover{background-color:color-mix(in oklab,var(--ww-color-muted-foreground,#6b7280)10%,transparent)}}.ww\\:hover\\:bg-primary\\/90:hover{background-color:var(--ww-color-primary,#6366f1)}@supports (color:color-mix(in lab, red, red)){.ww\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--ww-color-primary,#6366f1)90%,transparent)}}.ww\\:hover\\:text-accent-foreground:hover{color:var(--ww-color-accent-foreground,#1f2937)}.ww\\:hover\\:text-foreground:hover{color:var(--ww-color-foreground,#1f2937)}.ww\\:hover\\:underline:hover{text-decoration-line:underline}}.ww\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.ww\\:disabled\\:opacity-40:disabled{opacity:.4}.ww\\:disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.ww\\:sm\\:inset-auto{inset:auto}.ww\\:sm\\:right-0{right:calc(var(--ww-spacing)*0)}.ww\\:sm\\:bottom-4{bottom:calc(var(--ww-spacing)*4)}.ww\\:sm\\:left-0{left:calc(var(--ww-spacing)*0)}.ww\\:sm\\:mx-auto{margin-inline:auto}.ww\\:sm\\:h-\\[720px\\]{height:720px}.ww\\:sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.ww\\:sm\\:w-\\[calc\\(100vw-2rem\\)\\]{width:calc(100vw - 2rem)}.ww\\:sm\\:max-w-\\[1000px\\]{max-width:1000px}.ww\\:sm\\:rounded-2xl{border-radius:var(--ww-radius-2xl)}.ww\\:sm\\:border{border-style:var(--tw-border-style);border-width:1px}.ww\\:sm\\:border-border{border-color:var(--ww-color-border,#e5e7eb)}.ww\\:sm\\:py-2{padding-block:calc(var(--ww-spacing)*2)}.ww\\:sm\\:pr-2{padding-right:calc(var(--ww-spacing)*2)}.ww\\:sm\\:pl-4{padding-left:calc(var(--ww-spacing)*4)}.ww\\:sm\\:text-sm{font-size:var(--ww-text-sm);line-height:var(--tw-leading,var(--ww-text-sm--line-height))}.ww\\:sm\\:text-\\[11px\\]{font-size:11px}}.ww\\:\\[\\&\\>\\*\\:first-child\\]\\:mt-0>:first-child{margin-top:calc(var(--ww-spacing)*0)}.ww\\:\\[\\&\\>\\*\\:last-child\\]\\:mb-0>:last-child{margin-bottom:calc(var(--ww-spacing)*0)}}@keyframes ww-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes ww-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes ww-pulse{0%,80%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}@keyframes ww-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){[data-waniwani-chat] [data-waniwani-shimmer]{color:var(--ww-color-muted-foreground)!important;animation:none!important}}[data-waniwani-floating=dock]{transition:opacity .32s,transform .42s cubic-bezier(.22,1,.36,1),max-width .3s,visibility 0s linear .42s}[data-waniwani-floating=dock][data-appeared=true][data-state=shown]{visibility:visible;opacity:1;pointer-events:auto;transition:opacity .32s,transform .42s cubic-bezier(.22,1,.36,1),max-width .3s,visibility;transform:translateY(0)}[data-waniwani-floating=dock][data-appeared=false],[data-waniwani-floating=dock][data-state=hidden]{opacity:0;visibility:hidden;pointer-events:none;transform:translateY(1rem)}[data-waniwani-floating=panel]{transition:clip-path .44s cubic-bezier(.22,1,.36,1),opacity .26s,visibility 0s linear .44s}[data-waniwani-floating=panel][data-state=shown]{visibility:visible;opacity:1;pointer-events:auto;clip-path:inset(-40px round 18px);transition:clip-path .44s cubic-bezier(.22,1,.36,1),opacity .26s,visibility}[data-waniwani-floating=panel][data-state=hidden]{opacity:0;visibility:hidden;pointer-events:none;clip-path:inset(calc(100% - 60px) 12% 0 round 24px)}@media (max-width:639px){[data-waniwani-floating=panel][data-state=shown]{clip-path:inset(0)}[data-waniwani-floating=panel][data-state=hidden]{clip-path:inset(calc(100% - 72px) 6% 0 round 22px)}}@media (prefers-reduced-motion:reduce){[data-waniwani-floating=dock],[data-waniwani-floating=panel]{clip-path:none;transition:visibility 0s linear 10ms}[data-waniwani-floating=dock][data-appeared=true][data-state=shown],[data-waniwani-floating=panel][data-state=shown]{transition:visibility}}[data-waniwani-chat] ::-webkit-scrollbar{width:8px}[data-waniwani-chat] ::-webkit-scrollbar-track{background:0 0}[data-waniwani-chat] ::-webkit-scrollbar-thumb{background:var(--ww-color-border);border-radius:9999px}[data-waniwani-chat] ::-webkit-scrollbar-thumb:hover{background:var(--ww-color-muted-foreground)}[data-waniwani-chat] *{scrollbar-width:thin;scrollbar-color:var(--ww-color-border)transparent}[data-waniwani-chat]{--ww-color-background:var(--ww-bg,#fff);--ww-color-foreground:var(--ww-text,#1f2937);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#1f2937);--ww-color-muted-foreground:var(--ww-muted,#6b7280);--ww-color-border:var(--ww-border,#e5e7eb);--ww-color-input:var(--ww-input-bg,#f9fafb);--ww-color-accent:var(--ww-assistant-bubble,#f3f4f6);--ww-color-accent-foreground:var(--ww-text,#1f2937);--ww-color-user-bubble:var(--ww-user-bubble,#f4f4f4);--ww-color-card:var(--ww-bg,#fff);--ww-color-card-foreground:var(--ww-text,#1f2937);--ww-color-card-header:var(--ww-header-bg,#fff);--ww-color-card-header-foreground:var(--ww-header-text,#1f2937);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#f4f4f5);--ww-radius:var(--ww-radius,16px);--ww-font-sans:var(--ww-font,system-ui,-apple-system,\"Segoe UI\",sans-serif);--ww-glass:#eceef499;--ww-glass-border:#0000000f;border-style:solid;border-width:var(--ww-border-width,0);border-color:var(--ww-color-border);box-shadow:var(--ww-shadow,none)}.dark [data-waniwani-chat],[data-waniwani-chat].dark{--ww-color-background:var(--ww-bg,#212121);--ww-color-foreground:var(--ww-text,#ececec);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#fff);--ww-color-muted-foreground:var(--ww-muted,#8e8ea0);--ww-color-border:var(--ww-border,#444);--ww-color-input:var(--ww-input-bg,#2f2f2f);--ww-color-accent:var(--ww-assistant-bubble,#2f2f2f);--ww-color-accent-foreground:var(--ww-text,#ececec);--ww-color-user-bubble:var(--ww-user-bubble,#303030);--ww-color-card:var(--ww-bg,#212121);--ww-color-card-foreground:var(--ww-text,#ececec);--ww-color-card-header:var(--ww-header-bg,#1e1e1e);--ww-color-card-header-foreground:var(--ww-header-text,#ececec);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#262626);--ww-glass:#282a3480;--ww-glass-border:#ffffff1f}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto]{--ww-color-background:var(--ww-bg,#212121);--ww-color-foreground:var(--ww-text,#ececec);--ww-color-primary:var(--ww-primary,#6366f1);--ww-color-primary-foreground:var(--ww-primary-fg,#fff);--ww-color-muted-foreground:var(--ww-muted,#8e8ea0);--ww-color-border:var(--ww-border,#444);--ww-color-input:var(--ww-input-bg,#2f2f2f);--ww-color-accent:var(--ww-assistant-bubble,#2f2f2f);--ww-color-accent-foreground:var(--ww-text,#ececec);--ww-color-user-bubble:var(--ww-user-bubble,#303030);--ww-color-card:var(--ww-bg,#212121);--ww-color-card-foreground:var(--ww-text,#ececec);--ww-color-card-header:var(--ww-header-bg,#1e1e1e);--ww-color-card-header-foreground:var(--ww-header-text,#ececec);--ww-color-status:var(--ww-status,#22c55e);--ww-color-tool-card:var(--ww-tool-card,#262626);--ww-glass:#282a3480;--ww-glass-border:#ffffff1f}}[data-waniwani-chat] [data-streamdown=table-wrapper]{flex-direction:column;gap:.5rem;margin-top:1rem;margin-bottom:1rem;display:flex}[data-waniwani-chat] [data-streamdown=table-wrapper]>div:first-child:has(button){justify-content:flex-end;align-items:center;gap:.25rem;display:flex}[data-waniwani-chat] [data-streamdown=table-wrapper]>div:last-child{overflow-x:auto}[data-waniwani-chat] [data-streamdown=table]{border-collapse:collapse;border:1px solid var(--ww-color-border);border-radius:.75rem;width:100%;overflow:hidden}[data-waniwani-chat] [data-streamdown=table-header]{background-color:var(--ww-color-accent)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=table-header]{background-color:color-mix(in srgb,var(--ww-color-accent)80%,transparent)}}[data-waniwani-chat] [data-streamdown=table-body]{background-color:var(--ww-color-accent)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=table-body]{background-color:color-mix(in srgb,var(--ww-color-accent)40%,transparent)}}[data-waniwani-chat] [data-streamdown=table-body]>tr+tr{border-top:1px solid var(--ww-color-border)}[data-waniwani-chat] [data-streamdown=table-row]{border-bottom:1px solid var(--ww-color-border)}[data-waniwani-chat] [data-streamdown=table-header-cell]{white-space:nowrap;text-align:left;padding:.5rem 1rem;font-size:.875rem;font-weight:600}[data-waniwani-chat] [data-streamdown=table-cell]{padding:.5rem 1rem;font-size:.875rem}[data-waniwani-chat] [data-streamdown=link]{color:var(--ww-color-primary);overflow-wrap:anywhere;cursor:pointer;font-weight:500;text-decoration:underline}[data-waniwani-chat].dark [data-streamdown=link],.dark [data-waniwani-chat] [data-streamdown=link]{color:var(--ww-color-primary)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat].dark [data-streamdown=link],.dark [data-waniwani-chat] [data-streamdown=link]{color:color-mix(in oklab,var(--ww-color-primary)55%,white)}}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto] [data-streamdown=link]{color:var(--ww-color-primary)}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat][data-color-scheme=auto] [data-streamdown=link]{color:color-mix(in oklab,var(--ww-color-primary)55%,white)}}}[data-waniwani-chat].dark [data-waniwani-logo],.dark [data-waniwani-chat] [data-waniwani-logo]{filter:invert()}@media (prefers-color-scheme:dark){[data-waniwani-chat][data-color-scheme=auto] [data-waniwani-logo]{filter:invert()}}[data-waniwani-chat] [data-streamdown=link-safety-modal]{z-index:50;background-color:var(--ww-color-background);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=link-safety-modal]{background-color:color-mix(in srgb,var(--ww-color-background)50%,transparent)}}[data-waniwani-chat] [data-streamdown=link-safety-modal]{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div{border:1px solid var(--ww-color-border);background-color:var(--ww-color-background);width:100%;max-width:28rem;color:var(--ww-color-foreground);border-radius:.75rem;flex-direction:column;gap:1rem;margin:0 1rem;padding:1.5rem;display:flex;position:relative;box-shadow:0 10px 25px #0000001a}[data-waniwani-chat] [data-streamdown=link-safety-modal] button{cursor:pointer}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>button:first-child{color:var(--ww-color-muted-foreground);background:0 0;border:none;border-radius:.375rem;padding:.25rem;transition:background-color .15s,color .15s;position:absolute;top:1rem;right:1rem}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>button:first-child:hover{background-color:var(--ww-color-accent);color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type{flex-direction:column;gap:.5rem;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type>div{align-items:center;gap:.5rem;font-size:1.125rem;font-weight:600;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:first-of-type>p{color:var(--ww-color-muted-foreground);font-size:.875rem}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:nth-child(3){word-break:break-all;background-color:var(--ww-color-accent);border-radius:.375rem;max-height:8rem;padding:.75rem;font-family:ui-monospace,monospace;font-size:.875rem;overflow-y:auto}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child{gap:.5rem;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button{border:none;border-radius:.375rem;flex:1;justify-content:center;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;font-weight:500;transition:background-color .15s;display:flex}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:first-child{border:1px solid var(--ww-color-border);background-color:var(--ww-color-background);color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:first-child:hover{background-color:var(--ww-color-accent)}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:last-child{background-color:var(--ww-color-primary);color:#fff}[data-waniwani-chat] [data-streamdown=link-safety-modal]>div>div:last-child>button:last-child:hover{opacity:.9}[data-waniwani-chat] [data-streamdown=ordered-list]{white-space:normal;list-style-type:decimal;list-style-position:inside}[data-waniwani-chat] li [data-streamdown=ordered-list]{padding-left:1.5rem}[data-waniwani-chat] [data-streamdown=unordered-list]{white-space:normal;list-style-type:disc;list-style-position:inside}[data-waniwani-chat] li [data-streamdown=unordered-list]{padding-left:1.5rem}[data-waniwani-chat] [data-streamdown=list-item]{padding-top:.25rem;padding-bottom:.25rem}[data-waniwani-chat] [data-streamdown=list-item]>p{display:inline}[data-waniwani-chat] [data-streamdown=inline-code]{background-color:var(--ww-color-accent);border-radius:.25rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,monospace;font-size:.875rem}[data-waniwani-chat] [data-streamdown=heading-1]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.875rem;font-weight:600;line-height:2.25rem}[data-waniwani-chat] [data-streamdown=heading-2]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.5rem;font-weight:600;line-height:2rem}[data-waniwani-chat] [data-streamdown=heading-3]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.25rem;font-weight:600;line-height:1.75rem}[data-waniwani-chat] [data-streamdown=heading-4]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1.125rem;font-weight:600;line-height:1.75rem}[data-waniwani-chat] [data-streamdown=heading-5]{margin-top:1.5rem;margin-bottom:.5rem;font-size:1rem;font-weight:600;line-height:1.5rem}[data-waniwani-chat] [data-streamdown=heading-6]{margin-top:1.5rem;margin-bottom:.5rem;font-size:.875rem;font-weight:600;line-height:1.25rem}[data-waniwani-chat] [data-streamdown=blockquote]{border-left:4px solid var(--ww-color-muted-foreground);margin-top:1rem;margin-bottom:1rem}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=blockquote]{border-left:4px solid color-mix(in srgb,var(--ww-color-muted-foreground)30%,transparent)}}[data-waniwani-chat] [data-streamdown=blockquote]{color:var(--ww-color-muted-foreground);padding-left:1rem;font-style:italic}[data-waniwani-chat] [data-streamdown=horizontal-rule]{border-color:var(--ww-color-border);margin-top:1.5rem;margin-bottom:1.5rem}[data-waniwani-chat] [data-streamdown=strong]{font-weight:600}[data-waniwani-chat] [data-streamdown=image-wrapper]{margin-top:1rem;margin-bottom:1rem;display:inline-block;position:relative}[data-waniwani-chat] [data-streamdown=image]{border-radius:.5rem;max-width:100%}[data-waniwani-chat] [data-streamdown=code-block]{border:1px solid var(--ww-color-border);border-radius:.75rem;width:100%;margin-top:1rem;margin-bottom:1rem;overflow:hidden}[data-waniwani-chat] [data-streamdown=code-block-header]{background-color:var(--ww-color-accent);justify-content:space-between;align-items:center;display:flex}@supports (color:color-mix(in lab, red, red)){[data-waniwani-chat] [data-streamdown=code-block-header]{background-color:color-mix(in srgb,var(--ww-color-accent)80%,transparent)}}[data-waniwani-chat] [data-streamdown=code-block-header]{color:var(--ww-color-muted-foreground);padding:.75rem;font-size:.75rem}[data-waniwani-chat] [data-streamdown=code-block-body]{padding:1rem;font-size:.875rem;overflow-x:auto}[data-waniwani-chat] [data-streamdown=code-block-copy-button],[data-waniwani-chat] [data-streamdown=code-block-download-button]{cursor:pointer;color:var(--ww-color-muted-foreground);background:0 0;border:none;padding:.25rem;transition:color .15s}[data-waniwani-chat] [data-streamdown=code-block-copy-button]:hover,[data-waniwani-chat] [data-streamdown=code-block-download-button]:hover{color:var(--ww-color-foreground)}[data-waniwani-chat] [data-streamdown=mermaid-block]{border:1px solid var(--ww-color-border);border-radius:.75rem;height:auto;margin-top:1rem;margin-bottom:1rem;padding:1rem;position:relative}[data-waniwani-chat] [data-streamdown=mermaid]{width:100%;height:100%}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}",bt=null,Qr=null,la=null,$f=null,yj="waniwani-chat-sizing",wj="waniwani-chat-defaults",xj="waniwani-chat-chrome",vj="waniwani-chat-auto-card",bj=`:where([data-waniwani-embed]){height:${hI}}`,Sj=":where([data-waniwani-embed]){border-radius:16px;overflow:hidden}",Ij=":where([data-waniwani-embed]){border-style:solid;border-width:var(--ww-border-width,0);border-color:var(--ww-border,transparent);box-shadow:var(--ww-shadow,none)}",Cj=":where([data-waniwani-embed][data-waniwani-auto]){width:100%;max-width:28rem;margin-inline:auto;border-radius:16px;overflow:hidden;border-style:solid;border-width:var(--ww-border-width,1px);border-color:var(--ww-border,rgba(0,0,0,0.1));box-shadow:var(--ww-shadow,0 10px 30px rgba(0,0,0,0.08))}";function Wf(e,t){if(typeof document>"u"||document.getElementById(e))return;let a=document.createElement("style");a.id=e,a.textContent=t,document.head.appendChild(a)}function kj(e,t){let a=t.appearance?.variables;!a||!(e instanceof HTMLElement)||(typeof a.borderWidth=="number"&&e.style.setProperty("--ww-border-width",`${a.borderWidth}px`),a.borderColor&&e.style.setProperty("--ww-border",a.borderColor),a.boxShadow&&e.style.setProperty("--ww-shadow",a.boxShadow))}function SD(e,t){if(nx&&nx!=="__WANIWANI_EMBED_CSS__"){let n=document.createElement("style");n.textContent=nx,e.appendChild(n)}let a=document.createElement("style");if(a.textContent="[data-waniwani-chat]{border-width:0;box-shadow:none}",e.appendChild(a),t.css)try{let n=new URL(t.css,window.location.href);if(n.protocol==="https:"||n.protocol==="http:"){let r=document.createElement("link");r.rel="stylesheet",r.href=n.href,e.appendChild(r)}else console.warn("[Waniwani] Custom CSS URL must use http or https protocol.")}catch{console.warn("[Waniwani] Invalid custom CSS URL:",t.css)}}var vD="data-waniwani-embed",rx="data-waniwani-auto";function Lj(e){let t=document.querySelector(`[${vD}]`);if(t)return t;let a=document.createElement("div");a.setAttribute(vD,""),a.setAttribute(rx,"");let n=e?!!document.head?.contains(e):!1;return e?.parentNode&&!n?e.parentNode.insertBefore(a,e):document.body.appendChild(a),a}function Tj(e){return/^\d+$/.test(e.trim())?`${e.trim()}px`:e.trim()}function Aj(e,t,a,n){let r=Lj(n);Wf(yj,bj),e.height&&r instanceof HTMLElement&&(r.style.height=Tj(e.height)),e.appearance?.theme&&Wf(wj,Sj),Wf(xj,Ij),r.hasAttribute(rx)&&Wf(vj,Cj),kj(r,e),la=document.createElement("div"),la.id="waniwani-chat-embed",la.style.cssText="width:100%;height:100%;max-height:inherit;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;",r.appendChild(la);let o=la,l=()=>{let d=getComputedStyle(r);if(!d.maxHeight.endsWith("px")){o.style.removeProperty("max-height");return}let f=Number.parseFloat(d.maxHeight);if(!Number.isFinite(f)){o.style.removeProperty("max-height");return}let p=f;d.boxSizing==="border-box"&&(p-=(Number.parseFloat(d.paddingTop)||0)+(Number.parseFloat(d.paddingBottom)||0)+(Number.parseFloat(d.borderTopWidth)||0)+(Number.parseFloat(d.borderBottomWidth)||0)),p>0?o.style.maxHeight=`${p}px`:o.style.removeProperty("max-height")};l(),$f=new ResizeObserver(l),$f.observe(r);let i=la.attachShadow({mode:"open"});SD(i,e);let s=document.createElement("div");s.className="ww:contents",i.appendChild(s);let u=yu.default.createRef(),c=d=>{r instanceof HTMLElement&&(r.style.display=d?"":"none")};if(e.token){let d=zf(e.api??"",e.token,e.channelId);d?.visibility&&!Hf(d.visibility,window.location.pathname)&&c(!1)}return Qr=ox.default.createRoot(s),Qr.render(yu.default.createElement(wD,{ref:u,config:e,programmatic:t,scriptConfig:a,onVisibilityChange:c})),{destroy:()=>{$f?.disconnect(),$f=null,Qr?.unmount(),Qr=null,la?.remove(),la=null,r.hasAttribute(rx)&&r.remove(),bt=null},open:()=>{},close:()=>{},toggle:()=>{},sendMessage:d=>u.current?.chat?.sendMessage(d),sendMessageAndWait:async d=>{let f=u.current?.chat;if(f)return await f.sendMessageAndWait(d)},reset:()=>u.current?.chat?.reset(),focus:()=>u.current?.chat?.focus(),getMessages:()=>u.current?.chat?.messages??[],getSessionId:()=>u.current?.chat?.sessionId}}function Mj(e,t,a){la=document.createElement("div"),la.id="waniwani-chat-embed",la.style.cssText="position:fixed;inset:0;z-index:2147483000;pointer-events:none;",document.body.appendChild(la);let n=la.attachShadow({mode:"open"});SD(n,e);let r=document.createElement("div");r.className="ww:contents",n.appendChild(r);let o=yu.default.createRef();return Qr=ox.default.createRoot(r),Qr.render(yu.default.createElement(yD,{ref:o,config:e,programmatic:t,scriptConfig:a})),{destroy:()=>{Qr?.unmount(),Qr=null,la?.remove(),la=null,bt=null},open:()=>o.current?.open(),close:()=>o.current?.close(),toggle:()=>o.current?.toggle(),sendMessage:l=>o.current?.sendMessage(l),sendMessageAndWait:async l=>{if(o.current)return o.current.sendMessageAndWait(l)},reset:()=>o.current?.reset(),focus:()=>o.current?.focus(),getMessages:()=>o.current?.getMessages()??[],getSessionId:()=>o.current?.getSessionId()}}function ID(e){if(bt)return console.warn("[Waniwani] Chat widget is already initialized. Call destroy() first to re-initialize."),bt;let t=jh(),a=ed(),n=ds(e,void 0,a),r=n.mode==="floating"?Mj(n,e,a):Aj(n,e,a,t),o=n.api??"",l=n.token?mI({api:o,token:n.token,channelId:n.channelId,getSource:()=>zf(o,n.token,n.channelId)?.source??void 0,getSessionId:()=>r.getSessionId()}):qh("no public token configured (set data-token or pass token to init())");return bt={...r,track:l.track,identify:(i,s)=>l.identify(i,s),destroy:()=>{l.shutdown(),r.destroy()}},bt}function Ej(){bt&&bt.destroy()}var CD=qh("chat widget is not initialized (call WaniWani.chat.init() first)"),si=()=>bt?bt.track:CD.track;window.WaniWani=window.WaniWani||{};window.WaniWani.chat={init:ID,destroy:Ej,open:()=>bt?.open(),close:()=>bt?.close(),toggle:()=>bt?.toggle(),sendMessage:e=>bt?.sendMessage(e),sendMessageAndWait:async e=>{if(bt)return bt.sendMessageAndWait(e)},reset:()=>bt?.reset(),focus:()=>bt?.focus(),getMessages:()=>bt?.getMessages()??[],getSessionId:()=>bt?.getSessionId(),track:Object.assign(e=>si()(e),{priceShown:e=>si().priceShown(e),pricesCompared:e=>si().pricesCompared(e),optionSelected:e=>si().optionSelected(e),leadQualified:e=>si().leadQualified(e),converted:e=>si().converted(e)}),identify:(e,t)=>bt?bt.identify(e,t):CD.identify(e,t)};function bD(){if(ed().token)try{ID()}catch(t){console.error("[Waniwani] Auto-initialization failed:",t)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",bD):bD();})();
|
|
139
139
|
/*! Bundled license information:
|
|
140
140
|
|
|
141
141
|
react/cjs/react.production.js:
|