@desktalk/core 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
Files changed (72) hide show
  1. package/dist/frontend/assets/{frontend-DzPuSfWJ.js → frontend-BGrAEoc-.js} +2 -2
  2. package/dist/frontend/assets/{frontend-DzPuSfWJ.js.map → frontend-BGrAEoc-.js.map} +1 -1
  3. package/dist/frontend/assets/{frontend-Dn0dKARf.js → frontend-BWgJC5kX.js} +2 -2
  4. package/dist/frontend/assets/{frontend-Dn0dKARf.js.map → frontend-BWgJC5kX.js.map} +1 -1
  5. package/dist/frontend/assets/{frontend-yvqb_XNo.js → frontend-CTdbpot-.js} +2 -2
  6. package/dist/frontend/assets/{frontend-yvqb_XNo.js.map → frontend-CTdbpot-.js.map} +1 -1
  7. package/dist/frontend/assets/{frontend-BAknU-ge.js → frontend-CwxhooMD.js} +3 -3
  8. package/dist/frontend/assets/frontend-CwxhooMD.js.map +1 -0
  9. package/dist/frontend/assets/{frontend-DpmnQ1w4.js → frontend-DRTe8-9o.js} +3 -3
  10. package/dist/frontend/assets/frontend-DRTe8-9o.js.map +1 -0
  11. package/dist/frontend/assets/frontend-Dz_8vRz5.js +547 -0
  12. package/dist/frontend/assets/frontend-Dz_8vRz5.js.map +1 -0
  13. package/dist/frontend/assets/{frontend-0mUhlxkg.js → frontend-vY_f4fVI.js} +2 -2
  14. package/dist/frontend/assets/{frontend-0mUhlxkg.js.map → frontend-vY_f4fVI.js.map} +1 -1
  15. package/dist/frontend/assets/{highlighted-body-TPN3WLV5-BheGZsYG.js → highlighted-body-TPN3WLV5-CRT7miki.js} +2 -2
  16. package/dist/frontend/assets/{highlighted-body-TPN3WLV5-BheGZsYG.js.map → highlighted-body-TPN3WLV5-CRT7miki.js.map} +1 -1
  17. package/dist/frontend/assets/index-CI5Mxo87.js +1863 -0
  18. package/dist/frontend/assets/index-CI5Mxo87.js.map +1 -0
  19. package/dist/frontend/assets/index-D6_VuNyY.css +1 -0
  20. package/dist/frontend/index.html +3 -2
  21. package/dist/frontend/logo.png +0 -0
  22. package/dist/i18n/manifest.json +268 -0
  23. package/dist/i18n/zh-CN.json +53 -0
  24. package/dist/i18n/zh.json +60 -0
  25. package/dist/server/auth-routes.d.ts.map +1 -1
  26. package/dist/server/auth-routes.js +2 -2
  27. package/dist/server/auth-routes.js.map +1 -1
  28. package/dist/server/index.d.ts.map +1 -1
  29. package/dist/server/index.js +14 -5
  30. package/dist/server/index.js.map +1 -1
  31. package/dist/server/thumbnail-routes.d.ts +3 -0
  32. package/dist/server/thumbnail-routes.d.ts.map +1 -0
  33. package/dist/server/thumbnail-routes.js +97 -0
  34. package/dist/server/thumbnail-routes.js.map +1 -0
  35. package/dist/services/ai/edit-history.d.ts +3 -7
  36. package/dist/services/ai/edit-history.d.ts.map +1 -1
  37. package/dist/services/ai/edit-history.js +145 -76
  38. package/dist/services/ai/edit-history.js.map +1 -1
  39. package/dist/services/ai/edit-tool.js +1 -1
  40. package/dist/services/ai/edit-tool.js.map +1 -1
  41. package/dist/services/ai/layout-tool.d.ts +8 -0
  42. package/dist/services/ai/layout-tool.d.ts.map +1 -0
  43. package/dist/services/ai/layout-tool.js +105 -0
  44. package/dist/services/ai/layout-tool.js.map +1 -0
  45. package/dist/services/ai/manual-pages/desktop-layout.md +34 -0
  46. package/dist/services/ai/manual-pages/desktop-windows.md +2 -0
  47. package/dist/services/ai/manual-pages/index.d.ts.map +1 -1
  48. package/dist/services/ai/manual-pages/index.js +9 -2
  49. package/dist/services/ai/manual-pages/index.js.map +1 -1
  50. package/dist/services/ai/pi-session-service.d.ts.map +1 -1
  51. package/dist/services/ai/pi-session-service.js +4 -0
  52. package/dist/services/ai/pi-session-service.js.map +1 -1
  53. package/dist/services/ai/redo-edit-tool.js +1 -1
  54. package/dist/services/ai/redo-edit-tool.js.map +1 -1
  55. package/dist/services/ai/undo-edit-tool.js +1 -1
  56. package/dist/services/ai/undo-edit-tool.js.map +1 -1
  57. package/dist/services/file-thumbnail.d.ts +20 -0
  58. package/dist/services/file-thumbnail.d.ts.map +1 -0
  59. package/dist/services/file-thumbnail.js +102 -0
  60. package/dist/services/file-thumbnail.js.map +1 -0
  61. package/dist/services/onboarding-config.d.ts +1 -1
  62. package/dist/services/onboarding-config.d.ts.map +1 -1
  63. package/dist/services/onboarding-config.js +10 -2
  64. package/dist/services/onboarding-config.js.map +1 -1
  65. package/package.json +11 -10
  66. package/dist/frontend/assets/frontend-B1Lvc6Rl.js +0 -413
  67. package/dist/frontend/assets/frontend-B1Lvc6Rl.js.map +0 -1
  68. package/dist/frontend/assets/frontend-BAknU-ge.js.map +0 -1
  69. package/dist/frontend/assets/frontend-DpmnQ1w4.js.map +0 -1
  70. package/dist/frontend/assets/index-BAa2HQwc.css +0 -1
  71. package/dist/frontend/assets/index-BEaTx9Vu.js +0 -1863
  72. package/dist/frontend/assets/index-BEaTx9Vu.js.map +0 -1
@@ -0,0 +1,1863 @@
1
+ function Rv(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(a,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Do(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a0={exports:{}},Gl={};var hy;function AS(){if(hy)return Gl;hy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,l){var u=null;if(l!==void 0&&(u=""+l),s.key!==void 0&&(u=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:u,ref:s!==void 0?s:null,props:l}}return Gl.Fragment=t,Gl.jsx=n,Gl.jsxs=n,Gl}var py;function wS(){return py||(py=1,a0.exports=AS()),a0.exports}var x=wS();const SS=Do(x),kS=Rv({__proto__:null,default:SS},[x]);var i0={exports:{}},ze={};var my;function CS(){if(my)return ze;my=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=E&&D[E]||D["@@iterator"],typeof D=="function"?D:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,S={};function k(D,te,O){this.props=D,this.context=te,this.refs=S,this.updater=O||T}k.prototype.isReactComponent={},k.prototype.setState=function(D,te){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,te,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function q(){}q.prototype=k.prototype;function P(D,te,O){this.props=D,this.context=te,this.refs=S,this.updater=O||T}var G=P.prototype=new q;G.constructor=P,A(G,k.prototype),G.isPureReactComponent=!0;var ne=Array.isArray;function F(){}var J={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function le(D,te,O){var Y=O.ref;return{$$typeof:e,type:D,key:te,ref:Y!==void 0?Y:null,props:O}}function j(D,te){return le(D.type,te,D.props)}function H(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function z(D){var te={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(O){return te[O]})}var ve=/\/+/g;function de(D,te){return typeof D=="object"&&D!==null&&D.key!=null?z(""+D.key):te.toString(36)}function ue(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(F,F):(D.status="pending",D.then(function(te){D.status==="pending"&&(D.status="fulfilled",D.value=te)},function(te){D.status==="pending"&&(D.status="rejected",D.reason=te)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function M(D,te,O,Y,be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Oe=!1;if(D===null)Oe=!0;else switch(ye){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(D.$$typeof){case e:case t:Oe=!0;break;case m:return Oe=D._init,M(Oe(D._payload),te,O,Y,be)}}if(Oe)return be=be(D),Oe=Y===""?"."+de(D,0):Y,ne(be)?(O="",Oe!=null&&(O=Oe.replace(ve,"$&/")+"/"),M(be,te,O,"",function(Wt){return Wt})):be!=null&&(H(be)&&(be=j(be,O+(be.key==null||D&&D.key===be.key?"":(""+be.key).replace(ve,"$&/")+"/")+Oe)),te.push(be)),1;Oe=0;var tt=Y===""?".":Y+":";if(ne(D))for(var Ie=0;Ie<D.length;Ie++)Y=D[Ie],ye=tt+de(Y,Ie),Oe+=M(Y,te,O,ye,be);else if(Ie=v(D),typeof Ie=="function")for(D=Ie.call(D),Ie=0;!(Y=D.next()).done;)Y=Y.value,ye=tt+de(Y,Ie++),Oe+=M(Y,te,O,ye,be);else if(ye==="object"){if(typeof D.then=="function")return M(ue(D),te,O,Y,be);throw te=String(D),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function ae(D,te,O){if(D==null)return D;var Y=[],be=0;return M(D,Y,"","",function(ye){return te.call(O,ye,be++)}),Y}function Ee(D){if(D._status===-1){var te=D._result;te=te(),te.then(function(O){(D._status===0||D._status===-1)&&(D._status=1,D._result=O)},function(O){(D._status===0||D._status===-1)&&(D._status=2,D._result=O)}),D._status===-1&&(D._status=0,D._result=te)}if(D._status===1)return D._result.default;throw D._result}var ke=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:ae,forEach:function(D,te,O){ae(D,function(){te.apply(this,arguments)},O)},count:function(D){var te=0;return ae(D,function(){te++}),te},toArray:function(D){return ae(D,function(te){return te})||[]},only:function(D){if(!H(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return ze.Activity=b,ze.Children=R,ze.Component=k,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=P,ze.StrictMode=a,ze.Suspense=f,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,ze.__COMPILER_RUNTIME={__proto__:null,c:function(D){return J.H.useMemoCache(D)}},ze.cache=function(D){return function(){return D.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(D,te,O){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var Y=A({},D.props),be=D.key;if(te!=null)for(ye in te.key!==void 0&&(be=""+te.key),te)!U.call(te,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&te.ref===void 0||(Y[ye]=te[ye]);var ye=arguments.length-2;if(ye===1)Y.children=O;else if(1<ye){for(var Oe=Array(ye),tt=0;tt<ye;tt++)Oe[tt]=arguments[tt+2];Y.children=Oe}return le(D.type,be,Y)},ze.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:l,_context:D},D},ze.createElement=function(D,te,O){var Y,be={},ye=null;if(te!=null)for(Y in te.key!==void 0&&(ye=""+te.key),te)U.call(te,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(be[Y]=te[Y]);var Oe=arguments.length-2;if(Oe===1)be.children=O;else if(1<Oe){for(var tt=Array(Oe),Ie=0;Ie<Oe;Ie++)tt[Ie]=arguments[Ie+2];be.children=tt}if(D&&D.defaultProps)for(Y in Oe=D.defaultProps,Oe)be[Y]===void 0&&(be[Y]=Oe[Y]);return le(D,ye,be)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(D){return{$$typeof:d,render:D}},ze.isValidElement=H,ze.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:Ee}},ze.memo=function(D,te){return{$$typeof:h,type:D,compare:te===void 0?null:te}},ze.startTransition=function(D){var te=J.T,O={};J.T=O;try{var Y=D(),be=J.S;be!==null&&be(O,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(F,ke)}catch(ye){ke(ye)}finally{te!==null&&O.types!==null&&(te.types=O.types),J.T=te}},ze.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},ze.use=function(D){return J.H.use(D)},ze.useActionState=function(D,te,O){return J.H.useActionState(D,te,O)},ze.useCallback=function(D,te){return J.H.useCallback(D,te)},ze.useContext=function(D){return J.H.useContext(D)},ze.useDebugValue=function(){},ze.useDeferredValue=function(D,te){return J.H.useDeferredValue(D,te)},ze.useEffect=function(D,te){return J.H.useEffect(D,te)},ze.useEffectEvent=function(D){return J.H.useEffectEvent(D)},ze.useId=function(){return J.H.useId()},ze.useImperativeHandle=function(D,te,O){return J.H.useImperativeHandle(D,te,O)},ze.useInsertionEffect=function(D,te){return J.H.useInsertionEffect(D,te)},ze.useLayoutEffect=function(D,te){return J.H.useLayoutEffect(D,te)},ze.useMemo=function(D,te){return J.H.useMemo(D,te)},ze.useOptimistic=function(D,te){return J.H.useOptimistic(D,te)},ze.useReducer=function(D,te,O){return J.H.useReducer(D,te,O)},ze.useRef=function(D){return J.H.useRef(D)},ze.useState=function(D){return J.H.useState(D)},ze.useSyncExternalStore=function(D,te,O){return J.H.useSyncExternalStore(D,te,O)},ze.useTransition=function(){return J.H.useTransition()},ze.version="19.2.4",ze}var gy;function dm(){return gy||(gy=1,i0.exports=CS()),i0.exports}var C=dm();const Va=Do(C);function Ov(e,t){return function(){return e.apply(t,arguments)}}const{toString:NS}=Object.prototype,{getPrototypeOf:fm}=Object,{iterator:cd,toStringTag:Lv}=Symbol,dd=(e=>t=>{const n=NS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xr=e=>(e=e.toLowerCase(),t=>dd(t)===e),fd=e=>t=>typeof t===e,{isArray:Gs}=Array,Fs=fd("undefined");function Bo(e){return e!==null&&!Fs(e)&&e.constructor!==null&&!Fs(e.constructor)&&Rn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Iv=xr("ArrayBuffer");function RS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Iv(e.buffer),t}const OS=fd("string"),Rn=fd("function"),Mv=fd("number"),zo=e=>e!==null&&typeof e=="object",LS=e=>e===!0||e===!1,Dc=e=>{if(dd(e)!=="object")return!1;const t=fm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Lv in e)&&!(cd in e)},IS=e=>{if(!zo(e)||Bo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},MS=xr("Date"),DS=xr("File"),BS=e=>!!(e&&typeof e.uri<"u"),zS=e=>e&&typeof e.getParts<"u",PS=xr("Blob"),HS=xr("FileList"),US=e=>zo(e)&&Rn(e.pipe);function jS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const by=jS(),yy=typeof by.FormData<"u"?by.FormData:void 0,FS=e=>{let t;return e&&(yy&&e instanceof yy||Rn(e.append)&&((t=dd(e))==="formdata"||t==="object"&&Rn(e.toString)&&e.toString()==="[object FormData]"))},$S=xr("URLSearchParams"),[qS,YS,VS,GS]=["ReadableStream","Request","Response","Headers"].map(xr),WS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let a,s;if(typeof e!="object"&&(e=[e]),Gs(e))for(a=0,s=e.length;a<s;a++)t.call(null,e[a],a,e);else{if(Bo(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let d;for(a=0;a<u;a++)d=l[a],t.call(null,e[d],d,e)}}function Dv(e,t){if(Bo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let a=n.length,s;for(;a-- >0;)if(s=n[a],t===s.toLowerCase())return s;return null}const ki=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bv=e=>!Fs(e)&&e!==ki;function gp(){const{caseless:e,skipUndefined:t}=Bv(this)&&this||{},n={},a=(s,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const u=e&&Dv(n,l)||l;Dc(n[u])&&Dc(s)?n[u]=gp(n[u],s):Dc(s)?n[u]=gp({},s):Gs(s)?n[u]=s.slice():(!t||!Fs(s))&&(n[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Po(arguments[s],a);return n}const QS=(e,t,n,{allOwnKeys:a}={})=>(Po(t,(s,l)=>{n&&Rn(s)?Object.defineProperty(e,l,{value:Ov(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),XS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),KS=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ZS=(e,t,n,a)=>{let s,l,u;const d={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)u=s[l],(!a||a(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=n!==!1&&fm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},JS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},ek=e=>{if(!e)return null;if(Gs(e))return e;let t=e.length;if(!Mv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fm(Uint8Array)),nk=(e,t)=>{const a=(e&&e[cd]).call(e);let s;for(;(s=a.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},rk=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},ak=xr("HTMLFormElement"),ik=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,s){return a.toUpperCase()+s}),Ey=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sk=xr("RegExp"),zv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};Po(n,(s,l)=>{let u;(u=t(s,l,e))!==!1&&(a[l]=u||s)}),Object.defineProperties(e,a)},lk=e=>{zv(e,(t,n)=>{if(Rn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(Rn(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ok=(e,t)=>{const n={},a=s=>{s.forEach(l=>{n[l]=!0})};return Gs(e)?a(e):a(String(e).split(t)),n},uk=()=>{},ck=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dk(e){return!!(e&&Rn(e.append)&&e[Lv]==="FormData"&&e[cd])}const fk=e=>{const t=new Array(10),n=(a,s)=>{if(zo(a)){if(t.indexOf(a)>=0)return;if(Bo(a))return a;if(!("toJSON"in a)){t[s]=a;const l=Gs(a)?[]:{};return Po(a,(u,d)=>{const f=n(u,s+1);!Fs(f)&&(l[d]=f)}),t[s]=void 0,l}}return a};return n(e,0)},hk=xr("AsyncFunction"),pk=e=>e&&(zo(e)||Rn(e))&&Rn(e.then)&&Rn(e.catch),Pv=((e,t)=>e?setImmediate:t?((n,a)=>(ki.addEventListener("message",({source:s,data:l})=>{s===ki&&l===n&&a.length&&a.shift()()},!1),s=>{a.push(s),ki.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rn(ki.postMessage)),mk=typeof queueMicrotask<"u"?queueMicrotask.bind(ki):typeof process<"u"&&process.nextTick||Pv,gk=e=>e!=null&&Rn(e[cd]),Z={isArray:Gs,isArrayBuffer:Iv,isBuffer:Bo,isFormData:FS,isArrayBufferView:RS,isString:OS,isNumber:Mv,isBoolean:LS,isObject:zo,isPlainObject:Dc,isEmptyObject:IS,isReadableStream:qS,isRequest:YS,isResponse:VS,isHeaders:GS,isUndefined:Fs,isDate:MS,isFile:DS,isReactNativeBlob:BS,isReactNative:zS,isBlob:PS,isRegExp:sk,isFunction:Rn,isStream:US,isURLSearchParams:$S,isTypedArray:tk,isFileList:HS,forEach:Po,merge:gp,extend:QS,trim:WS,stripBOM:XS,inherits:KS,toFlatObject:ZS,kindOf:dd,kindOfTest:xr,endsWith:JS,toArray:ek,forEachEntry:nk,matchAll:rk,isHTMLForm:ak,hasOwnProperty:Ey,hasOwnProp:Ey,reduceDescriptors:zv,freezeMethods:lk,toObjectSet:ok,toCamelCase:ik,noop:uk,toFiniteNumber:ck,findKey:Dv,global:ki,isContextDefined:Bv,isSpecCompliantForm:dk,toJSONObject:fk,isAsyncFn:hk,isThenable:pk,setImmediate:Pv,asap:mk,isIterable:gk};let Be=class Hv extends Error{static from(t,n,a,s,l,u){const d=new Hv(t.message,n||t.code,a,s,l);return d.cause=t,d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}constructor(t,n,a,s,l){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),a&&(this.config=a),s&&(this.request=s),l&&(this.response=l,this.status=l.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}};Be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Be.ERR_BAD_OPTION="ERR_BAD_OPTION";Be.ECONNABORTED="ECONNABORTED";Be.ETIMEDOUT="ETIMEDOUT";Be.ERR_NETWORK="ERR_NETWORK";Be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Be.ERR_DEPRECATED="ERR_DEPRECATED";Be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Be.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Be.ERR_CANCELED="ERR_CANCELED";Be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Be.ERR_INVALID_URL="ERR_INVALID_URL";const bk=null;function bp(e){return Z.isPlainObject(e)||Z.isArray(e)}function Uv(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function s0(e,t,n){return e?e.concat(t).map(function(s,l){return s=Uv(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function yk(e){return Z.isArray(e)&&!e.some(bp)}const Ek=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function hd(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,S){return!Z.isUndefined(S[A])});const a=n.metaTokens,s=n.visitor||m,l=n.dots,u=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(s))throw new TypeError("visitor must be a function");function h(T){if(T===null)return"";if(Z.isDate(T))return T.toISOString();if(Z.isBoolean(T))return T.toString();if(!f&&Z.isBlob(T))throw new Be("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(T)||Z.isTypedArray(T)?f&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function m(T,A,S){let k=T;if(Z.isReactNative(t)&&Z.isReactNativeBlob(T))return t.append(s0(S,A,l),h(T)),!1;if(T&&!S&&typeof T=="object"){if(Z.endsWith(A,"{}"))A=a?A:A.slice(0,-2),T=JSON.stringify(T);else if(Z.isArray(T)&&yk(T)||(Z.isFileList(T)||Z.endsWith(A,"[]"))&&(k=Z.toArray(T)))return A=Uv(A),k.forEach(function(P,G){!(Z.isUndefined(P)||P===null)&&t.append(u===!0?s0([A],G,l):u===null?A:A+"[]",h(P))}),!1}return bp(T)?!0:(t.append(s0(S,A,l),h(T)),!1)}const b=[],E=Object.assign(Ek,{defaultVisitor:m,convertValue:h,isVisitable:bp});function v(T,A){if(!Z.isUndefined(T)){if(b.indexOf(T)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(T),Z.forEach(T,function(k,q){(!(Z.isUndefined(k)||k===null)&&s.call(t,k,Z.isString(q)?q.trim():q,A,E))===!0&&v(k,A?A.concat(q):[q])}),b.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return v(e),t}function xy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function hm(e,t){this._pairs=[],e&&hd(e,this,t)}const jv=hm.prototype;jv.append=function(t,n){this._pairs.push([t,n])};jv.toString=function(t){const n=t?function(a){return t.call(this,a,xy)}:xy;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fv(e,t,n){if(!t)return e;const a=n&&n.encode||xk,s=Z.isFunction(n)?{serialize:n}:n,l=s&&s.serialize;let u;if(l?u=l(t,s):u=Z.isURLSearchParams(t)?t.toString():new hm(t,s).toString(a),u){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class vy{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(a){a!==null&&t(a)})}}const pm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},vk=typeof URLSearchParams<"u"?URLSearchParams:hm,_k=typeof FormData<"u"?FormData:null,Tk=typeof Blob<"u"?Blob:null,Ak={isBrowser:!0,classes:{URLSearchParams:vk,FormData:_k,Blob:Tk},protocols:["http","https","file","blob","url","data"]},mm=typeof window<"u"&&typeof document<"u",yp=typeof navigator=="object"&&navigator||void 0,wk=mm&&(!yp||["ReactNative","NativeScript","NS"].indexOf(yp.product)<0),Sk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kk=mm&&window.location.href||"http://localhost",Ck=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mm,hasStandardBrowserEnv:wk,hasStandardBrowserWebWorkerEnv:Sk,navigator:yp,origin:kk},Symbol.toStringTag,{value:"Module"})),on={...Ck,...Ak};function Nk(e,t){return hd(e,new on.classes.URLSearchParams,{visitor:function(n,a,s,l){return on.isNode&&Z.isBuffer(n)?(this.append(a,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function Rk(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ok(e){const t={},n=Object.keys(e);let a;const s=n.length;let l;for(a=0;a<s;a++)l=n[a],t[l]=e[l];return t}function $v(e){function t(n,a,s,l){let u=n[l++];if(u==="__proto__")return!0;const d=Number.isFinite(+u),f=l>=n.length;return u=!u&&Z.isArray(s)?s.length:u,f?(Z.hasOwnProp(s,u)?s[u]=[s[u],a]:s[u]=a,!d):((!s[u]||!Z.isObject(s[u]))&&(s[u]=[]),t(n,a,s[u],l)&&Z.isArray(s[u])&&(s[u]=Ok(s[u])),!d)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(a,s)=>{t(Rk(a),s,n,0)}),n}return null}function Lk(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(n||JSON.stringify)(e)}const Ho={transitional:pm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const a=n.getContentType()||"",s=a.indexOf("application/json")>-1,l=Z.isObject(t);if(l&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return s?JSON.stringify($v(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Nk(t,this.formSerializer).toString();if((d=Z.isFileList(t))||a.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return hd(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),Lk(t)):t}],transformResponse:[function(t){const n=this.transitional||Ho.transitional,a=n&&n.forcedJSONParsing,s=this.responseType==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(a&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?Be.from(d,Be.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:on.classes.FormData,Blob:on.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{Ho.headers[e]={}});const Ik=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Mk=e=>{const t={};let n,a,s;return e&&e.split(`
2
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),a=u.substring(s+1).trim(),!(!n||t[n]&&Ik[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t},_y=Symbol("internals");function Wl(e){return e&&String(e).trim().toLowerCase()}function Bc(e){return e===!1||e==null?e:Z.isArray(e)?e.map(Bc):String(e)}function Dk(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const Bk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function l0(e,t,n,a,s){if(Z.isFunction(a))return a.call(this,t,n);if(s&&(t=n),!!Z.isString(t)){if(Z.isString(a))return t.indexOf(a)!==-1;if(Z.isRegExp(a))return a.test(t)}}function zk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function Pk(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(s,l,u){return this[a].call(this,t,s,l,u)},configurable:!0})})}let On=class{constructor(t){t&&this.set(t)}set(t,n,a){const s=this;function l(d,f,h){const m=Wl(f);if(!m)throw new Error("header name must be a non-empty string");const b=Z.findKey(s,m);(!b||s[b]===void 0||h===!0||h===void 0&&s[b]!==!1)&&(s[b||f]=Bc(d))}const u=(d,f)=>Z.forEach(d,(h,m)=>l(h,m,f));if(Z.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Z.isString(t)&&(t=t.trim())&&!Bk(t))u(Mk(t),n);else if(Z.isObject(t)&&Z.isIterable(t)){let d={},f,h;for(const m of t){if(!Z.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[h=m[0]]=(f=d[h])?Z.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}u(d,n)}else t!=null&&l(n,t,a);return this}get(t,n){if(t=Wl(t),t){const a=Z.findKey(this,t);if(a){const s=this[a];if(!n)return s;if(n===!0)return Dk(s);if(Z.isFunction(n))return n.call(this,s,a);if(Z.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Wl(t),t){const a=Z.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||l0(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let s=!1;function l(u){if(u=Wl(u),u){const d=Z.findKey(a,u);d&&(!n||l0(a,a[d],d,n))&&(delete a[d],s=!0)}}return Z.isArray(t)?t.forEach(l):l(t),s}clear(t){const n=Object.keys(this);let a=n.length,s=!1;for(;a--;){const l=n[a];(!t||l0(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const n=this,a={};return Z.forEach(this,(s,l)=>{const u=Z.findKey(a,l);if(u){n[u]=Bc(s),delete n[l];return}const d=t?zk(l):String(l).trim();d!==l&&delete n[l],n[d]=Bc(s),a[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Z.forEach(this,(a,s)=>{a!=null&&a!==!1&&(n[s]=t&&Z.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(s=>a.set(s)),a}static accessor(t){const a=(this[_y]=this[_y]={accessors:{}}).accessors,s=this.prototype;function l(u){const d=Wl(u);a[d]||(Pk(s,u),a[d]=!0)}return Z.isArray(t)?t.forEach(l):l(t),this}};On.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(On.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});Z.freezeMethods(On);function o0(e,t){const n=this||Ho,a=t||n,s=On.from(a.headers);let l=a.data;return Z.forEach(e,function(d){l=d.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function qv(e){return!!(e&&e.__CANCEL__)}let Uo=class extends Be{constructor(t,n,a){super(t??"canceled",Be.ERR_CANCELED,n,a),this.name="CanceledError",this.__CANCEL__=!0}};function Yv(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new Be("Request failed with status code "+n.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hk(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Uk(e,t){e=e||10;const n=new Array(e),a=new Array(e);let s=0,l=0,u;return t=t!==void 0?t:1e3,function(f){const h=Date.now(),m=a[l];u||(u=h),n[s]=f,a[s]=h;let b=l,E=0;for(;b!==s;)E+=n[b++],b=b%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),h-u<t)return;const v=m&&h-m;return v?Math.round(E*1e3/v):void 0}}function jk(e,t){let n=0,a=1e3/t,s,l;const u=(h,m=Date.now())=>{n=m,s=null,l&&(clearTimeout(l),l=null),e(...h)};return[(...h)=>{const m=Date.now(),b=m-n;b>=a?u(h,m):(s=h,l||(l=setTimeout(()=>{l=null,u(s)},a-b)))},()=>s&&u(s)]}const Yc=(e,t,n=3)=>{let a=0;const s=Uk(50,250);return jk(l=>{const u=l.loaded,d=l.lengthComputable?l.total:void 0,f=u-a,h=s(f),m=u<=d;a=u;const b={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:h||void 0,estimated:h&&d&&m?(d-u)/h:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(b)},n)},Ty=(e,t)=>{const n=e!=null;return[a=>t[0]({lengthComputable:n,total:e,loaded:a}),t[1]]},Ay=e=>(...t)=>Z.asap(()=>e(...t)),Fk=on.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,on.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(on.origin),on.navigator&&/(msie|trident)/i.test(on.navigator.userAgent)):()=>!0,$k=on.hasStandardBrowserEnv?{write(e,t,n,a,s,l,u){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),Z.isString(a)&&d.push(`path=${a}`),Z.isString(s)&&d.push(`domain=${s}`),l===!0&&d.push("secure"),Z.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function qk(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vv(e,t,n){let a=!qk(t);return e&&(a||n==!1)?Yk(e,t):t}const wy=e=>e instanceof On?{...e}:e;function Ii(e,t){t=t||{};const n={};function a(h,m,b,E){return Z.isPlainObject(h)&&Z.isPlainObject(m)?Z.merge.call({caseless:E},h,m):Z.isPlainObject(m)?Z.merge({},m):Z.isArray(m)?m.slice():m}function s(h,m,b,E){if(Z.isUndefined(m)){if(!Z.isUndefined(h))return a(void 0,h,b,E)}else return a(h,m,b,E)}function l(h,m){if(!Z.isUndefined(m))return a(void 0,m)}function u(h,m){if(Z.isUndefined(m)){if(!Z.isUndefined(h))return a(void 0,h)}else return a(void 0,m)}function d(h,m,b){if(b in t)return a(h,m);if(b in e)return a(void 0,h)}const f={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(h,m,b)=>s(wy(h),wy(m),b,!0)};return Z.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=Z.hasOwnProp(f,m)?f[m]:s,E=b(e[m],t[m],m);Z.isUndefined(E)&&b!==d||(n[m]=E)}),n}const Gv=e=>{const t=Ii({},e);let{data:n,withXSRFToken:a,xsrfHeaderName:s,xsrfCookieName:l,headers:u,auth:d}=t;if(t.headers=u=On.from(u),t.url=Fv(Vv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),Z.isFormData(n)){if(on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Z.isFunction(n.getHeaders)){const f=n.getHeaders(),h=["content-type","content-length"];Object.entries(f).forEach(([m,b])=>{h.includes(m.toLowerCase())&&u.set(m,b)})}}if(on.hasStandardBrowserEnv&&(a&&Z.isFunction(a)&&(a=a(t)),a||a!==!1&&Fk(t.url))){const f=s&&l&&$k.read(l);f&&u.set(s,f)}return t},Vk=typeof XMLHttpRequest<"u",Gk=Vk&&function(e){return new Promise(function(n,a){const s=Gv(e);let l=s.data;const u=On.from(s.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:h}=s,m,b,E,v,T;function A(){v&&v(),T&&T(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function k(){if(!S)return;const P=On.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),ne={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:P,config:e,request:S};Yv(function(J){n(J),A()},function(J){a(J),A()},ne),S=null}"onloadend"in S?S.onloadend=k:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(k)},S.onabort=function(){S&&(a(new Be("Request aborted",Be.ECONNABORTED,e,S)),S=null)},S.onerror=function(G){const ne=G&&G.message?G.message:"Network Error",F=new Be(ne,Be.ERR_NETWORK,e,S);F.event=G||null,a(F),S=null},S.ontimeout=function(){let G=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const ne=s.transitional||pm;s.timeoutErrorMessage&&(G=s.timeoutErrorMessage),a(new Be(G,ne.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,S)),S=null},l===void 0&&u.setContentType(null),"setRequestHeader"in S&&Z.forEach(u.toJSON(),function(G,ne){S.setRequestHeader(ne,G)}),Z.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),d&&d!=="json"&&(S.responseType=s.responseType),h&&([E,T]=Yc(h,!0),S.addEventListener("progress",E)),f&&S.upload&&([b,v]=Yc(f),S.upload.addEventListener("progress",b),S.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(m=P=>{S&&(a(!P||P.type?new Uo(null,e,S):P),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const q=Hk(s.url);if(q&&on.protocols.indexOf(q)===-1){a(new Be("Unsupported protocol "+q+":",Be.ERR_BAD_REQUEST,e));return}S.send(l||null)})},Wk=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let a=new AbortController,s;const l=function(h){if(!s){s=!0,d();const m=h instanceof Error?h:this.reason;a.abort(m instanceof Be?m:new Uo(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,l(new Be(`timeout of ${t}ms exceeded`,Be.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(l):h.removeEventListener("abort",l)}),e=null)};e.forEach(h=>h.addEventListener("abort",l));const{signal:f}=a;return f.unsubscribe=()=>Z.asap(d),f}},Qk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let a=0,s;for(;a<n;)s=a+t,yield e.slice(a,s),a=s},Xk=async function*(e,t){for await(const n of Kk(e))yield*Qk(n,t)},Kk=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:a}=await t.read();if(n)break;yield a}}finally{await t.cancel()}},Sy=(e,t,n,a)=>{const s=Xk(e,t);let l=0,u,d=f=>{u||(u=!0,a&&a(f))};return new ReadableStream({async pull(f){try{const{done:h,value:m}=await s.next();if(h){d(),f.close();return}let b=m.byteLength;if(n){let E=l+=b;n(E)}f.enqueue(new Uint8Array(m))}catch(h){throw d(h),h}},cancel(f){return d(f),s.return()}},{highWaterMark:2})},ky=64*1024,{isFunction:gc}=Z,Zk=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:Cy,TextEncoder:Ny}=Z.global,Ry=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jk=e=>{e=Z.merge.call({skipUndefined:!0},Zk,e);const{fetch:t,Request:n,Response:a}=e,s=t?gc(t):typeof fetch=="function",l=gc(n),u=gc(a);if(!s)return!1;const d=s&&gc(Cy),f=s&&(typeof Ny=="function"?(T=>A=>T.encode(A))(new Ny):async T=>new Uint8Array(await new n(T).arrayBuffer())),h=l&&d&&Ry(()=>{let T=!1;const A=new n(on.origin,{body:new Cy,method:"POST",get duplex(){return T=!0,"half"}}).headers.has("Content-Type");return T&&!A}),m=u&&d&&Ry(()=>Z.isReadableStream(new a("").body)),b={stream:m&&(T=>T.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!b[T]&&(b[T]=(A,S)=>{let k=A&&A[T];if(k)return k.call(A);throw new Be(`Response type '${T}' is not supported`,Be.ERR_NOT_SUPPORT,S)})});const E=async T=>{if(T==null)return 0;if(Z.isBlob(T))return T.size;if(Z.isSpecCompliantForm(T))return(await new n(on.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(T)||Z.isArrayBuffer(T))return T.byteLength;if(Z.isURLSearchParams(T)&&(T=T+""),Z.isString(T))return(await f(T)).byteLength},v=async(T,A)=>{const S=Z.toFiniteNumber(T.getContentLength());return S??E(A)};return async T=>{let{url:A,method:S,data:k,signal:q,cancelToken:P,timeout:G,onDownloadProgress:ne,onUploadProgress:F,responseType:J,headers:U,withCredentials:le="same-origin",fetchOptions:j}=Gv(T),H=t||fetch;J=J?(J+"").toLowerCase():"text";let z=Wk([q,P&&P.toAbortSignal()],G),ve=null;const de=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let ue;try{if(F&&h&&S!=="get"&&S!=="head"&&(ue=await v(U,k))!==0){let D=new n(A,{method:"POST",body:k,duplex:"half"}),te;if(Z.isFormData(k)&&(te=D.headers.get("content-type"))&&U.setContentType(te),D.body){const[O,Y]=Ty(ue,Yc(Ay(F)));k=Sy(D.body,ky,O,Y)}}Z.isString(le)||(le=le?"include":"omit");const M=l&&"credentials"in n.prototype,ae={...j,signal:z,method:S.toUpperCase(),headers:U.normalize().toJSON(),body:k,duplex:"half",credentials:M?le:void 0};ve=l&&new n(A,ae);let Ee=await(l?H(ve,j):H(A,ae));const ke=m&&(J==="stream"||J==="response");if(m&&(ne||ke&&de)){const D={};["status","statusText","headers"].forEach(be=>{D[be]=Ee[be]});const te=Z.toFiniteNumber(Ee.headers.get("content-length")),[O,Y]=ne&&Ty(te,Yc(Ay(ne),!0))||[];Ee=new a(Sy(Ee.body,ky,O,()=>{Y&&Y(),de&&de()}),D)}J=J||"text";let R=await b[Z.findKey(b,J)||"text"](Ee,T);return!ke&&de&&de(),await new Promise((D,te)=>{Yv(D,te,{data:R,headers:On.from(Ee.headers),status:Ee.status,statusText:Ee.statusText,config:T,request:ve})})}catch(M){throw de&&de(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,T,ve,M&&M.response),{cause:M.cause||M}):Be.from(M,M&&M.code,T,ve,M&&M.response)}}},eC=new Map,Wv=e=>{let t=e&&e.env||{};const{fetch:n,Request:a,Response:s}=t,l=[a,s,n];let u=l.length,d=u,f,h,m=eC;for(;d--;)f=l[d],h=m.get(f),h===void 0&&m.set(f,h=d?new Map:Jk(t)),m=h;return h};Wv();const gm={http:bk,xhr:Gk,fetch:{get:Wv}};Z.forEach(gm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Oy=e=>`- ${e}`,tC=e=>Z.isFunction(e)||e===null||e===!1;function nC(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let a,s;const l={};for(let u=0;u<n;u++){a=e[u];let d;if(s=a,!tC(a)&&(s=gm[(d=String(a)).toLowerCase()],s===void 0))throw new Be(`Unknown adapter '${d}'`);if(s&&(Z.isFunction(s)||(s=s.get(t))))break;l[d||"#"+u]=s}if(!s){const u=Object.entries(l).map(([f,h])=>`adapter ${f} `+(h===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since :
4
+ `+u.map(Oy).join(`
5
+ `):" "+Oy(u[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s}const Qv={getAdapter:nC,adapters:gm};function u0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uo(null,e)}function Ly(e){return u0(e),e.headers=On.from(e.headers),e.data=o0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qv.getAdapter(e.adapter||Ho.adapter,e)(e).then(function(a){return u0(e),a.data=o0.call(e,e.transformResponse,a),a.headers=On.from(a.headers),a},function(a){return qv(a)||(u0(e),a&&a.response&&(a.response.data=o0.call(e,e.transformResponse,a.response),a.response.headers=On.from(a.response.headers))),Promise.reject(a)})}const Xv="1.13.6",pd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pd[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const Iy={};pd.transitional=function(t,n,a){function s(l,u){return"[Axios v"+Xv+"] Transitional option '"+l+"'"+u+(a?". "+a:"")}return(l,u,d)=>{if(t===!1)throw new Be(s(u," has been removed"+(n?" in "+n:"")),Be.ERR_DEPRECATED);return n&&!Iy[u]&&(Iy[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,u,d):!0}};pd.spelling=function(t){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function rC(e,t,n){if(typeof e!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let s=a.length;for(;s-- >0;){const l=a[s],u=t[l];if(u){const d=e[l],f=d===void 0||u(d,l,e);if(f!==!0)throw new Be("option "+l+" must be "+f,Be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Be("Unknown option "+l,Be.ERR_BAD_OPTION)}}const zc={assertOptions:rC,validators:pd},sr=zc.validators;let Ri=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vy,response:new vy}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";try{a.stack?l&&!String(a.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(a.stack+=`
6
+ `+l):a.stack=l}catch{}}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ii(this.defaults,n);const{transitional:a,paramsSerializer:s,headers:l}=n;a!==void 0&&zc.assertOptions(a,{silentJSONParsing:sr.transitional(sr.boolean),forcedJSONParsing:sr.transitional(sr.boolean),clarifyTimeoutError:sr.transitional(sr.boolean),legacyInterceptorReqResOrdering:sr.transitional(sr.boolean)},!1),s!=null&&(Z.isFunction(s)?n.paramsSerializer={serialize:s}:zc.assertOptions(s,{encode:sr.function,serialize:sr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zc.assertOptions(n,{baseUrl:sr.spelling("baseURL"),withXsrfToken:sr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&Z.merge(l.common,l[n.method]);l&&Z.forEach(["delete","get","head","post","put","patch","common"],T=>{delete l[T]}),n.headers=On.concat(u,l);const d=[];let f=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;f=f&&A.synchronous;const S=n.transitional||pm;S&&S.legacyInterceptorReqResOrdering?d.unshift(A.fulfilled,A.rejected):d.push(A.fulfilled,A.rejected)});const h=[];this.interceptors.response.forEach(function(A){h.push(A.fulfilled,A.rejected)});let m,b=0,E;if(!f){const T=[Ly.bind(this),void 0];for(T.unshift(...d),T.push(...h),E=T.length,m=Promise.resolve(n);b<E;)m=m.then(T[b++],T[b++]);return m}E=d.length;let v=n;for(;b<E;){const T=d[b++],A=d[b++];try{v=T(v)}catch(S){A.call(this,S);break}}try{m=Ly.call(this,v)}catch(T){return Promise.reject(T)}for(b=0,E=h.length;b<E;)m=m.then(h[b++],h[b++]);return m}getUri(t){t=Ii(this.defaults,t);const n=Vv(t.baseURL,t.url,t.allowAbsoluteUrls);return Fv(n,t.params,t.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(t){Ri.prototype[t]=function(n,a){return this.request(Ii(a||{},{method:t,url:n,data:(a||{}).data}))}});Z.forEach(["post","put","patch"],function(t){function n(a){return function(l,u,d){return this.request(Ii(d||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:l,data:u}))}}Ri.prototype[t]=n(),Ri.prototype[t+"Form"]=n(!0)});let aC=class Kv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const a=this;this.promise.then(s=>{if(!a._listeners)return;let l=a._listeners.length;for(;l-- >0;)a._listeners[l](s);a._listeners=null}),this.promise.then=s=>{let l;const u=new Promise(d=>{a.subscribe(d),l=d}).then(s);return u.cancel=function(){a.unsubscribe(l)},u},t(function(l,u,d){a.reason||(a.reason=new Uo(l,u,d),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=a=>{t.abort(a)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kv(function(s){t=s}),cancel:t}}};function iC(e){return function(n){return e.apply(null,n)}}function sC(e){return Z.isObject(e)&&e.isAxiosError===!0}const Ep={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ep).forEach(([e,t])=>{Ep[t]=e});function Zv(e){const t=new Ri(e),n=Ov(Ri.prototype.request,t);return Z.extend(n,Ri.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Zv(Ii(e,s))},n}const At=Zv(Ho);At.Axios=Ri;At.CanceledError=Uo;At.CancelToken=aC;At.isCancel=qv;At.VERSION=Xv;At.toFormData=hd;At.AxiosError=Be;At.Cancel=At.CanceledError;At.all=function(t){return Promise.all(t)};At.spread=iC;At.isAxiosError=sC;At.mergeConfig=Ii;At.AxiosHeaders=On;At.formToJSON=e=>$v(Z.isHTMLForm(e)?new FormData(e):e);At.getAdapter=Qv.getAdapter;At.HttpStatusCode=Ep;At.default=At;const{Axios:lG,AxiosError:oG,CanceledError:uG,isCancel:cG,CancelToken:dG,VERSION:fG,all:hG,Cancel:pG,isAxiosError:mG,spread:gG,toFormData:bG,AxiosHeaders:yG,HttpStatusCode:EG,formToJSON:xG,getAdapter:vG,mergeConfig:_G}=At;var c0={exports:{}},ln={};var My;function lC(){if(My)return ln;My=1;var e=dm();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(f,h,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:f,containerInfo:h,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,ln.createPortal=function(f,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,m)},ln.flushSync=function(f){var h=u.T,m=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=m,a.d.f()}},ln.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},ln.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},ln.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var m=h.as,b=d(m,h.crossOrigin),E=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:v}):m==="script"&&a.d.X(f,{crossOrigin:b,integrity:E,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ln.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},ln.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,b=d(m,h.crossOrigin);a.d.L(f,m,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ln.preloadModule=function(f,h){if(typeof f=="string")if(h){var m=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},ln.requestFormReset=function(f){a.d.r(f)},ln.unstable_batchedUpdates=function(f,h){return f(h)},ln.useFormState=function(f,h,m){return u.H.useFormState(f,h,m)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.4",ln}var Dy;function Jv(){if(Dy)return c0.exports;Dy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),c0.exports=lC(),c0.exports}var jo=Jv();const oC=Do(jo),uC=Rv({__proto__:null,default:oC},[jo]);var d0={exports:{}},Ql={},f0={exports:{}},h0={};var By;function cC(){return By||(By=1,(function(e){function t(M,ae){var Ee=M.length;M.push(ae);e:for(;0<Ee;){var ke=Ee-1>>>1,R=M[ke];if(0<s(R,ae))M[ke]=ae,M[Ee]=R,Ee=ke;else break e}}function n(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var ae=M[0],Ee=M.pop();if(Ee!==ae){M[0]=Ee;e:for(var ke=0,R=M.length,D=R>>>1;ke<D;){var te=2*(ke+1)-1,O=M[te],Y=te+1,be=M[Y];if(0>s(O,Ee))Y<R&&0>s(be,O)?(M[ke]=be,M[Y]=Ee,ke=Y):(M[ke]=O,M[te]=Ee,ke=te);else if(Y<R&&0>s(be,Ee))M[ke]=be,M[Y]=Ee,ke=Y;else break e}}return ae}function s(M,ae){var Ee=M.sortIndex-ae.sortIndex;return Ee!==0?Ee:M.id-ae.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],m=1,b=null,E=3,v=!1,T=!1,A=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function G(M){for(var ae=n(h);ae!==null;){if(ae.callback===null)a(h);else if(ae.startTime<=M)a(h),ae.sortIndex=ae.expirationTime,t(f,ae);else break;ae=n(h)}}function ne(M){if(A=!1,G(M),!T)if(n(f)!==null)T=!0,F||(F=!0,z());else{var ae=n(h);ae!==null&&ue(ne,ae.startTime-M)}}var F=!1,J=-1,U=5,le=-1;function j(){return S?!0:!(e.unstable_now()-le<U)}function H(){if(S=!1,F){var M=e.unstable_now();le=M;var ae=!0;try{e:{T=!1,A&&(A=!1,q(J),J=-1),v=!0;var Ee=E;try{t:{for(G(M),b=n(f);b!==null&&!(b.expirationTime>M&&j());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,E=b.priorityLevel;var R=ke(b.expirationTime<=M);if(M=e.unstable_now(),typeof R=="function"){b.callback=R,G(M),ae=!0;break t}b===n(f)&&a(f),G(M)}else a(f);b=n(f)}if(b!==null)ae=!0;else{var D=n(h);D!==null&&ue(ne,D.startTime-M),ae=!1}}break e}finally{b=null,E=Ee,v=!1}ae=void 0}}finally{ae?z():F=!1}}}var z;if(typeof P=="function")z=function(){P(H)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,de=ve.port2;ve.port1.onmessage=H,z=function(){de.postMessage(null)}}else z=function(){k(H,0)};function ue(M,ae){J=k(function(){M(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_next=function(M){switch(E){case 1:case 2:case 3:var ae=3;break;default:ae=E}var Ee=E;E=ae;try{return M()}finally{E=Ee}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(M,ae){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var Ee=E;E=M;try{return ae()}finally{E=Ee}},e.unstable_scheduleCallback=function(M,ae,Ee){var ke=e.unstable_now();switch(typeof Ee=="object"&&Ee!==null?(Ee=Ee.delay,Ee=typeof Ee=="number"&&0<Ee?ke+Ee:ke):Ee=ke,M){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=Ee+R,M={id:m++,callback:ae,priorityLevel:M,startTime:Ee,expirationTime:R,sortIndex:-1},Ee>ke?(M.sortIndex=Ee,t(h,M),n(f)===null&&M===n(h)&&(A?(q(J),J=-1):A=!0,ue(ne,Ee-ke))):(M.sortIndex=R,t(f,M),T||v||(T=!0,F||(F=!0,z()))),M},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(M){var ae=E;return function(){var Ee=E;E=ae;try{return M.apply(this,arguments)}finally{E=Ee}}}})(h0)),h0}var zy;function dC(){return zy||(zy=1,f0.exports=cC()),f0.exports}var Py;function fC(){if(Py)return Ql;Py=1;var e=dC(),t=dm(),n=Jv();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,o=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(o=i.return),r=i.return;while(r)}return i.tag===3?o:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var o=r,c=i;;){var p=o.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===o)return f(p),r;if(g===c)return f(p),i;g=g.sibling}throw Error(a(188))}if(o.return!==c.return)o=p,c=g;else{for(var _=!1,w=p.child;w;){if(w===o){_=!0,o=p,c=g;break}if(w===c){_=!0,c=p,o=g;break}w=w.sibling}if(!_){for(w=g.child;w;){if(w===o){_=!0,o=g,c=p;break}if(w===c){_=!0,c=g,o=p;break}w=w.sibling}if(!_)throw Error(a(189))}}if(o.alternate!==c)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:i}function m(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=m(r),i!==null)return i;r=r.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),P=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function z(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var ve=Symbol.for("react.client.reference");function de(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ve?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case A:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case ne:return"Suspense";case F:return"SuspenseList";case le:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case T:return"Portal";case P:return r.displayName||"Context";case q:return(r._context.displayName||"Context")+".Consumer";case G:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case J:return i=r.displayName||null,i!==null?i:de(r.type)||"Memo";case U:i=r._payload,r=r._init;try{return de(r(i))}catch{}}return null}var ue=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee={pending:!1,data:null,method:null,action:null},ke=[],R=-1;function D(r){return{current:r}}function te(r){0>R||(r.current=ke[R],ke[R]=null,R--)}function O(r,i){R++,ke[R]=r.current,r.current=i}var Y=D(null),be=D(null),ye=D(null),Oe=D(null);function tt(r,i){switch(O(ye,i),O(be,r),O(Y,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?B2(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=B2(i),r=z2(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}te(Y),O(Y,r)}function Ie(){te(Y),te(be),te(ye)}function Wt(r){r.memoizedState!==null&&O(Oe,r);var i=Y.current,o=z2(i,r.type);i!==o&&(O(be,r),O(Y,o))}function Qt(r){be.current===r&&(te(Y),te(be)),Oe.current===r&&(te(Oe),$l._currentValue=Ee)}var Dn,fr;function Xt(r){if(Dn===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Dn=i&&i[1]||"",fr=-1<o.stack.indexOf(`
7
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
8
+ `+Dn+r+fr}var Tr=!1;function ha(r,i){if(!r||Tr)return"";Tr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ee){var K=ee}Reflect.construct(r,[],ce)}else{try{ce.call()}catch(ee){K=ee}r.call(ce.prototype)}}else{try{throw Error()}catch(ee){K=ee}(ce=r())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ee){if(ee&&K&&typeof ee.stack=="string")return[ee.stack,K.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),_=g[0],w=g[1];if(_&&w){var B=_.split(`
9
+ `),X=w.split(`
10
+ `);for(p=c=0;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(c===B.length||p===X.length)for(c=B.length-1,p=X.length-1;1<=c&&0<=p&&B[c]!==X[p];)p--;for(;1<=c&&0<=p;c--,p--)if(B[c]!==X[p]){if(c!==1||p!==1)do if(c--,p--,0>p||B[c]!==X[p]){var ie=`
11
+ `+B[c].replace(" at new "," at ");return r.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",r.displayName)),ie}while(1<=c&&0<=p);break}}}finally{Tr=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Xt(o):""}function je(r,i){switch(r.tag){case 26:case 27:case 5:return Xt(r.type);case 16:return Xt("Lazy");case 13:return r.child!==i&&i!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return ha(r.type,!1);case 11:return ha(r.type.render,!1);case 1:return ha(r.type,!0);case 31:return Xt("Activity");default:return""}}function ct(r){try{var i="",o=null;do i+=je(r,o),o=r,r=r.return;while(r);return i}catch(c){return`
12
+ Error generating stack: `+c.message+`
13
+ `+c.stack}}var Ft=Object.prototype.hasOwnProperty,fn=e.unstable_scheduleCallback,hr=e.unstable_cancelCallback,Fd=e.unstable_shouldYield,$d=e.unstable_requestPaint,hn=e.unstable_now,qd=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,De=e.unstable_NormalPriority,Ye=e.unstable_LowPriority,st=e.unstable_IdlePriority,Bn=e.log,Hr=e.unstable_setDisableYieldValue,pn=null,Pt=null;function En(r){if(typeof Bn=="function"&&Hr(r),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(pn,r)}catch{}}var mt=Math.clz32?Math.clz32:c6,pa=Math.log,pr=Math.LN2;function c6(r){return r>>>=0,r===0?32:31-(pa(r)/pr|0)|0}var eu=256,tu=262144,nu=4194304;function ni(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function ru(r,i,o){var c=r.pendingLanes;if(c===0)return 0;var p=0,g=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var w=c&134217727;return w!==0?(c=w&~g,c!==0?p=ni(c):(_&=w,_!==0?p=ni(_):o||(o=w&~r,o!==0&&(p=ni(o))))):(w=c&~g,w!==0?p=ni(w):_!==0?p=ni(_):o||(o=c&~r,o!==0&&(p=ni(o)))),p===0?0:i!==0&&i!==p&&(i&g)===0&&(g=p&-p,o=i&-i,g>=o||g===32&&(o&4194048)!==0)?i:p}function nl(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function d6(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 b1(){var r=nu;return nu<<=1,(nu&62914560)===0&&(nu=4194304),r}function Yd(r){for(var i=[],o=0;31>o;o++)i.push(r);return i}function rl(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function f6(r,i,o,c,p,g){var _=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var w=r.entanglements,B=r.expirationTimes,X=r.hiddenUpdates;for(o=_&~o;0<o;){var ie=31-mt(o),ce=1<<ie;w[ie]=0,B[ie]=-1;var K=X[ie];if(K!==null)for(X[ie]=null,ie=0;ie<K.length;ie++){var ee=K[ie];ee!==null&&(ee.lane&=-536870913)}o&=~ce}c!==0&&y1(r,c,0),g!==0&&p===0&&r.tag!==0&&(r.suspendedLanes|=g&~(_&~i))}function y1(r,i,o){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-mt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|o&261930}function E1(r,i){var o=r.entangledLanes|=i;for(r=r.entanglements;o;){var c=31-mt(o),p=1<<c;p&i|r[c]&i&&(r[c]|=i),o&=~p}}function x1(r,i){var o=i&-i;return o=(o&42)!==0?1:Vd(o),(o&(r.suspendedLanes|i))!==0?0:o}function Vd(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Gd(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function v1(){var r=ae.p;return r!==0?r:(r=window.event,r===void 0?32:sy(r.type))}function _1(r,i){var o=ae.p;try{return ae.p=r,i()}finally{ae.p=o}}var ma=Math.random().toString(36).slice(2),Kt="__reactFiber$"+ma,xn="__reactProps$"+ma,qi="__reactContainer$"+ma,Wd="__reactEvents$"+ma,h6="__reactListeners$"+ma,p6="__reactHandles$"+ma,T1="__reactResources$"+ma,al="__reactMarker$"+ma;function Qd(r){delete r[Kt],delete r[xn],delete r[Wd],delete r[h6],delete r[p6]}function Yi(r){var i=r[Kt];if(i)return i;for(var o=r.parentNode;o;){if(i=o[qi]||o[Kt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(r=q2(r);r!==null;){if(o=r[Kt])return o;r=q2(r)}return i}r=o,o=r.parentNode}return null}function Vi(r){if(r=r[Kt]||r[qi]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function il(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Gi(r){var i=r[T1];return i||(i=r[T1]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function $t(r){r[al]=!0}var A1=new Set,w1={};function ri(r,i){Wi(r,i),Wi(r+"Capture",i)}function Wi(r,i){for(w1[r]=i,r=0;r<i.length;r++)A1.add(i[r])}var m6=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]*$"),S1={},k1={};function g6(r){return Ft.call(k1,r)?!0:Ft.call(S1,r)?!1:m6.test(r)?k1[r]=!0:(S1[r]=!0,!1)}function au(r,i,o){if(g6(i))if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+o)}}function iu(r,i,o){if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+o)}}function Ur(r,i,o,c){if(c===null)r.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(i,o,""+c)}}function Xn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function C1(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function b6(r,i,o){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return p.call(this)},set:function(_){o=""+_,g.call(this,_)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return o},setValue:function(_){o=""+_},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Xd(r){if(!r._valueTracker){var i=C1(r)?"checked":"value";r._valueTracker=b6(r,i,""+r[i])}}function N1(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),c="";return r&&(c=C1(r)?r.checked?"true":"false":r.value),r=c,r!==o?(i.setValue(r),!0):!1}function su(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var y6=/[\n"\\]/g;function Kn(r){return r.replace(y6,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Kd(r,i,o,c,p,g,_,w){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),i!=null?_==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Xn(i)):r.value!==""+Xn(i)&&(r.value=""+Xn(i)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),i!=null?Zd(r,_,Xn(i)):o!=null?Zd(r,_,Xn(o)):c!=null&&r.removeAttribute("value"),p==null&&g!=null&&(r.defaultChecked=!!g),p!=null&&(r.checked=p&&typeof p!="function"&&typeof p!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.name=""+Xn(w):r.removeAttribute("name")}function R1(r,i,o,c,p,g,_,w){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),i!=null||o!=null){if(!(g!=="submit"&&g!=="reset"||i!=null)){Xd(r);return}o=o!=null?""+Xn(o):"",i=i!=null?""+Xn(i):o,w||i===r.value||(r.value=i),r.defaultValue=i}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=w?r.checked:!!c,r.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_),Xd(r)}function Zd(r,i,o){i==="number"&&su(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function Qi(r,i,o,c){if(r=r.options,i){i={};for(var p=0;p<o.length;p++)i["$"+o[p]]=!0;for(o=0;o<r.length;o++)p=i.hasOwnProperty("$"+r[o].value),r[o].selected!==p&&(r[o].selected=p),p&&c&&(r[o].defaultSelected=!0)}else{for(o=""+Xn(o),i=null,p=0;p<r.length;p++){if(r[p].value===o){r[p].selected=!0,c&&(r[p].defaultSelected=!0);return}i!==null||r[p].disabled||(i=r[p])}i!==null&&(i.selected=!0)}}function O1(r,i,o){if(i!=null&&(i=""+Xn(i),i!==r.value&&(r.value=i),o==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=o!=null?""+Xn(o):""}function L1(r,i,o,c){if(i==null){if(c!=null){if(o!=null)throw Error(a(92));if(ue(c)){if(1<c.length)throw Error(a(93));c=c[0]}o=c}o==null&&(o=""),i=o}o=Xn(i),r.defaultValue=o,c=r.textContent,c===o&&c!==""&&c!==null&&(r.value=c),Xd(r)}function Xi(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var E6=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 I1(r,i,o){var c=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,o):typeof o!="number"||o===0||E6.has(i)?i==="float"?r.cssFloat=o:r[i]=(""+o).trim():r[i]=o+"px"}function M1(r,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var p in i)c=i[p],i.hasOwnProperty(p)&&o[p]!==c&&I1(r,p,c)}else for(var g in i)i.hasOwnProperty(g)&&I1(r,g,i[g])}function Jd(r){if(r.indexOf("-")===-1)return!1;switch(r){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 x6=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"]]),v6=/^[\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 lu(r){return v6.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function jr(){}var ef=null;function tf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ki=null,Zi=null;function D1(r){var i=Vi(r);if(i&&(r=i.stateNode)){var o=r[xn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Kd(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Kn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var c=o[i];if(c!==r&&c.form===r.form){var p=c[xn]||null;if(!p)throw Error(a(90));Kd(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<o.length;i++)c=o[i],c.form===r.form&&N1(c)}break e;case"textarea":O1(r,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&Qi(r,!!o.multiple,i,!1)}}}var nf=!1;function B1(r,i,o){if(nf)return r(i,o);nf=!0;try{var c=r(i);return c}finally{if(nf=!1,(Ki!==null||Zi!==null)&&(Wu(),Ki&&(i=Ki,r=Zi,Zi=Ki=null,D1(i),r)))for(i=0;i<r.length;i++)D1(r[i])}}function sl(r,i){var o=r.stateNode;if(o===null)return null;var c=o[xn]||null;if(c===null)return null;o=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var Fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rf=!1;if(Fr)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){rf=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{rf=!1}var ga=null,af=null,ou=null;function z1(){if(ou)return ou;var r,i=af,o=i.length,c,p="value"in ga?ga.value:ga.textContent,g=p.length;for(r=0;r<o&&i[r]===p[r];r++);var _=o-r;for(c=1;c<=_&&i[o-c]===p[g-c];c++);return ou=p.slice(r,1<c?1-c:void 0)}function uu(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function cu(){return!0}function P1(){return!1}function vn(r){function i(o,c,p,g,_){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=_,this.currentTarget=null;for(var w in r)r.hasOwnProperty(w)&&(o=r[w],this[w]=o?o(g):g[w]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?cu:P1,this.isPropagationStopped=P1,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=cu)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=cu)},persist:function(){},isPersistent:cu}),i}var ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=vn(ai),ol=b({},ai,{view:0,detail:0}),_6=vn(ol),sf,lf,ul,fu=b({},ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ul&&(ul&&r.type==="mousemove"?(sf=r.screenX-ul.screenX,lf=r.screenY-ul.screenY):lf=sf=0,ul=r),sf)},movementY:function(r){return"movementY"in r?r.movementY:lf}}),H1=vn(fu),T6=b({},fu,{dataTransfer:0}),A6=vn(T6),w6=b({},ol,{relatedTarget:0}),of=vn(w6),S6=b({},ai,{animationName:0,elapsedTime:0,pseudoElement:0}),k6=vn(S6),C6=b({},ai,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),N6=vn(C6),R6=b({},ai,{data:0}),U1=vn(R6),O6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L6={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"},I6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M6(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=I6[r])?!!i[r]:!1}function uf(){return M6}var D6=b({},ol,{key:function(r){if(r.key){var i=O6[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=uu(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?L6[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uf,charCode:function(r){return r.type==="keypress"?uu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?uu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),B6=vn(D6),z6=b({},fu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j1=vn(z6),P6=b({},ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uf}),H6=vn(P6),U6=b({},ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),j6=vn(U6),F6=b({},fu,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),$6=vn(F6),q6=b({},ai,{newState:0,oldState:0}),Y6=vn(q6),V6=[9,13,27,32],cf=Fr&&"CompositionEvent"in window,cl=null;Fr&&"documentMode"in document&&(cl=document.documentMode);var G6=Fr&&"TextEvent"in window&&!cl,F1=Fr&&(!cf||cl&&8<cl&&11>=cl),$1=" ",q1=!1;function Y1(r,i){switch(r){case"keyup":return V6.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V1(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ji=!1;function W6(r,i){switch(r){case"compositionend":return V1(i);case"keypress":return i.which!==32?null:(q1=!0,$1);case"textInput":return r=i.data,r===$1&&q1?null:r;default:return null}}function Q6(r,i){if(Ji)return r==="compositionend"||!cf&&Y1(r,i)?(r=z1(),ou=af=ga=null,Ji=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return F1&&i.locale!=="ko"?null:i.data;default:return null}}var X6={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 G1(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!X6[r.type]:i==="textarea"}function W1(r,i,o,c){Ki?Zi?Zi.push(c):Zi=[c]:Ki=c,i=tc(i,"onChange"),0<i.length&&(o=new du("onChange","change",null,o,c),r.push({event:o,listeners:i}))}var dl=null,fl=null;function K6(r){R2(r,0)}function hu(r){var i=il(r);if(N1(i))return r}function Q1(r,i){if(r==="change")return i}var X1=!1;if(Fr){var df;if(Fr){var ff="oninput"in document;if(!ff){var K1=document.createElement("div");K1.setAttribute("oninput","return;"),ff=typeof K1.oninput=="function"}df=ff}else df=!1;X1=df&&(!document.documentMode||9<document.documentMode)}function Z1(){dl&&(dl.detachEvent("onpropertychange",J1),fl=dl=null)}function J1(r){if(r.propertyName==="value"&&hu(fl)){var i=[];W1(i,fl,r,tf(r)),B1(K6,i)}}function Z6(r,i,o){r==="focusin"?(Z1(),dl=i,fl=o,dl.attachEvent("onpropertychange",J1)):r==="focusout"&&Z1()}function J6(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return hu(fl)}function ew(r,i){if(r==="click")return hu(i)}function tw(r,i){if(r==="input"||r==="change")return hu(i)}function nw(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zn=typeof Object.is=="function"?Object.is:nw;function hl(r,i){if(zn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var o=Object.keys(r),c=Object.keys(i);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!Ft.call(i,p)||!zn(r[p],i[p]))return!1}return!0}function eg(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function tg(r,i){var o=eg(r);r=0;for(var c;o;){if(o.nodeType===3){if(c=r+o.textContent.length,r<=i&&c>=i)return{node:o,offset:i-r};r=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=eg(o)}}function ng(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ng(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function rg(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=su(r.document);i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=su(r.document)}return i}function hf(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var rw=Fr&&"documentMode"in document&&11>=document.documentMode,es=null,pf=null,pl=null,mf=!1;function ag(r,i,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;mf||es==null||es!==su(c)||(c=es,"selectionStart"in c&&hf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),pl&&hl(pl,c)||(pl=c,c=tc(pf,"onSelect"),0<c.length&&(i=new du("onSelect","select",null,i,o),r.push({event:i,listeners:c}),i.target=es)))}function ii(r,i){var o={};return o[r.toLowerCase()]=i.toLowerCase(),o["Webkit"+r]="webkit"+i,o["Moz"+r]="moz"+i,o}var ts={animationend:ii("Animation","AnimationEnd"),animationiteration:ii("Animation","AnimationIteration"),animationstart:ii("Animation","AnimationStart"),transitionrun:ii("Transition","TransitionRun"),transitionstart:ii("Transition","TransitionStart"),transitioncancel:ii("Transition","TransitionCancel"),transitionend:ii("Transition","TransitionEnd")},gf={},ig={};Fr&&(ig=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function si(r){if(gf[r])return gf[r];if(!ts[r])return r;var i=ts[r],o;for(o in i)if(i.hasOwnProperty(o)&&o in ig)return gf[r]=i[o];return r}var sg=si("animationend"),lg=si("animationiteration"),og=si("animationstart"),aw=si("transitionrun"),iw=si("transitionstart"),sw=si("transitioncancel"),ug=si("transitionend"),cg=new Map,bf="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(" ");bf.push("scrollEnd");function mr(r,i){cg.set(r,i),ri(i,[r])}var pu=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Zn=[],ns=0,yf=0;function mu(){for(var r=ns,i=yf=ns=0;i<r;){var o=Zn[i];Zn[i++]=null;var c=Zn[i];Zn[i++]=null;var p=Zn[i];Zn[i++]=null;var g=Zn[i];if(Zn[i++]=null,c!==null&&p!==null){var _=c.pending;_===null?p.next=p:(p.next=_.next,_.next=p),c.pending=p}g!==0&&dg(o,p,g)}}function gu(r,i,o,c){Zn[ns++]=r,Zn[ns++]=i,Zn[ns++]=o,Zn[ns++]=c,yf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Ef(r,i,o,c){return gu(r,i,o,c),bu(r)}function li(r,i){return gu(r,null,null,i),bu(r)}function dg(r,i,o){r.lanes|=o;var c=r.alternate;c!==null&&(c.lanes|=o);for(var p=!1,g=r.return;g!==null;)g.childLanes|=o,c=g.alternate,c!==null&&(c.childLanes|=o),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(p=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,p&&i!==null&&(p=31-mt(o),r=g.hiddenUpdates,c=r[p],c===null?r[p]=[i]:c.push(i),i.lane=o|536870912),g):null}function bu(r){if(50<Bl)throw Bl=0,Ch=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var rs={};function lw(r,i,o,c){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(r,i,o,c){return new lw(r,i,o,c)}function xf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function $r(r,i){var o=r.alternate;return o===null?(o=Pn(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function fg(r,i){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function yu(r,i,o,c,p,g){var _=0;if(c=r,typeof r=="function")xf(r)&&(_=1);else if(typeof r=="string")_=fS(r,o,Y.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case le:return r=Pn(31,o,i,p),r.elementType=le,r.lanes=g,r;case A:return oi(o.children,p,g,i);case S:_=8,p|=24;break;case k:return r=Pn(12,o,i,p|2),r.elementType=k,r.lanes=g,r;case ne:return r=Pn(13,o,i,p),r.elementType=ne,r.lanes=g,r;case F:return r=Pn(19,o,i,p),r.elementType=F,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case P:_=10;break e;case q:_=9;break e;case G:_=11;break e;case J:_=14;break e;case U:_=16,c=null;break e}_=29,o=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=Pn(_,o,i,p),i.elementType=r,i.type=c,i.lanes=g,i}function oi(r,i,o,c){return r=Pn(7,r,c,i),r.lanes=o,r}function vf(r,i,o){return r=Pn(6,r,null,i),r.lanes=o,r}function hg(r){var i=Pn(18,null,null,0);return i.stateNode=r,i}function _f(r,i,o){return i=Pn(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var pg=new WeakMap;function Jn(r,i){if(typeof r=="object"&&r!==null){var o=pg.get(r);return o!==void 0?o:(i={value:r,source:i,stack:ct(i)},pg.set(r,i),i)}return{value:r,source:i,stack:ct(i)}}var as=[],is=0,Eu=null,ml=0,er=[],tr=0,ba=null,Ar=1,wr="";function qr(r,i){as[is++]=ml,as[is++]=Eu,Eu=r,ml=i}function mg(r,i,o){er[tr++]=Ar,er[tr++]=wr,er[tr++]=ba,ba=r;var c=Ar;r=wr;var p=32-mt(c)-1;c&=~(1<<p),o+=1;var g=32-mt(i)+p;if(30<g){var _=p-p%5;g=(c&(1<<_)-1).toString(32),c>>=_,p-=_,Ar=1<<32-mt(i)+p|o<<p|c,wr=g+r}else Ar=1<<g|o<<p|c,wr=r}function Tf(r){r.return!==null&&(qr(r,1),mg(r,1,0))}function Af(r){for(;r===Eu;)Eu=as[--is],as[is]=null,ml=as[--is],as[is]=null;for(;r===ba;)ba=er[--tr],er[tr]=null,wr=er[--tr],er[tr]=null,Ar=er[--tr],er[tr]=null}function gg(r,i){er[tr++]=Ar,er[tr++]=wr,er[tr++]=ba,Ar=i.id,wr=i.overflow,ba=r}var Zt=null,xt=null,Ke=!1,ya=null,nr=!1,wf=Error(a(519));function Ea(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gl(Jn(i,r)),wf}function bg(r){var i=r.stateNode,o=r.type,c=r.memoizedProps;switch(i[Kt]=r,i[xn]=c,o){case"dialog":Ge("cancel",i),Ge("close",i);break;case"iframe":case"object":case"embed":Ge("load",i);break;case"video":case"audio":for(o=0;o<Pl.length;o++)Ge(Pl[o],i);break;case"source":Ge("error",i);break;case"img":case"image":case"link":Ge("error",i),Ge("load",i);break;case"details":Ge("toggle",i);break;case"input":Ge("invalid",i),R1(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ge("invalid",i);break;case"textarea":Ge("invalid",i),L1(i,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||c.suppressHydrationWarning===!0||M2(i.textContent,o)?(c.popover!=null&&(Ge("beforetoggle",i),Ge("toggle",i)),c.onScroll!=null&&Ge("scroll",i),c.onScrollEnd!=null&&Ge("scrollend",i),c.onClick!=null&&(i.onclick=jr),i=!0):i=!1,i||Ea(r,!0)}function yg(r){for(Zt=r.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:nr=!1;return;case 27:case 3:nr=!0;return;default:Zt=Zt.return}}function ss(r){if(r!==Zt)return!1;if(!Ke)return yg(r),Ke=!0,!1;var i=r.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||$h(r.type,r.memoizedProps)),o=!o),o&&xt&&Ea(r),yg(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));xt=$2(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));xt=$2(r)}else i===27?(i=xt,Ia(r.type)?(r=Wh,Wh=null,xt=r):xt=i):xt=Zt?ar(r.stateNode.nextSibling):null;return!0}function ui(){xt=Zt=null,Ke=!1}function Sf(){var r=ya;return r!==null&&(wn===null?wn=r:wn.push.apply(wn,r),ya=null),r}function gl(r){ya===null?ya=[r]:ya.push(r)}var kf=D(null),ci=null,Yr=null;function xa(r,i,o){O(kf,i._currentValue),i._currentValue=o}function Vr(r){r._currentValue=kf.current,te(kf)}function Cf(r,i,o){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===o)break;r=r.return}}function Nf(r,i,o,c){var p=r.child;for(p!==null&&(p.return=r);p!==null;){var g=p.dependencies;if(g!==null){var _=p.child;g=g.firstContext;e:for(;g!==null;){var w=g;g=p;for(var B=0;B<i.length;B++)if(w.context===i[B]){g.lanes|=o,w=g.alternate,w!==null&&(w.lanes|=o),Cf(g.return,o,r),c||(_=null);break e}g=w.next}}else if(p.tag===18){if(_=p.return,_===null)throw Error(a(341));_.lanes|=o,g=_.alternate,g!==null&&(g.lanes|=o),Cf(_,o,r),_=null}else _=p.child;if(_!==null)_.return=p;else for(_=p;_!==null;){if(_===r){_=null;break}if(p=_.sibling,p!==null){p.return=_.return,_=p;break}_=_.return}p=_}}function ls(r,i,o,c){r=null;for(var p=i,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var _=p.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var w=p.type;zn(p.pendingProps.value,_.value)||(r!==null?r.push(w):r=[w])}}else if(p===Oe.current){if(_=p.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(r!==null?r.push($l):r=[$l])}p=p.return}r!==null&&Nf(i,r,o,c),i.flags|=262144}function xu(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function di(r){ci=r,Yr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Jt(r){return Eg(ci,r)}function vu(r,i){return ci===null&&di(r),Eg(r,i)}function Eg(r,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Yr===null){if(r===null)throw Error(a(308));Yr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Yr=Yr.next=i;return o}var ow=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(o,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(o){return o()})}},uw=e.unstable_scheduleCallback,cw=e.unstable_NormalPriority,Lt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rf(){return{controller:new ow,data:new Map,refCount:0}}function bl(r){r.refCount--,r.refCount===0&&uw(cw,function(){r.controller.abort()})}var yl=null,Of=0,os=0,us=null;function dw(r,i){if(yl===null){var o=yl=[];Of=0,os=Mh(),us={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Of++,i.then(xg,xg),i}function xg(){if(--Of===0&&yl!==null){us!==null&&(us.status="fulfilled");var r=yl;yl=null,os=0,us=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function fw(r,i){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var p=0;p<o.length;p++)(0,o[p])(i)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var vg=M.S;M.S=function(r,i){a2=hn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&dw(r,i),vg!==null&&vg(r,i)};var fi=D(null);function Lf(){var r=fi.current;return r!==null?r:gt.pooledCache}function _u(r,i){i===null?O(fi,fi.current):O(fi,i.pool)}function _g(){var r=Lf();return r===null?null:{parent:Lt._currentValue,pool:r}}var cs=Error(a(460)),If=Error(a(474)),Tu=Error(a(542)),Au={then:function(){}};function Tg(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Ag(r,i,o){switch(o=r[o],o===void 0?r.push(i):o!==i&&(i.then(jr,jr),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Sg(r),r;default:if(typeof i.status=="string")i.then(jr,jr);else{if(r=gt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=c}},function(c){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Sg(r),r}throw pi=i,cs}}function hi(r){try{var i=r._init;return i(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(pi=o,cs):o}}var pi=null;function wg(){if(pi===null)throw Error(a(459));var r=pi;return pi=null,r}function Sg(r){if(r===cs||r===Tu)throw Error(a(483))}var ds=null,El=0;function wu(r){var i=El;return El+=1,ds===null&&(ds=[]),Ag(ds,r,i)}function xl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Su(r,i){throw i.$$typeof===E?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function kg(r){function i(V,$){if(r){var Q=V.deletions;Q===null?(V.deletions=[$],V.flags|=16):Q.push($)}}function o(V,$){if(!r)return null;for(;$!==null;)i(V,$),$=$.sibling;return null}function c(V){for(var $=new Map;V!==null;)V.key!==null?$.set(V.key,V):$.set(V.index,V),V=V.sibling;return $}function p(V,$){return V=$r(V,$),V.index=0,V.sibling=null,V}function g(V,$,Q){return V.index=Q,r?(Q=V.alternate,Q!==null?(Q=Q.index,Q<$?(V.flags|=67108866,$):Q):(V.flags|=67108866,$)):(V.flags|=1048576,$)}function _(V){return r&&V.alternate===null&&(V.flags|=67108866),V}function w(V,$,Q,oe){return $===null||$.tag!==6?($=vf(Q,V.mode,oe),$.return=V,$):($=p($,Q),$.return=V,$)}function B(V,$,Q,oe){var Ne=Q.type;return Ne===A?ie(V,$,Q.props.children,oe,Q.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===U&&hi(Ne)===$.type)?($=p($,Q.props),xl($,Q),$.return=V,$):($=yu(Q.type,Q.key,Q.props,null,V.mode,oe),xl($,Q),$.return=V,$)}function X(V,$,Q,oe){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=_f(Q,V.mode,oe),$.return=V,$):($=p($,Q.children||[]),$.return=V,$)}function ie(V,$,Q,oe,Ne){return $===null||$.tag!==7?($=oi(Q,V.mode,oe,Ne),$.return=V,$):($=p($,Q),$.return=V,$)}function ce(V,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=vf(""+$,V.mode,Q),$.return=V,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return Q=yu($.type,$.key,$.props,null,V.mode,Q),xl(Q,$),Q.return=V,Q;case T:return $=_f($,V.mode,Q),$.return=V,$;case U:return $=hi($),ce(V,$,Q)}if(ue($)||z($))return $=oi($,V.mode,Q,null),$.return=V,$;if(typeof $.then=="function")return ce(V,wu($),Q);if($.$$typeof===P)return ce(V,vu(V,$),Q);Su(V,$)}return null}function K(V,$,Q,oe){var Ne=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Ne!==null?null:w(V,$,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Ne?B(V,$,Q,oe):null;case T:return Q.key===Ne?X(V,$,Q,oe):null;case U:return Q=hi(Q),K(V,$,Q,oe)}if(ue(Q)||z(Q))return Ne!==null?null:ie(V,$,Q,oe,null);if(typeof Q.then=="function")return K(V,$,wu(Q),oe);if(Q.$$typeof===P)return K(V,$,vu(V,Q),oe);Su(V,Q)}return null}function ee(V,$,Q,oe,Ne){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return V=V.get(Q)||null,w($,V,""+oe,Ne);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return V=V.get(oe.key===null?Q:oe.key)||null,B($,V,oe,Ne);case T:return V=V.get(oe.key===null?Q:oe.key)||null,X($,V,oe,Ne);case U:return oe=hi(oe),ee(V,$,Q,oe,Ne)}if(ue(oe)||z(oe))return V=V.get(Q)||null,ie($,V,oe,Ne,null);if(typeof oe.then=="function")return ee(V,$,Q,wu(oe),Ne);if(oe.$$typeof===P)return ee(V,$,Q,vu($,oe),Ne);Su($,oe)}return null}function Te(V,$,Q,oe){for(var Ne=null,nt=null,Se=$,He=$=0,Xe=null;Se!==null&&He<Q.length;He++){Se.index>He?(Xe=Se,Se=null):Xe=Se.sibling;var rt=K(V,Se,Q[He],oe);if(rt===null){Se===null&&(Se=Xe);break}r&&Se&&rt.alternate===null&&i(V,Se),$=g(rt,$,He),nt===null?Ne=rt:nt.sibling=rt,nt=rt,Se=Xe}if(He===Q.length)return o(V,Se),Ke&&qr(V,He),Ne;if(Se===null){for(;He<Q.length;He++)Se=ce(V,Q[He],oe),Se!==null&&($=g(Se,$,He),nt===null?Ne=Se:nt.sibling=Se,nt=Se);return Ke&&qr(V,He),Ne}for(Se=c(Se);He<Q.length;He++)Xe=ee(Se,V,He,Q[He],oe),Xe!==null&&(r&&Xe.alternate!==null&&Se.delete(Xe.key===null?He:Xe.key),$=g(Xe,$,He),nt===null?Ne=Xe:nt.sibling=Xe,nt=Xe);return r&&Se.forEach(function(Pa){return i(V,Pa)}),Ke&&qr(V,He),Ne}function Le(V,$,Q,oe){if(Q==null)throw Error(a(151));for(var Ne=null,nt=null,Se=$,He=$=0,Xe=null,rt=Q.next();Se!==null&&!rt.done;He++,rt=Q.next()){Se.index>He?(Xe=Se,Se=null):Xe=Se.sibling;var Pa=K(V,Se,rt.value,oe);if(Pa===null){Se===null&&(Se=Xe);break}r&&Se&&Pa.alternate===null&&i(V,Se),$=g(Pa,$,He),nt===null?Ne=Pa:nt.sibling=Pa,nt=Pa,Se=Xe}if(rt.done)return o(V,Se),Ke&&qr(V,He),Ne;if(Se===null){for(;!rt.done;He++,rt=Q.next())rt=ce(V,rt.value,oe),rt!==null&&($=g(rt,$,He),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return Ke&&qr(V,He),Ne}for(Se=c(Se);!rt.done;He++,rt=Q.next())rt=ee(Se,V,He,rt.value,oe),rt!==null&&(r&&rt.alternate!==null&&Se.delete(rt.key===null?He:rt.key),$=g(rt,$,He),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return r&&Se.forEach(function(TS){return i(V,TS)}),Ke&&qr(V,He),Ne}function ht(V,$,Q,oe){if(typeof Q=="object"&&Q!==null&&Q.type===A&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Ne=Q.key;$!==null;){if($.key===Ne){if(Ne=Q.type,Ne===A){if($.tag===7){o(V,$.sibling),oe=p($,Q.props.children),oe.return=V,V=oe;break e}}else if($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===U&&hi(Ne)===$.type){o(V,$.sibling),oe=p($,Q.props),xl(oe,Q),oe.return=V,V=oe;break e}o(V,$);break}else i(V,$);$=$.sibling}Q.type===A?(oe=oi(Q.props.children,V.mode,oe,Q.key),oe.return=V,V=oe):(oe=yu(Q.type,Q.key,Q.props,null,V.mode,oe),xl(oe,Q),oe.return=V,V=oe)}return _(V);case T:e:{for(Ne=Q.key;$!==null;){if($.key===Ne)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){o(V,$.sibling),oe=p($,Q.children||[]),oe.return=V,V=oe;break e}else{o(V,$);break}else i(V,$);$=$.sibling}oe=_f(Q,V.mode,oe),oe.return=V,V=oe}return _(V);case U:return Q=hi(Q),ht(V,$,Q,oe)}if(ue(Q))return Te(V,$,Q,oe);if(z(Q)){if(Ne=z(Q),typeof Ne!="function")throw Error(a(150));return Q=Ne.call(Q),Le(V,$,Q,oe)}if(typeof Q.then=="function")return ht(V,$,wu(Q),oe);if(Q.$$typeof===P)return ht(V,$,vu(V,Q),oe);Su(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,$!==null&&$.tag===6?(o(V,$.sibling),oe=p($,Q),oe.return=V,V=oe):(o(V,$),oe=vf(Q,V.mode,oe),oe.return=V,V=oe),_(V)):o(V,$)}return function(V,$,Q,oe){try{El=0;var Ne=ht(V,$,Q,oe);return ds=null,Ne}catch(Se){if(Se===cs||Se===Tu)throw Se;var nt=Pn(29,Se,null,V.mode);return nt.lanes=oe,nt.return=V,nt}}}var mi=kg(!0),Cg=kg(!1),va=!1;function Mf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Df(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function _a(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Ta(r,i,o){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(it&2)!==0){var p=c.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),c.pending=i,i=bu(r),dg(r,null,o),i}return gu(r,c,i,o),bu(r)}function vl(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,o|=c,i.lanes=o,E1(r,o)}}function Bf(r,i){var o=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,g=null;if(o=o.firstBaseUpdate,o!==null){do{var _={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};g===null?p=g=_:g=g.next=_,o=o.next}while(o!==null);g===null?p=g=i:g=g.next=i}else p=g=i;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}var zf=!1;function _l(){if(zf){var r=us;if(r!==null)throw r}}function Tl(r,i,o,c){zf=!1;var p=r.updateQueue;va=!1;var g=p.firstBaseUpdate,_=p.lastBaseUpdate,w=p.shared.pending;if(w!==null){p.shared.pending=null;var B=w,X=B.next;B.next=null,_===null?g=X:_.next=X,_=B;var ie=r.alternate;ie!==null&&(ie=ie.updateQueue,w=ie.lastBaseUpdate,w!==_&&(w===null?ie.firstBaseUpdate=X:w.next=X,ie.lastBaseUpdate=B))}if(g!==null){var ce=p.baseState;_=0,ie=X=B=null,w=g;do{var K=w.lane&-536870913,ee=K!==w.lane;if(ee?(Qe&K)===K:(c&K)===K){K!==0&&K===os&&(zf=!0),ie!==null&&(ie=ie.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Te=r,Le=w;K=i;var ht=o;switch(Le.tag){case 1:if(Te=Le.payload,typeof Te=="function"){ce=Te.call(ht,ce,K);break e}ce=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Le.payload,K=typeof Te=="function"?Te.call(ht,ce,K):Te,K==null)break e;ce=b({},ce,K);break e;case 2:va=!0}}K=w.callback,K!==null&&(r.flags|=64,ee&&(r.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[K]:ee.push(K))}else ee={lane:K,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ie===null?(X=ie=ee,B=ce):ie=ie.next=ee,_|=K;if(w=w.next,w===null){if(w=p.shared.pending,w===null)break;ee=w,w=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(B=ce),p.baseState=B,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,g===null&&(p.shared.lanes=0),Ca|=_,r.lanes=_,r.memoizedState=ce}}function Ng(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Rg(r,i){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)Ng(o[r],i)}var fs=D(null),ku=D(0);function Og(r,i){r=ta,O(ku,r),O(fs,i),ta=r|i.baseLanes}function Pf(){O(ku,ta),O(fs,fs.current)}function Hf(){ta=ku.current,te(fs),te(ku)}var Hn=D(null),rr=null;function Aa(r){var i=r.alternate;O(Nt,Nt.current&1),O(Hn,r),rr===null&&(i===null||fs.current!==null||i.memoizedState!==null)&&(rr=r)}function Uf(r){O(Nt,Nt.current),O(Hn,r),rr===null&&(rr=r)}function Lg(r){r.tag===22?(O(Nt,Nt.current),O(Hn,r),rr===null&&(rr=r)):wa()}function wa(){O(Nt,Nt.current),O(Hn,Hn.current)}function Un(r){te(Hn),rr===r&&(rr=null),te(Nt)}var Nt=D(0);function Cu(r){for(var i=r;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Vh(o)||Gh(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Gr=0,Pe=null,dt=null,It=null,Nu=!1,hs=!1,gi=!1,Ru=0,Al=0,ps=null,hw=0;function wt(){throw Error(a(321))}function jf(r,i){if(i===null)return!1;for(var o=0;o<i.length&&o<r.length;o++)if(!zn(r[o],i[o]))return!1;return!0}function Ff(r,i,o,c,p,g){return Gr=g,Pe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=r===null||r.memoizedState===null?mb:rh,gi=!1,g=o(c,p),gi=!1,hs&&(g=Mg(i,o,c,p)),Ig(r),g}function Ig(r){M.H=kl;var i=dt!==null&&dt.next!==null;if(Gr=0,It=dt=Pe=null,Nu=!1,Al=0,ps=null,i)throw Error(a(300));r===null||Mt||(r=r.dependencies,r!==null&&xu(r)&&(Mt=!0))}function Mg(r,i,o,c){Pe=r;var p=0;do{if(hs&&(ps=null),Al=0,hs=!1,25<=p)throw Error(a(301));if(p+=1,It=dt=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}M.H=gb,g=i(o,c)}while(hs);return g}function pw(){var r=M.H,i=r.useState()[0];return i=typeof i.then=="function"?wl(i):i,r=r.useState()[0],(dt!==null?dt.memoizedState:null)!==r&&(Pe.flags|=1024),i}function $f(){var r=Ru!==0;return Ru=0,r}function qf(r,i,o){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~o}function Yf(r){if(Nu){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Nu=!1}Gr=0,It=dt=Pe=null,hs=!1,Al=Ru=0,ps=null}function mn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?Pe.memoizedState=It=r:It=It.next=r,It}function Rt(){if(dt===null){var r=Pe.alternate;r=r!==null?r.memoizedState:null}else r=dt.next;var i=It===null?Pe.memoizedState:It.next;if(i!==null)It=i,dt=r;else{if(r===null)throw Pe.alternate===null?Error(a(467)):Error(a(310));dt=r,r={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},It===null?Pe.memoizedState=It=r:It=It.next=r}return It}function Ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wl(r){var i=Al;return Al+=1,ps===null&&(ps=[]),r=Ag(ps,r,i),i=Pe,(It===null?i.memoizedState:It.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?mb:rh),r}function Lu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return wl(r);if(r.$$typeof===P)return Jt(r)}throw Error(a(438,String(r)))}function Vf(r){var i=null,o=Pe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var c=Pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=Ou(),Pe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(r),c=0;c<r;c++)o[c]=j;return i.index++,o}function Wr(r,i){return typeof i=="function"?i(r):i}function Iu(r){var i=Rt();return Gf(i,dt,r)}function Gf(r,i,o){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=o;var p=r.baseQueue,g=c.pending;if(g!==null){if(p!==null){var _=p.next;p.next=g.next,g.next=_}i.baseQueue=p=g,c.pending=null}if(g=r.baseState,p===null)r.memoizedState=g;else{i=p.next;var w=_=null,B=null,X=i,ie=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?(Qe&ce)===ce:(Gr&ce)===ce){var K=X.revertLane;if(K===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===os&&(ie=!0);else if((Gr&K)===K){X=X.next,K===os&&(ie=!0);continue}else ce={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},B===null?(w=B=ce,_=g):B=B.next=ce,Pe.lanes|=K,Ca|=K;ce=X.action,gi&&o(g,ce),g=X.hasEagerState?X.eagerState:o(g,ce)}else K={lane:ce,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},B===null?(w=B=K,_=g):B=B.next=K,Pe.lanes|=ce,Ca|=ce;X=X.next}while(X!==null&&X!==i);if(B===null?_=g:B.next=w,!zn(g,r.memoizedState)&&(Mt=!0,ie&&(o=us,o!==null)))throw o;r.memoizedState=g,r.baseState=_,r.baseQueue=B,c.lastRenderedState=g}return p===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function Wf(r){var i=Rt(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var c=o.dispatch,p=o.pending,g=i.memoizedState;if(p!==null){o.pending=null;var _=p=p.next;do g=r(g,_.action),_=_.next;while(_!==p);zn(g,i.memoizedState)||(Mt=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),o.lastRenderedState=g}return[g,c]}function Dg(r,i,o){var c=Pe,p=Rt(),g=Ke;if(g){if(o===void 0)throw Error(a(407));o=o()}else o=i();var _=!zn((dt||p).memoizedState,o);if(_&&(p.memoizedState=o,Mt=!0),p=p.queue,Kf(Pg.bind(null,c,p,r),[r]),p.getSnapshot!==i||_||It!==null&&It.memoizedState.tag&1){if(c.flags|=2048,ms(9,{destroy:void 0},zg.bind(null,c,p,o,i),null),gt===null)throw Error(a(349));g||(Gr&127)!==0||Bg(c,i,o)}return o}function Bg(r,i,o){r.flags|=16384,r={getSnapshot:i,value:o},i=Pe.updateQueue,i===null?(i=Ou(),Pe.updateQueue=i,i.stores=[r]):(o=i.stores,o===null?i.stores=[r]:o.push(r))}function zg(r,i,o,c){i.value=o,i.getSnapshot=c,Hg(i)&&Ug(r)}function Pg(r,i,o){return o(function(){Hg(i)&&Ug(r)})}function Hg(r){var i=r.getSnapshot;r=r.value;try{var o=i();return!zn(r,o)}catch{return!0}}function Ug(r){var i=li(r,2);i!==null&&Sn(i,r,2)}function Qf(r){var i=mn();if(typeof r=="function"){var o=r;if(r=o(),gi){En(!0);try{o()}finally{En(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:r},i}function jg(r,i,o,c){return r.baseState=o,Gf(r,dt,typeof c=="function"?c:Wr)}function mw(r,i,o,c,p){if(Bu(r))throw Error(a(485));if(r=i.action,r!==null){var g={payload:p,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){g.listeners.push(_)}};M.T!==null?o(!0):g.isTransition=!1,c(g),o=i.pending,o===null?(g.next=i.pending=g,Fg(i,g)):(g.next=o.next,i.pending=o.next=g)}}function Fg(r,i){var o=i.action,c=i.payload,p=r.state;if(i.isTransition){var g=M.T,_={};M.T=_;try{var w=o(p,c),B=M.S;B!==null&&B(_,w),$g(r,i,w)}catch(X){Xf(r,i,X)}finally{g!==null&&_.types!==null&&(g.types=_.types),M.T=g}}else try{g=o(p,c),$g(r,i,g)}catch(X){Xf(r,i,X)}}function $g(r,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){qg(r,i,c)},function(c){return Xf(r,i,c)}):qg(r,i,o)}function qg(r,i,o){i.status="fulfilled",i.value=o,Yg(i),r.state=o,i=r.pending,i!==null&&(o=i.next,o===i?r.pending=null:(o=o.next,i.next=o,Fg(r,o)))}function Xf(r,i,o){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=o,Yg(i),i=i.next;while(i!==c)}r.action=null}function Yg(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Vg(r,i){return i}function Gg(r,i){if(Ke){var o=gt.formState;if(o!==null){e:{var c=Pe;if(Ke){if(xt){t:{for(var p=xt,g=nr;p.nodeType!==8;){if(!g){p=null;break t}if(p=ar(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){xt=ar(p.nextSibling),c=p.data==="F!";break e}}Ea(c)}c=!1}c&&(i=o[0])}}return o=mn(),o.memoizedState=o.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vg,lastRenderedState:i},o.queue=c,o=fb.bind(null,Pe,c),c.dispatch=o,c=Qf(!1),g=nh.bind(null,Pe,!1,c.queue),c=mn(),p={state:i,dispatch:null,action:r,pending:null},c.queue=p,o=mw.bind(null,Pe,p,g,o),p.dispatch=o,c.memoizedState=r,[i,o,!1]}function Wg(r){var i=Rt();return Qg(i,dt,r)}function Qg(r,i,o){if(i=Gf(r,i,Vg)[0],r=Iu(Wr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=wl(i)}catch(_){throw _===cs?Tu:_}else c=i;i=Rt();var p=i.queue,g=p.dispatch;return o!==i.memoizedState&&(Pe.flags|=2048,ms(9,{destroy:void 0},gw.bind(null,p,o),null)),[c,g,r]}function gw(r,i){r.action=i}function Xg(r){var i=Rt(),o=dt;if(o!==null)return Qg(i,o,r);Rt(),i=i.memoizedState,o=Rt();var c=o.queue.dispatch;return o.memoizedState=r,[i,c,!1]}function ms(r,i,o,c){return r={tag:r,create:o,deps:c,inst:i,next:null},i=Pe.updateQueue,i===null&&(i=Ou(),Pe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=r.next=r:(c=o.next,o.next=r,r.next=c,i.lastEffect=r),r}function Kg(){return Rt().memoizedState}function Mu(r,i,o,c){var p=mn();Pe.flags|=r,p.memoizedState=ms(1|i,{destroy:void 0},o,c===void 0?null:c)}function Du(r,i,o,c){var p=Rt();c=c===void 0?null:c;var g=p.memoizedState.inst;dt!==null&&c!==null&&jf(c,dt.memoizedState.deps)?p.memoizedState=ms(i,g,o,c):(Pe.flags|=r,p.memoizedState=ms(1|i,g,o,c))}function Zg(r,i){Mu(8390656,8,r,i)}function Kf(r,i){Du(2048,8,r,i)}function bw(r){Pe.flags|=4;var i=Pe.updateQueue;if(i===null)i=Ou(),Pe.updateQueue=i,i.events=[r];else{var o=i.events;o===null?i.events=[r]:o.push(r)}}function Jg(r){var i=Rt().memoizedState;return bw({ref:i,nextImpl:r}),function(){if((it&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function eb(r,i){return Du(4,2,r,i)}function tb(r,i){return Du(4,4,r,i)}function nb(r,i){if(typeof i=="function"){r=r();var o=i(r);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function rb(r,i,o){o=o!=null?o.concat([r]):null,Du(4,4,nb.bind(null,i,r),o)}function Zf(){}function ab(r,i){var o=Rt();i=i===void 0?null:i;var c=o.memoizedState;return i!==null&&jf(i,c[1])?c[0]:(o.memoizedState=[r,i],r)}function ib(r,i){var o=Rt();i=i===void 0?null:i;var c=o.memoizedState;if(i!==null&&jf(i,c[1]))return c[0];if(c=r(),gi){En(!0);try{r()}finally{En(!1)}}return o.memoizedState=[c,i],c}function Jf(r,i,o){return o===void 0||(Gr&1073741824)!==0&&(Qe&261930)===0?r.memoizedState=i:(r.memoizedState=o,r=s2(),Pe.lanes|=r,Ca|=r,o)}function sb(r,i,o,c){return zn(o,i)?o:fs.current!==null?(r=Jf(r,o,c),zn(r,i)||(Mt=!0),r):(Gr&42)===0||(Gr&1073741824)!==0&&(Qe&261930)===0?(Mt=!0,r.memoizedState=o):(r=s2(),Pe.lanes|=r,Ca|=r,i)}function lb(r,i,o,c,p){var g=ae.p;ae.p=g!==0&&8>g?g:8;var _=M.T,w={};M.T=w,nh(r,!1,i,o);try{var B=p(),X=M.S;if(X!==null&&X(w,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var ie=fw(B,c);Sl(r,i,ie,$n(r))}else Sl(r,i,c,$n(r))}catch(ce){Sl(r,i,{then:function(){},status:"rejected",reason:ce},$n())}finally{ae.p=g,_!==null&&w.types!==null&&(_.types=w.types),M.T=_}}function yw(){}function eh(r,i,o,c){if(r.tag!==5)throw Error(a(476));var p=ob(r).queue;lb(r,p,i,Ee,o===null?yw:function(){return ub(r),o(c)})}function ob(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:Ee,baseState:Ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:Ee},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:o},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function ub(r){var i=ob(r);i.next===null&&(i=r.alternate.memoizedState),Sl(r,i.next.queue,{},$n())}function th(){return Jt($l)}function cb(){return Rt().memoizedState}function db(){return Rt().memoizedState}function Ew(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var o=$n();r=_a(o);var c=Ta(i,r,o);c!==null&&(Sn(c,i,o),vl(c,i,o)),i={cache:Rf()},r.payload=i;return}i=i.return}}function xw(r,i,o){var c=$n();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Bu(r)?hb(i,o):(o=Ef(r,i,o,c),o!==null&&(Sn(o,r,c),pb(o,i,c)))}function fb(r,i,o){var c=$n();Sl(r,i,o,c)}function Sl(r,i,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Bu(r))hb(i,p);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var _=i.lastRenderedState,w=g(_,o);if(p.hasEagerState=!0,p.eagerState=w,zn(w,_))return gu(r,i,p,0),gt===null&&mu(),!1}catch{}if(o=Ef(r,i,p,c),o!==null)return Sn(o,r,c),pb(o,i,c),!0}return!1}function nh(r,i,o,c){if(c={lane:2,revertLane:Mh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Bu(r)){if(i)throw Error(a(479))}else i=Ef(r,o,c,2),i!==null&&Sn(i,r,2)}function Bu(r){var i=r.alternate;return r===Pe||i!==null&&i===Pe}function hb(r,i){hs=Nu=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function pb(r,i,o){if((o&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,o|=c,i.lanes=o,E1(r,o)}}var kl={readContext:Jt,use:Lu,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};kl.useEffectEvent=wt;var mb={readContext:Jt,use:Lu,useCallback:function(r,i){return mn().memoizedState=[r,i===void 0?null:i],r},useContext:Jt,useEffect:Zg,useImperativeHandle:function(r,i,o){o=o!=null?o.concat([r]):null,Mu(4194308,4,nb.bind(null,i,r),o)},useLayoutEffect:function(r,i){return Mu(4194308,4,r,i)},useInsertionEffect:function(r,i){Mu(4,2,r,i)},useMemo:function(r,i){var o=mn();i=i===void 0?null:i;var c=r();if(gi){En(!0);try{r()}finally{En(!1)}}return o.memoizedState=[c,i],c},useReducer:function(r,i,o){var c=mn();if(o!==void 0){var p=o(i);if(gi){En(!0);try{o(i)}finally{En(!1)}}}else p=i;return c.memoizedState=c.baseState=p,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:p},c.queue=r,r=r.dispatch=xw.bind(null,Pe,r),[c.memoizedState,r]},useRef:function(r){var i=mn();return r={current:r},i.memoizedState=r},useState:function(r){r=Qf(r);var i=r.queue,o=fb.bind(null,Pe,i);return i.dispatch=o,[r.memoizedState,o]},useDebugValue:Zf,useDeferredValue:function(r,i){var o=mn();return Jf(o,r,i)},useTransition:function(){var r=Qf(!1);return r=lb.bind(null,Pe,r.queue,!0,!1),mn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,o){var c=Pe,p=mn();if(Ke){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),gt===null)throw Error(a(349));(Qe&127)!==0||Bg(c,i,o)}p.memoizedState=o;var g={value:o,getSnapshot:i};return p.queue=g,Zg(Pg.bind(null,c,g,r),[r]),c.flags|=2048,ms(9,{destroy:void 0},zg.bind(null,c,g,o,i),null),o},useId:function(){var r=mn(),i=gt.identifierPrefix;if(Ke){var o=wr,c=Ar;o=(c&~(1<<32-mt(c)-1)).toString(32)+o,i="_"+i+"R_"+o,o=Ru++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=hw++,i="_"+i+"r_"+o.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:th,useFormState:Gg,useActionState:Gg,useOptimistic:function(r){var i=mn();i.memoizedState=i.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=nh.bind(null,Pe,!0,o),o.dispatch=i,[r,i]},useMemoCache:Vf,useCacheRefresh:function(){return mn().memoizedState=Ew.bind(null,Pe)},useEffectEvent:function(r){var i=mn(),o={impl:r};return i.memoizedState=o,function(){if((it&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},rh={readContext:Jt,use:Lu,useCallback:ab,useContext:Jt,useEffect:Kf,useImperativeHandle:rb,useInsertionEffect:eb,useLayoutEffect:tb,useMemo:ib,useReducer:Iu,useRef:Kg,useState:function(){return Iu(Wr)},useDebugValue:Zf,useDeferredValue:function(r,i){var o=Rt();return sb(o,dt.memoizedState,r,i)},useTransition:function(){var r=Iu(Wr)[0],i=Rt().memoizedState;return[typeof r=="boolean"?r:wl(r),i]},useSyncExternalStore:Dg,useId:cb,useHostTransitionStatus:th,useFormState:Wg,useActionState:Wg,useOptimistic:function(r,i){var o=Rt();return jg(o,dt,r,i)},useMemoCache:Vf,useCacheRefresh:db};rh.useEffectEvent=Jg;var gb={readContext:Jt,use:Lu,useCallback:ab,useContext:Jt,useEffect:Kf,useImperativeHandle:rb,useInsertionEffect:eb,useLayoutEffect:tb,useMemo:ib,useReducer:Wf,useRef:Kg,useState:function(){return Wf(Wr)},useDebugValue:Zf,useDeferredValue:function(r,i){var o=Rt();return dt===null?Jf(o,r,i):sb(o,dt.memoizedState,r,i)},useTransition:function(){var r=Wf(Wr)[0],i=Rt().memoizedState;return[typeof r=="boolean"?r:wl(r),i]},useSyncExternalStore:Dg,useId:cb,useHostTransitionStatus:th,useFormState:Xg,useActionState:Xg,useOptimistic:function(r,i){var o=Rt();return dt!==null?jg(o,dt,r,i):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:Vf,useCacheRefresh:db};gb.useEffectEvent=Jg;function ah(r,i,o,c){i=r.memoizedState,o=o(c,i),o=o==null?i:b({},i,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var ih={enqueueSetState:function(r,i,o){r=r._reactInternals;var c=$n(),p=_a(c);p.payload=i,o!=null&&(p.callback=o),i=Ta(r,p,c),i!==null&&(Sn(i,r,c),vl(i,r,c))},enqueueReplaceState:function(r,i,o){r=r._reactInternals;var c=$n(),p=_a(c);p.tag=1,p.payload=i,o!=null&&(p.callback=o),i=Ta(r,p,c),i!==null&&(Sn(i,r,c),vl(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var o=$n(),c=_a(o);c.tag=2,i!=null&&(c.callback=i),i=Ta(r,c,o),i!==null&&(Sn(i,r,o),vl(i,r,o))}};function bb(r,i,o,c,p,g,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,_):i.prototype&&i.prototype.isPureReactComponent?!hl(o,c)||!hl(p,g):!0}function yb(r,i,o,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,c),i.state!==r&&ih.enqueueReplaceState(i,i.state,null)}function bi(r,i){var o=i;if("ref"in i){o={};for(var c in i)c!=="ref"&&(o[c]=i[c])}if(r=r.defaultProps){o===i&&(o=b({},o));for(var p in r)o[p]===void 0&&(o[p]=r[p])}return o}function Eb(r){pu(r)}function xb(r){console.error(r)}function vb(r){pu(r)}function zu(r,i){try{var o=r.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function _b(r,i,o){try{var c=r.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function sh(r,i,o){return o=_a(o),o.tag=3,o.payload={element:null},o.callback=function(){zu(r,i)},o}function Tb(r){return r=_a(r),r.tag=3,r}function Ab(r,i,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;r.payload=function(){return p(g)},r.callback=function(){_b(i,o,c)}}var _=o.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){_b(i,o,c),typeof p!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var w=c.stack;this.componentDidCatch(c.value,{componentStack:w!==null?w:""})})}function vw(r,i,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=o.alternate,i!==null&&ls(i,o,p,!0),o=Hn.current,o!==null){switch(o.tag){case 31:case 13:return rr===null?Qu():o.alternate===null&&St===0&&(St=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===Au?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([c]):i.add(c),Oh(r,c,p)),!1;case 22:return o.flags|=65536,c===Au?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([c]):o.add(c)),Oh(r,c,p)),!1}throw Error(a(435,o.tag))}return Oh(r,c,p),Qu(),!1}if(Ke)return i=Hn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,c!==wf&&(r=Error(a(422),{cause:c}),gl(Jn(r,o)))):(c!==wf&&(i=Error(a(423),{cause:c}),gl(Jn(i,o))),r=r.current.alternate,r.flags|=65536,p&=-p,r.lanes|=p,c=Jn(c,o),p=sh(r.stateNode,c,p),Bf(r,p),St!==4&&(St=2)),!1;var g=Error(a(520),{cause:c});if(g=Jn(g,o),Dl===null?Dl=[g]:Dl.push(g),St!==4&&(St=2),i===null)return!0;c=Jn(c,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,r=p&-p,o.lanes|=r,r=sh(o.stateNode,c,r),Bf(o,r),!1;case 1:if(i=o.type,g=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Na===null||!Na.has(g))))return o.flags|=65536,p&=-p,o.lanes|=p,p=Tb(p),Ab(p,r,o,c),Bf(o,p),!1}o=o.return}while(o!==null);return!1}var lh=Error(a(461)),Mt=!1;function en(r,i,o,c){i.child=r===null?Cg(i,null,o,c):mi(i,r.child,o,c)}function wb(r,i,o,c,p){o=o.render;var g=i.ref;if("ref"in c){var _={};for(var w in c)w!=="ref"&&(_[w]=c[w])}else _=c;return di(i),c=Ff(r,i,o,_,g,p),w=$f(),r!==null&&!Mt?(qf(r,i,p),Qr(r,i,p)):(Ke&&w&&Tf(i),i.flags|=1,en(r,i,c,p),i.child)}function Sb(r,i,o,c,p){if(r===null){var g=o.type;return typeof g=="function"&&!xf(g)&&g.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=g,kb(r,i,g,c,p)):(r=yu(o.type,null,c,i,i.mode,p),r.ref=i.ref,r.return=i,i.child=r)}if(g=r.child,!mh(r,p)){var _=g.memoizedProps;if(o=o.compare,o=o!==null?o:hl,o(_,c)&&r.ref===i.ref)return Qr(r,i,p)}return i.flags|=1,r=$r(g,c),r.ref=i.ref,r.return=i,i.child=r}function kb(r,i,o,c,p){if(r!==null){var g=r.memoizedProps;if(hl(g,c)&&r.ref===i.ref)if(Mt=!1,i.pendingProps=c=g,mh(r,p))(r.flags&131072)!==0&&(Mt=!0);else return i.lanes=r.lanes,Qr(r,i,p)}return oh(r,i,o,c,p)}function Cb(r,i,o,c){var p=c.children,g=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(g=g!==null?g.baseLanes|o:o,r!==null){for(c=i.child=r.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,i.child=null;return Nb(r,i,g,o,c)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&_u(i,g!==null?g.cachePool:null),g!==null?Og(i,g):Pf(),Lg(i);else return c=i.lanes=536870912,Nb(r,i,g!==null?g.baseLanes|o:o,o,c)}else g!==null?(_u(i,g.cachePool),Og(i,g),wa(),i.memoizedState=null):(r!==null&&_u(i,null),Pf(),wa());return en(r,i,p,o),i.child}function Cl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Nb(r,i,o,c,p){var g=Lf();return g=g===null?null:{parent:Lt._currentValue,pool:g},i.memoizedState={baseLanes:o,cachePool:g},r!==null&&_u(i,null),Pf(),Lg(i),r!==null&&ls(r,i,c,!0),i.childLanes=p,null}function Pu(r,i){return i=Uu({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function Rb(r,i,o){return mi(i,r.child,null,o),r=Pu(i,i.pendingProps),r.flags|=2,Un(i),i.memoizedState=null,r}function _w(r,i,o){var c=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Ke){if(c.mode==="hidden")return r=Pu(i,c),i.lanes=536870912,Cl(null,r);if(Uf(i),(r=xt)?(r=F2(r,nr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ba!==null?{id:Ar,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},o=hg(r),o.return=i,i.child=o,Zt=i,xt=null)):r=null,r===null)throw Ea(i);return i.lanes=536870912,null}return Pu(i,c)}var g=r.memoizedState;if(g!==null){var _=g.dehydrated;if(Uf(i),p)if(i.flags&256)i.flags&=-257,i=Rb(r,i,o);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Mt||ls(r,i,o,!1),p=(o&r.childLanes)!==0,Mt||p){if(c=gt,c!==null&&(_=x1(c,o),_!==0&&_!==g.retryLane))throw g.retryLane=_,li(r,_),Sn(c,r,_),lh;Qu(),i=Rb(r,i,o)}else r=g.treeContext,xt=ar(_.nextSibling),Zt=i,Ke=!0,ya=null,nr=!1,r!==null&&gg(i,r),i=Pu(i,c),i.flags|=4096;return i}return r=$r(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function Hu(r,i){var o=i.ref;if(o===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(i.flags|=4194816)}}function oh(r,i,o,c,p){return di(i),o=Ff(r,i,o,c,void 0,p),c=$f(),r!==null&&!Mt?(qf(r,i,p),Qr(r,i,p)):(Ke&&c&&Tf(i),i.flags|=1,en(r,i,o,p),i.child)}function Ob(r,i,o,c,p,g){return di(i),i.updateQueue=null,o=Mg(i,c,o,p),Ig(r),c=$f(),r!==null&&!Mt?(qf(r,i,g),Qr(r,i,g)):(Ke&&c&&Tf(i),i.flags|=1,en(r,i,o,g),i.child)}function Lb(r,i,o,c,p){if(di(i),i.stateNode===null){var g=rs,_=o.contextType;typeof _=="object"&&_!==null&&(g=Jt(_)),g=new o(c,g),i.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ih,i.stateNode=g,g._reactInternals=i,g=i.stateNode,g.props=c,g.state=i.memoizedState,g.refs={},Mf(i),_=o.contextType,g.context=typeof _=="object"&&_!==null?Jt(_):rs,g.state=i.memoizedState,_=o.getDerivedStateFromProps,typeof _=="function"&&(ah(i,o,_,c),g.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(_=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),_!==g.state&&ih.enqueueReplaceState(g,g.state,null),Tl(i,c,g,p),_l(),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){g=i.stateNode;var w=i.memoizedProps,B=bi(o,w);g.props=B;var X=g.context,ie=o.contextType;_=rs,typeof ie=="object"&&ie!==null&&(_=Jt(ie));var ce=o.getDerivedStateFromProps;ie=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",w=i.pendingProps!==w,ie||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w||X!==_)&&yb(i,g,c,_),va=!1;var K=i.memoizedState;g.state=K,Tl(i,c,g,p),_l(),X=i.memoizedState,w||K!==X||va?(typeof ce=="function"&&(ah(i,o,ce,c),X=i.memoizedState),(B=va||bb(i,o,B,c,K,X,_))?(ie||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(i.flags|=4194308)):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=X),g.props=c,g.state=X,g.context=_,c=B):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{g=i.stateNode,Df(r,i),_=i.memoizedProps,ie=bi(o,_),g.props=ie,ce=i.pendingProps,K=g.context,X=o.contextType,B=rs,typeof X=="object"&&X!==null&&(B=Jt(X)),w=o.getDerivedStateFromProps,(X=typeof w=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_!==ce||K!==B)&&yb(i,g,c,B),va=!1,K=i.memoizedState,g.state=K,Tl(i,c,g,p),_l();var ee=i.memoizedState;_!==ce||K!==ee||va||r!==null&&r.dependencies!==null&&xu(r.dependencies)?(typeof w=="function"&&(ah(i,o,w,c),ee=i.memoizedState),(ie=va||bb(i,o,ie,c,K,ee,B)||r!==null&&r.dependencies!==null&&xu(r.dependencies))?(X||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,ee,B),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,ee,B)),typeof g.componentDidUpdate=="function"&&(i.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&K===r.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&K===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ee),g.props=c,g.state=ee,g.context=B,c=ie):(typeof g.componentDidUpdate!="function"||_===r.memoizedProps&&K===r.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&K===r.memoizedState||(i.flags|=1024),c=!1)}return g=c,Hu(r,i),c=(i.flags&128)!==0,g||c?(g=i.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:g.render(),i.flags|=1,r!==null&&c?(i.child=mi(i,r.child,null,p),i.child=mi(i,null,o,p)):en(r,i,o,p),i.memoizedState=g.state,r=i.child):r=Qr(r,i,p),r}function Ib(r,i,o,c){return ui(),i.flags|=256,en(r,i,o,c),i.child}var uh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ch(r){return{baseLanes:r,cachePool:_g()}}function dh(r,i,o){return r=r!==null?r.childLanes&~o:0,i&&(r|=Fn),r}function Mb(r,i,o){var c=i.pendingProps,p=!1,g=(i.flags&128)!==0,_;if((_=g)||(_=r!==null&&r.memoizedState===null?!1:(Nt.current&2)!==0),_&&(p=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,r===null){if(Ke){if(p?Aa(i):wa(),(r=xt)?(r=F2(r,nr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:ba!==null?{id:Ar,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},o=hg(r),o.return=i,i.child=o,Zt=i,xt=null)):r=null,r===null)throw Ea(i);return Gh(r)?i.lanes=32:i.lanes=536870912,null}var w=c.children;return c=c.fallback,p?(wa(),p=i.mode,w=Uu({mode:"hidden",children:w},p),c=oi(c,p,o,null),w.return=i,c.return=i,w.sibling=c,i.child=w,c=i.child,c.memoizedState=ch(o),c.childLanes=dh(r,_,o),i.memoizedState=uh,Cl(null,c)):(Aa(i),fh(i,w))}var B=r.memoizedState;if(B!==null&&(w=B.dehydrated,w!==null)){if(g)i.flags&256?(Aa(i),i.flags&=-257,i=hh(r,i,o)):i.memoizedState!==null?(wa(),i.child=r.child,i.flags|=128,i=null):(wa(),w=c.fallback,p=i.mode,c=Uu({mode:"visible",children:c.children},p),w=oi(w,p,o,null),w.flags|=2,c.return=i,w.return=i,c.sibling=w,i.child=c,mi(i,r.child,null,o),c=i.child,c.memoizedState=ch(o),c.childLanes=dh(r,_,o),i.memoizedState=uh,i=Cl(null,c));else if(Aa(i),Gh(w)){if(_=w.nextSibling&&w.nextSibling.dataset,_)var X=_.dgst;_=X,c=Error(a(419)),c.stack="",c.digest=_,gl({value:c,source:null,stack:null}),i=hh(r,i,o)}else if(Mt||ls(r,i,o,!1),_=(o&r.childLanes)!==0,Mt||_){if(_=gt,_!==null&&(c=x1(_,o),c!==0&&c!==B.retryLane))throw B.retryLane=c,li(r,c),Sn(_,r,c),lh;Vh(w)||Qu(),i=hh(r,i,o)}else Vh(w)?(i.flags|=192,i.child=r.child,i=null):(r=B.treeContext,xt=ar(w.nextSibling),Zt=i,Ke=!0,ya=null,nr=!1,r!==null&&gg(i,r),i=fh(i,c.children),i.flags|=4096);return i}return p?(wa(),w=c.fallback,p=i.mode,B=r.child,X=B.sibling,c=$r(B,{mode:"hidden",children:c.children}),c.subtreeFlags=B.subtreeFlags&65011712,X!==null?w=$r(X,w):(w=oi(w,p,o,null),w.flags|=2),w.return=i,c.return=i,c.sibling=w,i.child=c,Cl(null,c),c=i.child,w=r.child.memoizedState,w===null?w=ch(o):(p=w.cachePool,p!==null?(B=Lt._currentValue,p=p.parent!==B?{parent:B,pool:B}:p):p=_g(),w={baseLanes:w.baseLanes|o,cachePool:p}),c.memoizedState=w,c.childLanes=dh(r,_,o),i.memoizedState=uh,Cl(r.child,c)):(Aa(i),o=r.child,r=o.sibling,o=$r(o,{mode:"visible",children:c.children}),o.return=i,o.sibling=null,r!==null&&(_=i.deletions,_===null?(i.deletions=[r],i.flags|=16):_.push(r)),i.child=o,i.memoizedState=null,o)}function fh(r,i){return i=Uu({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Uu(r,i){return r=Pn(22,r,null,i),r.lanes=0,r}function hh(r,i,o){return mi(i,r.child,null,o),r=fh(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Db(r,i,o){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Cf(r.return,i,o)}function ph(r,i,o,c,p,g){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:g}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=o,_.tailMode=p,_.treeForkCount=g)}function Bb(r,i,o){var c=i.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var _=Nt.current,w=(_&2)!==0;if(w?(_=_&1|2,i.flags|=128):_&=1,O(Nt,_),en(r,i,c,o),c=Ke?ml:0,!w&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Db(r,o,i);else if(r.tag===19)Db(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(p){case"forwards":for(o=i.child,p=null;o!==null;)r=o.alternate,r!==null&&Cu(r)===null&&(p=o),o=o.sibling;o=p,o===null?(p=i.child,i.child=null):(p=o.sibling,o.sibling=null),ph(i,!1,p,o,g,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=i.child,i.child=null;p!==null;){if(r=p.alternate,r!==null&&Cu(r)===null){i.child=p;break}r=p.sibling,p.sibling=o,o=p,p=r}ph(i,!0,o,null,g,c);break;case"together":ph(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Qr(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),Ca|=i.lanes,(o&i.childLanes)===0)if(r!==null){if(ls(r,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,o=$r(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=$r(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function mh(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&xu(r)))}function Tw(r,i,o){switch(i.tag){case 3:tt(i,i.stateNode.containerInfo),xa(i,Lt,r.memoizedState.cache),ui();break;case 27:case 5:Wt(i);break;case 4:tt(i,i.stateNode.containerInfo);break;case 10:xa(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Uf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Aa(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Mb(r,i,o):(Aa(i),r=Qr(r,i,o),r!==null?r.sibling:null);Aa(i);break;case 19:var p=(r.flags&128)!==0;if(c=(o&i.childLanes)!==0,c||(ls(r,i,o,!1),c=(o&i.childLanes)!==0),p){if(c)return Bb(r,i,o);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),O(Nt,Nt.current),c)break;return null;case 22:return i.lanes=0,Cb(r,i,o,i.pendingProps);case 24:xa(i,Lt,r.memoizedState.cache)}return Qr(r,i,o)}function zb(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps)Mt=!0;else{if(!mh(r,o)&&(i.flags&128)===0)return Mt=!1,Tw(r,i,o);Mt=(r.flags&131072)!==0}else Mt=!1,Ke&&(i.flags&1048576)!==0&&mg(i,ml,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=hi(i.elementType),i.type=r,typeof r=="function")xf(r)?(c=bi(r,c),i.tag=1,i=Lb(null,i,r,c,o)):(i.tag=0,i=oh(null,i,r,c,o));else{if(r!=null){var p=r.$$typeof;if(p===G){i.tag=11,i=wb(null,i,r,c,o);break e}else if(p===J){i.tag=14,i=Sb(null,i,r,c,o);break e}}throw i=de(r)||r,Error(a(306,i,""))}}return i;case 0:return oh(r,i,i.type,i.pendingProps,o);case 1:return c=i.type,p=bi(c,i.pendingProps),Lb(r,i,c,p,o);case 3:e:{if(tt(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var g=i.memoizedState;p=g.element,Df(r,i),Tl(i,c,null,o);var _=i.memoizedState;if(c=_.cache,xa(i,Lt,c),c!==g.cache&&Nf(i,[Lt],o,!0),_l(),c=_.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){i=Ib(r,i,c,o);break e}else if(c!==p){p=Jn(Error(a(424)),i),gl(p),i=Ib(r,i,c,o);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,xt=ar(r.firstChild),Zt=i,Ke=!0,ya=null,nr=!0,o=Cg(i,null,c,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ui(),c===p){i=Qr(r,i,o);break e}en(r,i,c,o)}i=i.child}return i;case 26:return Hu(r,i),r===null?(o=W2(i.type,null,i.pendingProps,null))?i.memoizedState=o:Ke||(o=i.type,r=i.pendingProps,c=nc(ye.current).createElement(o),c[Kt]=i,c[xn]=r,tn(c,o,r),$t(c),i.stateNode=c):i.memoizedState=W2(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Wt(i),r===null&&Ke&&(c=i.stateNode=Y2(i.type,i.pendingProps,ye.current),Zt=i,nr=!0,p=xt,Ia(i.type)?(Wh=p,xt=ar(c.firstChild)):xt=p),en(r,i,i.pendingProps.children,o),Hu(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Ke&&((p=c=xt)&&(c=Jw(c,i.type,i.pendingProps,nr),c!==null?(i.stateNode=c,Zt=i,xt=ar(c.firstChild),nr=!1,p=!0):p=!1),p||Ea(i)),Wt(i),p=i.type,g=i.pendingProps,_=r!==null?r.memoizedProps:null,c=g.children,$h(p,g)?c=null:_!==null&&$h(p,_)&&(i.flags|=32),i.memoizedState!==null&&(p=Ff(r,i,pw,null,null,o),$l._currentValue=p),Hu(r,i),en(r,i,c,o),i.child;case 6:return r===null&&Ke&&((r=o=xt)&&(o=eS(o,i.pendingProps,nr),o!==null?(i.stateNode=o,Zt=i,xt=null,r=!0):r=!1),r||Ea(i)),null;case 13:return Mb(r,i,o);case 4:return tt(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=mi(i,null,c,o):en(r,i,c,o),i.child;case 11:return wb(r,i,i.type,i.pendingProps,o);case 7:return en(r,i,i.pendingProps,o),i.child;case 8:return en(r,i,i.pendingProps.children,o),i.child;case 12:return en(r,i,i.pendingProps.children,o),i.child;case 10:return c=i.pendingProps,xa(i,i.type,c.value),en(r,i,c.children,o),i.child;case 9:return p=i.type._context,c=i.pendingProps.children,di(i),p=Jt(p),c=c(p),i.flags|=1,en(r,i,c,o),i.child;case 14:return Sb(r,i,i.type,i.pendingProps,o);case 15:return kb(r,i,i.type,i.pendingProps,o);case 19:return Bb(r,i,o);case 31:return _w(r,i,o);case 22:return Cb(r,i,o,i.pendingProps);case 24:return di(i),c=Jt(Lt),r===null?(p=Lf(),p===null&&(p=gt,g=Rf(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=o),p=g),i.memoizedState={parent:c,cache:p},Mf(i),xa(i,Lt,p)):((r.lanes&o)!==0&&(Df(r,i),Tl(i,null,null,o),_l()),p=r.memoizedState,g=i.memoizedState,p.parent!==c?(p={parent:c,cache:c},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),xa(i,Lt,c)):(c=g.cache,xa(i,Lt,c),c!==p.cache&&Nf(i,[Lt],o,!0))),en(r,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Xr(r){r.flags|=4}function gh(r,i,o,c,p){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(p&335544128)===p)if(r.stateNode.complete)r.flags|=8192;else if(c2())r.flags|=8192;else throw pi=Au,If}else r.flags&=-16777217}function Pb(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!J2(i))if(c2())r.flags|=8192;else throw pi=Au,If}function ju(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?b1():536870912,r.lanes|=i,Es|=i)}function Nl(r,i){if(!Ke)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function vt(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,c=0;if(i)for(var p=r.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=c,r.childLanes=o,i}function Aw(r,i,o){var c=i.pendingProps;switch(Af(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(i),null;case 1:return vt(i),null;case 3:return o=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Vr(Lt),Ie(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(ss(i)?Xr(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Sf())),vt(i),null;case 26:var p=i.type,g=i.memoizedState;return r===null?(Xr(i),g!==null?(vt(i),Pb(i,g)):(vt(i),gh(i,p,null,c,o))):g?g!==r.memoizedState?(Xr(i),vt(i),Pb(i,g)):(vt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Xr(i),vt(i),gh(i,p,r,c,o)),null;case 27:if(Qt(i),o=ye.current,p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Xr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return vt(i),null}r=Y.current,ss(i)?bg(i):(r=Y2(p,c,o),i.stateNode=r,Xr(i))}return vt(i),null;case 5:if(Qt(i),p=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Xr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return vt(i),null}if(g=Y.current,ss(i))bg(i);else{var _=nc(ye.current);switch(g){case 1:g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=_.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=_.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=_.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?_.createElement(p,{is:c.is}):_.createElement(p)}}g[Kt]=i,g[xn]=c;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)g.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=g;e:switch(tn(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Xr(i)}}return vt(i),gh(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,o),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Xr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=ye.current,ss(i)){if(r=i.stateNode,o=i.memoizedProps,c=null,p=Zt,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}r[Kt]=i,r=!!(r.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||M2(r.nodeValue,o)),r||Ea(i,!0)}else r=nc(r).createTextNode(c),r[Kt]=i,i.stateNode=r}return vt(i),null;case 31:if(o=i.memoizedState,r===null||r.memoizedState!==null){if(c=ss(i),o!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Kt]=i}else ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;vt(i),r=!1}else o=Sf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return i.flags&256?(Un(i),i):(Un(i),null);if((i.flags&128)!==0)throw Error(a(558))}return vt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(p=ss(i),c!==null&&c.dehydrated!==null){if(r===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Kt]=i}else ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;vt(i),p=!1}else p=Sf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(Un(i),i):(Un(i),null)}return Un(i),(i.flags&128)!==0?(i.lanes=o,i):(o=c!==null,r=r!==null&&r.memoizedState!==null,o&&(c=i.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),o!==r&&o&&(i.child.flags|=8192),ju(i,i.updateQueue),vt(i),null);case 4:return Ie(),r===null&&Ph(i.stateNode.containerInfo),vt(i),null;case 10:return Vr(i.type),vt(i),null;case 19:if(te(Nt),c=i.memoizedState,c===null)return vt(i),null;if(p=(i.flags&128)!==0,g=c.rendering,g===null)if(p)Nl(c,!1);else{if(St!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(g=Cu(r),g!==null){for(i.flags|=128,Nl(c,!1),r=g.updateQueue,i.updateQueue=r,ju(i,r),i.subtreeFlags=0,r=o,o=i.child;o!==null;)fg(o,r),o=o.sibling;return O(Nt,Nt.current&1|2),Ke&&qr(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&hn()>Vu&&(i.flags|=128,p=!0,Nl(c,!1),i.lanes=4194304)}else{if(!p)if(r=Cu(g),r!==null){if(i.flags|=128,p=!0,r=r.updateQueue,i.updateQueue=r,ju(i,r),Nl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Ke)return vt(i),null}else 2*hn()-c.renderingStartTime>Vu&&o!==536870912&&(i.flags|=128,p=!0,Nl(c,!1),i.lanes=4194304);c.isBackwards?(g.sibling=i.child,i.child=g):(r=c.last,r!==null?r.sibling=g:i.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=hn(),r.sibling=null,o=Nt.current,O(Nt,p?o&1|2:o&1),Ke&&qr(i,c.treeForkCount),r):(vt(i),null);case 22:case 23:return Un(i),Hf(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(o&536870912)!==0&&(i.flags&128)===0&&(vt(i),i.subtreeFlags&6&&(i.flags|=8192)):vt(i),o=i.updateQueue,o!==null&&ju(i,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==o&&(i.flags|=2048),r!==null&&te(fi),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Vr(Lt),vt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function ww(r,i){switch(Af(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Vr(Lt),Ie(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Qt(i),null;case 31:if(i.memoizedState!==null){if(Un(i),i.alternate===null)throw Error(a(340));ui()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Un(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ui()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return te(Nt),null;case 4:return Ie(),null;case 10:return Vr(i.type),null;case 22:case 23:return Un(i),Hf(),r!==null&&te(fi),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Vr(Lt),null;case 25:return null;default:return null}}function Hb(r,i){switch(Af(i),i.tag){case 3:Vr(Lt),Ie();break;case 26:case 27:case 5:Qt(i);break;case 4:Ie();break;case 31:i.memoizedState!==null&&Un(i);break;case 13:Un(i);break;case 19:te(Nt);break;case 10:Vr(i.type);break;case 22:case 23:Un(i),Hf(),r!==null&&te(fi);break;case 24:Vr(Lt)}}function Rl(r,i){try{var o=i.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&r)===r){c=void 0;var g=o.create,_=o.inst;c=g(),_.destroy=c}o=o.next}while(o!==p)}}catch(w){ut(i,i.return,w)}}function Sa(r,i,o){try{var c=i.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&r)===r){var _=c.inst,w=_.destroy;if(w!==void 0){_.destroy=void 0,p=i;var B=o,X=w;try{X()}catch(ie){ut(p,B,ie)}}}c=c.next}while(c!==g)}}catch(ie){ut(i,i.return,ie)}}function Ub(r){var i=r.updateQueue;if(i!==null){var o=r.stateNode;try{Rg(i,o)}catch(c){ut(r,r.return,c)}}}function jb(r,i,o){o.props=bi(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(c){ut(r,i,c)}}function Ol(r,i){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof o=="function"?r.refCleanup=o(c):o.current=c}}catch(p){ut(r,i,p)}}function Sr(r,i){var o=r.ref,c=r.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){ut(r,i,p)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){ut(r,i,p)}else o.current=null}function Fb(r){var i=r.type,o=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){ut(r,r.return,p)}}function bh(r,i,o){try{var c=r.stateNode;Gw(c,r.type,o,i),c[xn]=i}catch(p){ut(r,r.return,p)}}function $b(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Ia(r.type)||r.tag===4}function yh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||$b(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Ia(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Eh(r,i,o){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(r),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=jr));else if(c!==4&&(c===27&&Ia(r.type)&&(o=r.stateNode,i=null),r=r.child,r!==null))for(Eh(r,i,o),r=r.sibling;r!==null;)Eh(r,i,o),r=r.sibling}function Fu(r,i,o){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(c!==4&&(c===27&&Ia(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(Fu(r,i,o),r=r.sibling;r!==null;)Fu(r,i,o),r=r.sibling}function qb(r){var i=r.stateNode,o=r.memoizedProps;try{for(var c=r.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);tn(i,c,o),i[Kt]=r,i[xn]=o}catch(g){ut(r,r.return,g)}}var Kr=!1,Dt=!1,xh=!1,Yb=typeof WeakSet=="function"?WeakSet:Set,qt=null;function Sw(r,i){if(r=r.containerInfo,jh=uc,r=rg(r),hf(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{o.nodeType,g.nodeType}catch{o=null;break e}var _=0,w=-1,B=-1,X=0,ie=0,ce=r,K=null;t:for(;;){for(var ee;ce!==o||p!==0&&ce.nodeType!==3||(w=_+p),ce!==g||c!==0&&ce.nodeType!==3||(B=_+c),ce.nodeType===3&&(_+=ce.nodeValue.length),(ee=ce.firstChild)!==null;)K=ce,ce=ee;for(;;){if(ce===r)break t;if(K===o&&++X===p&&(w=_),K===g&&++ie===c&&(B=_),(ee=ce.nextSibling)!==null)break;ce=K,K=ce.parentNode}ce=ee}o=w===-1||B===-1?null:{start:w,end:B}}else o=null}o=o||{start:0,end:0}}else o=null;for(Fh={focusedElem:r,selectionRange:o},uc=!1,qt=i;qt!==null;)if(i=qt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,qt=r;else for(;qt!==null;){switch(i=qt,g=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)p=r[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,o=i,p=g.memoizedProps,g=g.memoizedState,c=o.stateNode;try{var Te=bi(o.type,p);r=c.getSnapshotBeforeUpdate(Te,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(Le){ut(o,o.return,Le)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,o=r.nodeType,o===9)Yh(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Yh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,qt=r;break}qt=i.return}}function Vb(r,i,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Jr(r,o),c&4&&Rl(5,o);break;case 1:if(Jr(r,o),c&4)if(r=o.stateNode,i===null)try{r.componentDidMount()}catch(_){ut(o,o.return,_)}else{var p=bi(o.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(p,i,r.__reactInternalSnapshotBeforeUpdate)}catch(_){ut(o,o.return,_)}}c&64&&Ub(o),c&512&&Ol(o,o.return);break;case 3:if(Jr(r,o),c&64&&(r=o.updateQueue,r!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{Rg(r,i)}catch(_){ut(o,o.return,_)}}break;case 27:i===null&&c&4&&qb(o);case 26:case 5:Jr(r,o),i===null&&c&4&&Fb(o),c&512&&Ol(o,o.return);break;case 12:Jr(r,o);break;case 31:Jr(r,o),c&4&&Qb(r,o);break;case 13:Jr(r,o),c&4&&Xb(r,o),c&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=Dw.bind(null,o),tS(r,o))));break;case 22:if(c=o.memoizedState!==null||Kr,!c){i=i!==null&&i.memoizedState!==null||Dt,p=Kr;var g=Dt;Kr=c,(Dt=i)&&!g?ea(r,o,(o.subtreeFlags&8772)!==0):Jr(r,o),Kr=p,Dt=g}break;case 30:break;default:Jr(r,o)}}function Gb(r){var i=r.alternate;i!==null&&(r.alternate=null,Gb(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Qd(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var _t=null,_n=!1;function Zr(r,i,o){for(o=o.child;o!==null;)Wb(r,i,o),o=o.sibling}function Wb(r,i,o){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(pn,o)}catch{}switch(o.tag){case 26:Dt||Sr(o,i),Zr(r,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Dt||Sr(o,i);var c=_t,p=_n;Ia(o.type)&&(_t=o.stateNode,_n=!1),Zr(r,i,o),Ul(o.stateNode),_t=c,_n=p;break;case 5:Dt||Sr(o,i);case 6:if(c=_t,p=_n,_t=null,Zr(r,i,o),_t=c,_n=p,_t!==null)if(_n)try{(_t.nodeType===9?_t.body:_t.nodeName==="HTML"?_t.ownerDocument.body:_t).removeChild(o.stateNode)}catch(g){ut(o,i,g)}else try{_t.removeChild(o.stateNode)}catch(g){ut(o,i,g)}break;case 18:_t!==null&&(_n?(r=_t,U2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),ks(r)):U2(_t,o.stateNode));break;case 4:c=_t,p=_n,_t=o.stateNode.containerInfo,_n=!0,Zr(r,i,o),_t=c,_n=p;break;case 0:case 11:case 14:case 15:Sa(2,o,i),Dt||Sa(4,o,i),Zr(r,i,o);break;case 1:Dt||(Sr(o,i),c=o.stateNode,typeof c.componentWillUnmount=="function"&&jb(o,i,c)),Zr(r,i,o);break;case 21:Zr(r,i,o);break;case 22:Dt=(c=Dt)||o.memoizedState!==null,Zr(r,i,o),Dt=c;break;default:Zr(r,i,o)}}function Qb(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ks(r)}catch(o){ut(i,i.return,o)}}}function Xb(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ks(r)}catch(o){ut(i,i.return,o)}}function kw(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Yb),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Yb),i;default:throw Error(a(435,r.tag))}}function $u(r,i){var o=kw(r);i.forEach(function(c){if(!o.has(c)){o.add(c);var p=Bw.bind(null,r,c);c.then(p,p)}})}function Tn(r,i){var o=i.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],g=r,_=i,w=_;e:for(;w!==null;){switch(w.tag){case 27:if(Ia(w.type)){_t=w.stateNode,_n=!1;break e}break;case 5:_t=w.stateNode,_n=!1;break e;case 3:case 4:_t=w.stateNode.containerInfo,_n=!0;break e}w=w.return}if(_t===null)throw Error(a(160));Wb(g,_,p),_t=null,_n=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Kb(i,r),i=i.sibling}var gr=null;function Kb(r,i){var o=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Tn(i,r),An(r),c&4&&(Sa(3,r,r.return),Rl(3,r),Sa(5,r,r.return));break;case 1:Tn(i,r),An(r),c&512&&(Dt||o===null||Sr(o,o.return)),c&64&&Kr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=gr;if(Tn(i,r),An(r),c&512&&(Dt||o===null||Sr(o,o.return)),c&4){var g=o!==null?o.memoizedState:null;if(c=r.memoizedState,o===null)if(c===null)if(r.stateNode===null){e:{c=r.type,o=r.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[al]||g[Kt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),tn(g,c,o),g[Kt]=r,$t(g),c=g;break e;case"link":var _=K2("link","href",p).get(c+(o.href||""));if(_){for(var w=0;w<_.length;w++)if(g=_[w],g.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&g.getAttribute("rel")===(o.rel==null?null:o.rel)&&g.getAttribute("title")===(o.title==null?null:o.title)&&g.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){_.splice(w,1);break t}}g=p.createElement(c),tn(g,c,o),p.head.appendChild(g);break;case"meta":if(_=K2("meta","content",p).get(c+(o.content||""))){for(w=0;w<_.length;w++)if(g=_[w],g.getAttribute("content")===(o.content==null?null:""+o.content)&&g.getAttribute("name")===(o.name==null?null:o.name)&&g.getAttribute("property")===(o.property==null?null:o.property)&&g.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&g.getAttribute("charset")===(o.charSet==null?null:o.charSet)){_.splice(w,1);break t}}g=p.createElement(c),tn(g,c,o),p.head.appendChild(g);break;default:throw Error(a(468,c))}g[Kt]=r,$t(g),c=g}r.stateNode=c}else Z2(p,r.type,r.stateNode);else r.stateNode=X2(p,c,r.memoizedProps);else g!==c?(g===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):g.count--,c===null?Z2(p,r.type,r.stateNode):X2(p,c,r.memoizedProps)):c===null&&r.stateNode!==null&&bh(r,r.memoizedProps,o.memoizedProps)}break;case 27:Tn(i,r),An(r),c&512&&(Dt||o===null||Sr(o,o.return)),o!==null&&c&4&&bh(r,r.memoizedProps,o.memoizedProps);break;case 5:if(Tn(i,r),An(r),c&512&&(Dt||o===null||Sr(o,o.return)),r.flags&32){p=r.stateNode;try{Xi(p,"")}catch(Te){ut(r,r.return,Te)}}c&4&&r.stateNode!=null&&(p=r.memoizedProps,bh(r,p,o!==null?o.memoizedProps:p)),c&1024&&(xh=!0);break;case 6:if(Tn(i,r),An(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,o=r.stateNode;try{o.nodeValue=c}catch(Te){ut(r,r.return,Te)}}break;case 3:if(ic=null,p=gr,gr=rc(i.containerInfo),Tn(i,r),gr=p,An(r),c&4&&o!==null&&o.memoizedState.isDehydrated)try{ks(i.containerInfo)}catch(Te){ut(r,r.return,Te)}xh&&(xh=!1,Zb(r));break;case 4:c=gr,gr=rc(r.stateNode.containerInfo),Tn(i,r),An(r),gr=c;break;case 12:Tn(i,r),An(r);break;case 31:Tn(i,r),An(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,$u(r,c)));break;case 13:Tn(i,r),An(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Yu=hn()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,$u(r,c)));break;case 22:p=r.memoizedState!==null;var B=o!==null&&o.memoizedState!==null,X=Kr,ie=Dt;if(Kr=X||p,Dt=ie||B,Tn(i,r),Dt=ie,Kr=X,An(r),c&8192)e:for(i=r.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(o===null||B||Kr||Dt||yi(r)),o=null,i=r;;){if(i.tag===5||i.tag===26){if(o===null){B=o=i;try{if(g=B.stateNode,p)_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{w=B.stateNode;var ce=B.memoizedProps.style,K=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;w.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(Te){ut(B,B.return,Te)}}}else if(i.tag===6){if(o===null){B=i;try{B.stateNode.nodeValue=p?"":B.memoizedProps}catch(Te){ut(B,B.return,Te)}}}else if(i.tag===18){if(o===null){B=i;try{var ee=B.stateNode;p?j2(ee,!0):j2(B.stateNode,!1)}catch(Te){ut(B,B.return,Te)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,$u(r,o))));break;case 19:Tn(i,r),An(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,$u(r,c)));break;case 30:break;case 21:break;default:Tn(i,r),An(r)}}function An(r){var i=r.flags;if(i&2){try{for(var o,c=r.return;c!==null;){if($b(c)){o=c;break}c=c.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var p=o.stateNode,g=yh(r);Fu(r,g,p);break;case 5:var _=o.stateNode;o.flags&32&&(Xi(_,""),o.flags&=-33);var w=yh(r);Fu(r,w,_);break;case 3:case 4:var B=o.stateNode.containerInfo,X=yh(r);Eh(r,X,B);break;default:throw Error(a(161))}}catch(ie){ut(r,r.return,ie)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Zb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Zb(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Jr(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Vb(r,i.alternate,i),i=i.sibling}function yi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Sa(4,i,i.return),yi(i);break;case 1:Sr(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&jb(i,i.return,o),yi(i);break;case 27:Ul(i.stateNode);case 26:case 5:Sr(i,i.return),yi(i);break;case 22:i.memoizedState===null&&yi(i);break;case 30:yi(i);break;default:yi(i)}r=r.sibling}}function ea(r,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,p=r,g=i,_=g.flags;switch(g.tag){case 0:case 11:case 15:ea(p,g,o),Rl(4,g);break;case 1:if(ea(p,g,o),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){ut(c,c.return,X)}if(c=g,p=c.updateQueue,p!==null){var w=c.stateNode;try{var B=p.shared.hiddenCallbacks;if(B!==null)for(p.shared.hiddenCallbacks=null,p=0;p<B.length;p++)Ng(B[p],w)}catch(X){ut(c,c.return,X)}}o&&_&64&&Ub(g),Ol(g,g.return);break;case 27:qb(g);case 26:case 5:ea(p,g,o),o&&c===null&&_&4&&Fb(g),Ol(g,g.return);break;case 12:ea(p,g,o);break;case 31:ea(p,g,o),o&&_&4&&Qb(p,g);break;case 13:ea(p,g,o),o&&_&4&&Xb(p,g);break;case 22:g.memoizedState===null&&ea(p,g,o),Ol(g,g.return);break;case 30:break;default:ea(p,g,o)}i=i.sibling}}function vh(r,i){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&bl(o))}function _h(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&bl(r))}function br(r,i,o,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Jb(r,i,o,c),i=i.sibling}function Jb(r,i,o,c){var p=i.flags;switch(i.tag){case 0:case 11:case 15:br(r,i,o,c),p&2048&&Rl(9,i);break;case 1:br(r,i,o,c);break;case 3:br(r,i,o,c),p&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&bl(r)));break;case 12:if(p&2048){br(r,i,o,c),r=i.stateNode;try{var g=i.memoizedProps,_=g.id,w=g.onPostCommit;typeof w=="function"&&w(_,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(B){ut(i,i.return,B)}}else br(r,i,o,c);break;case 31:br(r,i,o,c);break;case 13:br(r,i,o,c);break;case 23:break;case 22:g=i.stateNode,_=i.alternate,i.memoizedState!==null?g._visibility&2?br(r,i,o,c):Ll(r,i):g._visibility&2?br(r,i,o,c):(g._visibility|=2,gs(r,i,o,c,(i.subtreeFlags&10256)!==0||!1)),p&2048&&vh(_,i);break;case 24:br(r,i,o,c),p&2048&&_h(i.alternate,i);break;default:br(r,i,o,c)}}function gs(r,i,o,c,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var g=r,_=i,w=o,B=c,X=_.flags;switch(_.tag){case 0:case 11:case 15:gs(g,_,w,B,p),Rl(8,_);break;case 23:break;case 22:var ie=_.stateNode;_.memoizedState!==null?ie._visibility&2?gs(g,_,w,B,p):Ll(g,_):(ie._visibility|=2,gs(g,_,w,B,p)),p&&X&2048&&vh(_.alternate,_);break;case 24:gs(g,_,w,B,p),p&&X&2048&&_h(_.alternate,_);break;default:gs(g,_,w,B,p)}i=i.sibling}}function Ll(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=r,c=i,p=c.flags;switch(c.tag){case 22:Ll(o,c),p&2048&&vh(c.alternate,c);break;case 24:Ll(o,c),p&2048&&_h(c.alternate,c);break;default:Ll(o,c)}i=i.sibling}}var Il=8192;function bs(r,i,o){if(r.subtreeFlags&Il)for(r=r.child;r!==null;)e2(r,i,o),r=r.sibling}function e2(r,i,o){switch(r.tag){case 26:bs(r,i,o),r.flags&Il&&r.memoizedState!==null&&hS(o,gr,r.memoizedState,r.memoizedProps);break;case 5:bs(r,i,o);break;case 3:case 4:var c=gr;gr=rc(r.stateNode.containerInfo),bs(r,i,o),gr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Il,Il=16777216,bs(r,i,o),Il=c):bs(r,i,o));break;default:bs(r,i,o)}}function t2(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Ml(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var c=i[o];qt=c,r2(c,r)}t2(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)n2(r),r=r.sibling}function n2(r){switch(r.tag){case 0:case 11:case 15:Ml(r),r.flags&2048&&Sa(9,r,r.return);break;case 3:Ml(r);break;case 12:Ml(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,qu(r)):Ml(r);break;default:Ml(r)}}function qu(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var c=i[o];qt=c,r2(c,r)}t2(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Sa(8,i,i.return),qu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,qu(i));break;default:qu(i)}r=r.sibling}}function r2(r,i){for(;qt!==null;){var o=qt;switch(o.tag){case 0:case 11:case 15:Sa(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:bl(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,qt=c;else e:for(o=r;qt!==null;){c=qt;var p=c.sibling,g=c.return;if(Gb(c),c===o){qt=null;break e}if(p!==null){p.return=g,qt=p;break e}qt=g}}}var Cw={getCacheForType:function(r){var i=Jt(Lt),o=i.data.get(r);return o===void 0&&(o=r(),i.data.set(r,o)),o},cacheSignal:function(){return Jt(Lt).controller.signal}},Nw=typeof WeakMap=="function"?WeakMap:Map,it=0,gt=null,Ve=null,Qe=0,ot=0,jn=null,ka=!1,ys=!1,Th=!1,ta=0,St=0,Ca=0,Ei=0,Ah=0,Fn=0,Es=0,Dl=null,wn=null,wh=!1,Yu=0,a2=0,Vu=1/0,Gu=null,Na=null,Ht=0,Ra=null,xs=null,na=0,Sh=0,kh=null,i2=null,Bl=0,Ch=null;function $n(){return(it&2)!==0&&Qe!==0?Qe&-Qe:M.T!==null?Mh():v1()}function s2(){if(Fn===0)if((Qe&536870912)===0||Ke){var r=tu;tu<<=1,(tu&3932160)===0&&(tu=262144),Fn=r}else Fn=536870912;return r=Hn.current,r!==null&&(r.flags|=32),Fn}function Sn(r,i,o){(r===gt&&(ot===2||ot===9)||r.cancelPendingCommit!==null)&&(vs(r,0),Oa(r,Qe,Fn,!1)),rl(r,o),((it&2)===0||r!==gt)&&(r===gt&&((it&2)===0&&(Ei|=o),St===4&&Oa(r,Qe,Fn,!1)),kr(r))}function l2(r,i,o){if((it&6)!==0)throw Error(a(327));var c=!o&&(i&127)===0&&(i&r.expiredLanes)===0||nl(r,i),p=c?Lw(r,i):Rh(r,i,!0),g=c;do{if(p===0){ys&&!c&&Oa(r,i,0,!1);break}else{if(o=r.current.alternate,g&&!Rw(o)){p=Rh(r,i,!1),g=!1;continue}if(p===2){if(g=i,r.errorRecoveryDisabledLanes&g)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var w=r;p=Dl;var B=w.current.memoizedState.isDehydrated;if(B&&(vs(w,_).flags|=256),_=Rh(w,_,!1),_!==2){if(Th&&!B){w.errorRecoveryDisabledLanes|=g,Ei|=g,p=4;break e}g=wn,wn=p,g!==null&&(wn===null?wn=g:wn.push.apply(wn,g))}p=_}if(g=!1,p!==2)continue}}if(p===1){vs(r,0),Oa(r,i,0,!0);break}e:{switch(c=r,g=p,g){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Oa(c,i,Fn,!ka);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=Yu+300-hn(),10<p)){if(Oa(c,i,Fn,!ka),ru(c,0,!0)!==0)break e;na=i,c.timeoutHandle=P2(o2.bind(null,c,o,wn,Gu,wh,i,Fn,Ei,Es,ka,g,"Throttled",-0,0),p);break e}o2(c,o,wn,Gu,wh,i,Fn,Ei,Es,ka,g,null,-0,0)}}break}while(!0);kr(r)}function o2(r,i,o,c,p,g,_,w,B,X,ie,ce,K,ee){if(r.timeoutHandle=-1,ce=i.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jr},e2(i,g,ce);var Te=(g&62914560)===g?Yu-hn():(g&4194048)===g?a2-hn():0;if(Te=pS(ce,Te),Te!==null){na=g,r.cancelPendingCommit=Te(g2.bind(null,r,i,g,o,c,p,_,w,B,ie,ce,null,K,ee)),Oa(r,g,_,!X);return}}g2(r,i,g,o,c,p,_,w,B)}function Rw(r){for(var i=r;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var c=0;c<o.length;c++){var p=o[c],g=p.getSnapshot;p=p.value;try{if(!zn(g(),p))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Oa(r,i,o,c){i&=~Ah,i&=~Ei,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var p=i;0<p;){var g=31-mt(p),_=1<<g;c[g]=-1,p&=~_}o!==0&&y1(r,o,i)}function Wu(){return(it&6)===0?(zl(0),!1):!0}function Nh(){if(Ve!==null){if(ot===0)var r=Ve.return;else r=Ve,Yr=ci=null,Yf(r),ds=null,El=0,r=Ve;for(;r!==null;)Hb(r.alternate,r),r=r.return;Ve=null}}function vs(r,i){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,Xw(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),na=0,Nh(),gt=r,Ve=o=$r(r.current,null),Qe=i,ot=0,jn=null,ka=!1,ys=nl(r,i),Th=!1,Es=Fn=Ah=Ei=Ca=St=0,wn=Dl=null,wh=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var p=31-mt(c),g=1<<p;i|=r[p],c&=~g}return ta=i,mu(),o}function u2(r,i){Pe=null,M.H=kl,i===cs||i===Tu?(i=wg(),ot=3):i===If?(i=wg(),ot=4):ot=i===lh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,jn=i,Ve===null&&(St=1,zu(r,Jn(i,r.current)))}function c2(){var r=Hn.current;return r===null?!0:(Qe&4194048)===Qe?rr===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?r===rr:!1}function d2(){var r=M.H;return M.H=kl,r===null?kl:r}function f2(){var r=M.A;return M.A=Cw,r}function Qu(){St=4,ka||(Qe&4194048)!==Qe&&Hn.current!==null||(ys=!0),(Ca&134217727)===0&&(Ei&134217727)===0||gt===null||Oa(gt,Qe,Fn,!1)}function Rh(r,i,o){var c=it;it|=2;var p=d2(),g=f2();(gt!==r||Qe!==i)&&(Gu=null,vs(r,i)),i=!1;var _=St;e:do try{if(ot!==0&&Ve!==null){var w=Ve,B=jn;switch(ot){case 8:Nh(),_=6;break e;case 3:case 2:case 9:case 6:Hn.current===null&&(i=!0);var X=ot;if(ot=0,jn=null,_s(r,w,B,X),o&&ys){_=0;break e}break;default:X=ot,ot=0,jn=null,_s(r,w,B,X)}}Ow(),_=St;break}catch(ie){u2(r,ie)}while(!0);return i&&r.shellSuspendCounter++,Yr=ci=null,it=c,M.H=p,M.A=g,Ve===null&&(gt=null,Qe=0,mu()),_}function Ow(){for(;Ve!==null;)h2(Ve)}function Lw(r,i){var o=it;it|=2;var c=d2(),p=f2();gt!==r||Qe!==i?(Gu=null,Vu=hn()+500,vs(r,i)):ys=nl(r,i);e:do try{if(ot!==0&&Ve!==null){i=Ve;var g=jn;t:switch(ot){case 1:ot=0,jn=null,_s(r,i,g,1);break;case 2:case 9:if(Tg(g)){ot=0,jn=null,p2(i);break}i=function(){ot!==2&&ot!==9||gt!==r||(ot=7),kr(r)},g.then(i,i);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:Tg(g)?(ot=0,jn=null,p2(i)):(ot=0,jn=null,_s(r,i,g,7));break;case 5:var _=null;switch(Ve.tag){case 26:_=Ve.memoizedState;case 5:case 27:var w=Ve;if(_?J2(_):w.stateNode.complete){ot=0,jn=null;var B=w.sibling;if(B!==null)Ve=B;else{var X=w.return;X!==null?(Ve=X,Xu(X)):Ve=null}break t}}ot=0,jn=null,_s(r,i,g,5);break;case 6:ot=0,jn=null,_s(r,i,g,6);break;case 8:Nh(),St=6;break e;default:throw Error(a(462))}}Iw();break}catch(ie){u2(r,ie)}while(!0);return Yr=ci=null,M.H=c,M.A=p,it=o,Ve!==null?0:(gt=null,Qe=0,mu(),St)}function Iw(){for(;Ve!==null&&!Fd();)h2(Ve)}function h2(r){var i=zb(r.alternate,r,ta);r.memoizedProps=r.pendingProps,i===null?Xu(r):Ve=i}function p2(r){var i=r,o=i.alternate;switch(i.tag){case 15:case 0:i=Ob(o,i,i.pendingProps,i.type,void 0,Qe);break;case 11:i=Ob(o,i,i.pendingProps,i.type.render,i.ref,Qe);break;case 5:Yf(i);default:Hb(o,i),i=Ve=fg(i,ta),i=zb(o,i,ta)}r.memoizedProps=r.pendingProps,i===null?Xu(r):Ve=i}function _s(r,i,o,c){Yr=ci=null,Yf(i),ds=null,El=0;var p=i.return;try{if(vw(r,p,i,o,Qe)){St=1,zu(r,Jn(o,r.current)),Ve=null;return}}catch(g){if(p!==null)throw Ve=p,g;St=1,zu(r,Jn(o,r.current)),Ve=null;return}i.flags&32768?(Ke||c===1?r=!0:ys||(Qe&536870912)!==0?r=!1:(ka=r=!0,(c===2||c===9||c===3||c===6)&&(c=Hn.current,c!==null&&c.tag===13&&(c.flags|=16384))),m2(i,r)):Xu(i)}function Xu(r){var i=r;do{if((i.flags&32768)!==0){m2(i,ka);return}r=i.return;var o=Aw(i.alternate,i,ta);if(o!==null){Ve=o;return}if(i=i.sibling,i!==null){Ve=i;return}Ve=i=r}while(i!==null);St===0&&(St=5)}function m2(r,i){do{var o=ww(r.alternate,r);if(o!==null){o.flags&=32767,Ve=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(r=r.sibling,r!==null)){Ve=r;return}Ve=r=o}while(r!==null);St=6,Ve=null}function g2(r,i,o,c,p,g,_,w,B){r.cancelPendingCommit=null;do Ku();while(Ht!==0);if((it&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(g=i.lanes|i.childLanes,g|=yf,f6(r,o,g,_,w,B),r===gt&&(Ve=gt=null,Qe=0),xs=i,Ra=r,na=o,Sh=g,kh=p,i2=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,zw(De,function(){return v2(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=M.T,M.T=null,p=ae.p,ae.p=2,_=it,it|=4;try{Sw(r,i,o)}finally{it=_,ae.p=p,M.T=c}}Ht=1,b2(),y2(),E2()}}function b2(){if(Ht===1){Ht=0;var r=Ra,i=xs,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var c=ae.p;ae.p=2;var p=it;it|=4;try{Kb(i,r);var g=Fh,_=rg(r.containerInfo),w=g.focusedElem,B=g.selectionRange;if(_!==w&&w&&w.ownerDocument&&ng(w.ownerDocument.documentElement,w)){if(B!==null&&hf(w)){var X=B.start,ie=B.end;if(ie===void 0&&(ie=X),"selectionStart"in w)w.selectionStart=X,w.selectionEnd=Math.min(ie,w.value.length);else{var ce=w.ownerDocument||document,K=ce&&ce.defaultView||window;if(K.getSelection){var ee=K.getSelection(),Te=w.textContent.length,Le=Math.min(B.start,Te),ht=B.end===void 0?Le:Math.min(B.end,Te);!ee.extend&&Le>ht&&(_=ht,ht=Le,Le=_);var V=tg(w,Le),$=tg(w,ht);if(V&&$&&(ee.rangeCount!==1||ee.anchorNode!==V.node||ee.anchorOffset!==V.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var Q=ce.createRange();Q.setStart(V.node,V.offset),ee.removeAllRanges(),Le>ht?(ee.addRange(Q),ee.extend($.node,$.offset)):(Q.setEnd($.node,$.offset),ee.addRange(Q))}}}}for(ce=[],ee=w;ee=ee.parentNode;)ee.nodeType===1&&ce.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ce.length;w++){var oe=ce[w];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}uc=!!jh,Fh=jh=null}finally{it=p,ae.p=c,M.T=o}}r.current=i,Ht=2}}function y2(){if(Ht===2){Ht=0;var r=Ra,i=xs,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var c=ae.p;ae.p=2;var p=it;it|=4;try{Vb(r,i.alternate,i)}finally{it=p,ae.p=c,M.T=o}}Ht=3}}function E2(){if(Ht===4||Ht===3){Ht=0,$d();var r=Ra,i=xs,o=na,c=i2;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Ht=5:(Ht=0,xs=Ra=null,x2(r,r.pendingLanes));var p=r.pendingLanes;if(p===0&&(Na=null),Gd(o),i=i.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(pn,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=M.T,p=ae.p,ae.p=2,M.T=null;try{for(var g=r.onRecoverableError,_=0;_<c.length;_++){var w=c[_];g(w.value,{componentStack:w.stack})}}finally{M.T=i,ae.p=p}}(na&3)!==0&&Ku(),kr(r),p=r.pendingLanes,(o&261930)!==0&&(p&42)!==0?r===Ch?Bl++:(Bl=0,Ch=r):Bl=0,zl(0)}}function x2(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,bl(i)))}function Ku(){return b2(),y2(),E2(),v2()}function v2(){if(Ht!==5)return!1;var r=Ra,i=Sh;Sh=0;var o=Gd(na),c=M.T,p=ae.p;try{ae.p=32>o?32:o,M.T=null,o=kh,kh=null;var g=Ra,_=na;if(Ht=0,xs=Ra=null,na=0,(it&6)!==0)throw Error(a(331));var w=it;if(it|=4,n2(g.current),Jb(g,g.current,_,o),it=w,zl(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(pn,g)}catch{}return!0}finally{ae.p=p,M.T=c,x2(r,i)}}function _2(r,i,o){i=Jn(o,i),i=sh(r.stateNode,i,2),r=Ta(r,i,2),r!==null&&(rl(r,2),kr(r))}function ut(r,i,o){if(r.tag===3)_2(r,r,o);else for(;i!==null;){if(i.tag===3){_2(i,r,o);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Na===null||!Na.has(c))){r=Jn(o,r),o=Tb(2),c=Ta(i,o,2),c!==null&&(Ab(o,c,i,r),rl(c,2),kr(c));break}}i=i.return}}function Oh(r,i,o){var c=r.pingCache;if(c===null){c=r.pingCache=new Nw;var p=new Set;c.set(i,p)}else p=c.get(i),p===void 0&&(p=new Set,c.set(i,p));p.has(o)||(Th=!0,p.add(o),r=Mw.bind(null,r,i,o),i.then(r,r))}function Mw(r,i,o){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,gt===r&&(Qe&o)===o&&(St===4||St===3&&(Qe&62914560)===Qe&&300>hn()-Yu?(it&2)===0&&vs(r,0):Ah|=o,Es===Qe&&(Es=0)),kr(r)}function T2(r,i){i===0&&(i=b1()),r=li(r,i),r!==null&&(rl(r,i),kr(r))}function Dw(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),T2(r,o)}function Bw(r,i){var o=0;switch(r.tag){case 31:case 13:var c=r.stateNode,p=r.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),T2(r,o)}function zw(r,i){return fn(r,i)}var Zu=null,Ts=null,Lh=!1,Ju=!1,Ih=!1,La=0;function kr(r){r!==Ts&&r.next===null&&(Ts===null?Zu=Ts=r:Ts=Ts.next=r),Ju=!0,Lh||(Lh=!0,Hw())}function zl(r,i){if(!Ih&&Ju){Ih=!0;do for(var o=!1,c=Zu;c!==null;){if(r!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var _=c.suspendedLanes,w=c.pingedLanes;g=(1<<31-mt(42|r)+1)-1,g&=p&~(_&~w),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(o=!0,k2(c,g))}else g=Qe,g=ru(c,c===gt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||nl(c,g)||(o=!0,k2(c,g));c=c.next}while(o);Ih=!1}}function Pw(){A2()}function A2(){Ju=Lh=!1;var r=0;La!==0&&Qw()&&(r=La);for(var i=hn(),o=null,c=Zu;c!==null;){var p=c.next,g=w2(c,i);g===0?(c.next=null,o===null?Zu=p:o.next=p,p===null&&(Ts=o)):(o=c,(r!==0||(g&3)!==0)&&(Ju=!0)),c=p}Ht!==0&&Ht!==5||zl(r),La!==0&&(La=0)}function w2(r,i){for(var o=r.suspendedLanes,c=r.pingedLanes,p=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var _=31-mt(g),w=1<<_,B=p[_];B===-1?((w&o)===0||(w&c)!==0)&&(p[_]=d6(w,i)):B<=i&&(r.expiredLanes|=w),g&=~w}if(i=gt,o=Qe,o=ru(r,r===i?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,o===0||r===i&&(ot===2||ot===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&hr(c),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||nl(r,o)){if(i=o&-o,i===r.callbackPriority)return i;switch(c!==null&&hr(c),Gd(o)){case 2:case 8:o=xe;break;case 32:o=De;break;case 268435456:o=st;break;default:o=De}return c=S2.bind(null,r),o=fn(o,c),r.callbackPriority=i,r.callbackNode=o,i}return c!==null&&c!==null&&hr(c),r.callbackPriority=2,r.callbackNode=null,2}function S2(r,i){if(Ht!==0&&Ht!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(Ku()&&r.callbackNode!==o)return null;var c=Qe;return c=ru(r,r===gt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(l2(r,c,i),w2(r,hn()),r.callbackNode!=null&&r.callbackNode===o?S2.bind(null,r):null)}function k2(r,i){if(Ku())return null;l2(r,i,!0)}function Hw(){Kw(function(){(it&6)!==0?fn(se,Pw):A2()})}function Mh(){if(La===0){var r=os;r===0&&(r=eu,eu<<=1,(eu&261888)===0&&(eu=256)),La=r}return La}function C2(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:lu(""+r)}function N2(r,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,r.id&&o.setAttribute("form",r.id),i.parentNode.insertBefore(o,i),r=new FormData(r),o.parentNode.removeChild(o),r}function Uw(r,i,o,c,p){if(i==="submit"&&o&&o.stateNode===p){var g=C2((p[xn]||null).action),_=c.submitter;_&&(i=(i=_[xn]||null)?C2(i.formAction):_.getAttribute("formAction"),i!==null&&(g=i,_=null));var w=new du("action","action",null,c,p);r.push({event:w,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(La!==0){var B=_?N2(p,_):new FormData(p);eh(o,{pending:!0,data:B,method:p.method,action:g},null,B)}}else typeof g=="function"&&(w.preventDefault(),B=_?N2(p,_):new FormData(p),eh(o,{pending:!0,data:B,method:p.method,action:g},g,B))},currentTarget:p}]})}}for(var Dh=0;Dh<bf.length;Dh++){var Bh=bf[Dh],jw=Bh.toLowerCase(),Fw=Bh[0].toUpperCase()+Bh.slice(1);mr(jw,"on"+Fw)}mr(sg,"onAnimationEnd"),mr(lg,"onAnimationIteration"),mr(og,"onAnimationStart"),mr("dblclick","onDoubleClick"),mr("focusin","onFocus"),mr("focusout","onBlur"),mr(aw,"onTransitionRun"),mr(iw,"onTransitionStart"),mr(sw,"onTransitionCancel"),mr(ug,"onTransitionEnd"),Wi("onMouseEnter",["mouseout","mouseover"]),Wi("onMouseLeave",["mouseout","mouseover"]),Wi("onPointerEnter",["pointerout","pointerover"]),Wi("onPointerLeave",["pointerout","pointerover"]),ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pl="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(" "),$w=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pl));function R2(r,i){i=(i&4)!==0;for(var o=0;o<r.length;o++){var c=r[o],p=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var _=c.length-1;0<=_;_--){var w=c[_],B=w.instance,X=w.currentTarget;if(w=w.listener,B!==g&&p.isPropagationStopped())break e;g=w,p.currentTarget=X;try{g(p)}catch(ie){pu(ie)}p.currentTarget=null,g=B}else for(_=0;_<c.length;_++){if(w=c[_],B=w.instance,X=w.currentTarget,w=w.listener,B!==g&&p.isPropagationStopped())break e;g=w,p.currentTarget=X;try{g(p)}catch(ie){pu(ie)}p.currentTarget=null,g=B}}}}function Ge(r,i){var o=i[Wd];o===void 0&&(o=i[Wd]=new Set);var c=r+"__bubble";o.has(c)||(O2(i,r,2,!1),o.add(c))}function zh(r,i,o){var c=0;i&&(c|=4),O2(o,r,c,i)}var ec="_reactListening"+Math.random().toString(36).slice(2);function Ph(r){if(!r[ec]){r[ec]=!0,A1.forEach(function(o){o!=="selectionchange"&&($w.has(o)||zh(o,!1,r),zh(o,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ec]||(i[ec]=!0,zh("selectionchange",!1,i))}}function O2(r,i,o,c){switch(sy(i)){case 2:var p=bS;break;case 8:p=yS;break;default:p=Jh}o=p.bind(null,i,o,r),p=void 0,!rf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),c?p!==void 0?r.addEventListener(i,o,{capture:!0,passive:p}):r.addEventListener(i,o,!0):p!==void 0?r.addEventListener(i,o,{passive:p}):r.addEventListener(i,o,!1)}function Hh(r,i,o,c,p){var g=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var w=c.stateNode.containerInfo;if(w===p)break;if(_===4)for(_=c.return;_!==null;){var B=_.tag;if((B===3||B===4)&&_.stateNode.containerInfo===p)return;_=_.return}for(;w!==null;){if(_=Yi(w),_===null)return;if(B=_.tag,B===5||B===6||B===26||B===27){c=g=_;continue e}w=w.parentNode}}c=c.return}B1(function(){var X=g,ie=tf(o),ce=[];e:{var K=cg.get(r);if(K!==void 0){var ee=du,Te=r;switch(r){case"keypress":if(uu(o)===0)break e;case"keydown":case"keyup":ee=B6;break;case"focusin":Te="focus",ee=of;break;case"focusout":Te="blur",ee=of;break;case"beforeblur":case"afterblur":ee=of;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=H1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=A6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=H6;break;case sg:case lg:case og:ee=k6;break;case ug:ee=j6;break;case"scroll":case"scrollend":ee=_6;break;case"wheel":ee=$6;break;case"copy":case"cut":case"paste":ee=N6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=j1;break;case"toggle":case"beforetoggle":ee=Y6}var Le=(i&4)!==0,ht=!Le&&(r==="scroll"||r==="scrollend"),V=Le?K!==null?K+"Capture":null:K;Le=[];for(var $=X,Q;$!==null;){var oe=$;if(Q=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Q===null||V===null||(oe=sl($,V),oe!=null&&Le.push(Hl($,oe,Q))),ht)break;$=$.return}0<Le.length&&(K=new ee(K,Te,null,o,ie),ce.push({event:K,listeners:Le}))}}if((i&7)===0){e:{if(K=r==="mouseover"||r==="pointerover",ee=r==="mouseout"||r==="pointerout",K&&o!==ef&&(Te=o.relatedTarget||o.fromElement)&&(Yi(Te)||Te[qi]))break e;if((ee||K)&&(K=ie.window===ie?ie:(K=ie.ownerDocument)?K.defaultView||K.parentWindow:window,ee?(Te=o.relatedTarget||o.toElement,ee=X,Te=Te?Yi(Te):null,Te!==null&&(ht=l(Te),Le=Te.tag,Te!==ht||Le!==5&&Le!==27&&Le!==6)&&(Te=null)):(ee=null,Te=X),ee!==Te)){if(Le=H1,oe="onMouseLeave",V="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(Le=j1,oe="onPointerLeave",V="onPointerEnter",$="pointer"),ht=ee==null?K:il(ee),Q=Te==null?K:il(Te),K=new Le(oe,$+"leave",ee,o,ie),K.target=ht,K.relatedTarget=Q,oe=null,Yi(ie)===X&&(Le=new Le(V,$+"enter",Te,o,ie),Le.target=Q,Le.relatedTarget=ht,oe=Le),ht=oe,ee&&Te)t:{for(Le=qw,V=ee,$=Te,Q=0,oe=V;oe;oe=Le(oe))Q++;oe=0;for(var Ne=$;Ne;Ne=Le(Ne))oe++;for(;0<Q-oe;)V=Le(V),Q--;for(;0<oe-Q;)$=Le($),oe--;for(;Q--;){if(V===$||$!==null&&V===$.alternate){Le=V;break t}V=Le(V),$=Le($)}Le=null}else Le=null;ee!==null&&L2(ce,K,ee,Le,!1),Te!==null&&ht!==null&&L2(ce,ht,Te,Le,!0)}}e:{if(K=X?il(X):window,ee=K.nodeName&&K.nodeName.toLowerCase(),ee==="select"||ee==="input"&&K.type==="file")var nt=Q1;else if(G1(K))if(X1)nt=tw;else{nt=J6;var Se=Z6}else ee=K.nodeName,!ee||ee.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?X&&Jd(X.elementType)&&(nt=Q1):nt=ew;if(nt&&(nt=nt(r,X))){W1(ce,nt,o,ie);break e}Se&&Se(r,K,X),r==="focusout"&&X&&K.type==="number"&&X.memoizedProps.value!=null&&Zd(K,"number",K.value)}switch(Se=X?il(X):window,r){case"focusin":(G1(Se)||Se.contentEditable==="true")&&(es=Se,pf=X,pl=null);break;case"focusout":pl=pf=es=null;break;case"mousedown":mf=!0;break;case"contextmenu":case"mouseup":case"dragend":mf=!1,ag(ce,o,ie);break;case"selectionchange":if(rw)break;case"keydown":case"keyup":ag(ce,o,ie)}var He;if(cf)e:{switch(r){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Ji?Y1(r,o)&&(Xe="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Xe="onCompositionStart");Xe&&(F1&&o.locale!=="ko"&&(Ji||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Ji&&(He=z1()):(ga=ie,af="value"in ga?ga.value:ga.textContent,Ji=!0)),Se=tc(X,Xe),0<Se.length&&(Xe=new U1(Xe,r,null,o,ie),ce.push({event:Xe,listeners:Se}),He?Xe.data=He:(He=V1(o),He!==null&&(Xe.data=He)))),(He=G6?W6(r,o):Q6(r,o))&&(Xe=tc(X,"onBeforeInput"),0<Xe.length&&(Se=new U1("onBeforeInput","beforeinput",null,o,ie),ce.push({event:Se,listeners:Xe}),Se.data=He)),Uw(ce,r,X,o,ie)}R2(ce,i)})}function Hl(r,i,o){return{instance:r,listener:i,currentTarget:o}}function tc(r,i){for(var o=i+"Capture",c=[];r!==null;){var p=r,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=sl(r,o),p!=null&&c.unshift(Hl(r,p,g)),p=sl(r,i),p!=null&&c.push(Hl(r,p,g))),r.tag===3)return c;r=r.return}return[]}function qw(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function L2(r,i,o,c,p){for(var g=i._reactName,_=[];o!==null&&o!==c;){var w=o,B=w.alternate,X=w.stateNode;if(w=w.tag,B!==null&&B===c)break;w!==5&&w!==26&&w!==27||X===null||(B=X,p?(X=sl(o,g),X!=null&&_.unshift(Hl(o,X,B))):p||(X=sl(o,g),X!=null&&_.push(Hl(o,X,B)))),o=o.return}_.length!==0&&r.push({event:i,listeners:_})}var Yw=/\r\n?/g,Vw=/\u0000|\uFFFD/g;function I2(r){return(typeof r=="string"?r:""+r).replace(Yw,`
14
+ `).replace(Vw,"")}function M2(r,i){return i=I2(i),I2(r)===i}function ft(r,i,o,c,p,g){switch(o){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Xi(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Xi(r,""+c);break;case"className":iu(r,"class",c);break;case"tabIndex":iu(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":iu(r,o,c);break;case"style":M1(r,c,g);break;case"data":if(i!=="object"){iu(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||o!=="href")){r.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(o);break}c=lu(""+c),r.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(o,"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 g=="function"&&(o==="formAction"?(i!=="input"&&ft(r,i,"name",p.name,p,null),ft(r,i,"formEncType",p.formEncType,p,null),ft(r,i,"formMethod",p.formMethod,p,null),ft(r,i,"formTarget",p.formTarget,p,null)):(ft(r,i,"encType",p.encType,p,null),ft(r,i,"method",p.method,p,null),ft(r,i,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(o);break}c=lu(""+c),r.setAttribute(o,c);break;case"onClick":c!=null&&(r.onclick=jr);break;case"onScroll":c!=null&&Ge("scroll",r);break;case"onScrollEnd":c!=null&&Ge("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}o=lu(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(o,""+c):r.removeAttribute(o);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":c===!0?r.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(o,c):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(o,c):r.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(o):r.setAttribute(o,c);break;case"popover":Ge("beforetoggle",r),Ge("toggle",r),au(r,"popover",c);break;case"xlinkActuate":Ur(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Ur(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Ur(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Ur(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Ur(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Ur(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Ur(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":au(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=x6.get(o)||o,au(r,o,c))}}function Uh(r,i,o,c,p,g){switch(o){case"style":M1(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof c=="string"?Xi(r,c):(typeof c=="number"||typeof c=="bigint")&&Xi(r,""+c);break;case"onScroll":c!=null&&Ge("scroll",r);break;case"onScrollEnd":c!=null&&Ge("scrollend",r);break;case"onClick":c!=null&&(r.onclick=jr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!w1.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),i=o.slice(2,p?o.length-7:void 0),g=r[xn]||null,g=g!=null?g[o]:null,typeof g=="function"&&r.removeEventListener(i,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(i,c,p);break e}o in r?r[o]=c:c===!0?r.setAttribute(o,""):au(r,o,c)}}}function tn(r,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",r),Ge("load",r);var c=!1,p=!1,g;for(g in o)if(o.hasOwnProperty(g)){var _=o[g];if(_!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:ft(r,i,g,_,o,null)}}p&&ft(r,i,"srcSet",o.srcSet,o,null),c&&ft(r,i,"src",o.src,o,null);return;case"input":Ge("invalid",r);var w=g=_=p=null,B=null,X=null;for(c in o)if(o.hasOwnProperty(c)){var ie=o[c];if(ie!=null)switch(c){case"name":p=ie;break;case"type":_=ie;break;case"checked":B=ie;break;case"defaultChecked":X=ie;break;case"value":g=ie;break;case"defaultValue":w=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,i));break;default:ft(r,i,c,ie,o,null)}}R1(r,g,w,B,X,_,p,!1);return;case"select":Ge("invalid",r),c=_=g=null;for(p in o)if(o.hasOwnProperty(p)&&(w=o[p],w!=null))switch(p){case"value":g=w;break;case"defaultValue":_=w;break;case"multiple":c=w;default:ft(r,i,p,w,o,null)}i=g,o=_,r.multiple=!!c,i!=null?Qi(r,!!c,i,!1):o!=null&&Qi(r,!!c,o,!0);return;case"textarea":Ge("invalid",r),g=p=c=null;for(_ in o)if(o.hasOwnProperty(_)&&(w=o[_],w!=null))switch(_){case"value":c=w;break;case"defaultValue":p=w;break;case"children":g=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(a(91));break;default:ft(r,i,_,w,o,null)}L1(r,c,p,g);return;case"option":for(B in o)o.hasOwnProperty(B)&&(c=o[B],c!=null)&&(B==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":ft(r,i,B,c,o,null));return;case"dialog":Ge("beforetoggle",r),Ge("toggle",r),Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":Ge("load",r);break;case"video":case"audio":for(c=0;c<Pl.length;c++)Ge(Pl[c],r);break;case"image":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"embed":case"source":case"link":Ge("error",r),Ge("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in o)if(o.hasOwnProperty(X)&&(c=o[X],c!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:ft(r,i,X,c,o,null)}return;default:if(Jd(i)){for(ie in o)o.hasOwnProperty(ie)&&(c=o[ie],c!==void 0&&Uh(r,i,ie,c,o,void 0));return}}for(w in o)o.hasOwnProperty(w)&&(c=o[w],c!=null&&ft(r,i,w,c,o,null))}function Gw(r,i,o,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,_=null,w=null,B=null,X=null,ie=null;for(ee in o){var ce=o[ee];if(o.hasOwnProperty(ee)&&ce!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":B=ce;default:c.hasOwnProperty(ee)||ft(r,i,ee,null,c,ce)}}for(var K in c){var ee=c[K];if(ce=o[K],c.hasOwnProperty(K)&&(ee!=null||ce!=null))switch(K){case"type":g=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":_=ee;break;case"defaultValue":w=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:ee!==ce&&ft(r,i,K,ee,c,ce)}}Kd(r,_,w,B,X,ie,g,p);return;case"select":ee=_=w=K=null;for(g in o)if(B=o[g],o.hasOwnProperty(g)&&B!=null)switch(g){case"value":break;case"multiple":ee=B;default:c.hasOwnProperty(g)||ft(r,i,g,null,c,B)}for(p in c)if(g=c[p],B=o[p],c.hasOwnProperty(p)&&(g!=null||B!=null))switch(p){case"value":K=g;break;case"defaultValue":w=g;break;case"multiple":_=g;default:g!==B&&ft(r,i,p,g,c,B)}i=w,o=_,c=ee,K!=null?Qi(r,!!o,K,!1):!!c!=!!o&&(i!=null?Qi(r,!!o,i,!0):Qi(r,!!o,o?[]:"",!1));return;case"textarea":ee=K=null;for(w in o)if(p=o[w],o.hasOwnProperty(w)&&p!=null&&!c.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ft(r,i,w,null,c,p)}for(_ in c)if(p=c[_],g=o[_],c.hasOwnProperty(_)&&(p!=null||g!=null))switch(_){case"value":K=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==g&&ft(r,i,_,p,c,g)}O1(r,K,ee);return;case"option":for(var Te in o)K=o[Te],o.hasOwnProperty(Te)&&K!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?r.selected=!1:ft(r,i,Te,null,c,K));for(B in c)K=c[B],ee=o[B],c.hasOwnProperty(B)&&K!==ee&&(K!=null||ee!=null)&&(B==="selected"?r.selected=K&&typeof K!="function"&&typeof K!="symbol":ft(r,i,B,K,c,ee));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 Le in o)K=o[Le],o.hasOwnProperty(Le)&&K!=null&&!c.hasOwnProperty(Le)&&ft(r,i,Le,null,c,K);for(X in c)if(K=c[X],ee=o[X],c.hasOwnProperty(X)&&K!==ee&&(K!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,i));break;default:ft(r,i,X,K,c,ee)}return;default:if(Jd(i)){for(var ht in o)K=o[ht],o.hasOwnProperty(ht)&&K!==void 0&&!c.hasOwnProperty(ht)&&Uh(r,i,ht,void 0,c,K);for(ie in c)K=c[ie],ee=o[ie],!c.hasOwnProperty(ie)||K===ee||K===void 0&&ee===void 0||Uh(r,i,ie,K,c,ee);return}}for(var V in o)K=o[V],o.hasOwnProperty(V)&&K!=null&&!c.hasOwnProperty(V)&&ft(r,i,V,null,c,K);for(ce in c)K=c[ce],ee=o[ce],!c.hasOwnProperty(ce)||K===ee||K==null&&ee==null||ft(r,i,ce,K,c,ee)}function D2(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ww(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],g=p.transferSize,_=p.initiatorType,w=p.duration;if(g&&w&&D2(_)){for(_=0,w=p.responseEnd,c+=1;c<o.length;c++){var B=o[c],X=B.startTime;if(X>w)break;var ie=B.transferSize,ce=B.initiatorType;ie&&D2(ce)&&(B=B.responseEnd,_+=ie*(B<w?1:(w-X)/(B-X)))}if(--c,i+=8*(g+_)/(p.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var jh=null,Fh=null;function nc(r){return r.nodeType===9?r:r.ownerDocument}function B2(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function z2(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function $h(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var qh=null;function Qw(){var r=window.event;return r&&r.type==="popstate"?r===qh?!1:(qh=r,!0):(qh=null,!1)}var P2=typeof setTimeout=="function"?setTimeout:void 0,Xw=typeof clearTimeout=="function"?clearTimeout:void 0,H2=typeof Promise=="function"?Promise:void 0,Kw=typeof queueMicrotask=="function"?queueMicrotask:typeof H2<"u"?function(r){return H2.resolve(null).then(r).catch(Zw)}:P2;function Zw(r){setTimeout(function(){throw r})}function Ia(r){return r==="head"}function U2(r,i){var o=i,c=0;do{var p=o.nextSibling;if(r.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){r.removeChild(p),ks(i);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")Ul(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,Ul(o);for(var g=o.firstChild;g;){var _=g.nextSibling,w=g.nodeName;g[al]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&g.rel.toLowerCase()==="stylesheet"||o.removeChild(g),g=_}}else o==="body"&&Ul(r.ownerDocument.body);o=p}while(o);ks(i)}function j2(r,i){var o=r;r=0;do{var c=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=c}while(o)}function Yh(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Yh(o),Qd(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function Jw(r,i,o,c){for(;r.nodeType===1;){var p=o;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[al])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==p.rel||r.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||r.getAttribute("title")!==(p.title==null?null:p.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(p.src==null?null:p.src)||r.getAttribute("type")!==(p.type==null?null:p.type)||r.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=ar(r.nextSibling),r===null)break}return null}function eS(r,i,o){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=ar(r.nextSibling),r===null))return null;return r}function F2(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=ar(r.nextSibling),r===null))return null;return r}function Vh(r){return r.data==="$?"||r.data==="$~"}function Gh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function tS(r,i){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||o.readyState!=="loading")i();else{var c=function(){i(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function ar(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var Wh=null;function $2(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(i===0)return ar(r.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}r=r.nextSibling}return null}function q2(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return r;i--}else o!=="/$"&&o!=="/&"||i++}r=r.previousSibling}return null}function Y2(r,i,o){switch(i=nc(o),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ul(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Qd(r)}var ir=new Map,V2=new Set;function rc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ra=ae.d;ae.d={f:nS,r:rS,D:aS,C:iS,L:sS,m:lS,X:uS,S:oS,M:cS};function nS(){var r=ra.f(),i=Wu();return r||i}function rS(r){var i=Vi(r);i!==null&&i.tag===5&&i.type==="form"?ub(i):ra.r(r)}var As=typeof document>"u"?null:document;function G2(r,i,o){var c=As;if(c&&typeof i=="string"&&i){var p=Kn(i);p='link[rel="'+r+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),V2.has(p)||(V2.add(p),r={rel:r,crossOrigin:o,href:i},c.querySelector(p)===null&&(i=c.createElement("link"),tn(i,"link",r),$t(i),c.head.appendChild(i)))}}function aS(r){ra.D(r),G2("dns-prefetch",r,null)}function iS(r,i){ra.C(r,i),G2("preconnect",r,i)}function sS(r,i,o){ra.L(r,i,o);var c=As;if(c&&r&&i){var p='link[rel="preload"][as="'+Kn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Kn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Kn(o.imageSizes)+'"]')):p+='[href="'+Kn(r)+'"]';var g=p;switch(i){case"style":g=ws(r);break;case"script":g=Ss(r)}ir.has(g)||(r=b({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:r,as:i},o),ir.set(g,r),c.querySelector(p)!==null||i==="style"&&c.querySelector(jl(g))||i==="script"&&c.querySelector(Fl(g))||(i=c.createElement("link"),tn(i,"link",r),$t(i),c.head.appendChild(i)))}}function lS(r,i){ra.m(r,i);var o=As;if(o&&r){var c=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+Kn(c)+'"][href="'+Kn(r)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ss(r)}if(!ir.has(g)&&(r=b({rel:"modulepreload",href:r},i),ir.set(g,r),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Fl(g)))return}c=o.createElement("link"),tn(c,"link",r),$t(c),o.head.appendChild(c)}}}function oS(r,i,o){ra.S(r,i,o);var c=As;if(c&&r){var p=Gi(c).hoistableStyles,g=ws(r);i=i||"default";var _=p.get(g);if(!_){var w={loading:0,preload:null};if(_=c.querySelector(jl(g)))w.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":i},o),(o=ir.get(g))&&Qh(r,o);var B=_=c.createElement("link");$t(B),tn(B,"link",r),B._p=new Promise(function(X,ie){B.onload=X,B.onerror=ie}),B.addEventListener("load",function(){w.loading|=1}),B.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ac(_,i,c)}_={type:"stylesheet",instance:_,count:1,state:w},p.set(g,_)}}}function uS(r,i){ra.X(r,i);var o=As;if(o&&r){var c=Gi(o).hoistableScripts,p=Ss(r),g=c.get(p);g||(g=o.querySelector(Fl(p)),g||(r=b({src:r,async:!0},i),(i=ir.get(p))&&Xh(r,i),g=o.createElement("script"),$t(g),tn(g,"link",r),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function cS(r,i){ra.M(r,i);var o=As;if(o&&r){var c=Gi(o).hoistableScripts,p=Ss(r),g=c.get(p);g||(g=o.querySelector(Fl(p)),g||(r=b({src:r,async:!0,type:"module"},i),(i=ir.get(p))&&Xh(r,i),g=o.createElement("script"),$t(g),tn(g,"link",r),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function W2(r,i,o,c){var p=(p=ye.current)?rc(p):null;if(!p)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=ws(o.href),o=Gi(p).hoistableStyles,c=o.get(i),c||(c={type:"style",instance:null,count:0,state:null},o.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=ws(o.href);var g=Gi(p).hoistableStyles,_=g.get(r);if(_||(p=p.ownerDocument||p,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,_),(g=p.querySelector(jl(r)))&&!g._p&&(_.instance=g,_.state.loading=5),ir.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ir.set(r,o),g||dS(p,r,o,_.state))),i&&c===null)throw Error(a(528,""));return _}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ss(o),o=Gi(p).hoistableScripts,c=o.get(i),c||(c={type:"script",instance:null,count:0,state:null},o.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function ws(r){return'href="'+Kn(r)+'"'}function jl(r){return'link[rel="stylesheet"]['+r+"]"}function Q2(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function dS(r,i,o,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),tn(i,"link",o),$t(i),r.head.appendChild(i))}function Ss(r){return'[src="'+Kn(r)+'"]'}function Fl(r){return"script[async]"+r}function X2(r,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Kn(o.href)+'"]');if(c)return i.instance=c,$t(c),c;var p=b({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),$t(c),tn(c,"style",p),ac(c,o.precedence,r),i.instance=c;case"stylesheet":p=ws(o.href);var g=r.querySelector(jl(p));if(g)return i.state.loading|=4,i.instance=g,$t(g),g;c=Q2(o),(p=ir.get(p))&&Qh(c,p),g=(r.ownerDocument||r).createElement("link"),$t(g);var _=g;return _._p=new Promise(function(w,B){_.onload=w,_.onerror=B}),tn(g,"link",c),i.state.loading|=4,ac(g,o.precedence,r),i.instance=g;case"script":return g=Ss(o.src),(p=r.querySelector(Fl(g)))?(i.instance=p,$t(p),p):(c=o,(p=ir.get(g))&&(c=b({},o),Xh(c,p)),r=r.ownerDocument||r,p=r.createElement("script"),$t(p),tn(p,"link",c),r.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,ac(c,o.precedence,r));return i.instance}function ac(r,i,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,_=0;_<c.length;_++){var w=c[_];if(w.dataset.precedence===i)g=w;else if(g!==p)break}g?g.parentNode.insertBefore(r,g.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(r,i.firstChild))}function Qh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Xh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var ic=null;function K2(r,i,o){if(ic===null){var c=new Map,p=ic=new Map;p.set(o,c)}else p=ic,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(r))return c;for(c.set(r,null),o=o.getElementsByTagName(r),p=0;p<o.length;p++){var g=o[p];if(!(g[al]||g[Kt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var _=g.getAttribute(i)||"";_=r+_;var w=c.get(_);w?w.push(g):c.set(_,[g])}}return c}function Z2(r,i,o){r=r.ownerDocument||r,r.head.insertBefore(o,i==="title"?r.querySelector("head > title"):null)}function fS(r,i,o){if(o===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function J2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function hS(r,i,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=ws(c.href),g=i.querySelector(jl(p));if(g){i=g._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=sc.bind(r),i.then(r,r)),o.state.loading|=4,o.instance=g,$t(g);return}g=i.ownerDocument||i,c=Q2(c),(p=ir.get(p))&&Qh(c,p),g=g.createElement("link"),$t(g);var _=g;_._p=new Promise(function(w,B){_.onload=w,_.onerror=B}),tn(g,"link",c),o.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=sc.bind(r),i.addEventListener("load",o),i.addEventListener("error",o))}}var Kh=0;function pS(r,i){return r.stylesheets&&r.count===0&&oc(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var c=setTimeout(function(){if(r.stylesheets&&oc(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+i);0<r.imgBytes&&Kh===0&&(Kh=62500*Ww());var p=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&oc(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>Kh?50:800)+i);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)oc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var lc=null;function oc(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,lc=new Map,i.forEach(mS,r),lc=null,sc.call(r))}function mS(r,i){if(!(i.state.loading&4)){var o=lc.get(r);if(o)var c=o.get(null);else{o=new Map,lc.set(r,o);for(var p=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var _=p[g];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(o.set(_.dataset.precedence,_),c=_)}c&&o.set(null,c)}p=i.instance,_=p.getAttribute("data-precedence"),g=o.get(_)||c,g===c&&o.set(null,p),o.set(_,p),this.count++,c=sc.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(p,r.firstChild)),i.state.loading|=4}}var $l={$$typeof:P,Provider:null,Consumer:null,_currentValue:Ee,_currentValue2:Ee,_threadCount:0};function gS(r,i,o,c,p,g,_,w,B){this.tag=1,this.containerInfo=r,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=Yd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.hiddenUpdates=Yd(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function ey(r,i,o,c,p,g,_,w,B,X,ie,ce){return r=new gS(r,i,o,_,B,X,ie,ce,w),i=1,g===!0&&(i|=24),g=Pn(3,null,null,i),r.current=g,g.stateNode=r,i=Rf(),i.refCount++,r.pooledCache=i,i.refCount++,g.memoizedState={element:c,isDehydrated:o,cache:i},Mf(g),r}function ty(r){return r?(r=rs,r):rs}function ny(r,i,o,c,p,g){p=ty(p),c.context===null?c.context=p:c.pendingContext=p,c=_a(i),c.payload={element:o},g=g===void 0?null:g,g!==null&&(c.callback=g),o=Ta(r,c,i),o!==null&&(Sn(o,r,i),vl(o,r,i))}function ry(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function Zh(r,i){ry(r,i),(r=r.alternate)&&ry(r,i)}function ay(r){if(r.tag===13||r.tag===31){var i=li(r,67108864);i!==null&&Sn(i,r,67108864),Zh(r,67108864)}}function iy(r){if(r.tag===13||r.tag===31){var i=$n();i=Vd(i);var o=li(r,i);o!==null&&Sn(o,r,i),Zh(r,i)}}var uc=!0;function bS(r,i,o,c){var p=M.T;M.T=null;var g=ae.p;try{ae.p=2,Jh(r,i,o,c)}finally{ae.p=g,M.T=p}}function yS(r,i,o,c){var p=M.T;M.T=null;var g=ae.p;try{ae.p=8,Jh(r,i,o,c)}finally{ae.p=g,M.T=p}}function Jh(r,i,o,c){if(uc){var p=e0(c);if(p===null)Hh(r,i,c,cc,o),ly(r,c);else if(xS(p,r,i,o,c))c.stopPropagation();else if(ly(r,c),i&4&&-1<ES.indexOf(r)){for(;p!==null;){var g=Vi(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var _=ni(g.pendingLanes);if(_!==0){var w=g;for(w.pendingLanes|=2,w.entangledLanes|=2;_;){var B=1<<31-mt(_);w.entanglements[1]|=B,_&=~B}kr(g),(it&6)===0&&(Vu=hn()+500,zl(0))}}break;case 31:case 13:w=li(g,2),w!==null&&Sn(w,g,2),Wu(),Zh(g,2)}if(g=e0(c),g===null&&Hh(r,i,c,cc,o),g===p)break;p=g}p!==null&&c.stopPropagation()}else Hh(r,i,c,null,o)}}function e0(r){return r=tf(r),t0(r)}var cc=null;function t0(r){if(cc=null,r=Yi(r),r!==null){var i=l(r);if(i===null)r=null;else{var o=i.tag;if(o===13){if(r=u(i),r!==null)return r;r=null}else if(o===31){if(r=d(i),r!==null)return r;r=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return cc=r,null}function sy(r){switch(r){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(qd()){case se:return 2;case xe:return 8;case De:case Ye:return 32;case st:return 268435456;default:return 32}default:return 32}}var n0=!1,Ma=null,Da=null,Ba=null,ql=new Map,Yl=new Map,za=[],ES="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 ly(r,i){switch(r){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":Da=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":ql.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yl.delete(i.pointerId)}}function Vl(r,i,o,c,p,g){return r===null||r.nativeEvent!==g?(r={blockedOn:i,domEventName:o,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},i!==null&&(i=Vi(i),i!==null&&ay(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),r)}function xS(r,i,o,c,p){switch(i){case"focusin":return Ma=Vl(Ma,r,i,o,c,p),!0;case"dragenter":return Da=Vl(Da,r,i,o,c,p),!0;case"mouseover":return Ba=Vl(Ba,r,i,o,c,p),!0;case"pointerover":var g=p.pointerId;return ql.set(g,Vl(ql.get(g)||null,r,i,o,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Yl.set(g,Vl(Yl.get(g)||null,r,i,o,c,p)),!0}return!1}function oy(r){var i=Yi(r.target);if(i!==null){var o=l(i);if(o!==null){if(i=o.tag,i===13){if(i=u(o),i!==null){r.blockedOn=i,_1(r.priority,function(){iy(o)});return}}else if(i===31){if(i=d(o),i!==null){r.blockedOn=i,_1(r.priority,function(){iy(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function dc(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var o=e0(r.nativeEvent);if(o===null){o=r.nativeEvent;var c=new o.constructor(o.type,o);ef=c,o.target.dispatchEvent(c),ef=null}else return i=Vi(o),i!==null&&ay(i),r.blockedOn=o,!1;i.shift()}return!0}function uy(r,i,o){dc(r)&&o.delete(i)}function vS(){n0=!1,Ma!==null&&dc(Ma)&&(Ma=null),Da!==null&&dc(Da)&&(Da=null),Ba!==null&&dc(Ba)&&(Ba=null),ql.forEach(uy),Yl.forEach(uy)}function fc(r,i){r.blockedOn===i&&(r.blockedOn=null,n0||(n0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vS)))}var hc=null;function cy(r){hc!==r&&(hc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hc===r&&(hc=null);for(var i=0;i<r.length;i+=3){var o=r[i],c=r[i+1],p=r[i+2];if(typeof c!="function"){if(t0(c||o)===null)continue;break}var g=Vi(o);g!==null&&(r.splice(i,3),i-=3,eh(g,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function ks(r){function i(B){return fc(B,r)}Ma!==null&&fc(Ma,r),Da!==null&&fc(Da,r),Ba!==null&&fc(Ba,r),ql.forEach(i),Yl.forEach(i);for(var o=0;o<za.length;o++){var c=za[o];c.blockedOn===r&&(c.blockedOn=null)}for(;0<za.length&&(o=za[0],o.blockedOn===null);)oy(o),o.blockedOn===null&&za.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],g=o[c+1],_=p[xn]||null;if(typeof g=="function")_||cy(o);else if(_){var w=null;if(g&&g.hasAttribute("formAction")){if(p=g,_=g[xn]||null)w=_.formAction;else if(t0(p)!==null)continue}else w=_.action;typeof w=="function"?o[c+1]=w:(o.splice(c,3),c-=3),cy(o)}}}function dy(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(_){return p=_})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),c||setTimeout(o,20)}function o(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function r0(r){this._internalRoot=r}pc.prototype.render=r0.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,c=$n();ny(o,c,r,i,null,null)},pc.prototype.unmount=r0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;ny(r.current,2,null,r,null,null),Wu(),i[qi]=null}};function pc(r){this._internalRoot=r}pc.prototype.unstable_scheduleHydration=function(r){if(r){var i=v1();r={blockedOn:null,target:r,priority:i};for(var o=0;o<za.length&&i!==0&&i<za[o].priority;o++);za.splice(o,0,r),o===0&&oy(r)}};var fy=t.version;if(fy!=="19.2.4")throw Error(a(527,fy,"19.2.4"));ae.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?m(r):null,r=r===null?null:r.stateNode,r};var _S={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mc.isDisabled&&mc.supportsFiber)try{pn=mc.inject(_S),Pt=mc}catch{}}return Ql.createRoot=function(r,i){if(!s(r))throw Error(a(299));var o=!1,c="",p=Eb,g=xb,_=vb;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=ey(r,1,!1,null,null,o,c,null,p,g,_,dy),r[qi]=i.current,Ph(r),new r0(i)},Ql.hydrateRoot=function(r,i,o){if(!s(r))throw Error(a(299));var c=!1,p="",g=Eb,_=xb,w=vb,B=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(_=o.onCaughtError),o.onRecoverableError!==void 0&&(w=o.onRecoverableError),o.formState!==void 0&&(B=o.formState)),i=ey(r,1,!0,i,o??null,c,p,B,g,_,w,dy),i.context=ty(null),o=i.current,c=$n(),c=Vd(c),p=_a(c),p.callback=null,Ta(o,p,c),o=c,i.current.lanes=o,rl(i,o),kr(i),r[qi]=i.current,Ph(r),new pc(i)},Ql.version="19.2.4",Ql}var Hy;function hC(){if(Hy)return d0.exports;Hy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),d0.exports=fC(),d0.exports}var xp=hC();function bm(e,t,n){const a=e.slice(t);return!a||a==="/"||a==="\\"?n:a.startsWith("/")||a.startsWith("\\")?`${n}${a}`:`${n}/${a}`}function pC(e){const t=e.match(/^(.*[\\/])home[\\/][^\\/]+(?=([\\/]|$))/i);return!t||typeof t[0]!="string"?null:bm(e,t[0].length,"<dt-home>")}function mC(e){const t=e.match(/^(.*[\\/])(?=(home|miniapps|ai-sessions)([\\/]|$))/i);return!t||typeof t[1]!="string"?null:bm(e,t[1].length,"<dt-data>")}function gC(e){const t=e.match(/^((?:[A-Za-z]:)?[\\/](?:Users|home)[\\/][^\\/]+)(?=([\\/]|$))/);return!t||typeof t[1]!="string"?null:bm(e,t[1].length,"~")}function bC(e){return pC(e)??mC(e)??gC(e)??e}const e_=C.createContext(null),ym=C.createContext(null);function TG({windowId:e,children:t}){return x.jsx(ym.Provider,{value:e,children:t})}function yC(){const e=C.useContext(ym);if(!e)throw new Error("useWindowId must be used inside a <WindowIdProvider>");return e}function bc(e,t){window.dispatchEvent(new CustomEvent("desktalk:actions-changed",{detail:{windowId:e,actions:t}}))}function AG({children:e}){const t=C.useRef(new Map),n=C.useContext(ym),a=C.useMemo(()=>({register(s){t.current.set(s.name,s),n&&bc(n,Array.from(t.current.values()))},unregister(s){t.current.delete(s),n&&bc(n,Array.from(t.current.values()))}}),[n]);return C.useEffect(()=>{if(n)return bc(n,Array.from(t.current.values())),()=>{bc(n,[])}},[n]),x.jsx(e_.Provider,{value:a,children:e})}function wG({name:e,description:t,params:n,handler:a}){const s=C.useContext(e_);return C.useEffect(()=>{if(s)return s.register({name:e,description:t,params:n,handler:a}),()=>{s.unregister(e)}},[s,e,t,n,a]),null}const t_=C.createContext(null);function SG({miniAppId:e,children:t}){return Va.createElement(t_.Provider,{value:e},t)}function EC(){const e=C.useContext(t_);if(!e)throw new Error("useMiniAppId must be used inside a <MiniAppIdProvider>");return e}let Pc=null;const vp=new Map,Ti=new Map,Ai=new Map,xC=5e3,vC=200;let _C=0;function TC(){return`req-${++_C}-${Date.now()}`}function AC(e){Pc=e,e.addEventListener("message",t=>{try{const n=JSON.parse(t.data);if(n.type==="command:response"){const a=vp.get(n.requestId);a&&(vp.delete(n.requestId),n.error?a.reject(new Error(n.error)):a.resolve(n.data))}else if(n.type==="event"){typeof window<"u"&&window.dispatchEvent(new CustomEvent("desktalk:event",{detail:{miniAppId:typeof n.miniAppId=="string"?n.miniAppId:null,event:typeof n.event=="string"?n.event:null,data:n.data}}));const a=Ti.get(n.event);if(a&&a.size>0)for(const s of a)s(n.data);else{Ai.has(n.event)||Ai.set(n.event,[]);const s=Ai.get(n.event),l=setTimeout(()=>{const u=Ai.get(n.event);if(u){const d=u.findIndex(f=>f.timer===l);d!==-1&&u.splice(d,1),u.length===0&&Ai.delete(n.event)}},xC);for(s.push({data:n.data,timer:l});s.length>vC;){const u=s.shift();clearTimeout(u.timer)}}}}catch{}})}function kG(e){const t=EC();return C.useCallback(n=>new Promise((a,s)=>{if(!Pc||Pc.readyState!==WebSocket.OPEN){s(new Error("WebSocket not connected"));return}const l=TC();vp.set(l,{resolve:a,reject:s}),Pc.send(JSON.stringify({type:"command:invoke",miniAppId:t,command:e,requestId:l,data:n??null}))}),[t,e])}function CG(e,t){const n=C.useRef(t);n.current=t,C.useEffect(()=>{const a=l=>{n.current(l)};Ti.has(e)||Ti.set(e,new Set),Ti.get(e).add(a);const s=Ai.get(e);if(s&&s.length>0){const l=[...s];for(const u of l)clearTimeout(u.timer);Ai.delete(e);for(const u of l)a(u.data)}return()=>{Ti.get(e)?.delete(a),Ti.get(e)?.size===0&&Ti.delete(e)}},[e])}function NG(){return C.useCallback((e,t)=>{window.dispatchEvent(new CustomEvent("desktalk:open-window",{detail:{miniAppId:e,args:t}}))},[])}function RG(e){const t=yC(),n=C.useRef(e);n.current=e,C.useEffect(()=>{const a=s=>{const l=s.detail;l.windowId===t&&n.current(l.args)};return window.addEventListener("desktalk:window-args-updated",a),()=>window.removeEventListener("desktalk:window-args-updated",a)},[t])}const wC=C.createContext({locale:"en",messages:{}});C.createContext(null);let n_={messages:{}};function SC(e,t){return t?e.replace(/\{([A-Za-z_$][\w$]*)\}/g,(n,a)=>{const s=t[a];return s==null?"":String(s)}):e}function kC(e,t,n,a,s){const l=e.messages[t]?.[n]??a;return SC(l,s)}function Ce(e){return kC(n_,e.scope,e.key,e.defaultText,e.params)}function CC({locale:e,messages:t,children:n}){const a=C.useMemo(()=>({locale:e,messages:t}),[e,t]);return n_=a,Va.createElement(wC.Provider,{value:a},n)}var NC=function(e){return typeof e=="function"},Ds=function(e){var t=C.useRef(e);t.current=C.useMemo(function(){return e},[e]);var n=C.useRef(void 0);return n.current||(n.current=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return t.current.apply(this,a)}),n.current};function Uy(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function r_(e){var t=C.useRef(e);return t.current=e,t}var RC=function(e){var t=r_(e);C.useEffect(function(){return function(){t.current()}},[])},OC=!!(typeof window<"u"&&window.document&&window.document.createElement);function a_(e,t){if(OC){if(!e)return t;var n;return NC(e)?n=e():"current"in e?n=e.current:n=e,n}}var LC=function(e){var t=function(n,a,s){var l=C.useRef(!1),u=C.useRef([]),d=C.useRef([]),f=C.useRef(void 0);e(function(){var h,m=Array.isArray(s)?s:[s],b=m.map(function(E){return a_(E)});if(!l.current){l.current=!0,u.current=b,d.current=a,f.current=n();return}(b.length!==u.current.length||!Uy(u.current,b)||!Uy(d.current,a))&&((h=f.current)===null||h===void 0||h.call(f),u.current=b,d.current=a,f.current=n())}),RC(function(){var h;(h=f.current)===null||h===void 0||h.call(f),l.current=!1})};return t},IC=LC(C.useEffect);function oo(e,t,n){n===void 0&&(n={});var a=n.enable,s=a===void 0?!0:a,l=r_(t);IC(function(){if(s){var u=a_(n.target,window);if(u?.addEventListener){var d=function(h){return l.current(h)},f=Array.isArray(e)?e:[e];return f.forEach(function(h){u.addEventListener(h,d,{capture:n.capture,once:n.once,passive:n.passive})}),function(){f.forEach(function(h){u.removeEventListener(h,d,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,s],n.target)}const jy=e=>{let t;const n=new Set,a=(h,m)=>{const b=typeof h=="function"?h(t):h;if(!Object.is(b,t)){const E=t;t=m??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(v=>v(t,E))}},s=()=>t,d={setState:a,getState:s,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(a,s,d);return d},MC=(e=>e?jy(e):jy),DC=e=>e;function BC(e,t=DC){const n=Va.useSyncExternalStore(e.subscribe,Va.useCallback(()=>t(e.getState()),[e,t]),Va.useCallback(()=>t(e.getInitialState()),[e,t]));return Va.useDebugValue(n),n}const Fy=e=>{const t=MC(e),n=a=>BC(t,a);return Object.assign(n,t),n},Fo=(e=>e?Fy(e):Fy);function uo(e,t,n){if(e.type==="leaf")return[{windowId:e.windowId,x:t.x+n,y:t.y+n,width:Math.max(t.width-n*2,0),height:Math.max(t.height-n*2,0)}];const{split:a,ratio:s,children:l}=e,u=n/2;if(a==="horizontal"){const h=Math.round(t.width*s),m=t.width-h;return[...uo(l[0],{...t,width:h-u},n),...uo(l[1],{x:t.x+h+u,y:t.y,width:m-u,height:t.height},n)]}const d=Math.round(t.height*s),f=t.height-d;return[...uo(l[0],{...t,height:d-u},n),...uo(l[1],{x:t.x,y:t.y+d+u,width:t.width,height:f-u},n)]}function Bs(e){return e.type==="leaf"?[e.windowId]:[...Bs(e.children[0]),...Bs(e.children[1])]}function _p(e,t){return e.type==="leaf"?e.windowId===t?e:null:_p(e.children[0],t)??_p(e.children[1],t)}function Ln(e,t){return _p(e,t)!==null}function zC(e,t,n=0){return e.windowId===t?n:-1}function Vc(e,t,n,a){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:a==="auto"?HC(zC({windowId:t},t)):a,ratio:.5,children:[{type:"leaf",windowId:t},{type:"leaf",windowId:n}]}:Ln(e.children[0],t)?{...e,children:[Vc(e.children[0],t,n,a),e.children[1]]}:{...e,children:[e.children[0],Vc(e.children[1],t,n,a)]}}function Gc(e,t){if(e.type==="leaf")return e.windowId===t?null:e;const[n,a]=e.children;if(n.type==="leaf"&&n.windowId===t)return a;if(a.type==="leaf"&&a.windowId===t)return n;if(Ln(n,t)){const s=Gc(n,t);return s===null?a:{...e,children:[s,a]}}if(Ln(a,t)){const s=Gc(a,t);return s===null?n:{...e,children:[n,s]}}return e}function Wc(e,t,n){return e.type==="leaf"?e.windowId===t?{type:"leaf",windowId:n}:e.windowId===n?{type:"leaf",windowId:t}:e:{...e,children:[Wc(e.children[0],t,n),Wc(e.children[1],t,n)]}}function Tp(e,t,n){if(e.type==="leaf")return e;const[a,s]=e.children,l=a.type==="leaf"&&a.windowId===t||Ln(a,t),u=s.type==="leaf"&&s.windowId===t||Ln(s,t);if(l&&!u){if(a.type==="leaf"&&a.windowId===t)return{...e,ratio:fo(e.ratio+n)};const d=Tp(a,t,n);return d===a?{...e,ratio:fo(e.ratio+n)}:{...e,children:[d,s]}}if(u&&!l){if(s.type==="leaf"&&s.windowId===t)return{...e,ratio:fo(e.ratio-n)};const d=Tp(s,t,n);return d===s?{...e,ratio:fo(e.ratio-n)}:{...e,children:[a,d]}}return e}function Ap(e,t){if(e.type==="leaf")return e;const[n,a]=e.children;return n.type==="leaf"&&n.windowId===t||a.type==="leaf"&&a.windowId===t?{...e,ratio:.5}:Ln(n,t)?{...e,children:[Ap(n,t),a]}:Ln(a,t)?{...e,children:[n,Ap(a,t)]}:e}function wp(e,t){if(e.type==="leaf")return e;const[n,a]=e.children;return n.type==="leaf"&&n.windowId===t||a.type==="leaf"&&a.windowId===t?{...e,split:e.split==="horizontal"?"vertical":"horizontal"}:Ln(n,t)?{...e,children:[wp(n,t),a]}:Ln(a,t)?{...e,children:[n,wp(a,t)]}:e}function Sp(e,t,n,a){return e.type==="leaf"?e.windowId!==t?e:{type:"container",split:a==="left"||a==="right"?"horizontal":"vertical",ratio:.5,children:[a==="left"||a==="top"?{type:"leaf",windowId:n}:{type:"leaf",windowId:t},a==="left"||a==="top"?{type:"leaf",windowId:t}:{type:"leaf",windowId:n}]}:Ln(e.children[0],t)?{...e,children:[Sp(e.children[0],t,n,a),e.children[1]]}:{...e,children:[e.children[0],Sp(e.children[1],t,n,a)]}}function PC(e,t,n,a){if(t===n||!Ln(e,t)||!Ln(e,n))return e;if(a==="center")return Wc(e,t,n);const s=Gc(e,t);return s?Sp(s,n,t,a):e}function $y(e,t,n){const a=e.find(f=>f.windowId===t);if(!a)return null;const s=a.x+a.width/2,l=a.y+a.height/2;let u=null,d=1/0;for(const f of e){if(f.windowId===t)continue;const h=f.x+f.width/2,m=f.y+f.height/2;let b=!1;switch(n){case"left":b=h<s;break;case"right":b=h>s;break;case"up":b=m<l;break;case"down":b=m>l;break}if(b){const E=Math.abs(h-s)+Math.abs(m-l);E<d&&(d=E,u=f.windowId)}}return u}function co(e,t,n,a=[]){if(e.type==="leaf")return[];const{split:s,ratio:l,children:u}=e,d=[];if(s==="horizontal"){const f=t.x+Math.round(t.width*l),h=n/2;d.push({path:a,split:s,ratio:l,x:f-h,y:t.y,width:n,height:t.height});const m={...t,width:Math.round(t.width*l)-h},b={x:t.x+Math.round(t.width*l)+h,y:t.y,width:t.width-Math.round(t.width*l)-h,height:t.height};d.push(...co(u[0],m,n,[...a,0])),d.push(...co(u[1],b,n,[...a,1]))}else{const f=t.y+Math.round(t.height*l),h=n/2;d.push({path:a,split:s,ratio:l,x:t.x,y:f-h,width:t.width,height:n});const m={...t,height:Math.round(t.height*l)-h},b={x:t.x,y:t.y+Math.round(t.height*l)+h,width:t.width,height:t.height-Math.round(t.height*l)-h};d.push(...co(u[0],m,n,[...a,0])),d.push(...co(u[1],b,n,[...a,1]))}return d}function i_(e,t,n){if(t.length===0)return e.type!=="container"?e:{...e,ratio:fo(n)};if(e.type!=="container")return e;const[a,...s]=t,l=[e.children[0],e.children[1]];return l[a]=i_(e.children[a],s,n),{...e,children:l}}function fo(e){return Math.min(Math.max(e,.15),.85)}function HC(e){return e%2===0?"horizontal":"vertical"}const qy=4;function UC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,args:e.args}}function jC(e){return{id:e.id,miniAppId:e.miniAppId,title:e.title,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1,args:e.args}}let Hc=null;function Em(e){!Hc||Hc.readyState!==WebSocket.OPEN||Hc.send(JSON.stringify(e))}function kn(){const e=Ze.getState(),t={version:2,windows:e.windows.map(UC),tree:e.tree,focusedWindowId:e.focusedWindowId,fullscreenWindowId:e.fullscreenWindowId,windowIdCounter:e.windowIdCounter,nextSplitDirection:e.nextSplitDirection};Em({type:"window:sync",...t})}function Yy(e){Hc=e}function FC(e,t){Em({type:"window:actions_changed",windowId:e,actions:t})}function p0(e,t,n){Em({type:"window:action_result",requestId:e,result:t,error:n})}function qn(e,t){return e?{rects:uo(e,t,qy),bars:co(e,t,qy)}:{rects:[],bars:[]}}function gn(e,t,n,a){const s=new Map(t.map(l=>[l.windowId,l]));return e.map(l=>{const u=s.get(l.id);return{...l,focused:l.id===n,maximized:l.id===a,position:u?{x:u.x,y:u.y}:l.position,size:u?{width:u.width,height:u.height}:l.size,zIndex:l.id===a?9999:1}})}function Vy(e){return e??{}}function Gy(e,t){const n=Vy(e),a=Vy(t),s=Object.keys(n),l=Object.keys(a);return s.length!==l.length?!1:s.every(u=>n[u]===a[u])}const Ze=Fo((e,t)=>({windows:[],windowIdCounter:0,focusedWindowActions:[],windowActions:{},tree:null,focusedWindowId:null,fullscreenWindowId:null,nextSplitDirection:"auto",tileRects:[],splitBars:[],desktopBounds:{x:0,y:0,width:800,height:600},openWindow(n,a,s){const l=t(),u=l.windows.filter(S=>S.miniAppId===n&&Gy(S.args,s)).reduce((S,k)=>!S||k.id===l.focusedWindowId?k:S,void 0);if(u){const S=l.fullscreenWindowId===u.id?l.fullscreenWindowId:null,{rects:k,bars:q}=qn(l.tree,l.desktopBounds),P=gn(l.windows.map(G=>G.id===u.id&&s?{...G,args:s}:G),k,u.id,S);return e({windows:P,focusedWindowId:u.id,fullscreenWindowId:S,tileRects:k,splitBars:q,focusedWindowActions:l.windowActions[u.id]??[]}),kn(),u.id}const d=l.windowIdCounter+1,f=`win-${d}`,h={id:f,miniAppId:n,title:a,position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!0,zIndex:1,args:s};let m=l.nextSplitDirection;if(m==="auto"&&l.tree){const S=l.focusedWindowId&&Ln(l.tree,l.focusedWindowId)?l.focusedWindowId:Bs(l.tree)[0],k=l.tileRects.find(q=>q.windowId===S);k&&(m=k.width>=k.height?"horizontal":"vertical")}let b;if(!l.tree)b={type:"leaf",windowId:f};else if(l.focusedWindowId&&Ln(l.tree,l.focusedWindowId))b=Vc(l.tree,l.focusedWindowId,f,m);else{const S=Bs(l.tree);b=Vc(l.tree,S[0],f,m)}const{rects:E,bars:v}=qn(b,l.desktopBounds),T=[...l.windows,h],A=gn(T,E,f,null);return e({windows:A,windowIdCounter:d,tree:b,focusedWindowId:f,fullscreenWindowId:null,tileRects:E,splitBars:v,focusedWindowActions:[]}),kn(),f},closeWindow(n){const a=t(),s=a.windows.filter(v=>v.id!==n),{[n]:l,...u}=a.windowActions,d=a.tree?Gc(a.tree,n):null;let f=null;if(a.focusedWindowId===n){if(d){const v=Bs(d);f=v.length>0?v[0]:null}}else f=a.focusedWindowId;const h=a.fullscreenWindowId===n?null:a.fullscreenWindowId,{rects:m,bars:b}=qn(d,a.desktopBounds),E=gn(s,m,f,h);e({windows:E,tree:d,focusedWindowId:f,fullscreenWindowId:h,windowActions:u,focusedWindowActions:f?u[f]??[]:[],tileRects:m,splitBars:b}),kn()},focusWindow(n){const a=t();if(!a.windows.find(h=>h.id===n))return;const l=a.tree??{type:"leaf",windowId:n},{rects:u,bars:d}=qn(l,a.desktopBounds),f=gn(a.windows,u,n,a.fullscreenWindowId);e({windows:f,tree:l,focusedWindowId:n,tileRects:u,splitBars:d,focusedWindowActions:a.windowActions[n]??[]}),kn()},maximizeWindow(n){const a=t();if(!a.windows.find(h=>h.id===n))return;const l=a.fullscreenWindowId===n?null:n,{rects:u,bars:d}=qn(a.tree,a.desktopBounds),f=gn(a.windows,u,a.focusedWindowId,l);e({windows:f,fullscreenWindowId:l,tileRects:u,splitBars:d}),kn()},moveWindow(n,a){},resizeWindow(n,a){},focusDirection(n){const a=t();if(!a.focusedWindowId||!a.tree)return;const s=a.tileRects,l=$y(s,a.focusedWindowId,n);if(!l)return;const u=gn(a.windows,s,l,a.fullscreenWindowId);e({windows:u,focusedWindowId:l,fullscreenWindowId:null,focusedWindowActions:a.windowActions[l]??[]}),kn()},swapDirection(n){const a=t();if(!a.focusedWindowId||!a.tree)return;const s=a.tileRects,l=$y(s,a.focusedWindowId,n);if(!l)return;const u=Wc(a.tree,a.focusedWindowId,l),{rects:d,bars:f}=qn(u,a.desktopBounds),h=gn(a.windows,d,a.focusedWindowId,a.fullscreenWindowId);e({windows:h,tree:u,tileRects:d,splitBars:f}),kn()},toggleFullscreen(){const n=t();n.focusedWindowId&&t().maximizeWindow(n.focusedWindowId)},setNextSplitDirection(n){e({nextSplitDirection:n}),kn()},rotateFocusedSplit(){const n=t();if(!n.focusedWindowId||!n.tree)return;const a=wp(n.tree,n.focusedWindowId),{rects:s,bars:l}=qn(a,n.desktopBounds),u=gn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:u,tree:a,tileRects:s,splitBars:l}),kn()},adjustFocusedRatio(n){const a=t();if(!a.focusedWindowId||!a.tree)return;const s=Tp(a.tree,a.focusedWindowId,n),{rects:l,bars:u}=qn(s,a.desktopBounds),d=gn(a.windows,l,a.focusedWindowId,a.fullscreenWindowId);e({windows:d,tree:s,tileRects:l,splitBars:u}),kn()},equalizeFocusedRatio(){const n=t();if(!n.focusedWindowId||!n.tree)return;const a=Ap(n.tree,n.focusedWindowId),{rects:s,bars:l}=qn(a,n.desktopBounds),u=gn(n.windows,s,n.focusedWindowId,n.fullscreenWindowId);e({windows:u,tree:a,tileRects:s,splitBars:l}),kn()},focusNth(n){const a=t();if(!a.tree)return;const s=Bs(a.tree),l=n-1;if(l<0||l>=s.length)return;const u=s[l],d=gn(a.windows,a.tileRects,u,null);e({windows:d,focusedWindowId:u,fullscreenWindowId:null,focusedWindowActions:a.windowActions[u]??[]}),kn()},setDesktopBounds(n){const a=t(),{rects:s,bars:l}=qn(a.tree,n),u=gn(a.windows,s,a.focusedWindowId,a.fullscreenWindowId);e({windows:u,desktopBounds:n,tileRects:s,splitBars:l})},setNodeRatio(n,a){const s=t();if(!s.tree)return;const l=i_(s.tree,n,a),{rects:u,bars:d}=qn(l,s.desktopBounds),f=gn(s.windows,u,s.focusedWindowId,s.fullscreenWindowId);e({windows:f,tree:l,tileRects:u,splitBars:d}),kn()},relocateWindow(n,a,s){const l=t();if(!l.tree)return;const u=PC(l.tree,n,a,s);if(u===l.tree)return;const{rects:d,bars:f}=qn(u,l.desktopBounds),h=gn(l.windows,d,n,null);e({windows:h,tree:u,focusedWindowId:n,fullscreenWindowId:null,tileRects:d,splitBars:f,focusedWindowActions:l.windowActions[n]??[]}),kn()},setFocusedWindowActions(n){e({focusedWindowActions:n})},setWindowActions(n,a){e(s=>({windowActions:{...s.windowActions,[n]:a},focusedWindowActions:s.focusedWindowId===n?a:s.focusedWindowActions}))},getFocusedWindow(){const n=t();return n.windows.find(a=>a.id===n.focusedWindowId)},getWindowsByMiniApp(n,a){return t().windows.filter(s=>s.miniAppId===n&&Gy(s.args,a))},restoreFromBackend(n){const a=t().desktopBounds,{rects:s,bars:l}=qn(n.tree,a),u=gn(n.windows.map(jC),s,n.focusedWindowId,n.fullscreenWindowId);e({windows:u,tree:n.tree,focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windowIdCounter:n.windowIdCounter,nextSplitDirection:n.nextSplitDirection,tileRects:s,splitBars:l})}})),$C="_dockIcon_1xw56_1",qC="_dockIconImage_1xw56_11",Wy={dockIcon:$C,dockIconImage:qC};function YC({icon:e,iconPng:t,className:n,tooltip:a}){const s=x.jsx("div",{className:[Wy.dockIcon,n].filter(Boolean).join(" "),children:t?x.jsx("img",{className:Wy.dockIconImage,src:t,alt:"","aria-hidden":"true"}):x.jsx("span",{children:e})});return a?x.jsx("dt-tooltip",{content:a,children:s}):s}function VC(e,t){return t?e.some(n=>{const a=n.current;return a?a.contains(t):!1}):!1}function GC(e,t,n=!0){C.useEffect(()=>{if(!n)return;function a(l){const u=l.target;VC(e,u)||t()}function s(){requestAnimationFrame(()=>{document.activeElement?.tagName==="IFRAME"&&t()})}return document.addEventListener("mousedown",a),window.addEventListener("blur",s),()=>{document.removeEventListener("mousedown",a),window.removeEventListener("blur",s)}},[n,t,e])}const WC="_panel_uttta_1",QC="_empty_uttta_18",XC="_item_uttta_25",KC="_icon_uttta_45",ZC="_label_uttta_52",Xl={panel:WC,empty:QC,item:XC,icon:KC,label:ZC};function JC({apps:e,isOpen:t,onClose:n,onLaunch:a,anchorRef:s}){const l=C.useRef(null),[u,d]=C.useState({top:0,left:0});return C.useLayoutEffect(()=>{if(!t||!s.current)return;function f(){const h=s.current?.getBoundingClientRect(),m=l.current?.offsetWidth??340;if(!h)return;const b=Math.min(Math.max(16,h.left),Math.max(16,window.innerWidth-m-16));d({top:h.bottom+16,left:b})}return f(),window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[s,t]),GC([l,s],n,t),C.useEffect(()=>{if(!t)return;function f(h){h.key==="Escape"&&n()}return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[t,n]),t?jo.createPortal(x.jsxs("div",{ref:l,className:Xl.panel,style:u,children:[e.length===0&&x.jsx("div",{className:Xl.empty,children:"No applications available"}),e.map(f=>x.jsxs("button",{className:Xl.item,onClick:()=>{a(f),n()},children:[x.jsx(YC,{icon:f.icon,iconPng:f.iconPng,className:Xl.icon}),x.jsx("span",{className:Xl.label,children:f.name})]},f.id))]}),document.body):null}const e4=C.memo(function({mode:t,size:n=14}){return x.jsxs("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"1.5"}),t==="horizontal"&&x.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13"}),t==="vertical"&&x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8"}),t==="auto"&&x.jsxs(x.Fragment,{children:[x.jsx("line",{x1:"8",y1:"3",x2:"8",y2:"13",opacity:"0.45"}),x.jsx("line",{x1:"2",y1:"8",x2:"14",y2:"8",opacity:"0.45"}),x.jsx("text",{x:"8",y:"9",textAnchor:"middle",dominantBaseline:"central",fill:"currentColor",stroke:"none",fontSize:"5.5",fontWeight:"700",children:"A"})]})]})}),t4="_actionsBar_1otoq_2",n4="_launcherWrapper_1otoq_18",r4="_appName_1otoq_22",a4="_appNameActive_1otoq_41",i4="_splitToggle_1otoq_47",s4="_splitToggleActive_1otoq_68",l4="_separator_1otoq_79",o4="_action_1otoq_2",u4="_glowing_1otoq_104",c4="_builtinAction_1otoq_116 _action_1otoq_2",lr={actionsBar:t4,launcherWrapper:n4,appName:r4,appNameActive:a4,splitToggle:i4,splitToggleActive:s4,separator:l4,action:o4,glowing:u4,builtinAction:c4},m0=["auto","horizontal","vertical"],d4={auto:"Auto",horizontal:"Horizontal",vertical:"Vertical"};function f4({apps:e,onLaunch:t}){const n=Ze(S=>S.focusedWindowId),a=Ze(S=>S.fullscreenWindowId),s=Ze(S=>S.windows.find(k=>k.id===S.focusedWindowId)),l=Ze(S=>S.focusedWindowActions),u=Ze(S=>S.nextSplitDirection),[d,f]=C.useState(!1),h=C.useRef(l),[m,b]=C.useState(!1),E=C.useRef(null);C.useEffect(()=>{if(l.length>0&&l!==h.current){f(!0);const S=setTimeout(()=>f(!1),1200);return h.current=l,()=>clearTimeout(S)}h.current=l},[l]);const v=C.useCallback(()=>{const S=m0.indexOf(u),k=m0[(S+1)%m0.length];Ze.getState().setNextSplitDirection(k)},[u]),T=n===a&&a!==null,A=`${Ce({scope:"core",key:"split.mode",defaultText:"Split mode"})}: ${d4[u]}`;return x.jsxs("div",{className:lr.actionsBar,children:[x.jsxs("div",{className:lr.launcherWrapper,children:[x.jsx("button",{ref:E,className:`${lr.appName}${m?` ${lr.appNameActive}`:""}`,onClick:()=>b(S=>!S),children:Ce({scope:"core",key:"applications",defaultText:"Applications"})}),x.jsx(JC,{apps:e,isOpen:m,onClose:()=>b(!1),onLaunch:t,anchorRef:E})]}),x.jsx("dt-tooltip",{content:A,placement:"bottom",children:x.jsx("button",{className:`${lr.splitToggle}${u!=="auto"?` ${lr.splitToggleActive}`:""}`,onClick:v,children:x.jsx(e4,{mode:u})})}),s&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:lr.separator}),x.jsx("button",{className:lr.builtinAction,onClick:()=>Ze.getState().maximizeWindow(s.id),children:Ce(T?{scope:"core",key:"window.restore",defaultText:"Restore"}:{scope:"core",key:"window.fullscreen",defaultText:"Fullscreen"})}),x.jsx("button",{className:lr.builtinAction,onClick:()=>Ze.getState().closeWindow(s.id),children:Ce({scope:"core",key:"close",defaultText:"Close"})}),l.length>0&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:lr.separator}),l.map(S=>x.jsx("dt-tooltip",{content:S.description,placement:"bottom",children:x.jsx("button",{className:`${lr.action}${d?` ${lr.glowing}`:""}`,onClick:()=>S.handler(),children:S.name})},S.name))]})]})]})}const h4="_overlay_196os_1",p4="_card_196os_13",m4="_spinner_196os_27",g4="_title_196os_36",b4="_subtitle_196os_42",Kl={overlay:h4,card:p4,spinner:m4,title:g4,subtitle:b4};function y4({status:e,retryInSeconds:t}){if(e==="connected")return null;const n=e==="reconnecting"?`Reconnecting${t&&t>0?` in ${t}s`:""}...`:"Connecting...";return x.jsx("div",{className:Kl.overlay,role:"status","aria-live":"polite","aria-busy":"true",children:x.jsxs("div",{className:Kl.card,children:[x.jsx("span",{className:Kl.spinner,"aria-hidden":"true"}),x.jsx("div",{className:Kl.title,children:n}),x.jsx("div",{className:Kl.subtitle,children:"DeskTalk is waiting for the desktop bridge to be ready."})]})})}const E4="_resizer_z2l6k_1",x4="_horizontal_z2l6k_11",v4="_vertical_z2l6k_18",_4="_bar_z2l6k_25",yc={resizer:E4,horizontal:x4,vertical:v4,bar:_4};function s_({path:e,split:t,ratio:n,onRatioChange:a}){const s=C.useRef(null),l=C.useRef(null),u=C.useCallback(h=>{h.preventDefault(),h.stopPropagation();const m=h.clientX,b=h.clientY;s.current={clientX:m,clientY:b,startRatio:n};const v=l.current?.parentElement?.getBoundingClientRect();if(!v)return;const T=document.createElement("style");T.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(T);const A=k=>{if(!s.current)return;const q=k.clientX-s.current.clientX,P=k.clientY-s.current.clientY;let G;t==="horizontal"?G=v.width>0?q/v.width:0:G=v.height>0?P/v.height:0;const ne=s.current.startRatio+G;a?a(ne):Ze.getState().setNodeRatio(e,ne)},S=()=>{s.current=null,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="",T.remove()};document.addEventListener("mousemove",A),document.addEventListener("mouseup",S),document.body.style.cursor=t==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"},[a,e,t,n]),d=t==="horizontal",f=[yc.resizer,d?yc.horizontal:yc.vertical].filter(Boolean).join(" ");return x.jsx("div",{ref:l,className:f,onMouseDown:u,children:x.jsx("div",{className:yc.bar})})}const g0={isDragging:!1,dragWindowId:null,dropTarget:null},la=Fo((e,t)=>({...g0,startDrag(n){e({isDragging:!0,dragWindowId:n,dropTarget:null})},updateDropTarget(n,a){const s=t();if(n===s.dragWindowId){e({dropTarget:null});return}const l=s.dropTarget;l&&l.windowId===n&&l.edge===a||e({dropTarget:{windowId:n,edge:a}})},clearDropTarget(){t().dropTarget!==null&&e({dropTarget:null})},finishDrag(){const n=t(),a=n.isDragging&&n.dragWindowId&&n.dropTarget?{sourceWindowId:n.dragWindowId,target:n.dropTarget}:null;return e(g0),a},cancelDrag(){e(g0)}})),T4="_overlay_19iyv_1",A4="_tileZone_19iyv_8",w4="_highlight_19iyv_13",b0={overlay:T4,tileZone:A4,highlight:w4};function S4(e,t,n,a){const s=a.getBoundingClientRect(),l=s.left+n.x,u=s.top+n.y,d=e-l,f=t-u,h=n.width>0?d/n.width:.5,m=n.height>0?f/n.height:.5;return m<.3?"top":m>.7?"bottom":h<.3?"left":h>.7?"right":"center"}function k4(e){switch(e){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{right:0,top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,bottom:0,width:"100%",height:"50%"};case"center":return{left:0,top:0,width:"100%",height:"100%"}}}function C4({desktopRef:e}){const t=la(d=>d.dragWindowId),n=la(d=>d.dropTarget),a=Ze(d=>d.tileRects),s=C.useCallback((d,f)=>{const h=e.current;if(!h)return;const m=S4(d.clientX,d.clientY,f,h);la.getState().updateDropTarget(f.windowId,m)},[e]),l=C.useCallback(()=>{la.getState().clearDropTarget()},[]),u=a.filter(d=>d.windowId!==t);return x.jsx("div",{className:b0.overlay,children:u.map(d=>{const f=n?.windowId===d.windowId;return x.jsx("div",{className:b0.tileZone,style:{left:d.x,top:d.y,width:d.width,height:d.height},onMouseMove:h=>s(h,d),onMouseLeave:l,children:f&&n&&x.jsx("div",{className:b0.highlight,style:k4(n.edge)})},d.windowId)})})}class N4{stream=null;audioContext=null;sourceNode=null;workletNode=null;chunkHandler=null;async start(t){this.chunkHandler=t,this.stream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:{ideal:16e3},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.audioContext=new AudioContext,await this.audioContext.audioWorklet.addModule("/pcm-capture-processor.js"),this.sourceNode=this.audioContext.createMediaStreamSource(this.stream),this.workletNode=new AudioWorkletNode(this.audioContext,"pcm-capture-processor"),this.workletNode.port.onmessage=a=>{this.chunkHandler&&a.data&&this.chunkHandler(a.data)},this.sourceNode.connect(this.workletNode);const n=this.audioContext.createGain();n.gain.value=0,this.workletNode.connect(n),n.connect(this.audioContext.destination),console.log(`[mic] Started capture at ${this.audioContext.sampleRate}Hz, resampling to 16kHz in worklet`)}stop(){if(this.workletNode&&(this.workletNode.disconnect(),this.workletNode.port.onmessage=null,this.workletNode=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.stream){for(const t of this.stream.getTracks())t.stop();this.stream=null}this.chunkHandler=null,console.log("[mic] Stopped capture")}isActive(){return this.stream!==null&&this.audioContext!==null}}class R4{ws=null;eventHandler=null;sessionId=null;connect(){return new Promise((t,n)=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){t();return}const s=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws/voice`,l=new WebSocket(s);l.binaryType="arraybuffer",l.addEventListener("open",()=>{this.ws=l,console.log("[voice-ws] Connected"),t()}),l.addEventListener("message",u=>{if(typeof u.data=="string")try{const d=JSON.parse(u.data);this.eventHandler?.(d)}catch{}}),l.addEventListener("close",()=>{console.log("[voice-ws] Disconnected"),this.ws=null}),l.addEventListener("error",u=>{console.error("[voice-ws] Error:",u),n(new Error("Voice WebSocket connection failed"))})})}onEvent(t){this.eventHandler=t}startSession(t,n=16e3,a){this.sessionId=t,this.sendControl({type:"session.start",sessionId:t,format:"pcm_s16le",sampleRate:n,channels:1,...a?{language:a}:{}})}endSession(){this.sessionId&&(this.sendControl({type:"session.end",sessionId:this.sessionId}),this.sessionId=null)}sendAudioChunk(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(t)}sendControl(t){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(t))}disconnect(){this.ws&&(this.ws.close(),this.ws=null),this.sessionId=null}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}}let bo=null,Lr=null;function O4(){return`vs-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}const Ir=Fo((e,t)=>({status:"idle",errorMessage:null,partialText:"",transcripts:[],sessionId:null,async startVoice(){const n=t();if(!(n.status!=="idle"&&n.status!=="error")){e({status:"connecting",errorMessage:null,partialText:""});try{Lr=new R4,Lr.onEvent(s=>{L4(s,e,t)}),await Lr.connect();const a=O4();Lr.startSession(a,16e3),e({sessionId:a}),await I4(Lr,a),bo=new N4,await bo.start(s=>{Lr?.sendAudioChunk(s)}),e({status:"listening"})}catch(a){const s=a instanceof DOMException&&a.name==="NotAllowedError"?"Microphone permission denied. Please allow microphone access.":a.message;e({status:"error",errorMessage:s}),Qy()}}},stopVoice(){t().status!=="idle"&&(Qy(),e({status:"idle",partialText:"",sessionId:null}))},clearTranscripts(){e({transcripts:[],partialText:""})}}));function L4(e,t,n){switch(e.type){case"speech.start":t({status:"speaking",partialText:""});break;case"transcript.partial":t({partialText:e.text??""});break;case"transcript.final":if(e.text&&e.utteranceId){const a=n();t({transcripts:[...a.transcripts,{utteranceId:e.utteranceId,text:e.text,isFinal:!0,timestamp:Date.now()}],partialText:"",status:"listening"})}break;case"speech.end":t({status:"listening",partialText:""});break;case"error":t({status:"error",errorMessage:e.message??`Error: ${e.code??"unknown"}`});break}}function I4(e,t){return new Promise((n,a)=>{const s=setTimeout(()=>{a(new Error("Voice session start timed out"))},5e3),l=e.eventHandler;e.onEvent(u=>{l?.(u),u.type==="session.ready"&&u.sessionId===t?(clearTimeout(s),e.onEvent(l??(()=>{})),n()):u.type==="error"&&u.sessionId===t&&(clearTimeout(s),e.onEvent(l??(()=>{})),a(new Error(u.message??"Session start failed")))})})}function Qy(){bo&&(bo.stop(),bo=null),Lr&&(Lr.endSession(),Lr.disconnect(),Lr=null)}const dr=At.create({withCredentials:!0});function l_(e,t){return At.isAxiosError(e)?e.response?.data?.error??e.message??t:e instanceof Error&&e.message?e.message:t}function Xy(e,t){const n=t.find(a=>a.id===e);return!n||!n.model?"not configured":`${n.id}/${n.model}`}const at=Fo((e,t)=>({messages:[],draftInput:"",isAiRunning:!1,activeRequestId:null,modelLabel:"not configured",tokenCount:0,providerOptions:[],selectedProvider:"",currentSessionId:null,sessions:[],pendingQuestion:null,async loadProviders(){try{const{data:n}=await dr.get("/api/ai/providers");e({providerOptions:n.providers,selectedProvider:n.defaultProvider,modelLabel:Xy(n.defaultProvider,n.providers)})}catch{e({providerOptions:[],selectedProvider:"",modelLabel:"not configured"})}},loadSessions(n){return n.readyState!==WebSocket.OPEN?!1:(n.send(JSON.stringify({type:"ai:sessions:list"})),!0)},switchSession(n,a){const s=t();return!n||a.readyState!==WebSocket.OPEN||s.isAiRunning||s.currentSessionId===n?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:n,pendingQuestion:null}),a.send(JSON.stringify({type:"ai:sessions:switch",sessionId:n})),!0)},createSession(n){const a=t();return n.readyState!==WebSocket.OPEN||a.isAiRunning?!1:(e({messages:[],isAiRunning:!1,tokenCount:0,activeRequestId:null,currentSessionId:null,pendingQuestion:null}),n.send(JSON.stringify({type:"ai:sessions:create"})),!0)},cancelAiRequest(n){const a=t();return n.readyState!==WebSocket.OPEN||!a.isAiRunning||!a.activeRequestId?!1:(n.send(JSON.stringify({type:"ai:cancel",requestId:a.activeRequestId})),!0)},answerQuestion(n,a,s){const l=t();return s.readyState!==WebSocket.OPEN||!l.pendingQuestion||l.pendingQuestion.questionId!==n?!1:(s.send(JSON.stringify({type:"ai:answer",questionId:n,answer:a})),e({pendingQuestion:null}),!0)},submitPrompt(n,a="text",s){const l=t();if(!n||s.readyState!==WebSocket.OPEN||l.isAiRunning)return!1;const u=`ai-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return e(d=>({messages:[...d.messages,{id:`user-${u}`,role:"user",content:n,source:a},{id:`assistant-${u}`,role:"assistant",content:""}],isAiRunning:!0,activeRequestId:u,tokenCount:0})),s.send(JSON.stringify({type:"ai:prompt",requestId:u,text:n,source:a})),!0},setDraftInput(n){e({draftInput:n})},clearDraftInput(){e({draftInput:""})},handleAiEvent(n){const a=t();if(n.type==="sessions_sync"){e(s=>({sessions:n.sessions??s.sessions,currentSessionId:n.sessionId??s.currentSessionId}));return}if(n.type==="history_sync"){e(s=>({messages:n.messages??[],currentSessionId:n.sessionId??s.currentSessionId}));return}if(!(a.activeRequestId&&n.requestId!==a.activeRequestId))if(n.type==="message_start")e({isAiRunning:!0,modelLabel:n.model?`${n.provider}/${n.model}`:"not configured"});else if(n.type==="message_update")e(s=>{const l=[...s.messages],u=l.length-1;return u>=0&&l[u].role==="assistant"&&!l[u].toolCall&&(l[u]={...l[u],content:n.text??""}),{messages:l}});else if(n.type==="thinking_update")e(s=>{const l=[...s.messages],u=l.length-1;return u>=0&&l[u].role==="assistant"&&!l[u].toolCall&&(l[u]={...l[u],thinkingContent:n.thinkingText??""}),{messages:l}});else if(n.type==="tool_call")e(s=>{const l=[...s.messages],u=a.activeRequestId,d=u?`assistant-${u}`:null,f={id:`tool-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:"",toolCall:n.toolCall};if(d){const h=l.findIndex(m=>m.id===d);if(h>=0)return l.splice(h,0,f),{messages:l}}return l.push(f),{messages:l}});else if(n.type==="agent_question"){if(!n.questionId||!n.question||!n.questionType)return;e({pendingQuestion:{questionId:n.questionId,question:n.question,questionType:n.questionType,options:n.options}})}else if(n.type==="message_end"){const s=a.activeRequestId,l=a.providerOptions,u=a.selectedProvider,d="[Cancelled]";e(f=>{let h=f.messages;if(s){const m=`assistant-${s}`,b=h.findIndex(E=>E.id===m);if(b>=0){const E=h[b];if(n.cancelled){const v=E.content.trim()?`${E.content.replace(/\s+$/u,"")}
15
+
16
+ ${d}`:d;h=[...h.slice(0,b),{...E,content:E.cancelled?E.content:v,cancelled:!0},...h.slice(b+1)]}else!E.content&&!E.thinkingContent&&(h=[...h.slice(0,b),...h.slice(b+1)])}}return{messages:h,isAiRunning:!1,activeRequestId:null,pendingQuestion:null,tokenCount:n.usage?.totalTokens??0,modelLabel:u?Xy(u,l):f.modelLabel}})}else n.type==="error"&&e(s=>{const l=[...s.messages],u=l.length-1;return u>=0&&l[u].role==="assistant"?l[u]={...l[u],content:n.message??"AI request failed."}:l.push({id:`assistant-error-${Date.now()}`,role:"assistant",content:n.message??"AI request failed."}),{messages:l,isAiRunning:!1,activeRequestId:null,pendingQuestion:null}})},clearMessages(){e({messages:[],tokenCount:0})},addSystemMessage(n){e(a=>({messages:[...a.messages,{id:`system-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:"assistant",content:n}]}))}})),md=[{name:"new",description:"Create a new AI session",execute(e){return e.createSession(e.socket)}},{name:"clear",description:"Clear the current message history (client-side only)",execute(e){return e.clearMessages(),!0}},{name:"title",description:"Rename the current AI session",execute(e,t){const n=t.trim();return n?(e.socket.send(JSON.stringify({type:"ai:sessions:rename",title:n})),!0):(e.addSystemMessage("Usage: /title <new session title>"),!0)}},{name:"help",description:"Show available slash commands",execute(e){const t=md.map(n=>` /${n.name} — ${n.description}`);return e.addSystemMessage(`Available commands:
17
+ `+t.join(`
18
+ `)),!0}}];function M4(e,t){const n=e.trim();if(!n.startsWith("/"))return!1;const a=n.indexOf(" "),s=(a===-1?n.slice(1):n.slice(1,a)).toLowerCase(),l=a===-1?"":n.slice(a+1).trim(),u=md.find(d=>d.name===s);return u?u.execute(t,l):(t.addSystemMessage(`Unknown command: /${s}. Type /help for available commands.`),!0)}function D4(e){const t=e.toLowerCase();return md.filter(n=>n.name.startsWith(t))}function B4(){return md}const z4="modulepreload",P4=function(e){return"/"+e},Ky={},ia=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");s=f(n.map(h=>{if(h=P4(h),h in Ky)return;Ky[h]=!0;const m=h.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const E=document.createElement("link");if(E.rel=m?"stylesheet":z4,m||(E.as="script"),E.crossOrigin="",E.href=h,d&&E.setAttribute("nonce",d),document.head.appendChild(E),m)return new Promise((v,T)=>{E.addEventListener("load",v),E.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return s.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},gd=(function(e){if(e==null)return F4;if(typeof e=="function")return bd(e);if(typeof e=="object")return Array.isArray(e)?H4(e):U4(e);if(typeof e=="string")return j4(e);throw new Error("Expected function, string, or object as test")});function H4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gd(e[n]);return bd(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function U4(e){const t=e;return bd(n);function n(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function j4(e){return bd(t);function t(n){return n&&n.type===e}}function bd(e){return t;function t(n,a,s){return!!($4(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function F4(){return!0}function $4(e){return e!==null&&typeof e=="object"&&"type"in e}const o_=[],ho=!0,kp=!1,zs="skip";function xm(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const l=gd(s),u=a?-1:1;d(e,void 0,[])();function d(f,h,m){const b=f&&typeof f=="object"?f:{};if(typeof b.type=="string"){const v=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return E;function E(){let v=o_,T,A,S;if((!t||l(f,h,m[m.length-1]||void 0))&&(v=q4(n(f,m)),v[0]===kp))return v;if("children"in f&&f.children){const k=f;if(k.children&&v[0]!==zs)for(A=(a?k.children.length:-1)+u,S=m.concat(k);A>-1&&A<k.children.length;){const q=k.children[A];if(T=d(q,A,S)(),T[0]===kp)return T;A=typeof T[1]=="number"?T[1]:A+u}}return v}}}function q4(e){return Array.isArray(e)?e:typeof e=="number"?[ho,e]:e==null?o_:[e]}function Br(e,t,n,a){let s,l,u;typeof t=="function"&&typeof n!="function"?(l=void 0,u=t,s=n):(l=t,u=n,s=a),xm(e,l,d,s);function d(f,h){const m=h[h.length-1],b=m?m.children.indexOf(f):void 0;return u(f,b,m)}}const $s={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Y4({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:s=[],blockedImageClass:l="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:u="text-gray-500",linkBlockPolicy:d=$s.indicator,imageBlockPolicy:f=$s.indicator}){const h=t.length&&!t.every(b=>b==="*"),m=n.length&&!n.every(b=>b==="*");if(!e&&(h||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return b=>{const E=K4(e,t,n,a,s,l,u,d,f);u_(b),Br(b,E)}}function Zy(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 V4(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const G4=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),W4=new Set(["javascript:","data:","file:","vbscript:"]);function Jy(e,t,n,a=!1,s=!1,l=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const u=Zy(e,n);if(!u||W4.has(u.protocol)||!(G4.has(u.protocol)||l.includes(u.protocol)||l.includes("*")))return null;if(u.protocol==="mailto:"||!u.protocol.match(/^https?:$/))return u.href;const f=V4(e);return u&&t.some(h=>{const m=Zy(h,n);return!m||m.origin!==u.origin?!1:u.href.startsWith(m.href)})?f?u.pathname+u.search+u.hash:u.href:t.includes("*")?u.protocol!=="https:"&&u.protocol!=="http:"?null:f?u.pathname+u.search+u.hash:u.href:null}function u_(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)u_(t)}}const y0=Symbol("node-seen");function Q4(e,t,n){return t===$s.remove?{type:"remove"}:t===$s.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function X4(e,t,n){if(t===$s.remove)return{type:"remove"};if(t===$s.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const K4=(e,t,n,a,s,l,u,d,f)=>{const h=(m,b,E)=>{if(m.type!=="element"||m[y0])return ho;if(m.tagName==="a"){const v=Jy(m.properties.href,t,e,!1,!1,s);if(v===null){if(m[y0]=!0,Br(m,h),E&&typeof b=="number"){const T=Q4(m,d,u);if(T.type==="remove")return E.children.splice(b,1),[zs,b];E.children[b]=T.element}return zs}else return m.properties.href=v,m.properties.target="_blank",m.properties.rel="noopener noreferrer",ho}if(m.tagName==="img"){const v=Jy(m.properties.src,n,e,a,!0,s);if(v===null){if(m[y0]=!0,Br(m,h),E&&typeof b=="number"){const T=X4(m,f,l);if(T.type==="remove")return E.children.splice(b,1),[zs,b];E.children[b]=T.element}return zs}else return m.properties.src=v,ho}return ho};return h},c_=-1,yd=0,yo=1,Qc=2,vm=3,_m=4,Tm=5,Am=6,d_=7,f_=8,eE=typeof self=="object"?self:globalThis,Z4=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),a=s=>{if(e.has(s))return e.get(s);const[l,u]=t[s];switch(l){case yd:case c_:return n(u,s);case yo:{const d=n([],s);for(const f of u)d.push(a(f));return d}case Qc:{const d=n({},s);for(const[f,h]of u)d[a(f)]=a(h);return d}case vm:return n(new Date(u),s);case _m:{const{source:d,flags:f}=u;return n(new RegExp(d,f),s)}case Tm:{const d=n(new Map,s);for(const[f,h]of u)d.set(a(f),a(h));return d}case Am:{const d=n(new Set,s);for(const f of u)d.add(a(f));return d}case d_:{const{name:d,message:f}=u;return n(new eE[d](f),s)}case f_:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return n(new DataView(d),u)}}return n(new eE[l](u),s)};return a},tE=e=>Z4(new Map,e)(0),Cs="",{toString:J4}={},{keys:e5}=Object,Zl=e=>{const t=typeof e;if(t!=="object"||!e)return[yd,t];const n=J4.call(e).slice(8,-1);switch(n){case"Array":return[yo,Cs];case"Object":return[Qc,Cs];case"Date":return[vm,Cs];case"RegExp":return[_m,Cs];case"Map":return[Tm,Cs];case"Set":return[Am,Cs];case"DataView":return[yo,n]}return n.includes("Array")?[yo,n]:n.includes("Error")?[d_,n]:[Qc,n]},Ec=([e,t])=>e===yd&&(t==="function"||t==="symbol"),t5=(e,t,n,a)=>{const s=(u,d)=>{const f=a.push(u)-1;return n.set(d,f),f},l=u=>{if(n.has(u))return n.get(u);let[d,f]=Zl(u);switch(d){case yd:{let m=u;switch(f){case"bigint":d=f_,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return s([c_],u)}return s([d,m],u)}case yo:{if(f){let E=u;return f==="DataView"?E=new Uint8Array(u.buffer):f==="ArrayBuffer"&&(E=new Uint8Array(u)),s([f,[...E]],u)}const m=[],b=s([d,m],u);for(const E of u)m.push(l(E));return b}case Qc:{if(f)switch(f){case"BigInt":return s([f,u.toString()],u);case"Boolean":case"Number":case"String":return s([f,u.valueOf()],u)}if(t&&"toJSON"in u)return l(u.toJSON());const m=[],b=s([d,m],u);for(const E of e5(u))(e||!Ec(Zl(u[E])))&&m.push([l(E),l(u[E])]);return b}case vm:return s([d,u.toISOString()],u);case _m:{const{source:m,flags:b}=u;return s([d,{source:m,flags:b}],u)}case Tm:{const m=[],b=s([d,m],u);for(const[E,v]of u)(e||!(Ec(Zl(E))||Ec(Zl(v))))&&m.push([l(E),l(v)]);return b}case Am:{const m=[],b=s([d,m],u);for(const E of u)(e||!Ec(Zl(E)))&&m.push(l(E));return b}}const{message:h}=u;return s([d,{name:f,message:h}],u)};return l},nE=(e,{json:t,lossy:n}={})=>{const a=[];return t5(!(t||n),!!t,new Map,a)(e),a},Mi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tE(nE(e,t)):structuredClone(e):(e,t)=>tE(nE(e,t));class $o{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}$o.prototype.normal={};$o.prototype.property={};$o.prototype.space=void 0;function h_(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new $o(n,a,t)}function No(e){return e.toLowerCase()}class Mn{constructor(t,n){this.attribute=n,this.property=t}}Mn.prototype.attribute="";Mn.prototype.booleanish=!1;Mn.prototype.boolean=!1;Mn.prototype.commaOrSpaceSeparated=!1;Mn.prototype.commaSeparated=!1;Mn.prototype.defined=!1;Mn.prototype.mustUseProperty=!1;Mn.prototype.number=!1;Mn.prototype.overloadedBoolean=!1;Mn.prototype.property="";Mn.prototype.spaceSeparated=!1;Mn.prototype.space=void 0;let n5=0;const Ue=zi(),Bt=zi(),Cp=zi(),me=zi(),Et=zi(),Hs=zi(),Vn=zi();function zi(){return 2**++n5}const Np=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Bt,commaOrSpaceSeparated:Vn,commaSeparated:Hs,number:me,overloadedBoolean:Cp,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),E0=Object.keys(Np);class wm extends Mn{constructor(t,n,a,s){let l=-1;if(super(t,n),rE(this,"space",s),typeof a=="number")for(;++l<E0.length;){const u=E0[l];rE(this,E0[l],(a&Np[u])===Np[u])}}}wm.prototype.defined=!0;function rE(e,t,n){n&&(e[t]=n)}function Ws(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const l=new wm(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,n[No(a)]=a,n[No(l.attribute)]=a}return new $o(t,n,e.space)}const p_=Ws({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:Et,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:me,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:Et,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Bt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function m_(e,t){return t in e?e[t]:t}function g_(e,t){return m_(e,t.toLowerCase())}const r5=Ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hs,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:Et,autoFocus:Ue,autoPlay:Ue,blocking:Et,capture:null,charSet:null,checked:Ue,cite:null,className:Et,cols:me,colSpan:null,content:null,contentEditable:Bt,controls:Ue,controlsList:Et,coords:me|Hs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Cp,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:Et,height:me,hidden:Cp,high:me,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ue,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,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:me,pattern:null,ping:Et,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:Et,required:Ue,reversed:Ue,rows:me,rowSpan:me,sandbox:Et,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Bt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,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:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:g_}),a5=Ws({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:Vn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:Et,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:Hs,g2:Hs,glyphName:Hs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vn,rev:Vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vn,requiredFeatures:Vn,requiredFonts:Vn,requiredFormats:Vn,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:m_}),b_=Ws({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()}}),y_=Ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:g_}),E_=Ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),i5={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"},s5=/[A-Z]/g,aE=/-[a-z]/g,l5=/^data[-\w.:]+$/i;function Ed(e,t){const n=No(t);let a=t,s=Mn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&l5.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(aE,u5);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!aE.test(l)){let u=l.replace(s5,o5);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=wm}return new s(a,t)}function o5(e){return"-"+e.toLowerCase()}function u5(e){return e.charAt(1).toUpperCase()}const qo=h_([p_,r5,b_,y_,E_],"html"),Ja=h_([p_,a5,b_,y_,E_],"svg");function iE(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,l=!1;for(;!l;){a===-1&&(a=n.length,l=!0);const u=n.slice(s,a).trim();(u||!l)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function x_(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sE=/[#.]/g;function c5(e,t){const n=e||"",a={};let s=0,l,u;for(;s<n.length;){sE.lastIndex=s;const d=sE.exec(n),f=n.slice(s,d?d.index:n.length);f&&(l?l==="#"?a.id=f:Array.isArray(a.className)?a.className.push(f):a.className=[f]:u=f,s+=f.length),d&&(l=d[0],s++)}return{type:"element",tagName:u||t||"div",properties:a,children:[]}}function lE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function v_(e){return e.join(" ").trim()}function __(e,t,n){const a=n?p5(n):void 0;function s(l,u,...d){let f;if(l==null){f={type:"root",children:[]};const h=u;d.unshift(h)}else{f=c5(l,t);const h=f.tagName.toLowerCase(),m=a?a.get(h):void 0;if(f.tagName=m||h,d5(u))d.unshift(u);else for(const[b,E]of Object.entries(u))f5(e,f.properties,b,E)}for(const h of d)Rp(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return s}function d5(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const l=s;for(const u of l)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function f5(e,t,n,a){const s=Ed(e,n);let l;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;l=a}else typeof a=="boolean"?l=a:typeof a=="string"?s.spaceSeparated?l=lE(a):s.commaSeparated?l=iE(a):s.commaOrSpaceSeparated?l=lE(iE(a).join(" ")):l=oE(s,s.property,a):Array.isArray(a)?l=[...a]:l=s.property==="style"?h5(a):String(a);if(Array.isArray(l)){const u=[];for(const d of l)u.push(oE(s,s.property,d));l=u}s.property==="className"&&Array.isArray(t.className)&&(l=t.className.concat(l)),t[s.property]=l}}function Rp(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Rp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Rp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||No(n)===No(t)))return!0}return n}function h5(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function p5(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const m5=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],g5=__(qo,"div"),b5=__(Ja,"g",m5);function y5(e){const t=String(e),n=[];return{toOffset:s,toPoint:a};function a(l){if(typeof l=="number"&&l>-1&&l<=t.length){let u=0;for(;;){let d=n[u];if(d===void 0){const f=uE(t,n[u-1]);d=f===-1?t.length+1:f+1,n[u]=d}if(d>l)return{line:u+1,column:l-(u>0?n[u-1]:0)+1,offset:l};u++}}}function s(l){if(l&&typeof l.line=="number"&&typeof l.column=="number"&&!Number.isNaN(l.line)&&!Number.isNaN(l.column)){for(;n.length<l.line;){const d=n[n.length-1],f=uE(t,d),h=f===-1?t.length+1:f+1;if(d===h)break;n.push(h)}const u=(l.line>1?n[l.line-2]:0)+l.column-1;if(u<n[l.line-1])return u}}}function uE(e,t){const n=e.indexOf("\r",t),a=e.indexOf(`
19
+ `,t);return a===-1?n:n===-1||n+1===a?a:n<a?n:a}const Ci={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},T_={}.hasOwnProperty,E5=Object.prototype;function x5(e,t){const n=t||{};return Sm({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ja:qo,verbose:n.verbose||!1},e)}function Sm(e,t){let n;switch(t.nodeName){case"#comment":{const a=t;return n={type:"comment",value:a.data},Uc(e,a,n),n}case"#document":case"#document-fragment":{const a=t,s="mode"in a?a.mode==="quirks"||a.mode==="limited-quirks":!1;if(n={type:"root",children:A_(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const l=String(e.file),u=y5(l),d=u.toPoint(0),f=u.toPoint(l.length);n.position={start:d,end:f}}return n}case"#documentType":{const a=t;return n={type:"doctype"},Uc(e,a,n),n}case"#text":{const a=t;return n={type:"text",value:a.value},Uc(e,a,n),n}default:return n=v5(e,t),n}}function A_(e,t){let n=-1;const a=[];for(;++n<t.length;){const s=Sm(e,t[n]);a.push(s)}return a}function v5(e,t){const n=e.schema;e.schema=t.namespaceURI===Ci.svg?Ja:qo;let a=-1;const s={};for(;++a<t.attrs.length;){const d=t.attrs[a],f=(d.prefix?d.prefix+":":"")+d.name;T_.call(E5,f)||(s[f]=d.value)}const u=(e.schema.space==="svg"?b5:g5)(t.tagName,s,A_(e,t.childNodes));if(Uc(e,t,u),u.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&Ps(f.startTag),m=f&&f.endTag&&Ps(f.endTag),b=Sm(e,d.content);h&&m&&e.file&&(b.position={start:h.end,end:m.start}),u.content=b}return e.schema=n,u}function Uc(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const a=_5(e,n,t.sourceCodeLocation);a&&(e.location=!0,n.position=a)}}function _5(e,t,n){const a=Ps(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(a&&!n.endTag&&s&&s.position&&s.position.end&&(a.end=Object.assign({},s.position.end)),e.verbose){const l={};let u;if(n.attrs)for(u in n.attrs)T_.call(n.attrs,u)&&(l[Ed(e.schema,u).property]=Ps(n.attrs[u]));n.startTag;const d=Ps(n.startTag),f=n.endTag?Ps(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=l,t.data={position:h}}}return a}function Ps(e){const t=cE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=cE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function cE(e){return e.line&&e.column?e:void 0}const dE={}.hasOwnProperty;function w_(e,t){const n=t||{};function a(s,...l){let u=a.invalid;const d=a.handlers;if(s&&dE.call(s,e)){const f=String(s[e]);u=dE.call(d,f)?d[f]:a.unknown}if(u)return u.call(this,s,...l)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const T5={},A5={}.hasOwnProperty,S_=w_("type",{handlers:{root:S5,element:O5,text:N5,comment:R5,doctype:C5}});function w5(e,t){const a=(t||T5).space;return S_(e,a==="svg"?Ja:qo)}function S5(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=km(e.children,n,t),Qs(e,n),n}function k5(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=km(e.children,n,t),Qs(e,n),n}function C5(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Qs(e,t),t}function N5(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Qs(e,t),t}function R5(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Qs(e,t),t}function O5(e,t){const n=t;let a=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=Ja);const s=[];let l;if(e.properties){for(l in e.properties)if(l!=="children"&&A5.call(e.properties,l)){const f=L5(a,l,e.properties[l]);f&&s.push(f)}}const u=a.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ci[u],childNodes:[],parentNode:null};return d.childNodes=km(e.children,d,a),Qs(e,d),e.tagName==="template"&&e.content&&(d.content=k5(e.content,a)),d}function L5(e,t,n){const a=Ed(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&a.boolean)return;Array.isArray(n)&&(n=a.commaSeparated?x_(n):v_(n));const s={name:a.attribute,value:n===!0?"":String(n)};if(a.space&&a.space!=="html"&&a.space!=="svg"){const l=s.name.indexOf(":");l<0?s.prefix="":(s.name=s.name.slice(l+1),s.prefix=a.attribute.slice(0,l)),s.namespace=Ci[a.space]}return s}function km(e,t,n){let a=-1;const s=[];if(e)for(;++a<e.length;){const l=S_(e[a],n);l.parentNode=t,s.push(l)}return s}function Qs(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const I5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],M5=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Tt="�";var N;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(N||(N={}));const Cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function k_(e){return e>=55296&&e<=57343}function D5(e){return e>=56320&&e<=57343}function B5(e,t){return(e-55296)*1024+9216+t}function C_(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function N_(e){return e>=64976&&e<=65007||M5.has(e)}var re;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(re||(re={}));const z5=65536;class P5{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=z5,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:a,col:s,offset:l}=this,u=s+n,d=l+n;return{code:t,startLine:a,endLine:a,startCol:u,endCol:u,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(D5(n))return this.pos++,this._addGap(),B5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(re.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let a=0;a<t.length;a++)if((this.html.charCodeAt(this.pos+a)|32)!==t.charCodeAt(a))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const a=this.html.charCodeAt(n);return a===N.CARRIAGE_RETURN?N.LINE_FEED:a}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,k_(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){C_(t)?this._err(re.controlCharacterInInputStream):N_(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var $e;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})($e||($e={}));function R_(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const H5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),U5=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function j5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=U5.get(e))!==null&&t!==void 0?t:e}var Gt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Gt||(Gt={}));const F5=32;var Ga;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ga||(Ga={}));function Op(e){return e>=Gt.ZERO&&e<=Gt.NINE}function $5(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_F||e>=Gt.LOWER_A&&e<=Gt.LOWER_F}function q5(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_Z||e>=Gt.LOWER_A&&e<=Gt.LOWER_Z||Op(e)}function Y5(e){return e===Gt.EQUALS||q5(e)}var Yt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Yt||(Yt={}));var sa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(sa||(sa={}));class V5{constructor(t,n,a){this.decodeTree=t,this.emitCodePoint=n,this.errors=a,this.state=Yt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=sa.Strict}startEntity(t){this.decodeMode=t,this.state=Yt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Yt.EntityStart:return t.charCodeAt(n)===Gt.NUM?(this.state=Yt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Yt.NamedEntity,this.stateNamedEntity(t,n));case Yt.NumericStart:return this.stateNumericStart(t,n);case Yt.NumericDecimal:return this.stateNumericDecimal(t,n);case Yt.NumericHex:return this.stateNumericHex(t,n);case Yt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|F5)===Gt.LOWER_X?(this.state=Yt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Yt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,a,s){if(n!==a){const l=a-n;this.result=this.result*Math.pow(s,l)+Number.parseInt(t.substr(n,l),s),this.consumed+=l}}stateNumericHex(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Op(s)||$5(s))n+=1;else return this.addToNumericResult(t,a,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,a,n,16),-1}stateNumericDecimal(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Op(s))n+=1;else return this.addToNumericResult(t,a,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,a,n,10),-1}emitNumericEntity(t,n){var a;if(this.consumed<=n)return(a=this.errors)===null||a===void 0||a.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Gt.SEMI)this.consumed+=1;else if(this.decodeMode===sa.Strict)return 0;return this.emitCodePoint(j5(this.result),this.consumed),this.errors&&(t!==Gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:a}=this;let s=a[this.treeIndex],l=(s&Ga.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=G5(a,s,this.treeIndex+Math.max(1,l),u),this.treeIndex<0)return this.result===0||this.decodeMode===sa.Attribute&&(l===0||Y5(u))?0:this.emitNotTerminatedNamedEntity();if(s=a[this.treeIndex],l=(s&Ga.VALUE_LENGTH)>>14,l!==0){if(u===Gt.SEMI)return this.emitNamedEntityData(this.treeIndex,l,this.consumed+this.excess);this.decodeMode!==sa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:a}=this,s=(a[n]&Ga.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,a){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Ga.VALUE_LENGTH:s[t+1],a),n===3&&this.emitCodePoint(s[t+2],a),a}end(){var t;switch(this.state){case Yt.NamedEntity:return this.result!==0&&(this.decodeMode!==sa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yt.NumericDecimal:return this.emitNumericEntity(0,2);case Yt.NumericHex:return this.emitNumericEntity(0,3);case Yt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yt.EntityStart:return 0}}}function G5(e,t,n,a){const s=(t&Ga.BRANCH_LENGTH)>>7,l=t&Ga.JUMP_TABLE;if(s===0)return l!==0&&a===l?n:-1;if(l){const f=a-l;return f<0||f>=s?-1:e[n+f]-1}let u=n,d=u+s-1;for(;u<=d;){const f=u+d>>>1,h=e[f];if(h<a)u=f+1;else if(h>a)d=f-1;else return e[f+s]}return-1}var he;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(he||(he={}));var Oi;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Oi||(Oi={}));var or;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(or||(or={}));var W;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(W||(W={}));var y;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(y||(y={}));const W5=new Map([[W.A,y.A],[W.ADDRESS,y.ADDRESS],[W.ANNOTATION_XML,y.ANNOTATION_XML],[W.APPLET,y.APPLET],[W.AREA,y.AREA],[W.ARTICLE,y.ARTICLE],[W.ASIDE,y.ASIDE],[W.B,y.B],[W.BASE,y.BASE],[W.BASEFONT,y.BASEFONT],[W.BGSOUND,y.BGSOUND],[W.BIG,y.BIG],[W.BLOCKQUOTE,y.BLOCKQUOTE],[W.BODY,y.BODY],[W.BR,y.BR],[W.BUTTON,y.BUTTON],[W.CAPTION,y.CAPTION],[W.CENTER,y.CENTER],[W.CODE,y.CODE],[W.COL,y.COL],[W.COLGROUP,y.COLGROUP],[W.DD,y.DD],[W.DESC,y.DESC],[W.DETAILS,y.DETAILS],[W.DIALOG,y.DIALOG],[W.DIR,y.DIR],[W.DIV,y.DIV],[W.DL,y.DL],[W.DT,y.DT],[W.EM,y.EM],[W.EMBED,y.EMBED],[W.FIELDSET,y.FIELDSET],[W.FIGCAPTION,y.FIGCAPTION],[W.FIGURE,y.FIGURE],[W.FONT,y.FONT],[W.FOOTER,y.FOOTER],[W.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[W.FORM,y.FORM],[W.FRAME,y.FRAME],[W.FRAMESET,y.FRAMESET],[W.H1,y.H1],[W.H2,y.H2],[W.H3,y.H3],[W.H4,y.H4],[W.H5,y.H5],[W.H6,y.H6],[W.HEAD,y.HEAD],[W.HEADER,y.HEADER],[W.HGROUP,y.HGROUP],[W.HR,y.HR],[W.HTML,y.HTML],[W.I,y.I],[W.IMG,y.IMG],[W.IMAGE,y.IMAGE],[W.INPUT,y.INPUT],[W.IFRAME,y.IFRAME],[W.KEYGEN,y.KEYGEN],[W.LABEL,y.LABEL],[W.LI,y.LI],[W.LINK,y.LINK],[W.LISTING,y.LISTING],[W.MAIN,y.MAIN],[W.MALIGNMARK,y.MALIGNMARK],[W.MARQUEE,y.MARQUEE],[W.MATH,y.MATH],[W.MENU,y.MENU],[W.META,y.META],[W.MGLYPH,y.MGLYPH],[W.MI,y.MI],[W.MO,y.MO],[W.MN,y.MN],[W.MS,y.MS],[W.MTEXT,y.MTEXT],[W.NAV,y.NAV],[W.NOBR,y.NOBR],[W.NOFRAMES,y.NOFRAMES],[W.NOEMBED,y.NOEMBED],[W.NOSCRIPT,y.NOSCRIPT],[W.OBJECT,y.OBJECT],[W.OL,y.OL],[W.OPTGROUP,y.OPTGROUP],[W.OPTION,y.OPTION],[W.P,y.P],[W.PARAM,y.PARAM],[W.PLAINTEXT,y.PLAINTEXT],[W.PRE,y.PRE],[W.RB,y.RB],[W.RP,y.RP],[W.RT,y.RT],[W.RTC,y.RTC],[W.RUBY,y.RUBY],[W.S,y.S],[W.SCRIPT,y.SCRIPT],[W.SEARCH,y.SEARCH],[W.SECTION,y.SECTION],[W.SELECT,y.SELECT],[W.SOURCE,y.SOURCE],[W.SMALL,y.SMALL],[W.SPAN,y.SPAN],[W.STRIKE,y.STRIKE],[W.STRONG,y.STRONG],[W.STYLE,y.STYLE],[W.SUB,y.SUB],[W.SUMMARY,y.SUMMARY],[W.SUP,y.SUP],[W.TABLE,y.TABLE],[W.TBODY,y.TBODY],[W.TEMPLATE,y.TEMPLATE],[W.TEXTAREA,y.TEXTAREA],[W.TFOOT,y.TFOOT],[W.TD,y.TD],[W.TH,y.TH],[W.THEAD,y.THEAD],[W.TITLE,y.TITLE],[W.TR,y.TR],[W.TRACK,y.TRACK],[W.TT,y.TT],[W.U,y.U],[W.UL,y.UL],[W.SVG,y.SVG],[W.VAR,y.VAR],[W.WBR,y.WBR],[W.XMP,y.XMP]]);function Xs(e){var t;return(t=W5.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const pe=y,Q5={[he.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[he.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[he.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[he.XLINK]:new Set,[he.XML]:new Set,[he.XMLNS]:new Set},Lp=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);W.STYLE,W.SCRIPT,W.XMP,W.IFRAME,W.NOEMBED,W.NOFRAMES,W.PLAINTEXT;var L;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(L||(L={}));const Ot={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function X5(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function po(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function K5(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function $a(e){return K5(e)||po(e)}function fE(e){return $a(e)||X5(e)}function xc(e){return e+32}function O_(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function hE(e){return O_(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function Z5(e){return e===N.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:k_(e)?re.surrogateCharacterReference:N_(e)?re.noncharacterCharacterReference:C_(e)||e===N.CARRIAGE_RETURN?re.controlCharacterReference:null}class J5{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new P5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new V5(H5,(a,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(a)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:a=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+a)},validateNumericCharacterReference:a=>{const s=Z5(a);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var a,s;(s=(a=this.handler).onParseError)===null||s===void 0||s.call(a,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,a){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||a?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:$e.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$e.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$e.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$e.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const a=this.currentToken;if(R_(a,this.currentAttr.name)===null){if(a.attrs.push(this.currentAttr),a.location&&this.currentLocation){const s=(t=(n=a.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(re.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Xs(t.tagName),t.type===$e.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case $e.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $e.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $e.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:$e.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=O_(t)?$e.WHITESPACE_CHARACTER:t===N.NULL?$e.NULL_CHARACTER:$e.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($e.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?sa.Attribute:sa.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($a(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($a(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=L.DATA;break}case N.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=Tt;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(po(t)?xc(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){$a(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){$a(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){$a(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$a(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$a(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Cn.SCRIPT,!1)&&hE(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case N.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Cn.SCRIPT,!1)&&hE(this.preprocessor.peek(Cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(re.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=Tt;break}default:this.currentAttr.name+=String.fromCodePoint(po(t)?xc(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Tt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Cn.DASH_DASH,!0)?(this._createCommentToken(Cn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(Cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Cn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(Cn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(Cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Tt;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(re.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(po(t))this._createDoctypeToken(String.fromCharCode(xc(t))),this.state=L.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(Tt),this.state=L.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.name+=Tt;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(po(t)?xc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Cn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Cn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Tt;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Tt;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Tt;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Tt;break}case N.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case N.NULL:{this._err(re.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=L.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&fE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){fE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const L_=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),pE=new Set([...L_,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),Xc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),eN=new Set([...Xc,y.OL,y.UL]),tN=new Set([...Xc,y.BUTTON]),mE=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),gE=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),nN=new Set([y.TR,y.TEMPLATE,y.HTML]),rN=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),aN=new Set([y.TABLE,y.TEMPLATE,y.HTML]),iN=new Set([y.TD,y.TH]);class sN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,a){this.treeAdapter=n,this.handler=a,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===he.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const a=this._indexOf(t);this.items[a]=n,a===this.stackTop&&(this.current=n)}insertAfter(t,n,a){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,a),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==he.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(a,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Lp,he.HTML)}popUntilTableCellPopped(){this.popUntilPopped(iN,he.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let a=this.stackTop;a>=0;a--)if(t.has(this.tagIDs[a])&&this.treeAdapter.getNamespaceURI(this.items[a])===n)return a;return-1}clearBackTo(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(a+1)}clearBackToTableContext(){this.clearBackTo(aN,he.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rN,he.HTML)}clearBackToTableRowContext(){this.clearBackTo(nN,he.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===y.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===y.HTML}hasInDynamicScope(t,n){for(let a=this.stackTop;a>=0;a--){const s=this.tagIDs[a];switch(this.treeAdapter.getNamespaceURI(this.items[a])){case he.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case he.SVG:{if(gE.has(s))return!1;break}case he.MATHML:{if(mE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xc)}hasInListItemScope(t){return this.hasInDynamicScope(t,eN)}hasInButtonScope(t){return this.hasInDynamicScope(t,tN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case he.HTML:{if(Lp.has(n))return!0;if(Xc.has(n))return!1;break}case he.SVG:{if(gE.has(n))return!1;break}case he.MATHML:{if(mE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===he.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===he.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===he.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&L_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&pE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&pE.has(this.currentTagId);)this.pop()}}const x0=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const bE={type:Mr.Marker};class lN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const a=[],s=n.length,l=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const f=this.entries[d];if(f.type===Mr.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===l&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===s&&a.push({idx:d,attrs:m})}}return a}_ensureNoahArkCondition(t){if(this.entries.length<x0)return;const n=this.treeAdapter.getAttrList(t),a=this._getNoahArkConditionCandidates(t,n);if(a.length<x0)return;const s=new Map(n.map(u=>[u.name,u.value]));let l=0;for(let u=0;u<a.length;u++){const d=a[u];d.attrs.every(f=>s.get(f.name)===f.value)&&(l+=1,l>=x0&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(bE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const a=this.entries.indexOf(this.bookmark);this.entries.splice(a,0,{type:Mr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(bE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(a=>a.type===Mr.Marker||this.treeAdapter.getTagName(a.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const qa={createDocument(){return{nodeName:"#document",mode:or.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const a=e.childNodes.indexOf(n);e.childNodes.splice(a,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,a){const s=e.childNodes.find(l=>l.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=a;else{const l={nodeName:"#documentType",name:t,publicId:n,systemId:a,parentNode:null};qa.appendChild(e,l)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(qa.isTextNode(n)){n.value+=t;return}}qa.appendChild(e,qa.createTextNode(t))},insertTextBefore(e,t,n){const a=e.childNodes[e.childNodes.indexOf(n)-1];a&&qa.isTextNode(a)?a.value+=t:qa.insertBefore(e,qa.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(a=>a.name));for(let a=0;a<t.length;a++)n.has(t[a].name)||e.attrs.push(t[a])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},I_="html",oN="about:legacy-compat",uN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",M_=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],cN=[...M_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),D_=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fN=[...D_,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function yE(e,t){return t.some(n=>e.startsWith(n))}function hN(e){return e.name===I_&&e.publicId===null&&(e.systemId===null||e.systemId===oN)}function pN(e){if(e.name!==I_)return or.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===uN)return or.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),dN.has(n))return or.QUIRKS;let a=t===null?cN:M_;if(yE(n,a))return or.QUIRKS;if(a=t===null?D_:fN,yE(n,a))return or.LIMITED_QUIRKS}return or.NO_QUIRKS}const EE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mN="definitionurl",gN="definitionURL",bN=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),yN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:he.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:he.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:he.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:he.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:he.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:he.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:he.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:he.XML}],["xml:space",{prefix:"xml",name:"space",namespace:he.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:he.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:he.XMLNS}]]),EN=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),xN=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function vN(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:a})=>a===Oi.COLOR||a===Oi.SIZE||a===Oi.FACE)||xN.has(t)}function B_(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mN){e.attrs[t].name=gN;break}}function z_(e){for(let t=0;t<e.attrs.length;t++){const n=bN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Cm(e){for(let t=0;t<e.attrs.length;t++){const n=yN.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function _N(e){const t=EN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Xs(e.tagName))}function TN(e,t){return t===he.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function AN(e,t,n){if(t===he.MATHML&&e===y.ANNOTATION_XML){for(let a=0;a<n.length;a++)if(n[a].name===Oi.ENCODING){const s=n[a].value.toLowerCase();return s===EE.TEXT_HTML||s===EE.APPLICATION_XML}}return t===he.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function wN(e,t,n,a){return(!a||a===he.HTML)&&AN(e,t,n)||(!a||a===he.MATHML)&&TN(e,t)}const SN="hidden",kN=8,CN=3;var I;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));const NN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},P_=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),xE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:qa,onParseError:null};class vE{constructor(t,n,a=null,s=null){this.fragmentContext=a,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...xE,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new J5(this.options,this),this.activeFormattingElements=new lN(this.treeAdapter),this.fragmentContextID=a?Xs(this.treeAdapter.getTagName(a)):y.UNKNOWN,this._setContextModes(a??this.document,this.fragmentContextID),this.openElements=new sN(this.document,this.treeAdapter,this)}static parse(t,n){const a=new this(n);return a.tokenizer.write(t,!0),a.document}static getFragmentParser(t,n){const a={...xE,...n};t??(t=a.treeAdapter.createElement(W.TEMPLATE,he.HTML,[]));const s=a.treeAdapter.createElement("documentmock",he.HTML,[]),l=new this(a,s,t);return l.fragmentContextID===y.TEMPLATE&&l.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),l._initTokenizerForFragmentParsing(),l._insertFakeRootElement(),l._resetInsertionMode(),l._findFormInFragmentContext(),l}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,a){var s;if(!this.onParseError)return;const l=(s=t.location)!==null&&s!==void 0?s:NN,u={code:n,startLine:l.startLine,startCol:l.startCol,startOffset:l.startOffset,endLine:a?l.startLine:l.endLine,endCol:a?l.startCol:l.endCol,endOffset:a?l.startOffset:l.endOffset};this.onParseError(u)}onItemPush(t,n,a){var s,l;(l=(s=this.treeAdapter).onItemPush)===null||l===void 0||l.call(s,t),a&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var a,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(a=this.treeAdapter).onItemPop)===null||s===void 0||s.call(a,t,this.openElements.current),n){let l,u;this.openElements.stackTop===0&&this.fragmentContext?(l=this.fragmentContext,u=this.fragmentContextID):{current:l,currentTagId:u}=this.openElements,this._setContextModes(l,u)}}_setContextModes(t,n){const a=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===he.HTML;this.currentNotInHTML=!a,this.tokenizer.inForeignNode=!a&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,he.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=Ot.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===W.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==he.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Ot.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Ot.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Ot.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Ot.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",a=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,a,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const a=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,a)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const a=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(a??this.document,t)}}_appendElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location)}_insertElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID)}_insertFakeElement(t,n){const a=this.treeAdapter.createElement(t,he.HTML,[]);this._attachElementToTree(a,null),this.openElements.push(a,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,he.HTML,t.attrs),a=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,a),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(W.HTML,he.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const a=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,a),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_insertCharacters(t){let n,a;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:a}=this._findFosterParentingLocation(),a?this.treeAdapter.insertTextBefore(n,t.chars,a):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),l=a?s.lastIndexOf(a):s.length,u=s[l-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let a=this.treeAdapter.getFirstChild(t);a;a=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(a),this.treeAdapter.appendChild(n,a)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const a=n.location,s=this.treeAdapter.getTagName(t),l=n.type===$e.END_TAG&&s===n.tagName?{endTag:{...a},endLine:a.endLine,endCol:a.endCol,endOffset:a.endOffset}:{endLine:a.startLine,endCol:a.startCol,endOffset:a.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,l)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,a;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,a=this.fragmentContextID):{current:n,currentTagId:a}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===W.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===he.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&a!==void 0&&!this._isIntegrationPoint(a,n,he.HTML)}_processToken(t){switch(t.type){case $e.CHARACTER:{this.onCharacter(t);break}case $e.NULL_CHARACTER:{this.onNullCharacter(t);break}case $e.COMMENT:{this.onComment(t);break}case $e.DOCTYPE:{this.onDoctype(t);break}case $e.START_TAG:{this._processStartTag(t);break}case $e.END_TAG:{this.onEndTag(t);break}case $e.EOF:{this.onEof(t);break}case $e.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,a){const s=this.treeAdapter.getNamespaceURI(n),l=this.treeAdapter.getAttrList(n);return wN(t,s,l,a)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Mr.Marker||this.openElements.contains(s.element)),a=n===-1?t-1:n-1;for(let s=a;s>=0;s--){const l=this.activeFormattingElements.entries[s];this._insertElement(l.token,this.treeAdapter.getNamespaceURI(l.element)),l.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=I.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=I.IN_TABLE;return}case y.BODY:{this.insertionMode=I.IN_BODY;return}case y.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const a=this.openElements.tagIDs[n];if(a===y.TEMPLATE)break;if(a===y.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return P_.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===he.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const a=this.treeAdapter.getParentNode(n);return a?{parent:a,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const a=this.treeAdapter.getNamespaceURI(t);return Q5[a].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iR(this,t);return}switch(this.insertionMode){case I.INITIAL:{Jl(this,t);break}case I.BEFORE_HTML:{Eo(this,t);break}case I.BEFORE_HEAD:{xo(this,t);break}case I.IN_HEAD:{vo(this,t);break}case I.IN_HEAD_NO_SCRIPT:{_o(this,t);break}case I.AFTER_HEAD:{To(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{U_(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{v0(this,t);break}case I.IN_TABLE_TEXT:{V_(this,t);break}case I.IN_COLUMN_GROUP:{Kc(this,t);break}case I.AFTER_BODY:{Zc(this,t);break}case I.AFTER_AFTER_BODY:{jc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aR(this,t);return}switch(this.insertionMode){case I.INITIAL:{Jl(this,t);break}case I.BEFORE_HTML:{Eo(this,t);break}case I.BEFORE_HEAD:{xo(this,t);break}case I.IN_HEAD:{vo(this,t);break}case I.IN_HEAD_NO_SCRIPT:{_o(this,t);break}case I.AFTER_HEAD:{To(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{v0(this,t);break}case I.IN_COLUMN_GROUP:{Kc(this,t);break}case I.AFTER_BODY:{Zc(this,t);break}case I.AFTER_AFTER_BODY:{jc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ip(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{Ip(this,t);break}case I.IN_TABLE_TEXT:{eo(this,t);break}case I.AFTER_BODY:{BN(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{zN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{PN(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case I.IN_TABLE_TEXT:{eo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?sR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Jl(this,t);break}case I.BEFORE_HTML:{HN(this,t);break}case I.BEFORE_HEAD:{jN(this,t);break}case I.IN_HEAD:{vr(this,t);break}case I.IN_HEAD_NO_SCRIPT:{qN(this,t);break}case I.AFTER_HEAD:{VN(this,t);break}case I.IN_BODY:{cn(this,t);break}case I.IN_TABLE:{qs(this,t);break}case I.IN_TABLE_TEXT:{eo(this,t);break}case I.IN_CAPTION:{F8(this,t);break}case I.IN_COLUMN_GROUP:{Om(this,t);break}case I.IN_TABLE_BODY:{_d(this,t);break}case I.IN_ROW:{Td(this,t);break}case I.IN_CELL:{Y8(this,t);break}case I.IN_SELECT:{Q_(this,t);break}case I.IN_SELECT_IN_TABLE:{G8(this,t);break}case I.IN_TEMPLATE:{Q8(this,t);break}case I.AFTER_BODY:{K8(this,t);break}case I.IN_FRAMESET:{Z8(this,t);break}case I.AFTER_FRAMESET:{eR(this,t);break}case I.AFTER_AFTER_BODY:{nR(this,t);break}case I.AFTER_AFTER_FRAMESET:{rR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?lR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Jl(this,t);break}case I.BEFORE_HTML:{UN(this,t);break}case I.BEFORE_HEAD:{FN(this,t);break}case I.IN_HEAD:{$N(this,t);break}case I.IN_HEAD_NO_SCRIPT:{YN(this,t);break}case I.AFTER_HEAD:{GN(this,t);break}case I.IN_BODY:{vd(this,t);break}case I.TEXT:{L8(this,t);break}case I.IN_TABLE:{Ro(this,t);break}case I.IN_TABLE_TEXT:{eo(this,t);break}case I.IN_CAPTION:{$8(this,t);break}case I.IN_COLUMN_GROUP:{q8(this,t);break}case I.IN_TABLE_BODY:{Mp(this,t);break}case I.IN_ROW:{W_(this,t);break}case I.IN_CELL:{V8(this,t);break}case I.IN_SELECT:{X_(this,t);break}case I.IN_SELECT_IN_TABLE:{W8(this,t);break}case I.IN_TEMPLATE:{X8(this,t);break}case I.AFTER_BODY:{Z_(this,t);break}case I.IN_FRAMESET:{J8(this,t);break}case I.AFTER_FRAMESET:{tR(this,t);break}case I.AFTER_AFTER_BODY:{jc(this,t);break}}}onEof(t){switch(this.insertionMode){case I.INITIAL:{Jl(this,t);break}case I.BEFORE_HTML:{Eo(this,t);break}case I.BEFORE_HEAD:{xo(this,t);break}case I.IN_HEAD:{vo(this,t);break}case I.IN_HEAD_NO_SCRIPT:{_o(this,t);break}case I.AFTER_HEAD:{To(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{q_(this,t);break}case I.TEXT:{I8(this,t);break}case I.IN_TABLE_TEXT:{eo(this,t);break}case I.IN_TEMPLATE:{K_(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{Rm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{H_(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{v0(this,t);break}case I.IN_TABLE_TEXT:{Y_(this,t);break}}}}function RN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):$_(e,t),n}function ON(e,t){let n=null,a=e.openElements.stackTop;for(;a>=0;a--){const s=e.openElements.items[a];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[a])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(a,0)),e.activeFormattingElements.removeEntry(t)),n}function LN(e,t,n){let a=t,s=e.openElements.getCommonAncestor(t);for(let l=0,u=s;u!==n;l++,u=s){s=e.openElements.getCommonAncestor(u);const d=e.activeFormattingElements.getElementEntry(u),f=d&&l>=CN;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(u)):(u=IN(e,d),a===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(a),e.treeAdapter.appendChild(u,a),a=u)}return a}function IN(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),a=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,a),t.element=a,a}function MN(e,t,n){const a=e.treeAdapter.getTagName(t),s=Xs(a);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const l=e.treeAdapter.getNamespaceURI(t);s===y.TEMPLATE&&l===he.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function DN(e,t,n){const a=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,l=e.treeAdapter.createElement(s.tagName,a,s.attrs);e._adoptNodes(t,l),e.treeAdapter.appendChild(t,l),e.activeFormattingElements.insertElementAfterBookmark(l,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,l,s.tagID)}function Nm(e,t){for(let n=0;n<kN;n++){const a=RN(e,t);if(!a)break;const s=ON(e,a);if(!s)break;e.activeFormattingElements.bookmark=a;const l=LN(e,s,a.element),u=e.openElements.getCommonAncestor(a.element);e.treeAdapter.detachNode(l),u&&MN(e,u,l),DN(e,s,a)}}function Ip(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function BN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function zN(e,t){e._appendCommentNode(t,e.document)}function Rm(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let a=e.openElements.stackTop;a>=n;a--)e._setEndLocation(e.openElements.items[a],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const a=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(a);if(s&&!s.endTag&&(e._setEndLocation(a,t),e.openElements.stackTop>=1)){const l=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(l);u&&!u.endTag&&e._setEndLocation(l,t)}}}}function PN(e,t){e._setDocumentType(t);const n=t.forceQuirks?or.QUIRKS:pN(t);hN(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=I.BEFORE_HTML}function Jl(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,or.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function HN(e,t){t.tagID===y.HTML?(e._insertElement(t,he.HTML),e.insertionMode=I.BEFORE_HEAD):Eo(e,t)}function UN(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&Eo(e,t)}function Eo(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function jN(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.HEAD:{e._insertElement(t,he.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:xo(e,t)}}function FN(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?xo(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function xo(e,t){e._insertFakeElement(W.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function vr(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,he.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Ot.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ot.RAWTEXT):(e._insertElement(t,he.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Ot.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Ot.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:vo(e,t)}}function $N(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{vo(e,t);break}case y.TEMPLATE:{Pi(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Pi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function vo(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function qN(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{vr(e,t);break}case y.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:_o(e,t)}}function YN(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case y.BR:{_o(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function _o(e,t){const n=t.type===$e.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function VN(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BODY:{e._insertElement(t,he.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,he.HTML),e.insertionMode=I.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,re.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),vr(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:To(e,t)}}function GN(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{To(e,t);break}case y.TEMPLATE:{Pi(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function To(e,t){e._insertFakeElement(W.BODY,y.BODY),e.insertionMode=I.IN_BODY,xd(e,t)}function xd(e,t){switch(t.type){case $e.CHARACTER:{U_(e,t);break}case $e.WHITESPACE_CHARACTER:{H_(e,t);break}case $e.COMMENT:{Ip(e,t);break}case $e.START_TAG:{cn(e,t);break}case $e.END_TAG:{vd(e,t);break}case $e.EOF:{q_(e,t);break}}}function H_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function U_(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function WN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function QN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function XN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_FRAMESET)}function KN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML)}function ZN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Lp.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,he.HTML)}function JN(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function e8(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML),n||(e.formElement=e.openElements.current))}function t8(e,t){e.framesetOk=!1;const n=t.tagID;for(let a=e.openElements.stackTop;a>=0;a--){const s=e.openElements.tagIDs[a];if(n===y.LI&&s===y.LI||(n===y.DD||n===y.DT)&&(s===y.DD||s===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==y.ADDRESS&&s!==y.DIV&&s!==y.P&&e._isSpecialElement(e.openElements.items[a],s))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML)}function n8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML),e.tokenizer.state=Ot.PLAINTEXT}function r8(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML),e.framesetOk=!1}function a8(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(W.A);n&&(Nm(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function i8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function s8(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(Nm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,he.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function l8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function o8(e,t){e.treeAdapter.getDocumentMode(e.document)!==or.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,he.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function j_(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,he.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function F_(e){const t=R_(e,Oi.TYPE);return t!=null&&t.toLowerCase()===SN}function u8(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,he.HTML),F_(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function c8(e,t){e._appendElement(t,he.HTML),t.ackSelfClosing=!0}function d8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,he.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function f8(e,t){t.tagName=W.IMG,t.tagID=y.IMG,j_(e,t)}function h8(e,t){e._insertElement(t,he.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ot.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function p8(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ot.RAWTEXT)}function m8(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ot.RAWTEXT)}function _E(e,t){e._switchToTextParsing(t,Ot.RAWTEXT)}function g8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function b8(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML)}function y8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,he.HTML)}function E8(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,he.HTML)}function x8(e,t){e._reconstructActiveFormattingElements(),B_(t),Cm(t),t.selfClosing?e._appendElement(t,he.MATHML):e._insertElement(t,he.MATHML),t.ackSelfClosing=!0}function v8(e,t){e._reconstructActiveFormattingElements(),z_(t),Cm(t),t.selfClosing?e._appendElement(t,he.SVG):e._insertElement(t,he.SVG),t.ackSelfClosing=!0}function TE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,he.HTML)}function cn(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{i8(e,t);break}case y.A:{a8(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{ZN(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{KN(e,t);break}case y.LI:case y.DD:case y.DT:{t8(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{j_(e,t);break}case y.HR:{d8(e,t);break}case y.RB:case y.RTC:{y8(e,t);break}case y.RT:case y.RP:{E8(e,t);break}case y.PRE:case y.LISTING:{JN(e,t);break}case y.XMP:{p8(e,t);break}case y.SVG:{v8(e,t);break}case y.HTML:{WN(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{vr(e,t);break}case y.BODY:{QN(e,t);break}case y.FORM:{e8(e,t);break}case y.NOBR:{s8(e,t);break}case y.MATH:{x8(e,t);break}case y.TABLE:{o8(e,t);break}case y.INPUT:{u8(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{c8(e,t);break}case y.IMAGE:{f8(e,t);break}case y.BUTTON:{r8(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{l8(e,t);break}case y.IFRAME:{m8(e,t);break}case y.SELECT:{g8(e,t);break}case y.OPTION:case y.OPTGROUP:{b8(e,t);break}case y.NOEMBED:case y.NOFRAMES:{_E(e,t);break}case y.FRAMESET:{XN(e,t);break}case y.TEXTAREA:{h8(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?_E(e,t):TE(e,t);break}case y.PLAINTEXT:{n8(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:TE(e,t)}}function _8(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function T8(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=I.AFTER_BODY,Z_(e,t))}function A8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function w8(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function S8(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement(W.P,y.P),e._closePElement()}function k8(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function C8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function N8(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function R8(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function O8(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(W.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function $_(e,t){const n=t.tagName,a=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const l=e.openElements.items[s],u=e.openElements.tagIDs[s];if(a===u&&(a!==y.UNKNOWN||e.treeAdapter.getTagName(l)===n)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(l,u))break}}function vd(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{Nm(e,t);break}case y.P:{S8(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{A8(e,t);break}case y.LI:{k8(e);break}case y.DD:case y.DT:{C8(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{N8(e);break}case y.BR:{O8(e);break}case y.BODY:{_8(e,t);break}case y.HTML:{T8(e,t);break}case y.FORM:{w8(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{R8(e,t);break}case y.TEMPLATE:{Pi(e,t);break}default:$_(e,t)}}function q_(e,t){e.tmplInsertionModeStack.length>0?K_(e,t):Rm(e,t)}function L8(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function I8(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function v0(e,t){if(e.openElements.currentTagId!==void 0&&P_.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case $e.CHARACTER:{V_(e,t);break}case $e.WHITESPACE_CHARACTER:{Y_(e,t);break}}else Yo(e,t)}function M8(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_CAPTION}function D8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function B8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.COLGROUP,y.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,Om(e,t)}function z8(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_TABLE_BODY}function P8(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(W.TBODY,y.TBODY),e.insertionMode=I.IN_TABLE_BODY,_d(e,t)}function H8(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function U8(e,t){F_(t)?e._appendElement(t,he.HTML):Yo(e,t),t.ackSelfClosing=!0}function j8(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,he.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function qs(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{P8(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{vr(e,t);break}case y.COL:{B8(e,t);break}case y.FORM:{j8(e,t);break}case y.TABLE:{H8(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{z8(e,t);break}case y.INPUT:{U8(e,t);break}case y.CAPTION:{M8(e,t);break}case y.COLGROUP:{D8(e,t);break}default:Yo(e,t)}}function Ro(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{Pi(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:Yo(e,t)}}function Yo(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xd(e,t),e.fosterParentingEnabled=n}function Y_(e,t){e.pendingCharacterTokens.push(t)}function V_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function eo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Yo(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const G_=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function F8(e,t){const n=t.tagID;G_.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,qs(e,t)):cn(e,t)}function $8(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,n===y.TABLE&&Ro(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:vd(e,t)}}function Om(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.COL:{e._appendElement(t,he.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{vr(e,t);break}default:Kc(e,t)}}function q8(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case y.TEMPLATE:{Pi(e,t);break}case y.COL:break;default:Kc(e,t)}}function Kc(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE,e._processToken(t))}function _d(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(W.TR,y.TR),e.insertionMode=I.IN_ROW,Td(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,qs(e,t));break}default:qs(e,t)}}function Mp(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,Ro(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:Ro(e,t)}}function Td(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,he.HTML),e.insertionMode=I.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,_d(e,t));break}default:qs(e,t)}}function W_(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Mp(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Mp(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:Ro(e,t)}}function Y8(e,t){const n=t.tagID;G_.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),Td(e,t)):cn(e,t)}function V8(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),W_(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:vd(e,t)}}function Q_(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,he.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,he.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,he.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{vr(e,t);break}}}function X_(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{Pi(e,t);break}}}function G8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Q_(e,t)}function W8(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):X_(e,t)}function Q8(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{vr(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,qs(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,Om(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,_d(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,Td(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,cn(e,t)}}function X8(e,t){t.tagID===y.TEMPLATE&&Pi(e,t)}function K_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Rm(e,t)}function K8(e,t){t.tagID===y.HTML?cn(e,t):Zc(e,t)}function Z_(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const a=e.openElements.items[1];a&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(a))===null||n===void 0)&&n.endTag)&&e._setEndLocation(a,t)}}else Zc(e,t)}function Zc(e,t){e.insertionMode=I.IN_BODY,xd(e,t)}function Z8(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.FRAMESET:{e._insertElement(t,he.HTML);break}case y.FRAME:{e._appendElement(t,he.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{vr(e,t);break}}}function J8(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function eR(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{vr(e,t);break}}}function tR(e,t){t.tagID===y.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function nR(e,t){t.tagID===y.HTML?cn(e,t):jc(e,t)}function jc(e,t){e.insertionMode=I.IN_BODY,xd(e,t)}function rR(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{vr(e,t);break}}}function aR(e,t){t.chars=Tt,e._insertCharacters(t)}function iR(e,t){e._insertCharacters(t),e.framesetOk=!1}function J_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==he.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function sR(e,t){if(vN(t))J_(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),a=e.treeAdapter.getNamespaceURI(n);a===he.MATHML?B_(t):a===he.SVG&&(_N(t),z_(t)),Cm(t),t.selfClosing?e._appendElement(t,a):e._insertElement(t,a),t.ackSelfClosing=!0}}function lR(e,t){if(t.tagID===y.P||t.tagID===y.BR){J_(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const a=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(a)===he.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(a);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}W.AREA,W.BASE,W.BASEFONT,W.BGSOUND,W.BR,W.COL,W.EMBED,W.FRAME,W.HR,W.IMG,W.INPUT,W.KEYGEN,W.LINK,W.META,W.PARAM,W.SOURCE,W.TRACK,W.WBR;const Ad=eT("end"),zr=eT("start");function eT(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function tT(e){const t=zr(e),n=Ad(e);if(t&&n)return{start:t,end:n}}const oR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,uR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),AE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function nT(e,t){const n=ER(e),a=w_("type",{handlers:{root:cR,element:dR,text:fR,comment:aT,doctype:hR,raw:mR},unknown:gR}),s={parser:n?new vE(AE):vE.getFragmentParser(void 0,AE),handle(d){a(d,s)},stitches:!1,options:t||{}};a(e,s),Ks(s,zr());const l=n?s.parser.document:s.parser.getFragment(),u=x5(l,{file:s.options.file});return s.stitches&&Br(u,"comment",function(d,f,h){const m=d;if(m.value.stitch&&h&&f!==void 0){const b=h.children;return b[f]=m.value.stitch,f}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function rT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cR(e,t){rT(e.children,t)}function dR(e,t){bR(e,t),rT(e.children,t),yR(e,t)}function fR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:$e.CHARACTER,chars:e.value,location:Vo(e)};Ks(t,zr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hR(e,t){const n={type:$e.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Vo(e)};Ks(t,zr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pR(e,t){t.stitches=!0;const n=xR(e);if("children"in e&&"children"in n){const a=nT({type:"root",children:e.children},t.options);n.children=a.children}aT({type:"comment",value:{stitch:n}},t)}function aT(e,t){const n=e.value,a={type:$e.COMMENT,data:n,location:Vo(e)};Ks(t,zr(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function mR(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,iT(t,zr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(oR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function gR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))pR(n,t);else{let a="";throw uR.has(n.type)&&(a=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+a)}}function Ks(e,t){iT(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ot.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function iT(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function bR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ot.PLAINTEXT)return;Ks(t,zr(e));const a=t.parser.openElements.current;let s="namespaceURI"in a?a.namespaceURI:Ci.html;s===Ci.html&&n==="svg"&&(s=Ci.svg);const l=w5({...e,children:[]},{space:s===Ci.svg?"svg":"html"}),u={type:$e.START_TAG,tagName:n,tagID:Xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in l?l.attrs:[],location:Vo(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function yR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&I5.includes(n)||t.parser.tokenizer.state===Ot.PLAINTEXT)return;Ks(t,Ad(e));const a={type:$e.END_TAG,tagName:n,tagID:Xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Vo(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ot.RCDATA||t.parser.tokenizer.state===Ot.RAWTEXT||t.parser.tokenizer.state===Ot.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ot.DATA)}function ER(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Vo(e){const t=zr(e)||{line:void 0,column:void 0,offset:void 0},n=Ad(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function xR(e){return"children"in e?Mi({...e,children:[]}):Mi(e)}function Dp(e){return function(t,n){return nT(t,{...e,file:n})}}const xi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],wi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...xi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...xi],h2:[["className","sr-only"]],img:[...xi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...xi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...xi],table:[...xi],ul:[...xi,["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"]},Ya={}.hasOwnProperty;function vR(e,t){let n={type:"root",children:[]};const a={schema:t?{...wi,...t}:wi,stack:[]},s=sT(a,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function sT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return _R(e,n);case"doctype":return TR(e,n);case"element":return AR(e,n);case"root":return wR(e,n);case"text":return SR(e,n)}}}function _R(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",a=n.indexOf("-->"),l={type:"comment",value:a<0?n:n.slice(0,a)};return Go(l,t),l}}function TR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Go(n,t),n}}function AR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const a=lT(e,t.children),s=kR(e,t.properties);e.stack.pop();let l=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(l=!0,e.schema.ancestors&&Ya.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let f=-1;for(l=!1;++f<d.length;)e.stack.includes(d[f])&&(l=!0)}if(!l)return e.schema.strip&&!e.schema.strip.includes(n)?a:void 0;const u={type:"element",tagName:n,properties:s,children:a};return Go(u,t),u}function wR(e,t){const a={type:"root",children:lT(e,t.children)};return Go(a,t),a}function SR(e,t){const a={type:"text",value:typeof t.value=="string"?t.value:""};return Go(a,t),a}function lT(e,t){const n=[];if(Array.isArray(t)){const a=t;let s=-1;for(;++s<a.length;){const l=sT(e,a[s]);l&&(Array.isArray(l)?n.push(...l):n.push(l))}}return n}function kR(e,t){const n=e.stack[e.stack.length-1],a=e.schema.attributes,s=e.schema.required,l=a&&Ya.call(a,n)?a[n]:void 0,u=a&&Ya.call(a,"*")?a["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(Ya.call(d,h)){const m=d[h];let b=wE(e,SE(l,h),h,m);b==null&&(b=wE(e,SE(u,h),h,m)),b!=null&&(f[h]=b)}if(s&&Ya.call(s,n)){const m=s[n];for(h in m)Ya.call(m,h)&&!Ya.call(f,h)&&(f[h]=m[h])}return f}function wE(e,t,n,a){return t?Array.isArray(a)?CR(e,t,n,a):oT(e,t,n,a):void 0}function CR(e,t,n,a){let s=-1;const l=[];for(;++s<a.length;){const u=oT(e,t,n,a[s]);(typeof u=="number"||typeof u=="string")&&l.push(u)}return l}function oT(e,t,n,a){if(!(typeof a!="boolean"&&typeof a!="number"&&typeof a!="string")&&NR(e,n,a)){if(typeof t=="object"&&t.length>1){let s=!1,l=0;for(;++l<t.length;){const u=t[l];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(a))){s=!0;break}}else if(u===a){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+a:a}}function NR(e,t,n){const a=e.schema.protocols&&Ya.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!a||a.length===0)return!0;const s=String(n),l=s.indexOf(":"),u=s.indexOf("?"),d=s.indexOf("#"),f=s.indexOf("/");if(l<0||f>-1&&l>f||u>-1&&l>u||d>-1&&l>d)return!0;let h=-1;for(;++h<a.length;){const m=a[h];if(l===m.length&&s.slice(0,m.length)===m)return!0}return!1}function Go(e,t){const n=tT(t);t.data&&(e.data=Mi(t.data)),n&&(e.position=n)}function SE(e,t){let n,a=-1;if(e)for(;++a<e.length;){const s=e[a],l=typeof s=="string"?s:s[0];if(l===t)return s;l==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function uT(e){return function(t){return vR(t,e)}}function kE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}const bn=ei(/[A-Za-z]/),un=ei(/[\dA-Za-z]/),RR=ei(/[#-'*+\--9=?A-Z^-~]/);function Jc(e){return e!==null&&(e<32||e===127)}const Bp=ei(/\d/),OR=ei(/[\dA-Fa-f]/),LR=ei(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function bt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const wd=ei(/\p{P}|\p{S}/u),Di=ei(/\s/);function ei(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function IR(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function MR(e,t,n){const s=gd((n||{}).ignore||[]),l=DR(t);let u=-1;for(;++u<l.length;)xm(e,"text",d);function d(h,m){let b=-1,E;for(;++b<m.length;){const v=m[b],T=E?E.children:void 0;if(s(v,T?T.indexOf(v):void 0,E))return;E=v}if(E)return f(h,m)}function f(h,m){const b=m[m.length-1],E=l[u][0],v=l[u][1];let T=0;const S=b.children.indexOf(h);let k=!1,q=[];E.lastIndex=0;let P=E.exec(h.value);for(;P;){const G=P.index,ne={index:P.index,input:P.input,stack:[...m,h]};let F=v(...P,ne);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?E.lastIndex=G+1:(T!==G&&q.push({type:"text",value:h.value.slice(T,G)}),Array.isArray(F)?q.push(...F):F&&q.push(F),T=G+P[0].length,k=!0),!E.global)break;P=E.exec(h.value)}return k?(T<h.value.length&&q.push({type:"text",value:h.value.slice(T)}),b.children.splice(S,1,...q)):q=[h],S+q.length}}function DR(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([BR(s[0]),zR(s[1])])}return t}function BR(e){return typeof e=="string"?new RegExp(IR(e),"g"):e}function zR(e){return typeof e=="function"?e:function(){return e}}const _0="phrasing",T0=["autolink","link","image","label"];function PR(){return{transforms:[YR],enter:{literalAutolink:UR,literalAutolinkEmail:A0,literalAutolinkHttp:A0,literalAutolinkWww:A0},exit:{literalAutolink:qR,literalAutolinkEmail:$R,literalAutolinkHttp:jR,literalAutolinkWww:FR}}}function HR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_0,notInConstruct:T0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_0,notInConstruct:T0},{character:":",before:"[ps]",after:"\\/",inConstruct:_0,notInConstruct:T0}]}}function UR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function A0(e){this.config.enter.autolinkProtocol.call(this,e)}function jR(e){this.config.exit.autolinkProtocol.call(this,e)}function FR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function $R(e){this.config.exit.autolinkEmail.call(this,e)}function qR(e){this.exit(e)}function YR(e){MR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,VR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,GR]],{ignore:["link","linkReference"]})}function VR(e,t,n,a,s){let l="";if(!cT(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!WR(n)))return!1;const u=QR(n+a);if(!u[0])return!1;const d={type:"link",title:null,url:l+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function GR(e,t,n,a){return!cT(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function WR(e){const 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 QR(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=kE(e,"(");let l=kE(e,")");for(;a!==-1&&s>l;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),l++;return[e,n]}function cT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Di(n)||wd(n))&&(!t||n!==47)}function Er(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}dT.peek=a9;function XR(){this.buffer()}function KR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ZR(){this.buffer()}function JR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function e9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function t9(e){this.exit(e)}function n9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Er(this.sliceSerialize(e)).toLowerCase(),n.label=t}function r9(e){this.exit(e)}function a9(){return"["}function dT(e,t,n,a){const s=n.createTracker(a);let l=s.move("[^");const u=n.enter("footnoteReference"),d=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),d(),u(),l+=s.move("]"),l}function i9(){return{enter:{gfmFootnoteCallString:XR,gfmFootnoteCall:KR,gfmFootnoteDefinitionLabelString:ZR,gfmFootnoteDefinition:JR},exit:{gfmFootnoteCallString:e9,gfmFootnoteCall:t9,gfmFootnoteDefinitionLabelString:n9,gfmFootnoteDefinition:r9}}}function s9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,l,u){const d=l.createTracker(u);let f=d.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return f+=d.move(l.safe(l.associationId(a),{before:f,after:"]"})),m(),f+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),f+=d.move((t?`
20
+ `:" ")+l.indentLines(l.containerFlow(a,d.current()),t?fT:l9))),h(),f}}function l9(e,t,n){return t===0?e:fT(e,t,n)}function fT(e,t,n){return(n?"":" ")+e}const o9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];hT.peek=h9;function u9(){return{canContainEols:["delete"],enter:{strikethrough:d9},exit:{strikethrough:f9}}}function c9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:o9}],handlers:{delete:hT}}}function d9(e){this.enter({type:"delete",children:[]},e)}function f9(e){this.exit(e)}function hT(e,t,n,a){const s=n.createTracker(a),l=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,{...s.current(),before:u,after:"~"}),u+=s.move("~~"),l(),u}function h9(){return"~"}function p9(e){return e.length}function m9(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||p9,l=[],u=[],d=[],f=[];let h=0,m=-1;for(;++m<e.length;){const A=[],S=[];let k=-1;for(e[m].length>h&&(h=e[m].length);++k<e[m].length;){const q=g9(e[m][k]);if(n.alignDelimiters!==!1){const P=s(q);S[k]=P,(f[k]===void 0||P>f[k])&&(f[k]=P)}A.push(q)}u[m]=A,d[m]=S}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)l[b]=CE(a[b]);else{const A=CE(a);for(;++b<h;)l[b]=A}b=-1;const E=[],v=[];for(;++b<h;){const A=l[b];let S="",k="";A===99?(S=":",k=":"):A===108?S=":":A===114&&(k=":");let q=n.alignDelimiters===!1?1:Math.max(1,f[b]-S.length-k.length);const P=S+"-".repeat(q)+k;n.alignDelimiters!==!1&&(q=S.length+q+k.length,q>f[b]&&(f[b]=q),v[b]=q),E[b]=P}u.splice(1,0,E),d.splice(1,0,v),m=-1;const T=[];for(;++m<u.length;){const A=u[m],S=d[m];b=-1;const k=[];for(;++b<h;){const q=A[b]||"";let P="",G="";if(n.alignDelimiters!==!1){const ne=f[b]-(S[b]||0),F=l[b];F===114?P=" ".repeat(ne):F===99?ne%2?(P=" ".repeat(ne/2+.5),G=" ".repeat(ne/2-.5)):(P=" ".repeat(ne/2),G=P):G=" ".repeat(ne)}n.delimiterStart!==!1&&!b&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&q==="")&&(n.delimiterStart!==!1||b)&&k.push(" "),n.alignDelimiters!==!1&&k.push(P),k.push(q),n.alignDelimiters!==!1&&k.push(G),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||b!==h-1)&&k.push("|")}T.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return T.join(`
21
+ `)}function g9(e){return e==null?"":String(e)}function CE(e){const 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}function b9(e,t,n,a){const s=n.enter("blockquote"),l=n.createTracker(a);l.move("> "),l.shift(2);const u=n.indentLines(n.containerFlow(e,l.current()),y9);return s(),u}function y9(e,t,n){return">"+(n?"":" ")+e}function E9(e,t){return NE(e,t.inConstruct,!0)&&!NE(e,t.notInConstruct,!1)}function NE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function RE(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
22
+ `&&E9(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
23
+ `}function x9(e,t){const n=String(e);let a=n.indexOf(t),s=a,l=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++l>u&&(u=l):l=1,s=a+t.length,a=n.indexOf(t,s);return u}function v9(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function _9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function T9(e,t,n,a){const s=_9(n),l=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(v9(e,n)){const b=n.enter("codeIndented"),E=n.indentLines(l,A9);return b(),E}const d=n.createTracker(a),f=s.repeat(Math.max(x9(l,s)+1,3)),h=n.enter("codeFenced");let m=d.move(f);if(e.lang){const b=n.enter(`codeFencedLang${u}`);m+=d.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...d.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${u}`);m+=d.move(" "),m+=d.move(n.safe(e.meta,{before:m,after:`
24
+ `,encode:["`"],...d.current()})),b()}return m+=d.move(`
25
+ `),l&&(m+=d.move(l+`
26
+ `)),m+=d.move(f),h(),m}function A9(e,t,n){return(n?"":" ")+e}function Lm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function w9(e,t,n,a){const s=Lm(n),l=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let d=n.enter("label");const f=n.createTracker(a);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
27
+ `,...f.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),d()),u(),h}function S9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Oo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ys(e){if(e===null||bt(e)||Di(e))return 1;if(wd(e))return 2}function ed(e,t,n){const a=Ys(e),s=Ys(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}pT.peek=k9;function pT(e,t,n,a){const s=S9(n),l=n.enter("emphasis"),u=n.createTracker(a),d=u.move(s);let f=u.move(n.containerPhrasing(e,{after:s,before:d,...u.current()}));const h=f.charCodeAt(0),m=ed(a.before.charCodeAt(a.before.length-1),h,s);m.inside&&(f=Oo(h)+f.slice(1));const b=f.charCodeAt(f.length-1),E=ed(a.after.charCodeAt(0),b,s);E.inside&&(f=f.slice(0,-1)+Oo(b));const v=u.move(s);return l(),n.attentionEncodeSurroundingInfo={after:E.outside,before:m.outside},d+f+v}function k9(e,t,n){return n.options.emphasis||"*"}const C9={};function Im(e,t){const n=C9,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mT(e,a,s)}function mT(e,t,n){if(N9(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return OE(e.children,t,n)}return Array.isArray(e)?OE(e,t,n):""}function OE(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=mT(e[s],t,n);return a.join("")}function N9(e){return!!(e&&typeof e=="object")}function R9(e,t){let n=!1;return Br(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,kp}),!!((!e.depth||e.depth<3)&&Im(e)&&(t.options.setext||n))}function O9(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(a);if(R9(e,n)){const m=n.enter("headingSetext"),b=n.enter("phrasing"),E=n.containerPhrasing(e,{...l.current(),before:`
28
+ `,after:`
29
+ `});return b(),m(),E+`
30
+ `+(s===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
31
+ `))+1))}const u="#".repeat(s),d=n.enter("headingAtx"),f=n.enter("phrasing");l.move(u+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
32
+ `,...l.current()});return/^[\t ]/.test(h)&&(h=Oo(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),f(),d(),h}gT.peek=L9;function gT(e){return e.value||""}function L9(){return"<"}bT.peek=I9;function bT(e,t,n,a){const s=Lm(n),l=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let d=n.enter("label");const f=n.createTracker(a);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),d()),h+=f.move(")"),u(),h}function I9(){return"!"}yT.peek=M9;function yT(e,t,n,a){const s=e.referenceType,l=n.enter("imageReference");let u=n.enter("label");const d=n.createTracker(a);let f=d.move("![");const h=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const b=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return u(),n.stack=m,l(),s==="full"||!h||h!==b?f+=d.move(b+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function M9(){return"!"}ET.peek=D9;function ET(e,t,n){let a=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++l<n.unsafe.length;){const u=n.unsafe[l],d=n.compilePattern(u);let f;if(u.atBreak)for(;f=d.exec(a);){let h=f.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(f.index+1)}}return s+a+s}function D9(){return"`"}function xT(e,t){const n=Im(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vT.peek=B9;function vT(e,t,n,a){const s=Lm(n),l=s==='"'?"Quote":"Apostrophe",u=n.createTracker(a);let d,f;if(xT(e,n)){const m=n.stack;n.stack=[],d=n.enter("autolink");let b=u.move("<");return b+=u.move(n.containerPhrasing(e,{before:b,after:">",...u.current()})),b+=u.move(">"),d(),n.stack=m,b}d=n.enter("link"),f=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(f=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=u.move(" "+s),h+=u.move(n.safe(e.title,{before:h,after:s,...u.current()})),h+=u.move(s),f()),h+=u.move(")"),d(),h}function B9(e,t,n){return xT(e,n)?"<":"["}_T.peek=z9;function _T(e,t,n,a){const s=e.referenceType,l=n.enter("linkReference");let u=n.enter("label");const d=n.createTracker(a);let f=d.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const b=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return u(),n.stack=m,l(),s==="full"||!h||h!==b?f+=d.move(b+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function z9(){return"["}function Mm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function P9(e){const t=Mm(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function H9(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function TT(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function U9(e,t,n,a){const s=n.enter("list"),l=n.bulletCurrent;let u=e.ordered?H9(n):Mm(n);const d=e.ordered?u==="."?")":".":P9(n);let f=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),TT(n)===u&&m){let b=-1;for(;++b<e.children.length;){const E=e.children[b];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=d),n.bulletCurrent=u;const h=n.containerFlow(e,a);return n.bulletLastUsed=u,n.bulletCurrent=l,s(),h}function j9(e){const 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}function F9(e,t,n,a){const s=j9(n);let l=n.bulletCurrent||Mm(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let u=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=n.createTracker(a);d.move(l+" ".repeat(u-l.length)),d.shift(u);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),m);return f(),h;function m(b,E,v){return E?(v?"":" ".repeat(u))+b:(v?l:l+" ".repeat(u-l.length))+b}}function $9(e,t,n,a){const s=n.enter("paragraph"),l=n.enter("phrasing"),u=n.containerPhrasing(e,a);return l(),s(),u}const q9=gd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Y9(e,t,n,a){return(e.children.some(function(u){return q9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function V9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}AT.peek=G9;function AT(e,t,n,a){const s=V9(n),l=n.enter("strong"),u=n.createTracker(a),d=u.move(s+s);let f=u.move(n.containerPhrasing(e,{after:s,before:d,...u.current()}));const h=f.charCodeAt(0),m=ed(a.before.charCodeAt(a.before.length-1),h,s);m.inside&&(f=Oo(h)+f.slice(1));const b=f.charCodeAt(f.length-1),E=ed(a.after.charCodeAt(0),b,s);E.inside&&(f=f.slice(0,-1)+Oo(b));const v=u.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:E.outside,before:m.outside},d+f+v}function G9(e,t,n){return n.options.strong||"*"}function W9(e,t,n,a){return n.safe(e.value,a)}function Q9(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function X9(e,t,n){const a=(TT(n)+(n.options.ruleSpaces?" ":"")).repeat(Q9(n));return n.options.ruleSpaces?a.slice(0,-1):a}const wT={blockquote:b9,break:RE,code:T9,definition:w9,emphasis:pT,hardBreak:RE,heading:O9,html:gT,image:bT,imageReference:yT,inlineCode:ET,link:vT,linkReference:_T,list:U9,listItem:F9,paragraph:$9,root:Y9,strong:AT,text:W9,thematicBreak:X9},LE=document.createElement("i");function Dm(e){const t="&"+e+";";LE.innerHTML=t;const n=LE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ST(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const K9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Z9(e){return e.replace(K9,J9)}function J9(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return ST(n.slice(l?2:1),l?16:10)}return Dm(n)||e}function eO(){return{enter:{table:tO,tableData:IE,tableHeader:IE,tableRow:rO},exit:{codeText:aO,table:nO,tableData:w0,tableHeader:w0,tableRow:w0}}}function tO(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function nO(e){this.exit(e),this.data.inTable=void 0}function rO(e){this.enter({type:"tableRow",children:[]},e)}function w0(e){this.exit(e)}function IE(e){this.enter({type:"tableCell",children:[]},e)}function aO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function iO(e,t){return t==="|"?t:e}function sO(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
33
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:u,tableCell:f,tableRow:d}};function u(v,T,A,S){return h(m(v,A,S),v.align)}function d(v,T,A,S){const k=b(v,A,S),q=h([k]);return q.slice(0,q.indexOf(`
34
+ `))}function f(v,T,A,S){const k=A.enter("tableCell"),q=A.enter("phrasing"),P=A.containerPhrasing(v,{...S,before:l,after:l});return q(),k(),P}function h(v,T){return m9(v,{align:T,alignDelimiters:a,padding:n,stringLength:s})}function m(v,T,A){const S=v.children;let k=-1;const q=[],P=T.enter("table");for(;++k<S.length;)q[k]=b(S[k],T,A);return P(),q}function b(v,T,A){const S=v.children;let k=-1;const q=[],P=T.enter("tableRow");for(;++k<S.length;)q[k]=f(S[k],v,T,A);return P(),q}function E(v,T,A){let S=wT.inlineCode(v,T,A);return A.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function lO(){return{exit:{taskListCheckValueChecked:ME,taskListCheckValueUnchecked:ME,paragraph:uO}}}function oO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cO}}}function ME(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let l=-1,u;for(;++l<s.length;){const d=s[l];if(d.type==="paragraph"){u=d;break}}u===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function cO(e,t,n,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);l&&d.move(u);let f=wT.listItem(e,t,n,{...a,...d.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+u}}function dO(){return[PR(),i9(),u9(),eO(),lO()]}function fO(e){return{extensions:[HR(),s9(e),c9(),sO(e),oO()]}}function Wn(e,t,n,a){const s=e.length;let l=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)u=Array.from(a),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);l<a.length;)u=a.slice(l,l+1e4),u.unshift(t,0),e.splice(...u),l+=1e4,t+=1e4}function ur(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const DE={}.hasOwnProperty;function kT(e){const t={};let n=-1;for(;++n<e.length;)hO(t,e[n]);return t}function hO(e,t){let n;for(n in t){const s=(DE.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let u;if(l)for(u in l){DE.call(s,u)||(s[u]=[]);const d=l[u];pO(s[u],Array.isArray(d)?d:d?[d]:[])}}}function pO(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Wn(e,0,0,a)}const mO={tokenize:vO,partial:!0},CT={tokenize:_O,partial:!0},NT={tokenize:TO,partial:!0},RT={tokenize:AO,partial:!0},gO={tokenize:wO,partial:!0},OT={name:"wwwAutolink",tokenize:EO,previous:IT},LT={name:"protocolAutolink",tokenize:xO,previous:MT},ua={name:"emailAutolink",tokenize:yO,previous:DT},Pr={};function bO(){return{text:Pr}}let vi=48;for(;vi<123;)Pr[vi]=ua,vi++,vi===58?vi=65:vi===91&&(vi=97);Pr[43]=ua;Pr[45]=ua;Pr[46]=ua;Pr[95]=ua;Pr[72]=[ua,LT];Pr[104]=[ua,LT];Pr[87]=[ua,OT];Pr[119]=[ua,OT];function yO(e,t,n){const a=this;let s,l;return u;function u(b){return!zp(b)||!DT.call(a,a.previous)||Bm(a.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(b))}function d(b){return zp(b)?(e.consume(b),d):b===64?(e.consume(b),f):n(b)}function f(b){return b===46?e.check(gO,m,h)(b):b===45||b===95||un(b)?(l=!0,e.consume(b),f):m(b)}function h(b){return e.consume(b),s=!0,f}function m(b){return l&&s&&bn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function EO(e,t,n){const a=this;return s;function s(u){return u!==87&&u!==119||!IT.call(a,a.previous)||Bm(a.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mO,e.attempt(CT,e.attempt(NT,l),n),n)(u))}function l(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function xO(e,t,n){const a=this;let s="",l=!1;return u;function u(b){return(b===72||b===104)&&MT.call(a,a.previous)&&!Bm(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),d):n(b)}function d(b){if(bn(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),d;if(b===58){const E=s.toLowerCase();if(E==="http"||E==="https")return e.consume(b),f}return n(b)}function f(b){return b===47?(e.consume(b),l?h:(l=!0,f)):n(b)}function h(b){return b===null||Jc(b)||bt(b)||Di(b)||wd(b)?n(b):e.attempt(CT,e.attempt(NT,m),n)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function vO(e,t,n){let a=0;return s;function s(u){return(u===87||u===119)&&a<3?(a++,e.consume(u),s):u===46&&a===3?(e.consume(u),l):n(u)}function l(u){return u===null?n(u):t(u)}}function _O(e,t,n){let a,s,l;return u;function u(h){return h===46||h===95?e.check(RT,f,d)(h):h===null||bt(h)||Di(h)||h!==45&&wd(h)?f(h):(l=!0,e.consume(h),u)}function d(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),u}function f(h){return s||a||!l?n(h):t(h)}}function TO(e,t){let n=0,a=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&a<n?l(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(RT,t,l)(u):u===null||bt(u)||Di(u)?t(u):(e.consume(u),s)}function l(u){return u===41&&a++,e.consume(u),s}}function AO(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),l):d===93?(e.consume(d),s):d===60||d===null||bt(d)||Di(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||bt(d)||Di(d)?t(d):a(d)}function l(d){return bn(d)?u(d):n(d)}function u(d){return d===59?(e.consume(d),a):bn(d)?(e.consume(d),u):n(d)}}function wO(e,t,n){return a;function a(l){return e.consume(l),s}function s(l){return un(l)?n(l):t(l)}}function IT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bt(e)}function MT(e){return!bn(e)}function DT(e){return!(e===47||zp(e))}function zp(e){return e===43||e===45||e===46||e===95||un(e)}function Bm(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Zs(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let u="";if(l===37&&un(e.charCodeAt(n+1))&&un(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(u=String.fromCharCode(l,d),s=1):u="�"}else u=String.fromCharCode(l);u&&(t.push(e.slice(a,n),encodeURIComponent(u)),a=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Sd(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!a.includes(l)&&(t=l(t,n),a.push(l))}return t}const Pp={name:"attention",resolveAll:SO,tokenize:kO};function SO(e,t){let n=-1,a,s,l,u,d,f,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const b={...e[a][1].end},E={...e[n][1].start};BE(b,-f),BE(E,f),u={type:f>1?"strongSequence":"emphasisSequence",start:b,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},l={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[a][1].end={...u.start},e[n][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=ur(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=ur(h,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",l,t]]),h=ur(h,Sd(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=ur(h,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=ur(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Wn(e,a-1,n-a+3,h),n=a+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kO(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Ys(a);let l;return u;function u(f){return l=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===l)return e.consume(f),d;const h=e.exit("attentionSequence"),m=Ys(f),b=!m||m===2&&s||n.includes(f),E=!s||s===2&&m||n.includes(a);return h._open=!!(l===42?b:b&&(s||!E)),h._close=!!(l===42?E:E&&(m||!b)),t(f)}}function BE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CO={name:"autolink",tokenize:NO};function NO(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return bn(v)?(e.consume(v),u):v===64?n(v):h(v)}function u(v){return v===43||v===45||v===46||un(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(e.consume(v),a=0,f):(v===43||v===45||v===46||un(v))&&a++<32?(e.consume(v),d):(a=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Jc(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),m):RR(v)?(e.consume(v),h):n(v)}function m(v){return un(v)?b(v):n(v)}function b(v){return v===46?(e.consume(v),a=0,m):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):E(v)}function E(v){if((v===45||un(v))&&a++<63){const T=v===45?E:b;return e.consume(v),T}return n(v)}}function Je(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(f){return We(f)?(e.enter(n),d(f)):t(f)}function d(f){return We(f)&&l++<s?(e.consume(f),d):(e.exit(n),t(f))}}const Wo={partial:!0,tokenize:RO};function RO(e,t,n){return a;function a(l){return We(l)?Je(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Re(l)?t(l):n(l)}}const BT={continuation:{tokenize:LO},exit:IO,name:"blockQuote",tokenize:OO};function OO(e,t,n){const a=this;return s;function s(u){if(u===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),l}return n(u)}function l(u){return We(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function LO(e,t,n){const a=this;return s;function s(u){return We(u)?Je(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return e.attempt(BT,t,n)(u)}}function IO(e){e.exit("blockQuote")}const zT={name:"characterEscape",tokenize:MO};function MO(e,t,n){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return LR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const PT={name:"characterReference",tokenize:DO};function DO(e,t,n){const a=this;let s=0,l,u;return d;function d(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),f}function f(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,u=un,m(b))}function h(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,u=OR,m):(e.enter("characterReferenceValue"),l=7,u=Bp,m(b))}function m(b){if(b===59&&s){const E=e.exit("characterReferenceValue");return u===un&&!Dm(a.sliceSerialize(E))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(b)&&s++<l?(e.consume(b),m):n(b)}}const zE={partial:!0,tokenize:zO},PE={concrete:!0,name:"codeFenced",tokenize:BO};function BO(e,t,n){const a=this,s={partial:!0,tokenize:ne};let l=0,u=0,d;return f;function f(F){return h(F)}function h(F){const J=a.events[a.events.length-1];return l=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,d=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(F)}function m(F){return F===d?(u++,e.consume(F),m):u<3?n(F):(e.exit("codeFencedFenceSequence"),We(F)?Je(e,b,"whitespace")(F):b(F))}function b(F){return F===null||Re(F)?(e.exit("codeFencedFence"),a.interrupt?t(F):e.check(zE,A,G)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(F))}function E(F){return F===null||Re(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(F)):We(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,v,"whitespace")(F)):F===96&&F===d?n(F):(e.consume(F),E)}function v(F){return F===null||Re(F)?b(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(F))}function T(F){return F===null||Re(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(F)):F===96&&F===d?n(F):(e.consume(F),T)}function A(F){return e.attempt(s,G,S)(F)}function S(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),k}function k(F){return l>0&&We(F)?Je(e,q,"linePrefix",l+1)(F):q(F)}function q(F){return F===null||Re(F)?e.check(zE,A,G)(F):(e.enter("codeFlowValue"),P(F))}function P(F){return F===null||Re(F)?(e.exit("codeFlowValue"),q(F)):(e.consume(F),P)}function G(F){return e.exit("codeFenced"),t(F)}function ne(F,J,U){let le=0;return j;function j(ue){return F.enter("lineEnding"),F.consume(ue),F.exit("lineEnding"),H}function H(ue){return F.enter("codeFencedFence"),We(ue)?Je(F,z,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):z(ue)}function z(ue){return ue===d?(F.enter("codeFencedFenceSequence"),ve(ue)):U(ue)}function ve(ue){return ue===d?(le++,F.consume(ue),ve):le>=u?(F.exit("codeFencedFenceSequence"),We(ue)?Je(F,de,"whitespace")(ue):de(ue)):U(ue)}function de(ue){return ue===null||Re(ue)?(F.exit("codeFencedFence"),J(ue)):U(ue)}}}function zO(e,t,n){const a=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l)}function l(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}const S0={name:"codeIndented",tokenize:HO},PO={partial:!0,tokenize:UO};function HO(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),Je(e,l,"linePrefix",5)(h)}function l(h){const m=a.events[a.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?f(h):Re(h)?e.attempt(PO,u,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Re(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function UO(e,t,n){const a=this;return s;function s(u){return a.parser.lazy[a.now().line]?n(u):Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Je(e,l,"linePrefix",5)(u)}function l(u){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):Re(u)?s(u):n(u)}}const jO={name:"codeText",previous:$O,resolve:FO,tokenize:qO};function FO(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function $O(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qO(e,t,n){let a=0,s,l;return u;function u(b){return e.enter("codeText"),e.enter("codeTextSequence"),d(b)}function d(b){return b===96?(e.consume(b),a++,d):(e.exit("codeTextSequence"),f(b))}function f(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),f):b===96?(l=e.enter("codeTextSequence"),s=0,m(b)):Re(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(b))}function h(b){return b===null||b===32||b===96||Re(b)?(e.exit("codeTextData"),f(b)):(e.consume(b),h)}function m(b){return b===96?(e.consume(b),s++,m):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(l.type="codeTextData",h(b))}}class YO{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,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&to(this.left,a),l.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),to(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),to(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){const n=this.left.splice(t,Number.POSITIVE_INFINITY);to(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);to(this.left,n.reverse())}}}function to(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function HT(e){const t={};let n=-1,a,s,l,u,d,f,h;const m=new YO(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(a=m.get(n),n&&a[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,VO(m,n)),n=t[n],h=!0);else if(a[1]._container){for(l=n,s=void 0;l--;)if(u=m.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=l);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(a[1].end={...m.get(s)[1].start},d=m.slice(s,n),d.unshift(a),m.splice(s,n-s+1,d))}}return Wn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function VO(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const l=[];let u=n._tokenizer;u||(u=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,f=[],h={};let m,b,E=-1,v=n,T=0,A=0;const S=[A];for(;v;){for(;e.get(++s)[1]!==v;);l.push(s),v._tokenizer||(m=a.sliceStream(v),v.next||m.push(null),b&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),b=v,v=v.next}for(v=n;++E<d.length;)d[E][0]==="exit"&&d[E-1][0]==="enter"&&d[E][1].type===d[E-1][1].type&&d[E][1].start.line!==d[E][1].end.line&&(A=E+1,S.push(A),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),E=S.length;E--;){const k=d.slice(S[E],S[E+1]),q=l.pop();f.push([q,q+k.length-1]),e.splice(q,2,k)}for(f.reverse(),E=-1;++E<f.length;)h[T+f[E][0]]=T+f[E][1],T+=f[E][1]-f[E][0]-1;return h}const GO={resolve:QO,tokenize:XO},WO={partial:!0,tokenize:KO};function QO(e){return HT(e),e}function XO(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?l(d):Re(d)?e.check(WO,u,l)(d):(e.consume(d),s)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function u(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function KO(e,t,n){const a=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,l,"linePrefix")}function l(u){if(u===null||Re(u))return n(u);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,n,t)(u)}}function UT(e,t,n,a,s,l,u,d,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return b;function b(k){return k===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(k),e.exit(l),E):k===null||k===32||k===41||Jc(k)?n(k):(e.enter(a),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),A(k))}function E(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===62?(e.exit("chunkString"),e.exit(d),E(k)):k===null||k===60||Re(k)?n(k):(e.consume(k),k===92?T:v)}function T(k){return k===60||k===62||k===92?(e.consume(k),v):v(k)}function A(k){return!m&&(k===null||k===41||bt(k))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(a),t(k)):m<h&&k===40?(e.consume(k),m++,A):k===41?(e.consume(k),m--,A):k===null||k===32||k===40||Jc(k)?n(k):(e.consume(k),k===92?S:A)}function S(k){return k===40||k===41||k===92?(e.consume(k),A):A(k)}}function jT(e,t,n,a,s,l){const u=this;let d=0,f;return h;function h(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(l),m}function m(v){return d>999||v===null||v===91||v===93&&!f||v===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(l),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Re(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||v===91||v===93||Re(v)||d++>999?(e.exit("chunkString"),m(v)):(e.consume(v),f||(f=!We(v)),v===92?E:b)}function E(v){return v===91||v===92||v===93?(e.consume(v),d++,b):b(v)}}function FT(e,t,n,a,s,l){let u;return d;function d(E){return E===34||E===39||E===40?(e.enter(a),e.enter(s),e.consume(E),e.exit(s),u=E===40?41:E,f):n(E)}function f(E){return E===u?(e.enter(s),e.consume(E),e.exit(s),e.exit(a),t):(e.enter(l),h(E))}function h(E){return E===u?(e.exit(l),f(u)):E===null?n(E):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===u||E===null||Re(E)?(e.exit("chunkString"),h(E)):(e.consume(E),E===92?b:m)}function b(E){return E===u||E===92?(e.consume(E),m):m(E)}}function Ao(e,t){let n;return a;function a(s){return Re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):We(s)?Je(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const ZO={name:"definition",tokenize:eL},JO={partial:!0,tokenize:tL};function eL(e,t,n){const a=this;let s;return l;function l(v){return e.enter("definition"),u(v)}function u(v){return jT.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return s=Er(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return bt(v)?Ao(e,h)(v):h(v)}function h(v){return UT(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return e.attempt(JO,b,b)(v)}function b(v){return We(v)?Je(e,E,"whitespace")(v):E(v)}function E(v){return v===null||Re(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function tL(e,t,n){return a;function a(d){return bt(d)?Ao(e,s)(d):n(d)}function s(d){return FT(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return We(d)?Je(e,u,"whitespace")(d):u(d)}function u(d){return d===null||Re(d)?t(d):n(d)}}const nL={name:"hardBreakEscape",tokenize:rL};function rL(e,t,n){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Re(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const aL={name:"headingAtx",resolve:iL,tokenize:sL};function iL(e,t){let n=e.length-2,a=3,s,l;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},l={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Wn(e,a,n-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function sL(e,t,n){let a=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&a++<6?(e.consume(m),u):m===null||bt(m)?(e.exit("atxHeadingSequence"),d(m)):n(m)}function d(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Re(m)?(e.exit("atxHeading"),t(m)):We(m)?Je(e,d,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),d(m))}function h(m){return m===null||m===35||bt(m)?(e.exit("atxHeadingText"),d(m)):(e.consume(m),h)}}const lL=["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"],HE=["pre","script","style","textarea"],oL={concrete:!0,name:"htmlFlow",resolveTo:dL,tokenize:fL},uL={partial:!0,tokenize:pL},cL={partial:!0,tokenize:hL};function dL(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 fL(e,t,n){const a=this;let s,l,u,d,f;return h;function h(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),b}function b(O){return O===33?(e.consume(O),E):O===47?(e.consume(O),l=!0,A):O===63?(e.consume(O),s=3,a.interrupt?t:R):bn(O)?(e.consume(O),u=String.fromCharCode(O),S):n(O)}function E(O){return O===45?(e.consume(O),s=2,v):O===91?(e.consume(O),s=5,d=0,T):bn(O)?(e.consume(O),s=4,a.interrupt?t:R):n(O)}function v(O){return O===45?(e.consume(O),a.interrupt?t:R):n(O)}function T(O){const Y="CDATA[";return O===Y.charCodeAt(d++)?(e.consume(O),d===Y.length?a.interrupt?t:z:T):n(O)}function A(O){return bn(O)?(e.consume(O),u=String.fromCharCode(O),S):n(O)}function S(O){if(O===null||O===47||O===62||bt(O)){const Y=O===47,be=u.toLowerCase();return!Y&&!l&&HE.includes(be)?(s=1,a.interrupt?t(O):z(O)):lL.includes(u.toLowerCase())?(s=6,Y?(e.consume(O),k):a.interrupt?t(O):z(O)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(O):l?q(O):P(O))}return O===45||un(O)?(e.consume(O),u+=String.fromCharCode(O),S):n(O)}function k(O){return O===62?(e.consume(O),a.interrupt?t:z):n(O)}function q(O){return We(O)?(e.consume(O),q):j(O)}function P(O){return O===47?(e.consume(O),j):O===58||O===95||bn(O)?(e.consume(O),G):We(O)?(e.consume(O),P):j(O)}function G(O){return O===45||O===46||O===58||O===95||un(O)?(e.consume(O),G):ne(O)}function ne(O){return O===61?(e.consume(O),F):We(O)?(e.consume(O),ne):P(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),f=O,J):We(O)?(e.consume(O),F):U(O)}function J(O){return O===f?(e.consume(O),f=null,le):O===null||Re(O)?n(O):(e.consume(O),J)}function U(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||bt(O)?ne(O):(e.consume(O),U)}function le(O){return O===47||O===62||We(O)?P(O):n(O)}function j(O){return O===62?(e.consume(O),H):n(O)}function H(O){return O===null||Re(O)?z(O):We(O)?(e.consume(O),H):n(O)}function z(O){return O===45&&s===2?(e.consume(O),M):O===60&&s===1?(e.consume(O),ae):O===62&&s===4?(e.consume(O),D):O===63&&s===3?(e.consume(O),R):O===93&&s===5?(e.consume(O),ke):Re(O)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(uL,te,ve)(O)):O===null||Re(O)?(e.exit("htmlFlowData"),ve(O)):(e.consume(O),z)}function ve(O){return e.check(cL,de,te)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ue}function ue(O){return O===null||Re(O)?ve(O):(e.enter("htmlFlowData"),z(O))}function M(O){return O===45?(e.consume(O),R):z(O)}function ae(O){return O===47?(e.consume(O),u="",Ee):z(O)}function Ee(O){if(O===62){const Y=u.toLowerCase();return HE.includes(Y)?(e.consume(O),D):z(O)}return bn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),Ee):z(O)}function ke(O){return O===93?(e.consume(O),R):z(O)}function R(O){return O===62?(e.consume(O),D):O===45&&s===2?(e.consume(O),R):z(O)}function D(O){return O===null||Re(O)?(e.exit("htmlFlowData"),te(O)):(e.consume(O),D)}function te(O){return e.exit("htmlFlow"),t(O)}}function hL(e,t,n){const a=this;return s;function s(u){return Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):n(u)}function l(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}function pL(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Wo,t,n)}}const mL={name:"htmlText",tokenize:gL};function gL(e,t,n){const a=this;let s,l,u;return d;function d(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),ne):R===63?(e.consume(R),P):bn(R)?(e.consume(R),U):n(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),l=0,T):bn(R)?(e.consume(R),q):n(R)}function m(R){return R===45?(e.consume(R),v):n(R)}function b(R){return R===null?n(R):R===45?(e.consume(R),E):Re(R)?(u=b,ae(R)):(e.consume(R),b)}function E(R){return R===45?(e.consume(R),v):b(R)}function v(R){return R===62?M(R):R===45?E(R):b(R)}function T(R){const D="CDATA[";return R===D.charCodeAt(l++)?(e.consume(R),l===D.length?A:T):n(R)}function A(R){return R===null?n(R):R===93?(e.consume(R),S):Re(R)?(u=A,ae(R)):(e.consume(R),A)}function S(R){return R===93?(e.consume(R),k):A(R)}function k(R){return R===62?M(R):R===93?(e.consume(R),k):A(R)}function q(R){return R===null||R===62?M(R):Re(R)?(u=q,ae(R)):(e.consume(R),q)}function P(R){return R===null?n(R):R===63?(e.consume(R),G):Re(R)?(u=P,ae(R)):(e.consume(R),P)}function G(R){return R===62?M(R):P(R)}function ne(R){return bn(R)?(e.consume(R),F):n(R)}function F(R){return R===45||un(R)?(e.consume(R),F):J(R)}function J(R){return Re(R)?(u=J,ae(R)):We(R)?(e.consume(R),J):M(R)}function U(R){return R===45||un(R)?(e.consume(R),U):R===47||R===62||bt(R)?le(R):n(R)}function le(R){return R===47?(e.consume(R),M):R===58||R===95||bn(R)?(e.consume(R),j):Re(R)?(u=le,ae(R)):We(R)?(e.consume(R),le):M(R)}function j(R){return R===45||R===46||R===58||R===95||un(R)?(e.consume(R),j):H(R)}function H(R){return R===61?(e.consume(R),z):Re(R)?(u=H,ae(R)):We(R)?(e.consume(R),H):le(R)}function z(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),s=R,ve):Re(R)?(u=z,ae(R)):We(R)?(e.consume(R),z):(e.consume(R),de)}function ve(R){return R===s?(e.consume(R),s=void 0,ue):R===null?n(R):Re(R)?(u=ve,ae(R)):(e.consume(R),ve)}function de(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||bt(R)?le(R):(e.consume(R),de)}function ue(R){return R===47||R===62||bt(R)?le(R):n(R)}function M(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ae(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Ee}function Ee(R){return We(R)?Je(e,ke,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ke(R)}function ke(R){return e.enter("htmlTextData"),u(R)}}const zm={name:"labelEnd",resolveAll:xL,resolveTo:vL,tokenize:_L},bL={tokenize:TL},yL={tokenize:AL},EL={tokenize:wL};function xL(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function vL(e,t){let n=e.length,a=0,s,l,u,d;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(u=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[u][1].end}},m={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=ur(d,e.slice(l+1,l+a+3)),d=ur(d,[["enter",m,t]]),d=ur(d,Sd(t.parser.constructs.insideSpan.null,e.slice(l+a+4,u-3),t)),d=ur(d,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),d=ur(d,e.slice(u+1)),d=ur(d,[["exit",f,t]]),Wn(e,l,e.length,d),e}function _L(e,t,n){const a=this;let s=a.events.length,l,u;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){l=a.events[s][1];break}return d;function d(E){return l?l._inactive?b(E):(u=a.parser.defined.includes(Er(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),f):n(E)}function f(E){return E===40?e.attempt(bL,m,u?m:b)(E):E===91?e.attempt(yL,m,u?h:b)(E):u?m(E):b(E)}function h(E){return e.attempt(EL,m,b)(E)}function m(E){return t(E)}function b(E){return l._balanced=!0,n(E)}}function TL(e,t,n){return a;function a(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return bt(b)?Ao(e,l)(b):l(b)}function l(b){return b===41?m(b):UT(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function u(b){return bt(b)?Ao(e,f)(b):m(b)}function d(b){return n(b)}function f(b){return b===34||b===39||b===40?FT(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function h(b){return bt(b)?Ao(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function AL(e,t,n){const a=this;return s;function s(d){return jT.call(a,e,l,u,"reference","referenceMarker","referenceString")(d)}function l(d){return a.parser.defined.includes(Er(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function u(d){return n(d)}}function wL(e,t,n){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const SL={name:"labelStartImage",resolveAll:zm.resolveAll,tokenize:kL};function kL(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):n(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const CL={name:"labelStartLink",resolveAll:zm.resolveAll,tokenize:NL};function NL(e,t,n){const a=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(u):t(u)}}const k0={name:"lineEnding",tokenize:RL};function RL(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Fc={name:"thematicBreak",tokenize:OL};function OL(e,t,n){let a=0,s;return l;function l(h){return e.enter("thematicBreak"),u(h)}function u(h){return s=h,d(h)}function d(h){return h===s?(e.enter("thematicBreakSequence"),f(h)):a>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===s?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),We(h)?Je(e,d,"whitespace")(h):d(h))}}const Nn={continuation:{tokenize:DL},exit:zL,name:"list",tokenize:ML},LL={partial:!0,tokenize:PL},IL={partial:!0,tokenize:BL};function ML(e,t,n){const a=this,s=a.events[a.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return d;function d(v){const T=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Bp(v)){if(a.containerState.type||(a.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Fc,n,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Bp(v)&&++u<10?(e.consume(v),f):(!a.interrupt||u<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Wo,a.interrupt?n:m,e.attempt(LL,E,b))}function m(v){return a.containerState.initialBlankLine=!0,l++,E(v)}function b(v){return We(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),E):n(v)}function E(v){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function DL(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Wo,s,l);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Je(e,t,"listItemIndent",a.containerState.size+1)(d)}function l(d){return a.containerState.furtherBlankLines||!We(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(IL,t,u)(d))}function u(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Je(e,e.attempt(Nn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function BL(e,t,n){const a=this;return Je(e,s,"listItemIndent",a.containerState.size+1);function s(l){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(l):n(l)}}function zL(e){e.exit(this.containerState.type)}function PL(e,t,n){const a=this;return Je(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const u=a.events[a.events.length-1];return!We(l)&&u&&u[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const UE={name:"setextUnderline",resolveTo:HL,tokenize:UL};function HL(e,t){let n=e.length,a,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",u,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function UL(e,t,n){const a=this;let s;return l;function l(h){let m=a.events.length,b;for(;m--;)if(a.events[m][1].type!=="lineEnding"&&a.events[m][1].type!=="linePrefix"&&a.events[m][1].type!=="content"){b=a.events[m][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||b)?(e.enter("setextHeadingLine"),s=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),We(h)?Je(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const jL={tokenize:QL,partial:!0};function FL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:VL,continuation:{tokenize:GL},exit:WL}},text:{91:{name:"gfmFootnoteCall",tokenize:YL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$L,resolveTo:qL}}}}function $L(e,t,n){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u;for(;s--;){const f=a.events[s][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!u||!u._balanced)return n(f);const h=Er(a.sliceSerialize({start:u.end,end:a.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function qL(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",u,t],["exit",u,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function YL(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,u;return d;function d(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),f}function f(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(b){if(l>999||b===93&&!u||b===null||b===91||bt(b))return n(b);if(b===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return s.includes(Er(a.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return bt(b)||(u=!0),l++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),l++,h):h(b)}}function VL(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,u=0,d;return f;function f(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(T)}function m(T){if(u>999||T===93&&!d||T===null||T===91||bt(T))return n(T);if(T===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return l=Er(a.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return bt(T)||(d=!0),u++,e.consume(T),T===92?b:m}function b(T){return T===91||T===92||T===93?(e.consume(T),u++,m):m(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),s.includes(l)||s.push(l),Je(e,v,"gfmFootnoteDefinitionWhitespace")):n(T)}function v(T){return t(T)}}function GL(e,t,n){return e.check(Wo,t,e.attempt(jL,t,n))}function WL(e){e.exit("gfmFootnoteDefinition")}function QL(e,t,n){const a=this;return Je(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const u=a.events[a.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(l):n(l)}}function XL(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(u,d){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let h=f;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[f][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[f][1].end)},b={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[f][1].start)},E=[["enter",m,d],["enter",u[h][1],d],["exit",u[h][1],d],["enter",b,d]],v=d.parser.constructs.insideSpan.null;v&&Wn(E,E.length,0,Sd(v,u.slice(h+1,f),d)),Wn(E,E.length,0,[["exit",b,d],["enter",u[f][1],d],["exit",u[f][1],d],["exit",m,d]]),Wn(u,h-1,f-h+3,E),f=h+E.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function l(u,d,f){const h=this.previous,m=this.events;let b=0;return E;function E(T){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(T):(u.enter("strikethroughSequenceTemporary"),v(T))}function v(T){const A=Ys(h);if(T===126)return b>1?f(T):(u.consume(T),b++,v);if(b<2&&!n)return f(T);const S=u.exit("strikethroughSequenceTemporary"),k=Ys(T);return S._open=!k||k===2&&!!A,S._close=!A||A===2&&!!k,d(T)}}}class KL{constructor(){this.map=[]}add(t,n,a){ZL(this,t,n,a)}consume(t){if(this.map.sort(function(l,u){return l[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const l of s)t.push(l);s=a.pop()}this.map.length=0}}function ZL(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function JL(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=a.length-1;a[l]=a[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function eI(){return{flow:{null:{name:"table",tokenize:tI,resolveAll:nI}}}}function tI(e,t,n){const a=this;let s=0,l=0,u;return d;function d(j){let H=a.events.length-1;for(;H>-1;){const de=a.events[H][1].type;if(de==="lineEnding"||de==="linePrefix")H--;else break}const z=H>-1?a.events[H][1].type:null,ve=z==="tableHead"||z==="tableRow"?F:f;return ve===F&&a.parser.lazy[a.now().line]?n(j):ve(j)}function f(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(u=!0,l+=1),m(j)}function m(j){return j===null?n(j):Re(j)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),v):n(j):We(j)?Je(e,m,"whitespace")(j):(l+=1,u&&(u=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),b(j)))}function b(j){return j===null||j===124||bt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?E:b)}function E(j){return j===92||j===124?(e.consume(j),b):b(j)}function v(j){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(j):(e.enter("tableDelimiterRow"),u=!1,We(j)?Je(e,T,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):T(j))}function T(j){return j===45||j===58?S(j):j===124?(u=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),A):ne(j)}function A(j){return We(j)?Je(e,S,"whitespace")(j):S(j)}function S(j){return j===58?(l+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),k):j===45?(l+=1,k(j)):j===null||Re(j)?G(j):ne(j)}function k(j){return j===45?(e.enter("tableDelimiterFiller"),q(j)):ne(j)}function q(j){return j===45?(e.consume(j),q):j===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),P):(e.exit("tableDelimiterFiller"),P(j))}function P(j){return We(j)?Je(e,G,"whitespace")(j):G(j)}function G(j){return j===124?T(j):j===null||Re(j)?!u||s!==l?ne(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):ne(j)}function ne(j){return n(j)}function F(j){return e.enter("tableRow"),J(j)}function J(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),J):j===null||Re(j)?(e.exit("tableRow"),t(j)):We(j)?Je(e,J,"whitespace")(j):(e.enter("data"),U(j))}function U(j){return j===null||j===124||bt(j)?(e.exit("data"),J(j)):(e.consume(j),j===92?le:U)}function le(j){return j===92||j===124?(e.consume(j),U):U(j)}}function nI(e,t){let n=-1,a=!0,s=0,l=[0,0,0,0],u=[0,0,0,0],d=!1,f=0,h,m,b;const E=new KL;for(;++n<e.length;){const v=e[n],T=v[1];v[0]==="enter"?T.type==="tableHead"?(d=!1,f!==0&&(jE(E,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",h,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(a=!0,b=void 0,l=[0,0,0,0],u=[0,n+1,0,0],d&&(d=!1,m={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",m,t]])),s=T.type==="tableDelimiterRow"?2:m?3:1):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(a=!1,u[2]===0&&(l[1]!==0&&(u[0]=u[1],b=vc(E,t,l,s,void 0,b),l=[0,0,0,0]),u[2]=n)):T.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(u[0]=u[1],b=vc(E,t,l,s,void 0,b)),l=u,u=[l[1],n,0,0])):T.type==="tableHead"?(d=!0,f=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(f=n,l[1]!==0?(u[0]=u[1],b=vc(E,t,l,s,n,b)):u[1]!==0&&(b=vc(E,t,u,s,n,b)),s=0):s&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(u[3]=n)}for(f!==0&&jE(E,t,f,h,m),E.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=JL(t.events,n))}return e}function vc(e,t,n,a,s,l){const u=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(l.end=Object.assign({},Is(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=Is(t.events,n[1]);if(l={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Is(t.events,n[2]),m=Is(t.events,n[3]),b={type:d,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",b,t]]),a!==2){const E=t.events[n[2]],v=t.events[n[3]];if(E[1].end=Object.assign({},v[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,A=n[3]-n[2]-1;e.add(T,A,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(l.end=Object.assign({},Is(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function jE(e,t,n,a,s){const l=[],u=Is(t.events,n);s&&(s.end=Object.assign({},u),l.push(["exit",s,t])),a.end=Object.assign({},u),l.push(["exit",a,t]),e.add(n+1,0,l)}function Is(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const rI={name:"tasklistCheck",tokenize:iI};function aI(){return{text:{91:rI}}}function iI(e,t,n){const a=this;return s;function s(f){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return bt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):n(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return Re(f)?t(f):We(f)?e.check({tokenize:sI},t,n)(f):n(f)}}function sI(e,t,n){return Je(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function lI(e){return kT([bO(),FL(),XL(e),eI(),aI()])}const oI={};function uI(e){const t=this,n=e||oI,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),u=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(lI(n)),l.push(dO()),u.push(fO(n))}var cI=Object.defineProperty,dI=Object.defineProperties,fI=Object.getOwnPropertyDescriptors,FE=Object.getOwnPropertySymbols,hI=Object.prototype.hasOwnProperty,pI=Object.prototype.propertyIsEnumerable,$E=(e,t,n)=>t in e?cI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$T=(e,t)=>{for(var n in t||(t={}))hI.call(t,n)&&$E(e,n,t[n]);if(FE)for(var n of FE(t))pI.call(t,n)&&$E(e,n,t[n]);return e},qT=(e,t)=>dI(e,fI(t)),In=(e,t)=>{let n=!1,a=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){a=!a,s+=2;continue}!a&&e[s]==="`"&&(n=!n)}return n||a},mI=(e,t)=>{let n=e.substring(t,t+3)==="```",a=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||a||s},gI=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!mI(e,n)&&(t+=1)}return t},Qa=(e,t)=>{let n=!1,a=!1,s=-1;for(let l=0;l<e.length;l+=1){if(e[l]==="\\"&&l+1<e.length&&e[l+1]==="`"){l+=1;continue}if(e.substring(l,l+3)==="```"){a=!a,l+=2;continue}if(!a&&e[l]==="`")if(n){if(s<t&&t<l)return!0;n=!1,s=-1}else n=!0,s=l}return!1},bI=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,yI=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(bI,(t,n,a,s)=>In(e,s)?t:`${n}\\>${a}`),EI=/(\*\*)([^*]*\*?)$/,xI=/(__)([^_]*?)$/,vI=/(\*\*\*)([^*]*?)$/,_I=/(\*)([^*]*?)$/,TI=/(_)([^_]*?)$/,AI=/(`)([^`]*?)$/,wI=/(~~)([^~]*?)$/,Hi=/^[\s_~*`]*$/,YT=/^[\s]*[-*+][\s]+$/,SI=/[\p{L}\p{N}_]/u,kI=/^```[^`\n]*```?$/,CI=/^\*{4,}$/,NI=/(__)([^_]+)_$/,RI=/(~~)([^~]+)~$/,qE=/~~/g,Xa=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:SI.test(e)},OI=(e,t)=>{let n=1;for(let a=t-1;a>=0;a-=1)if(e[a]==="]")n+=1;else if(e[a]==="["&&(n-=1,n===0))return a;return-1},VT=(e,t)=>{let n=1;for(let a=t+1;a<e.length;a+=1)if(e[a]==="[")n+=1;else if(e[a]==="]"&&(n-=1,n===0))return a;return-1},kd=(e,t)=>{let n=!1,a=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(a=!a,s+=1,n=!1):a||(n=!n))}return n||a},LI=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
35
+ `)return!1}return!1},GT=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?LI(e,t):!1;if(e[n]===`
36
+ `)return!1}return!1},II=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let a=n+1<e.length?e[n+1]:"";return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="/"}if(e[n]===`
37
+ `)return!1}return!1},Pm=(e,t,n)=>{let a=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
38
+ `){a=f+1;break}let s=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
39
+ `){s=f;break}let l=e.substring(a,s),u=0,d=!1;for(let f of l)if(f===n)u+=1;else if(f!==" "&&f!==" "){d=!0;break}return u>=3&&!d},MI=(e,t,n,a)=>n==="\\"||e.includes("$")&&kd(e,t)?!0:n!=="*"&&a==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&a&&Xa(n)&&Xa(a)||(!n||n===" "||n===" "||n===`
40
+ `)&&(!a||a===" "||a===" "||a===`
41
+ `)),WT=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let l=s>0?e[s-1]:"",u=s<a-1?e[s+1]:"";MI(e,s,l,u)||(t+=1)}return t},DI=(e,t,n,a)=>!!(n==="\\"||e.includes("$")&&kd(e,t)||GT(e,t)||II(e,t)||n==="_"||a==="_"||n&&a&&Xa(n)&&Xa(a)),BI=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let l=s>0?e[s-1]:"",u=s<a-1?e[s+1]:"";DI(e,s,l,u)||(t+=1)}return t},zI=e=>{let t=0,n=0,a=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,a=!a,s+=2;continue}a||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Hm=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="*"&&a+1<e.length&&e[a+1]==="*"&&(t+=1,a+=1)}return t},YE=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="_"&&a+1<e.length&&e[a+1]==="_"&&(t+=1,a+=1)}return t},PI=(e,t,n)=>{if(!t||Hi.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
42
+ `),s=a===-1?0:a+1,l=e.substring(s,n);return YT.test(l)&&t.includes(`
43
+ `)?!0:Pm(e,n,"*")},HI=e=>{let t=e.match(EI);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return In(e,a)||Qa(e,a)||PI(e,n,a)?e:Hm(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},UI=(e,t,n)=>{if(!t||Hi.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
44
+ `),s=a===-1?0:a+1,l=e.substring(s,n);return YT.test(l)&&t.includes(`
45
+ `)?!0:Pm(e,n,"_")},jI=e=>{let t=e.match(xI);if(!t){let s=e.match(NI);if(s){let l=e.lastIndexOf(s[1]);if(!(In(e,l)||Qa(e,l))&&YE(e)%2===1)return`${e}_`}return e}let n=t[2],a=e.lastIndexOf(t[1]);return In(e,a)||Qa(e,a)||UI(e,n,a)?e:YE(e)%2===1?`${e}__`:e},FI=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!kd(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!a||a===" "||a===" "||a===`
46
+ `)&&(!s||s===" "||s===" "||s===`
47
+ `)||a&&s&&Xa(a)&&Xa(s))continue;return n}}return-1},$I=e=>{if(!e.match(_I))return e;let t=FI(e);if(t===-1||In(e,t)||Qa(e,t))return e;let n=e.substring(t+1);return!n||Hi.test(n)?e:WT(e)%2===1?`${e}*`:e},QT=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!kd(e,n)&&!GT(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(a&&s&&Xa(a)&&Xa(s))continue;return n}}return-1},qI=e=>{let t=e.length;for(;t>0&&e[t-1]===`
48
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),a=e.slice(t);return`${n}_${a}`}return`${e}_`},YI=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Hm(t)%2!==1)return null;let n=t.indexOf("**"),a=QT(t);return n!==-1&&a!==-1&&n<a?`${t}_**`:null},VI=e=>{if(!e.match(TI))return e;let t=QT(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Hi.test(n)||In(e,t)||Qa(e,t))return e;if(BI(e)%2===1){let a=YI(e);return a!==null?a:qI(e)}return e},GI=e=>{let t=Hm(e),n=WT(e);return t%2===0&&n%2===0},WI=(e,t,n)=>!t||Hi.test(t)||In(e,n)||Qa(e,n)?!0:Pm(e,n,"*"),QI=e=>{if(CI.test(e))return e;let t=e.match(vI);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return WI(e,n,a)?e:zI(e)%2===1?GI(e)?e:`${e}***`:e},XI=/<[a-zA-Z/][^>]*$/,KI=e=>{let t=e.match(XI);return!t||t.index===void 0||In(e,t.index)?e:e.substring(0,t.index).trimEnd()},ZI=e=>!e.match(kI)||e.includes(`
49
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,JI=e=>(e.match(/```/g)||[]).length%2===1,eM=e=>{let t=ZI(e);if(t!==null)return t;let n=e.match(AI);if(n&&!JI(e)){let a=n[2];if(!a||Hi.test(a))return e;if(gI(e)%2===1)return`${e}\``}return e},tM=(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)==="```",nM=e=>{let t=0,n=!1;for(let a=0;a<e.length-1;a+=1)e[a]==="`"&&!tM(e,a)&&(n=!n),!n&&e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},rM=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
50
+ `,t)!==-1&&!e.endsWith(`
51
+ `)?`${e}
52
+ $$`:`${e}$$`},aM=e=>nM(e)%2===0?e:rM(e),iM=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let a=OI(e,t);if(a===-1||In(e,a))return null;let s=a>0&&e[a-1]==="!",l=s?a-1:a,u=e.substring(0,l);if(s)return u;let d=e.substring(a+1,t);return n==="text-only"?`${u}${d}`:`${u}[${d}](streamdown:incomplete-link)`},VE=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!In(e,n)){if(n>0&&e[n-1]==="!")continue;let a=VT(e,n);if(a===-1)return n;if(a+1<e.length&&e[a+1]==="("){let s=e.indexOf(")",a+2);s!==-1&&(n=s)}}return t},sM=(e,t,n)=>{let a=t>0&&e[t-1]==="!",s=a?t-1:t;if(!e.substring(t+1).includes("]")){let l=e.substring(0,s);if(a)return l;if(n==="text-only"){let u=VE(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}if(VT(e,t)===-1){let l=e.substring(0,s);if(a)return l;if(n==="text-only"){let u=VE(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}return null},XT=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!In(e,n)){let a=iM(e,n,t);if(a!==null)return a}for(let a=e.length-1;a>=0;a-=1)if(e[a]==="["&&!In(e,a)){let s=sM(e,a,t);if(s!==null)return s}return e},lM=/^-{1,2}$/,oM=/^[\s]*-{1,2}[\s]+$/,uM=/^={1,2}$/,cM=/^[\s]*={1,2}[\s]+$/,dM=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
53
+ `);if(t===-1)return e;let n=e.substring(t+1),a=e.substring(0,t),s=n.trim();if(lM.test(s)&&!n.match(oM)){let l=a.split(`
54
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}if(uM.test(s)&&!n.match(cM)){let l=a.split(`
55
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}return e},fM=e=>{var t,n;let a=e.match(wI);if(a){let s=a[2];if(!s||Hi.test(s))return e;let l=e.lastIndexOf(a[1]);if(In(e,l)||Qa(e,l))return e;if(((t=e.match(qE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(RI);if(s){let l=e.lastIndexOf(s[0].slice(0,2));if(In(e,l)||Qa(e,l))return e;if(((n=e.match(qE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},C0=e=>e!==!1,Gn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,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},hM=[{handler:{name:"comparisonOperators",handle:yI,priority:Gn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:KI,priority:Gn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:dM,priority:Gn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:XT,priority:Gn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:QI,priority:Gn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:HI,priority:Gn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:jI,priority:Gn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:$I,priority:Gn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:VI,priority:Gn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:eM,priority:Gn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:fM,priority:Gn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:aM,priority:Gn.KATEX},optionKey:"katex"}],pM=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return hM.filter(({handler:a,optionKey:s})=>a.name==="links"?C0(e?.links)||C0(e?.images):C0(e?.[s])).map(({handler:a,earlyReturn:s})=>a.name==="links"?{handler:qT($T({},a),{handle:l=>XT(l,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:a,earlyReturn:s})},mM=(e,t)=>{var n;if(!e||typeof e!="string")return e;let a=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=pM(t),l=((n=t?.handlers)!=null?n:[]).map(d=>{var f;return{handler:qT($T({},d),{priority:(f=d.priority)!=null?f:Gn.DEFAULT}),earlyReturn:void 0}}),u=[...s,...l].sort((d,f)=>{var h,m;return((h=d.handler.priority)!=null?h:0)-((m=f.handler.priority)!=null?m:0)});for(let{handler:d,earlyReturn:f}of u)if(a=d.handle(a),f!=null&&f(a))return a;return a},gM=mM;function KT(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=KT(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ZT(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=KT(e))&&(a&&(a+=" "),a+=t);return a}const bM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},yM=(e,t)=>({classGroupId:e,validator:t}),JT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),td="-",GE=[],EM="arbitrary..",xM=e=>{const t=_M(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return vM(u);const d=u.split(td),f=d[0]===""&&d.length>1?1:0;return e3(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=n[u];return f?h?bM(h,f):f:h||GE}return n[u]||GE}}},e3=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const h=e3(e,t+1,l);if(h)return h}const u=n.validators;if(u===null)return;const d=t===0?e.join(td):e.slice(t).join(td),f=u.length;for(let h=0;h<f;h++){const m=u[h];if(m.validator(d))return m.classGroupId}},vM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?EM+a:void 0})(),_M=e=>{const{theme:t,classGroups:n}=e;return TM(n,t)},TM=(e,t)=>{const n=JT();for(const a in e){const s=e[a];Um(s,n,a,t)}return n},Um=(e,t,n,a)=>{const s=e.length;for(let l=0;l<s;l++){const u=e[l];AM(u,t,n,a)}},AM=(e,t,n,a)=>{if(typeof e=="string"){wM(e,t,n);return}if(typeof e=="function"){SM(e,t,n,a);return}kM(e,t,n,a)},wM=(e,t,n)=>{const a=e===""?t:t3(t,e);a.classGroupId=n},SM=(e,t,n,a)=>{if(CM(e)){Um(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(yM(n,e))},kM=(e,t,n,a)=>{const s=Object.entries(e),l=s.length;for(let u=0;u<l;u++){const[d,f]=s[u];Um(f,t3(t,d),n,a)}},t3=(e,t)=>{let n=e;const a=t.split(td),s=a.length;for(let l=0;l<s;l++){const u=a[l];let d=n.nextPart.get(u);d||(d=JT(),n.nextPart.set(u,d)),n=d}return n},CM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return s(l,u),u},set(l,u){l in n?n[l]=u:s(l,u)}}},Hp="!",WE=":",RM=[],QE=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),OM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const l=[];let u=0,d=0,f=0,h;const m=s.length;for(let A=0;A<m;A++){const S=s[A];if(u===0&&d===0){if(S===WE){l.push(s.slice(f,A)),f=A+1;continue}if(S==="/"){h=A;continue}}S==="["?u++:S==="]"?u--:S==="("?d++:S===")"&&d--}const b=l.length===0?s:s.slice(f);let E=b,v=!1;b.endsWith(Hp)?(E=b.slice(0,-1),v=!0):b.startsWith(Hp)&&(E=b.slice(1),v=!0);const T=h&&h>f?h-f:void 0;return QE(l,v,E,T)};if(t){const s=t+WE,l=a;a=u=>u.startsWith(s)?l(u.slice(s.length)):QE(RM,!1,u,void 0,!0)}if(n){const s=a;a=l=>n({className:l,parseClassName:s})}return a},LM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let l=0;l<n.length;l++){const u=n[l],d=u[0]==="[",f=t.has(u);d||f?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(u)):s.push(u)}return s.length>0&&(s.sort(),a.push(...s)),a}},IM=e=>({cache:NM(e.cacheSize),parseClassName:OM(e),sortModifiers:LM(e),...xM(e)}),MM=/\s+/,DM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:l}=t,u=[],d=e.trim().split(MM);let f="";for(let h=d.length-1;h>=0;h-=1){const m=d[h],{isExternal:b,modifiers:E,hasImportantModifier:v,baseClassName:T,maybePostfixModifierPosition:A}=n(m);if(b){f=m+(f.length>0?" "+f:f);continue}let S=!!A,k=a(S?T.substring(0,A):T);if(!k){if(!S){f=m+(f.length>0?" "+f:f);continue}if(k=a(T),!k){f=m+(f.length>0?" "+f:f);continue}S=!1}const q=E.length===0?"":E.length===1?E[0]:l(E).join(":"),P=v?q+Hp:q,G=P+k;if(u.indexOf(G)>-1)continue;u.push(G);const ne=s(k,S);for(let F=0;F<ne.length;++F){const J=ne[F];u.push(P+J)}f=m+(f.length>0?" "+f:f)}return f},BM=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=n3(n))&&(s&&(s+=" "),s+=a);return s},n3=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=n3(e[a]))&&(n&&(n+=" "),n+=t);return n},zM=(e,...t)=>{let n,a,s,l;const u=f=>{const h=t.reduce((m,b)=>b(m),e());return n=IM(h),a=n.cache.get,s=n.cache.set,l=d,d(f)},d=f=>{const h=a(f);if(h)return h;const m=DM(f,n);return s(f,m),m};return l=u,(...f)=>l(BM(...f))},PM=[],Ut=e=>{const t=n=>n[e]||PM;return t.isThemeGetter=!0,t},r3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,a3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=e=>HM.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>!!e&&Number.isInteger(Number(e)),N0=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),aa=e=>UM.test(e),i3=()=>!0,YM=e=>jM.test(e)&&!FM.test(e),jm=()=>!1,VM=e=>$M.test(e),GM=e=>qM.test(e),WM=e=>!Ae(e)&&!we(e),QM=e=>ti(e,o3,jm),Ae=e=>r3.test(e),_i=e=>ti(e,u3,YM),XE=e=>ti(e,rD,Fe),XM=e=>ti(e,d3,i3),KM=e=>ti(e,c3,jm),KE=e=>ti(e,s3,jm),ZM=e=>ti(e,l3,GM),_c=e=>ti(e,f3,VM),we=e=>a3.test(e),no=e=>Ui(e,u3),JM=e=>Ui(e,c3),ZE=e=>Ui(e,s3),eD=e=>Ui(e,o3),tD=e=>Ui(e,l3),Tc=e=>Ui(e,f3,!0),nD=e=>Ui(e,d3,!0),ti=(e,t,n)=>{const a=r3.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ui=(e,t,n=!1)=>{const a=a3.exec(e);return a?a[1]?t(a[1]):n:!1},s3=e=>e==="position"||e==="percentage",l3=e=>e==="image"||e==="url",o3=e=>e==="length"||e==="size"||e==="bg-size",u3=e=>e==="length",rD=e=>e==="number",c3=e=>e==="family-name",d3=e=>e==="number"||e==="weight",f3=e=>e==="shadow",aD=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),a=Ut("font-weight"),s=Ut("tracking"),l=Ut("leading"),u=Ut("breakpoint"),d=Ut("container"),f=Ut("spacing"),h=Ut("radius"),m=Ut("shadow"),b=Ut("inset-shadow"),E=Ut("text-shadow"),v=Ut("drop-shadow"),T=Ut("blur"),A=Ut("perspective"),S=Ut("aspect"),k=Ut("ease"),q=Ut("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...G(),we,Ae],F=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],U=()=>[we,Ae,f],le=()=>[Ha,"full","auto",...U()],j=()=>[Ua,"none","subgrid",we,Ae],H=()=>["auto",{span:["full",Ua,we,Ae]},Ua,we,Ae],z=()=>[Ua,"auto",we,Ae],ve=()=>["auto","min","max","fr",we,Ae],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...U()],ae=()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],Ee=()=>[Ha,"screen","full","dvw","lvw","svw","min","max","fit",...U()],ke=()=>[Ha,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],R=()=>[e,we,Ae],D=()=>[...G(),ZE,KE,{position:[we,Ae]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",eD,QM,{size:[we,Ae]}],Y=()=>[N0,no,_i],be=()=>["","none","full",h,we,Ae],ye=()=>["",Fe,no,_i],Oe=()=>["solid","dashed","dotted","double"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>[Fe,N0,ZE,KE],Wt=()=>["","none",T,we,Ae],Qt=()=>["none",Fe,we,Ae],Dn=()=>["none",Fe,we,Ae],fr=()=>[Fe,we,Ae],Xt=()=>[Ha,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[aa],breakpoint:[aa],color:[i3],container:[aa],"drop-shadow":[aa],ease:["in","out","in-out"],font:[WM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[aa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[aa],shadow:[aa],spacing:["px",Fe],text:[aa],"text-shadow":[aa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,Ae,we,S]}],container:["container"],columns:[{columns:[Fe,Ae,we,d]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:ne()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{"inset-s":le(),start:le()}],end:[{"inset-e":le(),end:le()}],"inset-bs":[{"inset-bs":le()}],"inset-be":[{"inset-be":le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[Ua,"auto",we,Ae]}],basis:[{basis:[Ha,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Ha,"auto","initial","none",Ae]}],grow:[{grow:["",Fe,we,Ae]}],shrink:[{shrink:["",Fe,we,Ae]}],order:[{order:[Ua,"first","last","none",we,Ae]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],"inline-size":[{inline:["auto",...Ee()]}],"min-inline-size":[{"min-inline":["auto",...Ee()]}],"max-inline-size":[{"max-inline":["none",...Ee()]}],"block-size":[{block:["auto",...ke()]}],"min-block-size":[{"min-block":["auto",...ke()]}],"max-block-size":[{"max-block":["none",...ke()]}],w:[{w:[d,"screen",...ae()]}],"min-w":[{"min-w":[d,"screen","none",...ae()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",n,no,_i]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,nD,XM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",N0,Ae]}],"font-family":[{font:[JM,KM,t]}],"font-features":[{"font-features":[Ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,we,Ae]}],"line-clamp":[{"line-clamp":[Fe,"none",we,XE]}],leading:[{leading:[l,...U()]}],"list-image":[{"list-image":["none",we,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",we,_i]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Fe,"auto",we,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ua,we,Ae],radial:["",we,Ae],conic:[Ua,we,Ae]},tD,ZM]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,we,Ae]}],"outline-w":[{outline:["",Fe,no,_i]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",m,Tc,_c]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",b,Tc,_c]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Fe,_i]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",E,Tc,_c]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Fe,we,Ae]}],"mix-blend":[{"mix-blend":[...tt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":tt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ie()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Ie()}],"mask-image-t-to-pos":[{"mask-t-to":Ie()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Ie()}],"mask-image-r-to-pos":[{"mask-r-to":Ie()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Ie()}],"mask-image-b-to-pos":[{"mask-b-to":Ie()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Ie()}],"mask-image-l-to-pos":[{"mask-l-to":Ie()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Ie()}],"mask-image-x-to-pos":[{"mask-x-to":Ie()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Ie()}],"mask-image-y-to-pos":[{"mask-y-to":Ie()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[we,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ie()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":G()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ie()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,Ae]}],filter:[{filter:["","none",we,Ae]}],blur:[{blur:Wt()}],brightness:[{brightness:[Fe,we,Ae]}],contrast:[{contrast:[Fe,we,Ae]}],"drop-shadow":[{"drop-shadow":["","none",v,Tc,_c]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Fe,we,Ae]}],"hue-rotate":[{"hue-rotate":[Fe,we,Ae]}],invert:[{invert:["",Fe,we,Ae]}],saturate:[{saturate:[Fe,we,Ae]}],sepia:[{sepia:["",Fe,we,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",we,Ae]}],"backdrop-blur":[{"backdrop-blur":Wt()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,we,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,we,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,we,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,we,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Fe,we,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,we,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,we,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,we,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",we,Ae]}],ease:[{ease:["linear","initial",k,we,Ae]}],delay:[{delay:[Fe,we,Ae]}],animate:[{animate:["none",q,we,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,we,Ae]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:Qt()}],"rotate-x":[{"rotate-x":Qt()}],"rotate-y":[{"rotate-y":Qt()}],"rotate-z":[{"rotate-z":Qt()}],scale:[{scale:Dn()}],"scale-x":[{"scale-x":Dn()}],"scale-y":[{"scale-y":Dn()}],"scale-z":[{"scale-z":Dn()}],"scale-3d":["scale-3d"],skew:[{skew:fr()}],"skew-x":[{"skew-x":fr()}],"skew-y":[{"skew-y":fr()}],transform:[{transform:[we,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,Ae]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Fe,no,_i,XE]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},h3=zM(aD),iD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lD={};function JE(e,t){return(lD.jsx?sD:iD).test(e)}const oD=/[ \t\n\f\r]/g;function uD(e){return typeof e=="object"?e.type==="text"?ex(e.value):!1:ex(e)}function ex(e){return e.replace(oD,"")===""}var Ns={},R0,tx;function cD(){if(tx)return R0;tx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
56
+ `,h="/",m="*",b="",E="comment",v="declaration";function T(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var q=1,P=1;function G(de){var ue=de.match(t);ue&&(q+=ue.length);var M=de.lastIndexOf(f);P=~M?de.length-M:P+de.length}function ne(){var de={line:q,column:P};return function(ue){return ue.position=new F(de),le(),ue}}function F(de){this.start=de,this.end={line:q,column:P},this.source=k.source}F.prototype.content=S;function J(de){var ue=new Error(k.source+":"+q+":"+P+": "+de);if(ue.reason=de,ue.filename=k.source,ue.line=q,ue.column=P,ue.source=S,!k.silent)throw ue}function U(de){var ue=de.exec(S);if(ue){var M=ue[0];return G(M),S=S.slice(M.length),ue}}function le(){U(n)}function j(de){var ue;for(de=de||[];ue=H();)ue!==!1&&de.push(ue);return de}function H(){var de=ne();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var ue=2;b!=S.charAt(ue)&&(m!=S.charAt(ue)||h!=S.charAt(ue+1));)++ue;if(ue+=2,b===S.charAt(ue-1))return J("End of comment missing");var M=S.slice(2,ue-2);return P+=2,G(M),S=S.slice(ue),P+=2,de({type:E,comment:M})}}function z(){var de=ne(),ue=U(a);if(ue){if(H(),!U(s))return J("property missing ':'");var M=U(l),ae=de({type:v,property:A(ue[0].replace(e,b)),value:M?A(M[0].replace(e,b)):b});return U(u),ae}}function ve(){var de=[];j(de);for(var ue;ue=z();)ue!==!1&&(de.push(ue),j(de));return de}return le(),ve()}function A(S){return S?S.replace(d,b):b}return R0=T,R0}var nx;function dD(){if(nx)return Ns;nx=1;var e=Ns&&Ns.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=n;const t=e(cD());function n(a,s){let l=null;if(!a||typeof a!="string")return l;const u=(0,t.default)(a),d=typeof s=="function";return u.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:m}=f;d?s(h,m,f):m&&(l=l||{},l[h]=m)}),l}return Ns}var ro={},rx;function fD(){if(rx)return ro;rx=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},d=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,u))};return ro.camelCase=f,ro}var ao,ax;function hD(){if(ax)return ao;ax=1;var e=ao&&ao.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(dD()),n=fD();function a(s,l){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(d,f){d&&f&&(u[(0,n.camelCase)(d,l)]=f)}),u}return a.default=a,ao=a,ao}var pD=hD();const mD=Do(pD);function wo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ix(e.position):"start"in e||"end"in e?ix(e):"line"in e||"column"in e?Up(e):""}function Up(e){return sx(e&&e.line)+":"+sx(e&&e.column)}function ix(e){return Up(e&&e.start)+"-"+Up(e&&e.end)}function sx(e){return e&&typeof e=="number"?e:1}class dn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",l={},u=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(u=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?l.ruleId=a:(l.source=a.slice(0,f),l.ruleId=a.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=wo(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=u&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}dn.prototype.file="";dn.prototype.name="";dn.prototype.reason="";dn.prototype.message="";dn.prototype.stack="";dn.prototype.column=void 0;dn.prototype.line=void 0;dn.prototype.ancestors=void 0;dn.prototype.cause=void 0;dn.prototype.fatal=void 0;dn.prototype.place=void 0;dn.prototype.ruleId=void 0;dn.prototype.source=void 0;const Fm={}.hasOwnProperty,gD=new Map,bD=/[A-Z]/g,yD=new Set(["table","tbody","thead","tfoot","tr"]),ED=new Set(["td","th"]),p3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=CD(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=kD(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ja:qo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=m3(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function m3(e,t,n){if(t.type==="element")return vD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _D(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AD(e,t,n);if(t.type==="mdxjsEsm")return TD(e,t);if(t.type==="root")return wD(e,t,n);if(t.type==="text")return SD(e,t)}function vD(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Ja,e.schema=s),e.ancestors.push(t);const l=b3(e,t.tagName,!1),u=ND(e,t);let d=qm(e,t);return yD.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!uD(f):!0})),g3(e,u,l,t),$m(u,d),e.ancestors.pop(),e.schema=a,e.create(t,l,u,n)}function _D(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Lo(e,t.position)}function TD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lo(e,t.position)}function AD(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=Ja,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:b3(e,t.name,!0),u=RD(e,t),d=qm(e,t);return g3(e,u,l,t),$m(u,d),e.ancestors.pop(),e.schema=a,e.create(t,l,u,n)}function wD(e,t,n){const a={};return $m(a,qm(e,t)),e.create(t,e.Fragment,a,n)}function SD(e,t){return t.value}function g3(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function $m(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kD(e,t,n){return a;function a(s,l,u,d){const h=Array.isArray(u.children)?n:t;return d?h(l,u,d):h(l,u)}}function CD(e,t){return n;function n(a,s,l,u){const d=Array.isArray(l.children),f=zr(a);return t(s,l,u,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function ND(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&Fm.call(t.properties,s)){const l=OD(e,s,t.properties[s]);if(l){const[u,d]=l;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&ED.has(t.tagName)?a=d:n[u]=d}}if(a){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function RD(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const u=l.expression;u.type;const d=u.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Lo(e,t.position);else{const s=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else Lo(e,t.position);else l=a.value===null?!0:a.value;n[s]=l}return n}function qm(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:gD;for(;++a<t.children.length;){const l=t.children[a];let u;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=s.get(f)||0;u=f+"-"+h,s.set(f,h+1)}}const d=m3(e,l,u);d!==void 0&&n.push(d)}return n}function OD(e,t,n){const a=Ed(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?x_(n):v_(n)),a.property==="style"){let s=typeof n=="object"?n:LD(e,String(n));return e.stylePropertyNameCase==="css"&&(s=ID(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?i5[a.property]||a.property:a.attribute,n]}}function LD(e,t){try{return mD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new dn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=p3+"#cannot-parse-style-attribute",s}}function b3(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,u;for(;++l<s.length;){const d=JE(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}a=u}else a=JE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return Fm.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Lo(e)}function Lo(e,t){const n=new dn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=p3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ID(e){const t={};let n;for(n in e)Fm.call(e,n)&&(t[MD(n)]=e[n]);return t}function MD(e){let t=e.replace(bD,DD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function DD(e){return"-"+e.toLowerCase()}const O0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},BD={tokenize:zD};function zD(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Je(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),l(d)}function l(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Re(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),u)}}const PD={tokenize:HD},lx={tokenize:UD};function HD(e){const t=this,n=[];let a=0,s,l,u;return d;function d(P){if(a<n.length){const G=n[a];return t.containerState=G[1],e.attempt(G[0].continuation,f,h)(P)}return h(P)}function f(P){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&q();const G=t.events.length;let ne=G,F;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){F=t.events[ne][1].end;break}k(a);let J=G;for(;J<t.events.length;)t.events[J][1].end={...F},J++;return Wn(t.events,ne+1,0,t.events.slice(G)),t.events.length=J,h(P)}return d(P)}function h(P){if(a===n.length){if(!s)return E(P);if(s.currentConstruct&&s.currentConstruct.concrete)return T(P);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lx,m,b)(P)}function m(P){return s&&q(),k(a),E(P)}function b(P){return t.parser.lazy[t.now().line]=a!==n.length,u=t.now().offset,T(P)}function E(P){return t.containerState={},e.attempt(lx,v,T)(P)}function v(P){return a++,n.push([t.currentConstruct,t.containerState]),E(P)}function T(P){if(P===null){s&&q(),k(0),e.consume(P);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),A(P)}function A(P){if(P===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(P);return}return Re(P)?(e.consume(P),S(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(P),A)}function S(P,G){const ne=t.sliceStream(P);if(G&&ne.push(null),P.previous=l,l&&(l.next=P),l=P,s.defineSkip(P.start),s.write(ne),t.parser.lazy[P.start.line]){let F=s.events.length;for(;F--;)if(s.events[F][1].start.offset<u&&(!s.events[F][1].end||s.events[F][1].end.offset>u))return;const J=t.events.length;let U=J,le,j;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(le){j=t.events[U][1].end;break}le=!0}for(k(a),F=J;F<t.events.length;)t.events[F][1].end={...j},F++;Wn(t.events,U+1,0,t.events.slice(J)),t.events.length=F}}function k(P){let G=n.length;for(;G-- >P;){const ne=n[G];t.containerState=ne[1],ne[0].exit.call(t,e)}n.length=P}function q(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function UD(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const jD={tokenize:FD};function FD(e){const t=this,n=e.attempt(Wo,a,e.attempt(this.parser.constructs.flowInitial,s,Je(e,e.attempt(this.parser.constructs.flow,s,e.attempt(GO,s)),"linePrefix")));return n;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $D={resolveAll:E3()},qD=y3("string"),YD=y3("text");function y3(e){return{resolveAll:E3(e==="text"?VD:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],l=n.attempt(s,u,d);return u;function u(m){return h(m)?l(m):d(m)}function d(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const b=s[m];let E=-1;if(b)for(;++E<b.length;){const v=b[E];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function E3(e){return t;function t(n,a){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,a):n}}function VD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let l=s.length,u=-1,d=0,f;for(;l--;){const h=s[l];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(h===-2)f=!0,d++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:a.start._bufferIndex+u,_index:a.start._index+l,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const GD={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:BT},WD={91:ZO},QD={[-2]:S0,[-1]:S0,32:S0},XD={35:aL,42:Fc,45:[UE,Fc],60:oL,61:UE,95:Fc,96:PE,126:PE},KD={38:PT,92:zT},ZD={[-5]:k0,[-4]:k0,[-3]:k0,33:SL,38:PT,42:Pp,60:[CO,mL],91:CL,92:[nL,zT],93:zm,95:Pp,96:jO},JD={null:[Pp,$D]},e7={null:[42,95]},t7={null:[]},n7=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:e7,contentInitial:WD,disable:t7,document:GD,flow:XD,flowInitial:QD,insideSpan:JD,string:KD,text:ZD},Symbol.toStringTag,{value:"Module"}));function r7(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let u=[],d=[];const f={attempt:J(ne),check:J(F),consume:q,enter:P,exit:G,interrupt:J(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:A,events:[],now:T,parser:e,previous:null,sliceSerialize:E,sliceStream:v,write:b};let m=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function b(H){return u=ur(u,H),S(),u[u.length-1]!==null?[]:(U(t,0),h.events=Sd(l,h.events,h),h.events)}function E(H,z){return i7(v(H),z)}function v(H){return a7(u,H)}function T(){const{_bufferIndex:H,_index:z,line:ve,column:de,offset:ue}=a;return{_bufferIndex:H,_index:z,line:ve,column:de,offset:ue}}function A(H){s[H.line]=H.column,j()}function S(){let H;for(;a._index<u.length;){const z=u[a._index];if(typeof z=="string")for(H=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===H&&a._bufferIndex<z.length;)k(z.charCodeAt(a._bufferIndex));else k(z)}}function k(H){m=m(H)}function q(H){Re(H)?(a.line++,a.column=1,a.offset+=H===-3?2:1,j()):H!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=H}function P(H,z){const ve=z||{};return ve.type=H,ve.start=T(),h.events.push(["enter",ve,h]),d.push(ve),ve}function G(H){const z=d.pop();return z.end=T(),h.events.push(["exit",z,h]),z}function ne(H,z){U(H,z.from)}function F(H,z){z.restore()}function J(H,z){return ve;function ve(de,ue,M){let ae,Ee,ke,R;return Array.isArray(de)?te(de):"tokenize"in de?te([de]):D(de);function D(ye){return Oe;function Oe(tt){const Ie=tt!==null&&ye[tt],Wt=tt!==null&&ye.null,Qt=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(Wt)?Wt:Wt?[Wt]:[]];return te(Qt)(tt)}}function te(ye){return ae=ye,Ee=0,ye.length===0?M:O(ye[Ee])}function O(ye){return Oe;function Oe(tt){return R=le(),ke=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call(z?Object.assign(Object.create(h),z):h,f,Y,be)(tt)}}function Y(ye){return H(ke,R),ue}function be(ye){return R.restore(),++Ee<ae.length?O(ae[Ee]):M}}}function U(H,z){H.resolveAll&&!l.includes(H)&&l.push(H),H.resolve&&Wn(h.events,z,h.events.length-z,H.resolve(h.events.slice(z),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function le(){const H=T(),z=h.previous,ve=h.currentConstruct,de=h.events.length,ue=Array.from(d);return{from:de,restore:M};function M(){a=H,h.previous=z,h.currentConstruct=ve,h.events.length=de,d=ue,j()}}function j(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function a7(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(a,l)];else{if(u=e.slice(n,s),a>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(a):u.shift()}l>0&&u.push(e[s].slice(0,l))}return u}function i7(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const l=e[n];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
57
+ `;break}case-3:{u=`\r
58
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(l)}s=l===-2,a.push(u)}return a.join("")}function s7(e){const a={constructs:kT([n7,...(e||{}).extensions||[]]),content:s(BD),defined:[],document:s(PD),flow:s(jD),lazy:{},string:s(qD),text:s(YD)};return a;function s(l){return u;function u(d){return r7(a,l,d)}}}function l7(e){for(;!HT(e););return e}const ox=/[\0\t\n\r]/g;function o7(){let e=1,t="",n=!0,a;return s;function s(l,u,d){const f=[];let h,m,b,E,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),b=0,t="",n&&(l.charCodeAt(0)===65279&&b++,n=void 0);b<l.length;){if(ox.lastIndex=b,h=ox.exec(l),E=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(E),!h){t=l.slice(b);break}if(v===10&&b===E&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),b<E&&(f.push(l.slice(b,E)),e+=E-b),v){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}b=E+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const x3={}.hasOwnProperty;function u7(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),c7(n)(l7(s7(n).document().write(o7()(e,t,!0))))}function c7(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ft),autolinkProtocol:le,autolinkEmail:le,atxHeading:l(Tr),blockQuote:l(Wt),characterEscape:le,characterReference:le,codeFenced:l(Qt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(Qt,u),codeText:l(Dn,u),codeTextData:le,data:le,codeFlowValue:le,definition:l(fr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Xt),hardBreakEscape:l(ha),hardBreakTrailing:l(ha),htmlFlow:l(je,u),htmlFlowData:le,htmlText:l(je,u),htmlTextData:le,image:l(ct),label:u,link:l(Ft),listItem:l(hr),listItemValue:E,listOrdered:l(fn,b),listUnordered:l(fn),paragraph:l(Fd),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(Tr),strong:l($d),thematicBreak:l(qd)},exit:{atxHeading:f(),atxHeadingSequence:ne,autolink:f(),autolinkEmail:Ie,autolinkProtocol:tt,blockQuote:f(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:Oe,codeFenced:f(S),codeFencedFence:A,codeFencedFenceInfo:v,codeFencedFenceMeta:T,codeFlowValue:j,codeIndented:f(k),codeText:f(ue),codeTextData:j,data:j,definition:f(),definitionDestinationString:G,definitionLabelString:q,definitionTitleString:P,emphasis:f(),hardBreakEscape:f(z),hardBreakTrailing:f(z),htmlFlow:f(ve),htmlFlowData:j,htmlText:f(de),htmlTextData:j,image:f(ae),label:ke,labelText:Ee,lineEnding:H,link:f(M),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Y,resourceDestinationString:R,resourceTitleString:D,resource:te,setextHeading:f(U),setextHeadingLineSequence:J,setextHeadingText:F,strong:f(),thematicBreak:f()}};v3(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(se){let xe={type:"root",children:[]};const De={stack:[xe],tokenStack:[],config:t,enter:d,exit:h,buffer:u,resume:m,data:n},Ye=[];let st=-1;for(;++st<se.length;)if(se[st][1].type==="listOrdered"||se[st][1].type==="listUnordered")if(se[st][0]==="enter")Ye.push(st);else{const Bn=Ye.pop();st=s(se,Bn,st)}for(st=-1;++st<se.length;){const Bn=t[se[st][0]];x3.call(Bn,se[st][1].type)&&Bn[se[st][1].type].call(Object.assign({sliceSerialize:se[st][2].sliceSerialize},De),se[st][1])}if(De.tokenStack.length>0){const Bn=De.tokenStack[De.tokenStack.length-1];(Bn[1]||ux).call(De,void 0,Bn[0])}for(xe.position={start:ja(se.length>0?se[0][1].start:{line:1,column:1,offset:0}),end:ja(se.length>0?se[se.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)xe=t.transforms[st](xe)||xe;return xe}function s(se,xe,De){let Ye=xe-1,st=-1,Bn=!1,Hr,pn,Pt,En;for(;++Ye<=De;){const mt=se[Ye];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?st++:st--,En=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Hr&&!En&&!st&&!Pt&&(Pt=Ye),En=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:En=void 0}if(!st&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||st===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Hr){let pa=Ye;for(pn=void 0;pa--;){const pr=se[pa];if(pr[1].type==="lineEnding"||pr[1].type==="lineEndingBlank"){if(pr[0]==="exit")continue;pn&&(se[pn][1].type="lineEndingBlank",Bn=!0),pr[1].type="lineEnding",pn=pa}else if(!(pr[1].type==="linePrefix"||pr[1].type==="blockQuotePrefix"||pr[1].type==="blockQuotePrefixWhitespace"||pr[1].type==="blockQuoteMarker"||pr[1].type==="listItemIndent"))break}Pt&&(!pn||Pt<pn)&&(Hr._spread=!0),Hr.end=Object.assign({},pn?se[pn][1].start:mt[1].end),se.splice(pn||Ye,0,["exit",Hr,mt[2]]),Ye++,De++}if(mt[1].type==="listItemPrefix"){const pa={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Hr=pa,se.splice(Ye,0,["enter",pa,mt[2]]),Ye++,De++,Pt=void 0,En=!0}}}return se[xe][1]._spread=Bn,De}function l(se,xe){return De;function De(Ye){d.call(this,se(Ye),Ye),xe&&xe.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(se,xe,De){this.stack[this.stack.length-1].children.push(se),this.stack.push(se),this.tokenStack.push([xe,De||void 0]),se.position={start:ja(xe.start),end:void 0}}function f(se){return xe;function xe(De){se&&se.call(this,De),h.call(this,De)}}function h(se,xe){const De=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==se.type&&(xe?xe.call(this,se,Ye[0]):(Ye[1]||ux).call(this,se,Ye[0]));else throw new Error("Cannot close `"+se.type+"` ("+wo({start:se.start,end:se.end})+"): it’s not open");De.position.end=ja(se.end)}function m(){return Im(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function E(se){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(se),10),this.data.expectingFirstListItemValue=void 0}}function v(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=se}function T(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=se}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se.replace(/(\r?\n|\r)$/g,"")}function q(se){const xe=this.resume(),De=this.stack[this.stack.length-1];De.label=xe,De.identifier=Er(this.sliceSerialize(se)).toLowerCase()}function P(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function G(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function ne(se){const xe=this.stack[this.stack.length-1];if(!xe.depth){const De=this.sliceSerialize(se).length;xe.depth=De}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function J(se){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(se).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function le(se){const De=this.stack[this.stack.length-1].children;let Ye=De[De.length-1];(!Ye||Ye.type!=="text")&&(Ye=hn(),Ye.position={start:ja(se.start),end:void 0},De.push(Ye)),this.stack.push(Ye)}function j(se){const xe=this.stack.pop();xe.value+=this.sliceSerialize(se),xe.position.end=ja(se.end)}function H(se){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const De=xe.children[xe.children.length-1];De.position.end=ja(se.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(le.call(this,se),j.call(this,se))}function z(){this.data.atHardBreak=!0}function ve(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function de(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function ue(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.value=se}function M(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function ae(){const se=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";se.type+="Reference",se.referenceType=xe,delete se.url,delete se.title}else delete se.identifier,delete se.label;this.data.referenceType=void 0}function Ee(se){const xe=this.sliceSerialize(se),De=this.stack[this.stack.length-2];De.label=Z9(xe),De.identifier=Er(xe).toLowerCase()}function ke(){const se=this.stack[this.stack.length-1],xe=this.resume(),De=this.stack[this.stack.length-1];if(this.data.inReference=!0,De.type==="link"){const Ye=se.children;De.children=Ye}else De.alt=xe}function R(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.url=se}function D(){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.title=se}function te(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Y(se){const xe=this.resume(),De=this.stack[this.stack.length-1];De.label=xe,De.identifier=Er(this.sliceSerialize(se)).toLowerCase(),this.data.referenceType="full"}function be(se){this.data.characterReferenceType=se.type}function ye(se){const xe=this.sliceSerialize(se),De=this.data.characterReferenceType;let Ye;De?(Ye=ST(xe,De==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Dm(xe);const st=this.stack[this.stack.length-1];st.value+=Ye}function Oe(se){const xe=this.stack.pop();xe.position.end=ja(se.end)}function tt(se){j.call(this,se);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(se)}function Ie(se){j.call(this,se);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(se)}function Wt(){return{type:"blockquote",children:[]}}function Qt(){return{type:"code",lang:null,meta:null,value:""}}function Dn(){return{type:"inlineCode",value:""}}function fr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xt(){return{type:"emphasis",children:[]}}function Tr(){return{type:"heading",depth:0,children:[]}}function ha(){return{type:"break"}}function je(){return{type:"html",value:""}}function ct(){return{type:"image",title:null,url:"",alt:null}}function Ft(){return{type:"link",title:null,url:"",children:[]}}function fn(se){return{type:"list",ordered:se.type==="listOrdered",start:null,spread:se._spread,children:[]}}function hr(se){return{type:"listItem",spread:se._spread,checked:null,children:[]}}function Fd(){return{type:"paragraph",children:[]}}function $d(){return{type:"strong",children:[]}}function hn(){return{type:"text",value:""}}function qd(){return{type:"thematicBreak"}}}function ja(e){return{line:e.line,column:e.column,offset:e.offset}}function v3(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?v3(e,a):d7(e,a)}}function d7(e,t){let n;for(n in t)if(x3.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function ux(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wo({start:t.start,end:t.end})+") is still open")}function f7(e){const t=this;t.parser=n;function n(a){return u7(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function h7(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function p7(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
59
+ `}]}function m7(e,t){const n=t.value?t.value+`
60
+ `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function g7(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b7(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y7(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Zs(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let u,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=l+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function E7(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x7(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _3(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=a:s.push({type:"text",value:a}),s}function v7(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return _3(e,t);const s={src:Zs(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function _7(e,t){const n={src:Zs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function T7(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function A7(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return _3(e,t);const s={href:Zs(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function w7(e,t){const n={href:Zs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function S7(e,t,n){const a=e.all(t),s=n?k7(n):T3(t),l={},u=[];if(typeof t.checked=="boolean"){const m=a[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},a.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const m=a[d];(s||d!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
61
+ `}),m.type==="element"&&m.tagName==="p"&&!s?u.push(...m.children):u.push(m)}const f=a[a.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
62
+ `});const h={type:"element",tagName:"li",properties:l,children:u};return e.patch(t,h),e.applyData(t,h)}function k7(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=T3(n[a])}return t}function T3(e){const t=e.spread;return t??e.children.length>1}function C7(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const u=a[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function N7(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R7(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function O7(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L7(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=zr(t.children[1]),f=Ad(t.children[t.children.length-1]);d&&f&&(u.position={start:d,end:f}),s.push(u)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function I7(e,t,n){const a=n?n.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,d=u?u.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const b=t.children[f],E={},v=u?u[f]:void 0;v&&(E.align=v);let T={type:"element",tagName:l,properties:E,children:[]};b&&(T.children=e.all(b),e.patch(b,T),T=e.applyData(b,T)),h.push(T)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function M7(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const cx=9,dx=32;function D7(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const l=[];for(;a;)l.push(fx(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return l.push(fx(t.slice(s),s>0,!1)),l.join("")}function fx(e,t,n){let a=0,s=e.length;if(t){let l=e.codePointAt(a);for(;l===cx||l===dx;)a++,l=e.codePointAt(a)}if(n){let l=e.codePointAt(s-1);for(;l===cx||l===dx;)s--,l=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function B7(e,t){const n={type:"text",value:D7(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function z7(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const P7={blockquote:h7,break:p7,code:m7,delete:g7,emphasis:b7,footnoteReference:y7,heading:E7,html:x7,imageReference:v7,image:_7,inlineCode:T7,linkReference:A7,link:w7,listItem:S7,list:C7,paragraph:N7,root:R7,strong:O7,table:L7,tableCell:M7,tableRow:I7,text:B7,thematicBreak:z7,toml:Ac,yaml:Ac,definition:Ac,footnoteDefinition:Ac};function Ac(){}function H7(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function U7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function j7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||H7,a=e.options.footnoteBackLabel||U7,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const m=e.all(h),b=String(h.identifier).toUpperCase(),E=Zs(b.toLowerCase());let v=0;const T=[],A=e.footnoteCounts.get(b);for(;A!==void 0&&++v<=A;){T.length>0&&T.push({type:"text",value:" "});let q=typeof n=="string"?n:n(f,v);typeof q=="string"&&(q={type:"text",value:q}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,v),className:["data-footnote-backref"]},children:Array.isArray(q)?q:[q]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const q=S.children[S.children.length-1];q&&q.type==="text"?q.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...T)}else m.push(...T);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(m,!0)};e.patch(h,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Mi(u),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
63
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
64
+ `}]}}const jp={}.hasOwnProperty,F7={};function $7(e,t){const n=t||F7,a=new Map,s=new Map,l=new Map,u={...P7,...n.handlers},d={all:h,applyData:Y7,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:u,one:f,options:n,patch:q7,wrap:G7};return Br(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?a:s,E=String(m.identifier).toUpperCase();b.has(E)||b.set(E,m)}}),d;function f(m,b){const E=m.type,v=d.handlers[E];if(jp.call(d.handlers,E)&&v)return v(d,m,b);if(d.options.passThrough&&d.options.passThrough.includes(E)){if("children"in m){const{children:A,...S}=m,k=Mi(S);return k.children=d.all(m),k}return Mi(m)}return(d.options.unknownHandler||V7)(d,m,b)}function h(m){const b=[];if("children"in m){const E=m.children;let v=-1;for(;++v<E.length;){const T=d.one(E[v],m);if(T){if(v&&E[v-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=hx(T.value)),!Array.isArray(T)&&T.type==="element")){const A=T.children[0];A&&A.type==="text"&&(A.value=hx(A.value))}Array.isArray(T)?b.push(...T):b.push(T)}}}return b}}function q7(e,t){e.position&&(t.position=tT(e))}function Y7(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const u="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:u}}n.type==="element"&&l&&Object.assign(n.properties,Mi(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function V7(e,t){const n=t.data||{},a="value"in t&&!(jp.call(n,"hProperties")||jp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function G7(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
65
+ `});++a<e.length;)a&&n.push({type:"text",value:`
66
+ `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
67
+ `}),n}function hx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function px(e,t){const n=$7(e,t),a=n.one(e,void 0),s=j7(n),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
68
+ `},s),l}function W7(e,t){return e&&"run"in e?async function(n,a){const s=px(n,{file:a,...t});await e.run(s,a)}:function(n,a){return px(n,{file:a,...e||t})}}function mx(e){if(e)throw e}var L0,gx;function Q7(){if(gx)return L0;gx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),b=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!b)return!1;var E;for(E in h);return typeof E>"u"||e.call(h,E)},u=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},d=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(a)return a(h,m).value}else return;return h[m]};return L0=function f(){var h,m,b,E,v,T,A=arguments[0],S=1,k=arguments.length,q=!1;for(typeof A=="boolean"&&(q=A,A=arguments[1]||{},S=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});S<k;++S)if(h=arguments[S],h!=null)for(m in h)b=d(A,m),E=d(h,m),A!==E&&(q&&E&&(l(E)||(v=s(E)))?(v?(v=!1,T=b&&s(b)?b:[]):T=b&&l(b)?b:{},u(A,{name:m,newValue:f(q,T,E)})):typeof E<"u"&&u(A,{name:m,newValue:E}));return A},L0}var X7=Q7();const I0=Do(X7);function Fp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function K7(){const e=[],t={run:n,use:a};return t;function n(...s){let l=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...s);function d(f,...h){const m=e[++l];let b=-1;if(f){u(f);return}for(;++b<s.length;)(h[b]===null||h[b]===void 0)&&(h[b]=s[b]);s=h,m?Z7(m,d)(...h):u(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Z7(e,t){let n;return a;function a(...u){const d=e.length>u.length;let f;d&&u.push(s);try{f=e.apply(this,u)}catch(h){const m=h;if(d&&n)throw m;return s(m)}d||(f&&f.then&&typeof f.then=="function"?f.then(l,s):f instanceof Error?s(f):l(f))}function s(u,...d){n||(n=!0,t(u,...d))}function l(u){s(null,u)}}const Or={basename:J7,dirname:eB,extname:tB,join:nB,sep:"/"};function J7(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qo(e);let n=0,a=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let u=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else u<0&&(l=!0,u=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=u));return n===a?a=u:a<0&&(a=e.length),e.slice(n,a)}function eB(e){if(Qo(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tB(e){Qo(e);let t=e.length,n=-1,a=0,s=-1,l=0,u;for(;t--;){const d=e.codePointAt(t);if(d===47){if(u){a=t+1;break}continue}n<0&&(u=!0,n=t+1),d===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function nB(...e){let t=-1,n;for(;++t<e.length;)Qo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rB(n)}function rB(e){Qo(e);const t=e.codePointAt(0)===47;let n=aB(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function aB(e,t){let n="",a=0,s=-1,l=0,u=-1,d,f;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(s===u-1||l===1))if(s!==u-1&&l===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",a=0):(n=n.slice(0,f),a=n.length-1-n.lastIndexOf("/")),s=u,l=0;continue}}else if(n.length>0){n="",a=0,s=u,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),a=u-s-1;s=u,l=0}else d===46&&l>-1?l++:l=-1}return n}function Qo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iB={cwd:sB};function sB(){return"/"}function $p(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lB(e){if(typeof e=="string")e=new URL(e);else if(!$p(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oB(e)}function oB(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const M0=["history","path","basename","stem","extname","dirname"];class uB{constructor(t){let n;t?$p(t)?n={path:t}:typeof t=="string"||cB(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":iB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<M0.length;){const l=M0[a];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)M0.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Or.basename(this.path):void 0}set basename(t){B0(t,"basename"),D0(t,"basename"),this.path=Or.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Or.dirname(this.path):void 0}set dirname(t){bx(this.basename,"dirname"),this.path=Or.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Or.extname(this.path):void 0}set extname(t){if(D0(t,"extname"),bx(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=Or.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$p(t)&&(t=lB(t)),B0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Or.basename(this.path,this.extname):void 0}set stem(t){B0(t,"stem"),D0(t,"stem"),this.path=Or.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new dn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function D0(e,t){if(e&&e.includes(Or.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Or.sep+"`")}function B0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function bx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dB=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),fB={}.hasOwnProperty;class Ym extends dB{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=K7()}copy(){const t=new Ym;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(I0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(H0("data",this.frozen),this.namespace[t]=n,this):fB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(H0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=wc(t),a=this.parser||this.Parser;return z0("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),z0("process",this.parser||this.Parser),P0("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,u){const d=wc(t),f=a.parse(d);a.run(f,d,function(m,b,E){if(m||!b||!E)return h(m);const v=b,T=a.stringify(v,E);mB(T)?E.value=T:E.result=T,h(m,E)});function h(m,b){m||!b?u(m):l?l(b):n(void 0,b)}}}processSync(t){let n=!1,a;return this.freeze(),z0("processSync",this.parser||this.Parser),P0("processSync",this.compiler||this.Compiler),this.process(t,s),Ex("processSync","process",n),a;function s(l,u){n=!0,mx(l),a=u}}run(t,n,a){yx(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?l(void 0,a):new Promise(l);function l(u,d){const f=wc(n);s.run(t,f,h);function h(m,b,E){const v=b||t;m?d(m):u?u(v):a(void 0,v,E)}}}runSync(t,n){let a=!1,s;return this.run(t,n,l),Ex("runSync","run",a),s;function l(u,d){mx(u),s=d,a=!0}}stringify(t,n){this.freeze();const a=wc(n),s=this.compiler||this.Compiler;return P0("stringify",s),yx(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(H0("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...b]=h;f(m,b)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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");d(h.plugins),h.settings&&(s.settings=I0(!0,s.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const b=h[m];l(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let b=-1,E=-1;for(;++b<a.length;)if(a[b][0]===h){E=b;break}if(E===-1)a.push([h,...m]);else if(m.length>0){let[v,...T]=m;const A=a[E][1];Fp(A)&&Fp(v)&&(v=I0(!0,A,v)),a[E]=[h,v,...T]}}}}const hB=new Ym().freeze();function z0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function P0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function H0(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 yx(e){if(!Fp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ex(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wc(e){return pB(e)?e:new uB(e)}function pB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mB(e){return typeof e=="string"||gB(e)}function gB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Vm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ji=Vm();function A3(e){ji=e}var Si={exec:()=>null};function et(e,t=""){let n=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let u=typeof l=="string"?l:l.source;return u=u.replace(yn.caret,"$1"),n=n.replace(s,u),a},getRegex:()=>new RegExp(n,t)};return a}var bB=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),yn={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,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,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"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},yB=/^(?:[ \t]*(?:\n|$))+/,EB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gm=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,w3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,S3=et(w3).replace(/bull/g,Gm).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(),_B=et(w3).replace(/bull/g,Gm).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(),Wm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TB=/^[^\n]+/,Qm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,AB=et(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wB=et(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gm).getRegex(),Cd="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",Xm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,SB=et("^ {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",Xm).replace("tag",Cd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k3=et(Wm).replace("hr",Xo).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),kB=et(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",k3).getRegex(),Km={blockquote:kB,code:EB,def:AB,fences:xB,heading:vB,hr:Xo,html:SB,lheading:S3,list:wB,newline:yB,paragraph:k3,table:Si,text:TB},xx=et("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xo).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),CB={...Km,lheading:_B,table:xx,paragraph:et(Wm).replace("hr",Xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex()},NB={...Km,html:et(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xm).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:Si,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:et(Wm).replace("hr",Xo).replace("heading",` *#{1,6} *[^
69
+ ]`).replace("lheading",S3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},RB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,C3=/^( {2,}|\\)\n(?!\s*$)/,LB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Nd=/[\p{P}\p{S}]/u,Zm=/[\s\p{P}\p{S}]/u,N3=/[^\s\p{P}\p{S}]/u,IB=et(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zm).getRegex(),R3=/(?!~)[\p{P}\p{S}]/u,MB=/(?!~)[\s\p{P}\p{S}]/u,DB=/(?:[^\s\p{P}\p{S}]|~)/u,O3=/(?![*_])[\p{P}\p{S}]/u,BB=/(?![*_])[\s\p{P}\p{S}]/u,zB=/(?:[^\s\p{P}\p{S}]|[*_])/u,PB=et(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",bB?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),L3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,HB=et(L3,"u").replace(/punct/g,Nd).getRegex(),UB=et(L3,"u").replace(/punct/g,R3).getRegex(),I3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",jB=et(I3,"gu").replace(/notPunctSpace/g,N3).replace(/punctSpace/g,Zm).replace(/punct/g,Nd).getRegex(),FB=et(I3,"gu").replace(/notPunctSpace/g,DB).replace(/punctSpace/g,MB).replace(/punct/g,R3).getRegex(),$B=et("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N3).replace(/punctSpace/g,Zm).replace(/punct/g,Nd).getRegex(),qB=et(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,O3).getRegex(),YB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",VB=et(YB,"gu").replace(/notPunctSpace/g,zB).replace(/punctSpace/g,BB).replace(/punct/g,O3).getRegex(),GB=et(/\\(punct)/,"gu").replace(/punct/g,Nd).getRegex(),WB=et(/^<(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(),QB=et(Xm).replace("(?:-->|$)","-->").getRegex(),XB=et("^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",QB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,KB=et(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",nd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),M3=et(/^!?\[(label)\]\[(ref)\]/).replace("label",nd).replace("ref",Qm).getRegex(),D3=et(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qm).getRegex(),ZB=et("reflink|nolink(?!\\()","g").replace("reflink",M3).replace("nolink",D3).getRegex(),vx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jm={_backpedal:Si,anyPunctuation:GB,autolink:WB,blockSkip:PB,br:C3,code:OB,del:Si,delLDelim:Si,delRDelim:Si,emStrongLDelim:HB,emStrongRDelimAst:jB,emStrongRDelimUnd:$B,escape:RB,link:KB,nolink:D3,punctuation:IB,reflink:M3,reflinkSearch:ZB,tag:XB,text:LB,url:Si},JB={...Jm,link:et(/^!?\[(label)\]\((.*?)\)/).replace("label",nd).getRegex(),reflink:et(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nd).getRegex()},qp={...Jm,emStrongRDelimAst:FB,emStrongLDelim:UB,delLDelim:qB,delRDelim:VB,url:et(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vx).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:et(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vx).getRegex()},ez={...qp,br:et(C3).replace("{2,}","*").getRegex(),text:et(qp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sc={normal:Km,gfm:CB,pedantic:NB},io={normal:Jm,gfm:qp,breaks:ez,pedantic:JB},tz={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_x=e=>tz[e];function Rr(e,t){if(t){if(yn.escapeTest.test(e))return e.replace(yn.escapeReplace,_x)}else if(yn.escapeTestNoEncode.test(e))return e.replace(yn.escapeReplaceNoEncode,_x);return e}function Tx(e){try{e=encodeURI(e).replace(yn.percentDecode,"%")}catch{return null}return e}function Ax(e,t){let n=e.replace(yn.findPipe,(l,u,d)=>{let f=!1,h=u;for(;--h>=0&&d[h]==="\\";)f=!f;return f?"|":" |"}),a=n.split(yn.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(yn.slashPipe,"|");return a}function so(e,t,n){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function nz(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&(n--,n<0))return a;return n>0?-2:-1}function rz(e,t=0){let n=t,a="";for(let s of e)if(s===" "){let l=4-n%4;a+=" ".repeat(l),n+=l}else a+=s,n++;return a}function wx(e,t,n,a,s){let l=t.href,u=t.title||null,d=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:u,text:d,tokens:a.inlineTokens(d)};return a.state.inLink=!1,f}function az(e,t,n){let a=e.match(n.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
70
+ `).map(l=>{let u=l.match(n.other.beginningSpace);if(u===null)return l;let[d]=u;return d.length>=s.length?l.slice(s.length):l}).join(`
71
+ `)}var rd=class{options;rules;lexer;constructor(t){this.options=t||ji}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let a=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?a:so(a,`
72
+ `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let a=n[0],s=az(a,n[3]||"",this.rules);return{type:"code",raw:a,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let a=n[2].trim();if(this.rules.other.endingHash.test(a)){let s=so(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:so(n[0],`
73
+ `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let a=so(n[0],`
74
+ `).split(`
75
+ `),s="",l="",u=[];for(;a.length>0;){let d=!1,f=[],h;for(h=0;h<a.length;h++)if(this.rules.other.blockquoteStart.test(a[h]))f.push(a[h]),d=!0;else if(!d)f.push(a[h]);else break;a=a.slice(h);let m=f.join(`
76
+ `),b=m.replace(this.rules.other.blockquoteSetextReplace,`
77
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
78
+ ${m}`:m,l=l?`${l}
79
+ ${b}`:b;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,u,!0),this.lexer.state.top=E,a.length===0)break;let v=u.at(-1);if(v?.type==="code")break;if(v?.type==="blockquote"){let T=v,A=T.raw+`
80
+ `+a.join(`
81
+ `),S=this.blockquote(A);u[u.length-1]=S,s=s.substring(0,s.length-T.raw.length)+S.raw,l=l.substring(0,l.length-T.text.length)+S.text;break}else if(v?.type==="list"){let T=v,A=T.raw+`
82
+ `+a.join(`
83
+ `),S=this.list(A);u[u.length-1]=S,s=s.substring(0,s.length-v.raw.length)+S.raw,l=l.substring(0,l.length-T.raw.length)+S.raw,a=A.substring(u.at(-1).raw.length).split(`
84
+ `);continue}}return{type:"blockquote",raw:s,tokens:u,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let a=n[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let u=this.rules.other.listItemRegex(a),d=!1;for(;t;){let h=!1,m="",b="";if(!(n=u.exec(t))||this.rules.block.hr.test(t))break;m=n[0],t=t.substring(m.length);let E=rz(n[2].split(`
85
+ `,1)[0],n[1].length),v=t.split(`
86
+ `,1)[0],T=!E.trim(),A=0;if(this.options.pedantic?(A=2,b=E.trimStart()):T?A=n[1].length+1:(A=E.search(this.rules.other.nonSpaceChar),A=A>4?1:A,b=E.slice(A),A+=n[1].length),T&&this.rules.other.blankLine.test(v)&&(m+=v+`
87
+ `,t=t.substring(v.length+1),h=!0),!h){let S=this.rules.other.nextBulletRegex(A),k=this.rules.other.hrRegex(A),q=this.rules.other.fencesBeginRegex(A),P=this.rules.other.headingBeginRegex(A),G=this.rules.other.htmlBeginRegex(A),ne=this.rules.other.blockquoteBeginRegex(A);for(;t;){let F=t.split(`
88
+ `,1)[0],J;if(v=F,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),J=v):J=v.replace(this.rules.other.tabCharGlobal," "),q.test(v)||P.test(v)||G.test(v)||ne.test(v)||S.test(v)||k.test(v))break;if(J.search(this.rules.other.nonSpaceChar)>=A||!v.trim())b+=`
89
+ `+J.slice(A);else{if(T||E.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||q.test(E)||P.test(E)||k.test(E))break;b+=`
90
+ `+v}T=!v.trim(),m+=F+`
91
+ `,t=t.substring(F.length+1),E=J.slice(A)}}l.loose||(d?l.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(d=!0)),l.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),l.raw+=m}let f=l.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let h of l.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(h.raw);if(m){let b={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};h.checked=b.checked,l.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=b.raw+h.tokens[0].raw,h.tokens[0].text=b.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(b)):h.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):h.tokens.unshift(b)}}if(!l.loose){let m=h.tokens.filter(E=>E.type==="space"),b=m.length>0&&m.some(E=>this.rules.other.anyLine.test(E.raw));l.loose=b}}if(l.loose)for(let h of l.items){h.loose=!0;for(let m of h.tokens)m.type==="text"&&(m.type="paragraph")}return l}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let a=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:a,raw:n[0],href:s,title:l}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let a=Ax(n[1]),s=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
92
+ `):[],u={type:"table",raw:n[0],header:[],align:[],rows:[]};if(a.length===s.length){for(let d of s)this.rules.other.tableAlignRight.test(d)?u.align.push("right"):this.rules.other.tableAlignCenter.test(d)?u.align.push("center"):this.rules.other.tableAlignLeft.test(d)?u.align.push("left"):u.align.push(null);for(let d=0;d<a.length;d++)u.header.push({text:a[d],tokens:this.lexer.inline(a[d]),header:!0,align:u.align[d]});for(let d of l)u.rows.push(Ax(d,u.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:u.align[h]})));return u}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let a=n[1].charAt(n[1].length-1)===`
93
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let a=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let u=so(a.slice(0,-1),"\\");if((a.length-u.length)%2===0)return}else{let u=nz(n[2],"()");if(u===-2)return;if(u>-1){let d=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let s=n[2],l="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(s);u&&(s=u[1],l=u[3])}else l=n[3]?n[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),wx(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[s.toLowerCase()];if(!l){let u=a[0].charAt(0);return{type:"text",raw:u,text:u}}return wx(a,l,a[0],this.lexer,this.rules)}}emStrong(t,n,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,u,d,f=l,h=0,m=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,n=n.slice(-1*t.length+l);(s=m.exec(n))!=null;){if(u=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!u)continue;if(d=[...u].length,s[3]||s[4]){f+=d;continue}else if((s[5]||s[6])&&l%3&&!((l+d)%3)){h+=d;continue}if(f-=d,f>0)continue;d=Math.min(d,d+f+h);let b=[...s[0]][0].length,E=t.slice(0,l+s.index+b+d);if(Math.min(l,d)%2){let T=E.slice(1,-1);return{type:"em",raw:E,text:T,tokens:this.lexer.inlineTokens(T)}}let v=E.slice(2,-2);return{type:"strong",raw:E,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let a=n[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:n[0],text:a}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,a=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,u,d,f=l,h=this.rules.inline.delRDelim;for(h.lastIndex=0,n=n.slice(-1*t.length+l);(s=h.exec(n))!=null;){if(u=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!u||(d=[...u].length,d!==l))continue;if(s[3]||s[4]){f+=d;continue}if(f-=d,f>0)continue;d=Math.min(d,d+f);let m=[...s[0]][0].length,b=t.slice(0,l+s.index+m+d),E=b.slice(l,-l);return{type:"del",raw:b,text:E,tokens:this.lexer.inlineTokens(E)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let a,s;return n[2]==="@"?(a=n[1],s="mailto:"+a):(a=n[1],s=a),{type:"link",raw:n[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let a,s;if(n[2]==="@")a=n[0],s="mailto:"+a;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(l!==n[0]);a=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let a=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:a}}}},cr=class Yp{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ji,this.options.tokenizer=this.options.tokenizer||new rd,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 n={other:yn,block:Sc.normal,inline:io.normal};this.options.pedantic?(n.block=Sc.pedantic,n.inline=io.pedantic):this.options.gfm&&(n.block=Sc.gfm,this.options.breaks?n.inline=io.breaks:n.inline=io.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sc,inline:io}}static lex(t,n){return new Yp(n).lex(t)}static lexInline(t,n){return new Yp(n).inlineTokens(t)}lex(t){t=t.replace(yn.carriageReturn,`
94
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],a=!1){for(this.options.pedantic&&(t=t.replace(yn.tabCharGlobal," ").replace(yn.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(u=>(s=u.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let u=n.at(-1);s.raw.length===1&&u!==void 0?u.raw+=`
95
+ `:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`
96
+ `)?"":`
97
+ `)+s.raw,u.text+=`
98
+ `+s.text,this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`
99
+ `)?"":`
100
+ `)+s.raw,u.text+=`
101
+ `+s.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if(this.options.extensions?.startBlock){let u=1/0,d=t.slice(1),f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=t.substring(0,u+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let u=n.at(-1);a&&u?.type==="paragraph"?(u.raw+=(u.raw.endsWith(`
102
+ `)?"":`
103
+ `)+s.raw,u.text+=`
104
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s),a=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="text"?(u.raw+=(u.raw.endsWith(`
105
+ `)?"":`
106
+ `)+s.raw,u.text+=`
107
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let a=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let u=!1,d="";for(;t;){u||(d=""),u=!1;let f;if(this.options.extensions?.inline?.some(m=>(f=m.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let m=n.at(-1);f.type==="text"&&m?.type==="text"?(m.raw+=f.raw,m.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,a,d)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,a,d)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let h=t;if(this.options.extensions?.startInline){let m=1/0,b=t.slice(1),E;this.options.extensions.startInline.forEach(v=>{E=v.call({lexer:this},b),typeof E=="number"&&E>=0&&(m=Math.min(m,E))}),m<1/0&&m>=0&&(h=t.substring(0,m+1))}if(f=this.tokenizer.inlineText(h)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(d=f.raw.slice(-1)),u=!0;let m=n.at(-1);m?.type==="text"?(m.raw+=f.raw,m.text+=f.text):n.push(f);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},ad=class{options;parser;constructor(t){this.options=t||ji}space(t){return""}code({text:t,lang:n,escaped:a}){let s=(n||"").match(yn.notSpaceStart)?.[0],l=t.replace(yn.endingNewline,"")+`
108
+ `;return s?'<pre><code class="language-'+Rr(s)+'">'+(a?l:Rr(l,!0))+`</code></pre>
109
+ `:"<pre><code>"+(a?l:Rr(l,!0))+`</code></pre>
110
+ `}blockquote({tokens:t}){return`<blockquote>
111
+ ${this.parser.parse(t)}</blockquote>
112
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
113
+ `}hr(t){return`<hr>
114
+ `}list(t){let n=t.ordered,a=t.start,s="";for(let d=0;d<t.items.length;d++){let f=t.items[d];s+=this.listitem(f)}let l=n?"ol":"ul",u=n&&a!==1?' start="'+a+'"':"";return"<"+l+u+`>
115
+ `+s+"</"+l+`>
116
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
117
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
118
+ `}table(t){let n="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);n+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let u=t.rows[l];a="";for(let d=0;d<u.length;d++)a+=this.tablecell(u[d]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
119
+ <thead>
120
+ `+n+`</thead>
121
+ `+s+`</table>
122
+ `}tablerow({text:t}){return`<tr>
123
+ ${t}</tr>
124
+ `}tablecell(t){let n=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+n+`</${a}>
125
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Rr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:a}){let s=this.parser.parseInline(a),l=Tx(t);if(l===null)return s;t=l;let u='<a href="'+t+'"';return n&&(u+=' title="'+Rr(n)+'"'),u+=">"+s+"</a>",u}image({href:t,title:n,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=Tx(t);if(l===null)return Rr(a);t=l;let u=`<img src="${t}" alt="${Rr(a)}"`;return n&&(u+=` title="${Rr(n)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Rr(t.text)}},e1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},yr=class Vp{options;renderer;textRenderer;constructor(t){this.options=t||ji,this.options.renderer=this.options.renderer||new ad,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new e1}static parse(t,n){return new Vp(n).parse(t)}static parseInline(t,n){return new Vp(n).parseInline(t)}parse(t){let n="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let u=s,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=d||"";continue}}let l=s;switch(l.type){case"space":{n+=this.renderer.space(l);break}case"hr":{n+=this.renderer.hr(l);break}case"heading":{n+=this.renderer.heading(l);break}case"code":{n+=this.renderer.code(l);break}case"table":{n+=this.renderer.table(l);break}case"blockquote":{n+=this.renderer.blockquote(l);break}case"list":{n+=this.renderer.list(l);break}case"checkbox":{n+=this.renderer.checkbox(l);break}case"html":{n+=this.renderer.html(l);break}case"def":{n+=this.renderer.def(l);break}case"paragraph":{n+=this.renderer.paragraph(l);break}case"text":{n+=this.renderer.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){let a="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){a+=d||"";continue}}let u=l;switch(u.type){case"escape":{a+=n.text(u);break}case"html":{a+=n.html(u);break}case"link":{a+=n.link(u);break}case"image":{a+=n.image(u);break}case"checkbox":{a+=n.checkbox(u);break}case"strong":{a+=n.strong(u);break}case"em":{a+=n.em(u);break}case"codespan":{a+=n.codespan(u);break}case"br":{a+=n.br(u);break}case"del":{a+=n.del(u);break}case"text":{a+=n.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return a}},mo=class{options;block;constructor(t){this.options=t||ji}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?cr.lex:cr.lexInline}provideParser(){return this.block?yr.parse:yr.parseInline}},iz=class{defaults=Vm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=yr;Renderer=ad;TextRenderer=e1;Lexer=cr;Tokenizer=rd;Hooks=mo;constructor(...t){this.use(...t)}walkTokens(t,n){let a=[];for(let s of t)switch(a=a.concat(n.call(this,s)),s.type){case"table":{let l=s;for(let u of l.header)a=a.concat(this.walkTokens(u.tokens,n));for(let u of l.rows)for(let d of u)a=a.concat(this.walkTokens(d.tokens,n));break}case"list":{let l=s;a=a.concat(this.walkTokens(l.items,n));break}default:{let l=s;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(u=>{let d=l[u].flat(1/0);a=a.concat(this.walkTokens(d,n))}):l.tokens&&(a=a.concat(this.walkTokens(l.tokens,n)))}}return a}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let u=n.renderers[l.name];u?n.renderers[l.name]=function(...d){let f=l.renderer.apply(this,d);return f===!1&&(f=u.apply(this,d)),f}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=n[l.level];u?u.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),s.extensions=n),a.renderer){let l=this.defaults.renderer||new ad(this.defaults);for(let u in a.renderer){if(!(u in l))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let d=u,f=a.renderer[d],h=l[d];l[d]=(...m)=>{let b=f.apply(l,m);return b===!1&&(b=h.apply(l,m)),b||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new rd(this.defaults);for(let u in a.tokenizer){if(!(u in l))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let d=u,f=a.tokenizer[d],h=l[d];l[d]=(...m)=>{let b=f.apply(l,m);return b===!1&&(b=h.apply(l,m)),b}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new mo;for(let u in a.hooks){if(!(u in l))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let d=u,f=a.hooks[d],h=l[d];mo.passThroughHooks.has(u)?l[d]=m=>{if(this.defaults.async&&mo.passThroughHooksRespectAsync.has(u))return(async()=>{let E=await f.call(l,m);return h.call(l,E)})();let b=f.call(l,m);return h.call(l,b)}:l[d]=(...m)=>{if(this.defaults.async)return(async()=>{let E=await f.apply(l,m);return E===!1&&(E=await h.apply(l,m)),E})();let b=f.apply(l,m);return b===!1&&(b=h.apply(l,m)),b}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,u=a.walkTokens;s.walkTokens=function(d){let f=[];return f.push(u.call(this,d)),l&&(f=f.concat(l.call(this,d))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return cr.lex(t,n??this.defaults)}parser(t,n){return yr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,a)=>{let s={...a},l={...this.defaults,...s},u=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.async===!1)return u(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 n>"u"||n===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let d=l.hooks?await l.hooks.preprocess(n):n,f=await(l.hooks?await l.hooks.provideLexer():t?cr.lex:cr.lexInline)(d,l),h=l.hooks?await l.hooks.processAllTokens(f):f;l.walkTokens&&await Promise.all(this.walkTokens(h,l.walkTokens));let m=await(l.hooks?await l.hooks.provideParser():t?yr.parse:yr.parseInline)(h,l);return l.hooks?await l.hooks.postprocess(m):m})().catch(u);try{l.hooks&&(n=l.hooks.preprocess(n));let d=(l.hooks?l.hooks.provideLexer():t?cr.lex:cr.lexInline)(n,l);l.hooks&&(d=l.hooks.processAllTokens(d)),l.walkTokens&&this.walkTokens(d,l.walkTokens);let f=(l.hooks?l.hooks.provideParser():t?yr.parse:yr.parseInline)(d,l);return l.hooks&&(f=l.hooks.postprocess(f)),f}catch(d){return u(d)}}}onError(t,n){return a=>{if(a.message+=`
126
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Rr(a.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(a);throw a}}},Bi=new iz;function pt(e,t){return Bi.parse(e,t)}pt.options=pt.setOptions=function(e){return Bi.setOptions(e),pt.defaults=Bi.defaults,A3(pt.defaults),pt};pt.getDefaults=Vm;pt.defaults=ji;pt.use=function(...e){return Bi.use(...e),pt.defaults=Bi.defaults,A3(pt.defaults),pt};pt.walkTokens=function(e,t){return Bi.walkTokens(e,t)};pt.parseInline=Bi.parseInline;pt.Parser=yr;pt.parser=yr.parse;pt.Renderer=ad;pt.TextRenderer=e1;pt.Lexer=cr;pt.lexer=cr.lex;pt.Tokenizer=rd;pt.Hooks=mo;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;yr.parse;cr.lex;var sz=300,lz="300px",oz=500;function uz(e={}){let{immediate:t=!1,debounceDelay:n=sz,rootMargin:a=lz,idleTimeout:s=oz}=e,[l,u]=C.useState(!1),d=C.useRef(null),f=C.useRef(null),h=C.useRef(null),m=C.useMemo(()=>v=>{let T=Date.now();return window.setTimeout(()=>{v({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),b=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(v,T)=>window.requestIdleCallback(v,T):m,[m]),E=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?v=>window.cancelIdleCallback(v):v=>{clearTimeout(v)},[]);return C.useEffect(()=>{if(t){u(!0);return}let v=d.current;if(!v)return;f.current&&(clearTimeout(f.current),f.current=null),h.current&&(E(h.current),h.current=null);let T=()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(E(h.current),h.current=null)},A=P=>{h.current=b(G=>{G.timeRemaining()>0||G.didTimeout?(u(!0),P.disconnect()):h.current=b(()=>{u(!0),P.disconnect()},{timeout:s/2})},{timeout:s})},S=P=>{T(),f.current=window.setTimeout(()=>{var G,ne;let F=P.takeRecords();(F.length===0||(ne=(G=F.at(-1))==null?void 0:G.isIntersecting)!=null&&ne)&&A(P)},n)},k=(P,G)=>{P.isIntersecting?S(G):T()},q=new IntersectionObserver(P=>{for(let G of P)k(G,q)},{rootMargin:a,threshold:0});return q.observe(v),()=>{f.current&&clearTimeout(f.current),h.current&&E(h.current),q.disconnect()}},[t,n,a,s,E,b]),{shouldRender:l,containerRef:d}}var B3=/\s/,cz=/^\s+$/,dz=new Set(["code","pre","svg","math","annotation"]),fz=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",hz=e=>e.some(t=>fz(t)&&dz.has(t.tagName)),pz=e=>{let t=[],n="",a=!1;for(let s of e){let l=B3.test(s);l!==a&&n&&(t.push(n),n=""),n+=s,a=l}return n&&t.push(n),t},mz=e=>{let t=[],n="";for(let a of e)B3.test(a)?n+=a:(n&&(t.push(n),n=""),t.push(a));return n&&t.push(n),t},gz=(e,t,n,a,s)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${a}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${a}`},children:[{type:"text",value:e}]}),bz=(e,t,n,a,s)=>{let l=t.at(-1);if(!(l&&"children"in l))return;if(hz(t))return zs;let u=l,d=u.children.indexOf(e);if(d===-1)return;let f=e.value;if(!f.trim()){s.count+=f.length;return}let h=n.sep==="char"?mz(f):pz(f),m=a.prevContentLength,b=h.map(E=>{let v=s.count;if(s.count+=E.length,cz.test(E))return{type:"text",value:E};let T=m>0&&v<m;return gz(E,n.animation,n.duration,n.easing,T)});return u.children.splice(d,1,...b),d+b.length},yz=0;function Gp(e){var t,n,a,s;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(a=e?.easing)!=null?a:"ease",sep:(s=e?.sep)!=null?s:"word"},u={prevContentLength:0,lastRenderCharCount:0},d=yz++,f=()=>h=>{let m={count:0};xm(h,"text",(b,E)=>bz(b,E,l,u,m)),u.lastRenderCharCount=m.count,u.prevContentLength=0};return Object.defineProperty(f,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:f,setPrevContentLength(h){u.prevContentLength=h},getLastRenderCharCount(){let h=u.lastRenderCharCount;return u.lastRenderCharCount=0,h}}}Gp();var z3=C.createContext(!1),Ez=()=>C.useContext(z3),t1=(...e)=>h3(ZT(e)),xz=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(a=>a.startsWith(n)?a:`${e}:${a}`).join(" ")},vz=e=>e?(...t)=>xz(e,h3(ZT(t))):t1,Us=(e,t,n)=>{let a=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(a),l=document.createElement("a");l.href=s,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)},Wp=C.createContext(t1),qe=()=>C.useContext(Wp),_z=t1("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"),Tz=e=>{let t={};for(let n of e.split(";")){let a=n.indexOf(":");if(a>0){let s=n.slice(0,a).trim(),l=n.slice(a+1).trim();s&&l&&(t[s]=l)}}return t},Az=C.memo(({children:e,result:t,language:n,className:a,startLine:s,...l})=>{let u=qe(),d=C.useMemo(()=>u(_z),[u]),f=C.useMemo(()=>{let h={};return t.bg&&(h["--sdm-bg"]=t.bg),t.fg&&(h["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(h,Tz(t.rootStyle)),h},[t.bg,t.fg,t.rootStyle]);return x.jsx("div",{className:u(a,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:x.jsx("pre",{className:u(a,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:f,children:x.jsx("code",{className:u("[counter-increment:line_0] [counter-reset:line]"),style:s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((h,m)=>x.jsx("span",{className:d,children:h.length===0||h.length===1&&h[0].content===""?`
127
+ `:h.map((b,E)=>{let v={},T=!!b.bgColor;if(b.color&&(v["--sdm-c"]=b.color),b.bgColor&&(v["--sdm-tbg"]=b.bgColor),b.htmlStyle)for(let[A,S]of Object.entries(b.htmlStyle))A==="color"?v["--sdm-c"]=S:A==="background-color"?(v["--sdm-tbg"]=S,T=!0):v[A]=S;return x.jsx("span",{className:u("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",T&&"bg-[var(--sdm-tbg)]",T&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:v,...b.htmlAttrs,children:b.content},E)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),wz=({className:e,language:t,style:n,isIncomplete:a,...s})=>{let l=qe();return x.jsx("div",{className:l("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":a||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},P3=C.createContext({code:""}),H3=()=>C.useContext(P3),Sz=({language:e})=>{let t=qe();return x.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:x.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},kz=/\n+$/,Cz=C.lazy(()=>ia(()=>import("./highlighted-body-TPN3WLV5-CRT7miki.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),Nz=({code:e,language:t,className:n,children:a,isIncomplete:s=!1,startLine:l,...u})=>{let d=qe(),f=C.useMemo(()=>e.replace(kz,""),[e]),h=C.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:f.split(`
128
+ `).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[f]);return x.jsx(P3.Provider,{value:{code:e},children:x.jsxs(wz,{isIncomplete:s,language:t,children:[x.jsx(Sz,{language:t}),a?x.jsx("div",{className:d("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:x.jsx("div",{className:d("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:a})}):null,x.jsx(C.Suspense,{fallback:x.jsx(Az,{className:n,language:t,result:h,startLine:l,...u}),children:x.jsx(Cz,{className:n,code:f,language:t,raw:h,startLine:l,...u})})]})})},Rz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Oz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Lz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Iz=e=>x.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[x.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Mz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Dz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Bz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),zz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Pz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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"})}),Hz=e=>x.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:x.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.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),go={CheckIcon:Rz,CopyIcon:Oz,DownloadIcon:Lz,ExternalLinkIcon:zz,Loader2Icon:Iz,Maximize2Icon:Mz,RotateCcwIcon:Dz,XIcon:Bz,ZoomInIcon:Pz,ZoomOutIcon:Hz},U3=C.createContext(go),Uz=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),a=Object.keys(t);return n.length!==a.length?!1:n.every(s=>e[s]===t[s])},Sx=({icons:e,children:t})=>{let n=C.useRef(e),a=C.useRef(e?{...go,...e}:go);Uz(n.current,e)||(n.current=e,a.current=e?{...go,...e}:go);let s=a.current;return x.jsx(U3.Provider,{value:s,children:t})},_r=()=>C.useContext(U3),j3={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Qp=C.createContext(j3),ca=()=>C.useContext(Qp),kx=({onCopy:e,onError:t,timeout:n=2e3,children:a,className:s,code:l,...u})=>{let d=qe(),[f,h]=C.useState(!1),m=C.useRef(0),{code:b}=H3(),{isAnimating:E}=C.useContext(Qn),v=ca(),T=l??b,A=async()=>{var q;if(typeof window>"u"||!((q=navigator?.clipboard)!=null&&q.writeText)){t?.(new Error("Clipboard API not available"));return}try{f||(await navigator.clipboard.writeText(T),h(!0),e?.(),m.current=window.setTimeout(()=>h(!1),n))}catch(P){t?.(P)}};C.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let S=_r(),k=f?S.CheckIcon:S.CopyIcon;return x.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:E,onClick:A,title:v.copyCode,type:"button",...u,children:a??x.jsx(k,{size:14})})},Cx={"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",文言:"wy"},jz=({onDownload:e,onError:t,language:n,children:a,className:s,code:l,...u})=>{let d=qe(),{code:f}=H3(),{isAnimating:h}=C.useContext(Qn),m=ca(),b=_r(),E=l??f,v=`file.${n&&n in Cx?Cx[n]:"txt"}`,T="text/plain",A=()=>{try{Us(v,E,T),e?.()}catch(S){t?.(S)}};return x.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:h,onClick:A,title:m.downloadFile,type:"button",...u,children:a??x.jsx(b.DownloadIcon,{size:14})})},Nx=()=>{let{Loader2Icon:e}=_r(),t=qe();return x.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[x.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),x.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:x.jsx(e,{className:t("size-4 animate-spin")})})]})},Fz=/\.[^/.]+$/,$z=({node:e,className:t,src:n,alt:a,onLoad:s,onError:l,...u})=>{let{DownloadIcon:d}=_r(),f=qe(),h=C.useRef(null),[m,b]=C.useState(!1),[E,v]=C.useState(!1),T=ca(),A=u.width!=null||u.height!=null,S=(m||A)&&!E,k=E&&!A;C.useEffect(()=>{let ne=h.current;if(ne!=null&&ne.complete){let F=ne.naturalWidth>0;b(F),v(!F)}},[]);let q=C.useCallback(ne=>{b(!0),v(!1),s?.(ne)},[s]),P=C.useCallback(ne=>{b(!1),v(!0),l?.(ne)},[l]),G=async()=>{if(n)try{let ne=await(await fetch(n)).blob(),F=new URL(n,window.location.origin).pathname.split("/").pop()||"",J=F.split(".").pop(),U=F.includes(".")&&J!==void 0&&J.length<=4,le="";if(U)le=F;else{let j=ne.type,H="png";j.includes("jpeg")||j.includes("jpg")?H="jpg":j.includes("png")?H="png":j.includes("svg")?H="svg":j.includes("gif")?H="gif":j.includes("webp")&&(H="webp"),le=`${(a||F||"image").replace(Fz,"")}.${H}`}Us(le,ne,ne.type)}catch{window.open(n,"_blank")}};return n?x.jsxs("div",{className:f("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[x.jsx("img",{alt:a,className:f("max-w-full rounded-lg",k&&"hidden",t),"data-streamdown":"image",onError:P,onLoad:q,ref:h,src:n,...u}),k&&x.jsx("span",{className:f("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),x.jsx("div",{className:f("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),S&&x.jsx("button",{className:f("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:G,title:T.downloadImage,type:"button",children:x.jsx(d,{size:14})})]}):null},So=0,n1=()=>{So+=1,So===1&&(document.body.style.overflow="hidden")},r1=()=>{So=Math.max(0,So-1),So===0&&(document.body.style.overflow="")},qz=({url:e,isOpen:t,onClose:n,onConfirm:a})=>{let{CheckIcon:s,CopyIcon:l,ExternalLinkIcon:u,XIcon:d}=_r(),f=qe(),[h,m]=C.useState(!1),b=ca(),E=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),v=C.useCallback(()=>{a(),n()},[a,n]);return C.useEffect(()=>{if(t){n1();let T=A=>{A.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),r1()}}},[t,n]),t?x.jsx("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:x.jsxs("div",{className:f("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[x.jsx("button",{className:f("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:b.close,type:"button",children:x.jsx(d,{size:16})}),x.jsxs("div",{className:f("flex flex-col gap-2"),children:[x.jsxs("div",{className:f("flex items-center gap-2 font-semibold text-lg"),children:[x.jsx(u,{size:20}),x.jsx("span",{children:b.openExternalLink})]}),x.jsx("p",{className:f("text-muted-foreground text-sm"),children:b.externalLinkWarning})]}),x.jsx("div",{className:f("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),x.jsxs("div",{className:f("flex gap-2"),children:[x.jsx("button",{className:f("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:E,type:"button",children:h?x.jsxs(x.Fragment,{children:[x.jsx(s,{size:14}),x.jsx("span",{children:b.copied})]}):x.jsxs(x.Fragment,{children:[x.jsx(l,{size:14}),x.jsx("span",{children:b.copyLink})]})}),x.jsxs("button",{className:f("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:v,type:"button",children:[x.jsx(u,{size:14}),x.jsx("span",{children:b.openLink})]})]})]})}):null},Xp=C.createContext(null),a1=()=>C.useContext(Xp),BG=()=>{var e;let t=a1();return(e=t?.code)!=null?e:null},i1=()=>{var e;let t=a1();return(e=t?.mermaid)!=null?e:null},Yz=e=>{var t;let n=a1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(a=>Array.isArray(a.language)?a.language.includes(e):a.language===e))!=null?t:null},Vz=(e,t)=>{var n;let a=(n=void 0)!=null?n:5;return new Promise((s,l)=>{let u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),d=new Image;d.crossOrigin="anonymous",d.onload=()=>{let f=document.createElement("canvas"),h=d.width*a,m=d.height*a;f.width=h,f.height=m;let b=f.getContext("2d");if(!b){l(new Error("Failed to create 2D canvas context for PNG export"));return}b.drawImage(d,0,0,h,m),f.toBlob(E=>{if(!E){l(new Error("Failed to create PNG blob"));return}s(E)},"image/png")},d.onerror=()=>l(new Error("Failed to load SVG image")),d.src=u})},Gz=({chart:e,children:t,className:n,onDownload:a,config:s,onError:l})=>{let u=qe(),[d,f]=C.useState(!1),h=C.useRef(null),{isAnimating:m}=C.useContext(Qn),b=_r(),E=i1(),v=ca(),T=async A=>{try{if(A==="mmd"){Us("diagram.mmd",e,"text/plain"),f(!1),a?.(A);return}if(!E){l?.(new Error("Mermaid plugin not available"));return}let S=E.getMermaid(s),k=e.split("").reduce((G,ne)=>(G<<5)-G+ne.charCodeAt(0)|0,0),q=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await S.render(q,e);if(!P){l?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(A==="svg"){Us("diagram.svg",P,"image/svg+xml"),f(!1),a?.(A);return}if(A==="png"){let G=await Vz(P);Us("diagram.png",G,"image/png"),a?.(A),f(!1);return}}catch(S){l?.(S)}};return C.useEffect(()=>{let A=S=>{let k=S.composedPath();h.current&&!k.includes(h.current)&&f(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]),x.jsxs("div",{className:u("relative"),ref:h,children:[x.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>f(!d),title:v.downloadDiagram,type:"button",children:t??x.jsx(b.DownloadIcon,{size:14})}),d?x.jsxs("div",{className:u("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[x.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:v.downloadDiagramAsSvg,type:"button",children:v.mermaidFormatSvg}),x.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:v.downloadDiagramAsPng,type:"button",children:v.mermaidFormatPng}),x.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:v.downloadDiagramAsMmd,type:"button",children:v.mermaidFormatMmd})]}):null]})},Wz=({chart:e,config:t,onFullscreen:n,onExit:a,className:s,...l})=>{let{Maximize2Icon:u,XIcon:d}=_r(),f=qe(),[h,m]=C.useState(!1),{isAnimating:b,controls:E}=C.useContext(Qn),v=ca(),T=(()=>{if(typeof E=="boolean")return E;let S=E.mermaid;return S===!1?!1:S===!0||S===void 0?!0:S.panZoom!==!1})(),A=()=>{m(!h)};return C.useEffect(()=>{if(h){n1();let S=k=>{k.key==="Escape"&&m(!1)};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S),r1()}}},[h]),C.useEffect(()=>{h?n?.():a&&a()},[h,n,a]),x.jsxs(x.Fragment,{children:[x.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:b,onClick:A,title:v.viewFullscreen,type:"button",...l,children:x.jsx(u,{size:14})}),h?jo.createPortal(x.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:A,onKeyDown:S=>{S.key==="Escape"&&A()},role:"button",tabIndex:0,children:[x.jsx("button",{className:f("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:A,title:v.exitFullscreen,type:"button",children:x.jsx(d,{size:20})}),x.jsx("div",{className:f("flex size-full items-center justify-center p-4"),onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),role:"presentation",children:x.jsx(EA,{chart:e,className:f("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},F3=e=>{var t,n;let a=[],s=[],l=e.querySelectorAll("thead th");for(let d of l)a.push(((t=d.textContent)==null?void 0:t.trim())||"");let u=e.querySelectorAll("tbody tr");for(let d of u){let f=[],h=d.querySelectorAll("td");for(let m of h)f.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(f)}return{headers:a,rows:s}},$3=e=>{let{headers:t,rows:n}=e,a=d=>{let f=!1,h=!1;for(let m of d){if(m==='"'){f=!0,h=!0;break}(m===","||m===`
129
+ `)&&(f=!0)}return f?h?`"${d.replace(/"/g,'""')}"`:`"${d}"`:d},s=t.length>0?n.length+1:n.length,l=new Array(s),u=0;t.length>0&&(l[u]=t.map(a).join(","),u+=1);for(let d of n)l[u]=d.map(a).join(","),u+=1;return l.join(`
130
+ `)},Qz=e=>{let{headers:t,rows:n}=e,a=d=>{let f=!1;for(let m of d)if(m===" "||m===`
131
+ `||m==="\r"){f=!0;break}if(!f)return d;let h=[];for(let m of d)m===" "?h.push("\\t"):m===`
132
+ `?h.push("\\n"):m==="\r"?h.push("\\r"):h.push(m);return h.join("")},s=t.length>0?n.length+1:n.length,l=new Array(s),u=0;t.length>0&&(l[u]=t.map(a).join(" "),u+=1);for(let d of n)l[u]=d.map(a).join(" "),u+=1;return l.join(`
133
+ `)},U0=e=>{let t=!1;for(let a of e)if(a==="\\"||a==="|"){t=!0;break}if(!t)return e;let n=[];for(let a of e)a==="\\"?n.push("\\\\"):a==="|"?n.push("\\|"):n.push(a);return n.join("")},Kp=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let a=new Array(n.length+2),s=0,l=t.map(d=>U0(d));a[s]=`| ${l.join(" | ")} |`,s+=1;let u=new Array(t.length);for(let d=0;d<t.length;d+=1)u[d]="---";a[s]=`| ${u.join(" | ")} |`,s+=1;for(let d of n)if(d.length<t.length){let f=new Array(t.length);for(let h=0;h<t.length;h+=1)f[h]=h<d.length?U0(d[h]):"";a[s]=`| ${f.join(" | ")} |`,s+=1}else{let f=d.map(h=>U0(h));a[s]=`| ${f.join(" | ")} |`,s+=1}return a.join(`
134
+ `)},q3=({children:e,className:t,onCopy:n,onError:a,timeout:s=2e3})=>{let l=qe(),[u,d]=C.useState(!1),[f,h]=C.useState(!1),m=C.useRef(null),b=C.useRef(0),{isAnimating:E}=C.useContext(Qn),v=ca(),T=async k=>{var q,P;if(typeof window>"u"||!((q=navigator?.clipboard)!=null&&q.write)){a?.(new Error("Clipboard API not available"));return}try{let G=(P=m.current)==null?void 0:P.closest('[data-streamdown="table-wrapper"]'),ne=G?.querySelector("table");if(!ne){a?.(new Error("Table not found"));return}let F=F3(ne),J=({csv:$3,tsv:Qz,md:Kp}[k]||Kp)(F),U=new ClipboardItem({"text/plain":new Blob([J],{type:"text/plain"}),"text/html":new Blob([ne.outerHTML],{type:"text/html"})});await navigator.clipboard.write([U]),h(!0),d(!1),n?.(k),b.current=window.setTimeout(()=>h(!1),s)}catch(G){a?.(G)}};C.useEffect(()=>{let k=q=>{let P=q.composedPath();m.current&&!P.includes(m.current)&&d(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k),window.clearTimeout(b.current)}},[]);let A=_r(),S=f?A.CheckIcon:A.CopyIcon;return x.jsxs("div",{className:l("relative"),ref:m,children:[x.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:E,onClick:()=>d(!u),title:v.copyTable,type:"button",children:e??x.jsx(S,{height:14,width:14})}),u?x.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[x.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:v.copyTableAsMarkdown,type:"button",children:v.tableFormatMarkdown}),x.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:v.copyTableAsCsv,type:"button",children:v.tableFormatCsv}),x.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:v.copyTableAsTsv,type:"button",children:v.tableFormatTsv})]}):null]})},Y3=({children:e,className:t,onDownload:n,onError:a})=>{let s=qe(),[l,u]=C.useState(!1),d=C.useRef(null),{isAnimating:f}=C.useContext(Qn),h=ca(),m=_r(),b=E=>{var v;try{let T=(v=d.current)==null?void 0:v.closest('[data-streamdown="table-wrapper"]'),A=T?.querySelector("table");if(!A){a?.(new Error("Table not found"));return}let S=F3(A),k=E==="csv"?$3(S):Kp(S);Us(`table.${E==="csv"?"csv":"md"}`,k,E==="csv"?"text/csv":"text/markdown"),u(!1),n?.(E)}catch(T){a?.(T)}};return C.useEffect(()=>{let E=v=>{let T=v.composedPath();d.current&&!T.includes(d.current)&&u(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]),x.jsxs("div",{className:s("relative"),ref:d,children:[x.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>u(!l),title:h.downloadTable,type:"button",children:e??x.jsx(m.DownloadIcon,{size:14})}),l?x.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[x.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),x.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},Xz=({children:e,className:t,showCopy:n=!0,showDownload:a=!0})=>{let{Maximize2Icon:s,XIcon:l}=_r(),u=qe(),[d,f]=C.useState(!1),{isAnimating:h}=C.useContext(Qn),m=ca(),b=()=>{f(!0)},E=()=>{f(!1)};return C.useEffect(()=>{if(d){n1();let v=T=>{T.key==="Escape"&&f(!1)};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v),r1()}}},[d]),x.jsxs(x.Fragment,{children:[x.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:b,title:m.viewFullscreen,type:"button",children:x.jsx(s,{size:14})}),d?jo.createPortal(x.jsx("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:E,onKeyDown:v=>{v.key==="Escape"&&E()},role:"dialog",children:x.jsxs("div",{className:u("flex h-full flex-col"),onClick:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),role:"presentation",children:[x.jsxs("div",{className:u("flex items-center justify-end gap-1 p-4"),children:[n?x.jsx(q3,{}):null,a?x.jsx(Y3,{}):null,x.jsx("button",{className:u("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:E,title:m.exitFullscreen,type:"button",children:x.jsx(l,{size:20})})]}),x.jsx("div",{className:u("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:x.jsx("table",{className:u("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},Kz=({children:e,className:t,showControls:n,showCopy:a=!0,showDownload:s=!0,showFullscreen:l=!0,...u})=>{let d=qe(),f=n&&a,h=n&&s,m=n&&l,b=f||h||m;return x.jsxs("div",{className:d("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[b?x.jsxs("div",{className:d("flex items-center justify-end gap-1"),children:[f?x.jsx(q3,{}):null,h?x.jsx(Y3,{}):null,m?x.jsx(Xz,{showCopy:f,showDownload:h,children:e}):null]}):null,x.jsx("div",{className:d("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:x.jsx("table",{className:d("w-full divide-y divide-border",t),"data-streamdown":"table",...u,children:e})})]})},Zz=/startLine=(\d+)/,Jz=C.lazy(()=>ia(()=>Promise.resolve().then(()=>rG),void 0).then(e=>({default:e.Mermaid}))),eP=/language-([^\s]+)/;function Rd(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 n=e.position.start,a=t.position.start,s=e.position.end,l=t.position.end;return n?.line===a?.line&&n?.column===a?.column&&s?.line===l?.line&&s?.column===l?.column}function Ct(e,t){return e.className===t.className&&Rd(e.node,t.node)}var Zp=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,j0=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Rx=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},kc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},s1=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...a,children:e})},(e,t)=>Ct(e,t));s1.displayName="MarkdownOl";var V3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...a,children:e})},(e,t)=>e.className===t.className&&Rd(e.node,t.node));V3.displayName="MarkdownLi";var G3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...a,children:e})},(e,t)=>Ct(e,t));G3.displayName="MarkdownUl";var W3=C.memo(({className:e,node:t,...n})=>{let a=qe();return x.jsx("hr",{className:a("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ct(e,t));W3.displayName="MarkdownHr";var Q3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...a,children:e})},(e,t)=>Ct(e,t));Q3.displayName="MarkdownStrong";var tP=({children:e,className:t,href:n,node:a,...s})=>{let l=qe(),{linkSafety:u}=C.useContext(Qn),[d,f]=C.useState(!1),h=n==="streamdown:incomplete-link",m=C.useCallback(async T=>{if(!(!(u!=null&&u.enabled&&n)||h)){if(T.preventDefault(),u.onLinkCheck&&await u.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}f(!0)}},[u,n,h]),b=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),E=C.useCallback(()=>{f(!1)},[]),v={url:n??"",isOpen:d,onClose:E,onConfirm:b};return u!=null&&u.enabled&&n?x.jsxs(x.Fragment,{children:[x.jsx("button",{className:l("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:m,type:"button",children:e}),u.renderModal?u.renderModal(v):x.jsx(qz,{...v})]}):x.jsx("a",{className:l("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},X3=C.memo(tP,(e,t)=>Ct(e,t)&&e.href===t.href);X3.displayName="MarkdownA";var K3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...a,children:e})},(e,t)=>Ct(e,t));K3.displayName="MarkdownH1";var Z3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...a,children:e})},(e,t)=>Ct(e,t));Z3.displayName="MarkdownH2";var J3=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...a,children:e})},(e,t)=>Ct(e,t));J3.displayName="MarkdownH3";var eA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...a,children:e})},(e,t)=>Ct(e,t));eA.displayName="MarkdownH4";var tA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...a,children:e})},(e,t)=>Ct(e,t));tA.displayName="MarkdownH5";var nA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...a,children:e})},(e,t)=>Ct(e,t));nA.displayName="MarkdownH6";var rA=C.memo(({children:e,className:t,node:n,...a})=>{let{controls:s}=C.useContext(Qn),l=Zp(s,"table"),u=j0(s,"copy"),d=j0(s,"download"),f=j0(s,"fullscreen");return x.jsx(Kz,{className:t,showControls:l,showCopy:u,showDownload:d,showFullscreen:f,...a,children:e})},(e,t)=>Ct(e,t));rA.displayName="MarkdownTable";var aA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...a,children:e})},(e,t)=>Ct(e,t));aA.displayName="MarkdownThead";var iA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...a,children:e})},(e,t)=>Ct(e,t));iA.displayName="MarkdownTbody";var sA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...a,children:e})},(e,t)=>Ct(e,t));sA.displayName="MarkdownTr";var lA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...a,children:e})},(e,t)=>Ct(e,t));lA.displayName="MarkdownTh";var oA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...a,children:e})},(e,t)=>Ct(e,t));oA.displayName="MarkdownTd";var uA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...a,children:e})},(e,t)=>Ct(e,t));uA.displayName="MarkdownBlockquote";var cA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...a,children:e})},(e,t)=>Ct(e,t));cA.displayName="MarkdownSup";var dA=C.memo(({children:e,className:t,node:n,...a})=>{let s=qe();return x.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...a,children:e})},(e,t)=>Ct(e,t));dA.displayName="MarkdownSub";var fA=C.memo(({children:e,className:t,node:n,...a})=>{if("data-footnotes"in a){let s=u=>{var d,f;if(!C.isValidElement(u))return!1;let h=Array.isArray(u.props.children)?u.props.children:[u.props.children],m=!1,b=!1;for(let E of h)if(E){if(typeof E=="string")E.trim()!==""&&(m=!0);else if(C.isValidElement(E))if(((d=E.props)==null?void 0:d["data-footnote-backref"])!==void 0)b=!0;else{let v=Array.isArray(E.props.children)?E.props.children:[E.props.children];for(let T of v){if(typeof T=="string"&&T.trim()!==""){m=!0;break}if(C.isValidElement(T)&&((f=T.props)==null?void 0:f["data-footnote-backref"])===void 0){m=!0;break}}}}return b&&!m},l=Array.isArray(e)?e.map(u=>{if(!C.isValidElement(u))return u;if(u.type===s1){let d=(Array.isArray(u.props.children)?u.props.children:[u.props.children]).filter(f=>!s(f));return d.length===0?null:{...u,props:{...u.props,children:d}}}return u}):e;return(Array.isArray(l)?l.some(u=>u!==null):l!==null)?x.jsx("section",{className:t,...a,children:l}):null}return x.jsx("section",{className:t,...a,children:e})},(e,t)=>Ct(e,t));fA.displayName="MarkdownSection";var nP=({node:e,className:t,children:n,...a})=>{var s,l;let u=qe(),d=!("data-block"in a),{mermaid:f,controls:h}=C.useContext(Qn),m=i1(),b=Ez(),E=t?.match(eP),v=(s=E?.at(1))!=null?s:"",T=Yz(v);if(d)return x.jsx("code",{className:u("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...a,children:n});let A=(l=e?.properties)==null?void 0:l.metastring,S=A?.match(Zz),k=S?Number.parseInt(S[1],10):void 0,q=k!==void 0&&k>=1?k:void 0,P="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?P=n.props.children:typeof n=="string"&&(P=n),T){let J=T.component;return x.jsx(C.Suspense,{fallback:x.jsx(Nx,{}),children:x.jsx(J,{code:P,isIncomplete:b,language:v})})}if(v==="mermaid"&&m){let J=Zp(h,"mermaid"),U=kc(h,"download"),le=kc(h,"copy"),j=kc(h,"fullscreen"),H=kc(h,"panZoom"),z=J&&(U||le||j);return x.jsx(C.Suspense,{fallback:x.jsx(Nx,{}),children:x.jsxs("div",{className:u("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[x.jsx("div",{className:u("flex h-8 items-center text-muted-foreground text-xs"),children:x.jsx("span",{className:u("ml-1 font-mono lowercase"),children:"mermaid"})}),z?x.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:x.jsxs("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[U?x.jsx(Gz,{chart:P,config:f?.config}):null,le?x.jsx(kx,{code:P}):null,j?x.jsx(Wz,{chart:P,config:f?.config}):null]})}):null,x.jsx("div",{className:u("rounded-md border border-border bg-background"),children:x.jsx(Jz,{chart:P,config:f?.config,showControls:H})})]})})}let G=Zp(h,"code"),ne=Rx(h,"download"),F=Rx(h,"copy");return x.jsx(Nz,{className:t,code:P,isIncomplete:b,language:v,startLine:q,children:G?x.jsxs(x.Fragment,{children:[ne?x.jsx(jz,{code:P,language:v}):null,F?x.jsx(kx,{}):null]}):null})},hA=C.memo(nP,(e,t)=>e.className===t.className&&Rd(e.node,t.node));hA.displayName="MarkdownCode";var pA=C.memo($z,(e,t)=>e.className===t.className&&Rd(e.node,t.node));pA.displayName="MarkdownImg";var mA=C.memo(({children:e,node:t,...n})=>{let a=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(a.length===1&&C.isValidElement(a[0])){let s=a[0].props.node,l=s?.tagName;if(l==="img")return x.jsx(x.Fragment,{children:e});if(l==="code"&&"data-block"in a[0].props)return x.jsx(x.Fragment,{children:e})}return x.jsx("p",{...n,children:e})},(e,t)=>Ct(e,t));mA.displayName="MarkdownParagraph";var rP={ol:s1,li:V3,ul:G3,hr:W3,strong:Q3,a:X3,h1:K3,h2:Z3,h3:J3,h4:eA,h5:tA,h6:nA,table:rA,thead:aA,tbody:iA,tr:sA,th:lA,td:oA,blockquote:uA,code:hA,img:pA,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:cA,sub:dA,p:mA,section:fA},aP=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,iP=/\p{L}/u;function Ox(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(aP.test(n))return"rtl";if(iP.test(n))return"ltr"}return"ltr"}var sP=/^[ \t]{0,3}(`{3,}|~{3,})/,lP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Lx=e=>{let t=e.split(`
135
+ `),n=null,a=0;for(let s of t){let l=sP.exec(s);if(n===null){if(l){let u=l[1];n=u[0],a=u.length}}else if(l){let u=l[1],d=u[0],f=u.length;d===n&&f>=a&&(n=null,a=0)}}return n!==null},oP=e=>{let t=e.split(`
136
+ `);for(let n of t){let a=n.trim();if(a.length>0&&a.includes("|")&&lP.test(a))return!0}return!1},uP=()=>e=>{Br(e,"html",(t,n,a)=>{!a||typeof n!="number"||(a.children[n]={type:"text",value:t.value})})},Ix=[],Mx={allowDangerousHtml:!0},Cc=new WeakMap,cP=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(t){let n=this.keyCache.get(t);if(n)return n;let a=t.rehypePlugins,s=t.remarkPlugins,l=t.remarkRehypeOptions;if(!(a||s||l)){let b="default";return this.keyCache.set(t,b),b}let u=b=>{if(!b||b.length===0)return"";let E="";for(let v=0;v<b.length;v+=1){let T=b[v];if(v>0&&(E+=","),Array.isArray(T)){let[A,S]=T;if(typeof A=="function"){let k=Cc.get(A);k||(k=A.name,Cc.set(A,k)),E+=k}else E+=String(A);E+=":",E+=JSON.stringify(S)}else if(typeof T=="function"){let A=Cc.get(T);A||(A=T.name,Cc.set(T,A)),E+=A}else E+=String(T)}return E},d=u(a),f=u(s),h=l?JSON.stringify(l):"",m=`${f}::${d}::${h}`;return this.keyCache.set(t,m),m}get(t){let n=this.generateCacheKey(t),a=this.cache.get(n);return a&&(this.cache.delete(n),this.cache.set(n,a)),a}set(t,n){let a=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let s=this.cache.keys().next().value;s&&this.cache.delete(s)}this.cache.set(a,n)}clear(){this.cache.clear()}},Dx=new cP,gA=e=>{let t=dP(e),n=e.children||"",a=t.runSync(t.parse(n),n);return yP(a,e)},dP=e=>{let t=Dx.get(e);if(t)return t;let n=hP(e);return Dx.set(e,n),n},fP=e=>e.some(t=>Array.isArray(t)?t[0]===Dp:t===Dp),hP=e=>{let t=e.rehypePlugins||Ix,n=e.remarkPlugins||Ix,a=fP(t)?n:[...n,uP],s=e.remarkRehypeOptions?{...Mx,...e.remarkRehypeOptions}:Mx;return hB().use(f7).use(a).use(W7,s).use(t)},pP=e=>e,mP=(e,t,n,a)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:a}},gP=(e,t)=>{var n;for(let a in O0)if(Object.hasOwn(O0,a)&&Object.hasOwn(e.properties,a)){let s=e.properties[a],l=O0[a];(l===null||l.includes(e.tagName))&&(e.properties[a]=(n=t(String(s||""),a,e))!=null?n:void 0)}},bP=(e,t,n,a,s,l)=>{let u=!1;return a?u=!a.includes(e.tagName):s&&(u=s.includes(e.tagName)),!u&&l&&typeof t=="number"&&(u=!l(e,t,n)),u},yP=(e,t)=>{let{allowElement:n,allowedElements:a,disallowedElements:s,skipHtml:l,unwrapDisallowed:u,urlTransform:d}=t;if(n||a||s||l||d){let f=d||pP;Br(e,(h,m,b)=>{if(h.type==="raw"&&b&&typeof m=="number")return mP(b,m,l,h.value),m;if(h.type==="element"&&(gP(h,f),bP(h,m,b,a,s,n)&&b&&typeof m=="number"))return u&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m})}return xD(e,{Fragment:x.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0})},EP=/\[\^[\w-]{1,200}\](?!:)/,xP=/\[\^[\w-]{1,200}\]:/,vP=/<(\w+)[\s>]/,_P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Bx=new Map,zx=new Map,TP=e=>{let t=e.toLowerCase(),n=Bx.get(t);if(n)return n;let a=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Bx.set(t,a),a},AP=e=>{let t=e.toLowerCase(),n=zx.get(t);if(n)return n;let a=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return zx.set(t,a),a},Px=(e,t)=>{if(_P.has(t.toLowerCase()))return 0;let n=e.match(TP(t));if(!n)return 0;let a=0;for(let s of n)s.trimEnd().endsWith("/>")||(a+=1);return a},Hx=(e,t)=>{let n=e.match(AP(t));return n?n.length:0},wP=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},SP=e=>{let t=EP.test(e),n=xP.test(e);if(t||n)return[e];let a=cr.lex(e,{gfm:!0}),s=[],l=[],u=!1;for(let d of a){let f=d.raw,h=s.length;if(l.length>0){s[h-1]+=f;let m=l.at(-1),b=Px(f,m),E=Hx(f,m);for(let v=0;v<b;v+=1)l.push(m);for(let v=0;v<E;v+=1)l.length>0&&l.at(-1)===m&&l.pop();continue}if(d.type==="html"&&d.block){let m=f.match(vP);if(m){let b=m[1],E=Px(f,b),v=Hx(f,b);E>v&&l.push(b)}}if(h>0&&!u){let m=s[h-1];if(wP(m)%2===1){s[h-1]=m+f;continue}}s.push(f),d.type!=="space"&&(u=d.type==="code")}return s},kP=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let s=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(s,(l,u,d,f)=>{let h=d.replace(/\n\n/g,`
137
+ <!---->
138
+ `);return u+h+f})}return n},CP=/([\\`*_~[\]|])/g,NP=e=>e.replace(CP,"\\$1"),RP=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let s=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(s,(l,u,d,f)=>u+NP(d)+f)}return n},bA=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(bA).join(""):"",OP=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(a=>a.toLowerCase()));Br(t,"element",a=>{if(n.has(a.tagName.toLowerCase())){let s=bA(a);a.children=s?[{type:"text",value:s}]:[]}})},LP=()=>e=>{Br(e,"code",t=>{var n,a;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(a=t.data.hProperties)!=null?a:{},metastring:t.meta})})},IP=/^[ \t]*<[\w!/?-]/,MP=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,DP=e=>typeof e!="string"||e.length===0||!IP.test(e)?e:e.replace(MP,"$1"),Ux,jx,Fx,$x,$c={...wi,protocols:{...wi.protocols,href:[...(jx=(Ux=wi.protocols)==null?void 0:Ux.href)!=null?jx:[],"tel"]},attributes:{...wi.attributes,code:[...($x=(Fx=wi.attributes)==null?void 0:Fx.code)!=null?$x:[],"metastring"]}},Jp={raw:Dp,sanitize:[uT,$c],harden:[Y4,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},BP={gfm:[uI,{}],codeMeta:LP},qx=Object.values(Jp),zP=Object.values(BP),PP={block:" ▋",circle:" ●"},HP={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Qn=C.createContext(HP),yA=C.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:a,isIncomplete:s,dir:l,animatePlugin:u,...d})=>{if(u){let m=u.getLastRenderCharCount();u.setPrevContentLength(m)}let f=typeof e=="string"&&n?DP(e):e,h=x.jsx(gA,{...d,children:f});return x.jsx(z3.Provider,{value:s,children:l?x.jsx("div",{dir:l,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),a=Object.keys(t.components||{});if(n.length!==a.length||n.some(s=>{var l,u;return((l=e.components)==null?void 0:l[s])!==((u=t.components)==null?void 0:u[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});yA.displayName="Block";var UP=["github-light","github-dark"],l1=C.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:a=!0,normalizeHtmlIndentation:s=!1,components:l,rehypePlugins:u=qx,remarkPlugins:d=zP,className:f,shikiTheme:h=UP,mermaid:m,controls:b=!0,isAnimating:E=!1,animated:v,BlockComponent:T=yA,parseMarkdownIntoBlocksFn:A=SP,caret:S,plugins:k,remend:q,linkSafety:P={enabled:!0},allowedTags:G,literalTagContent:ne,translations:F,icons:J,prefix:U,onAnimationStart:le,onAnimationEnd:j,...H})=>{let z=C.useId(),[ve,de]=C.useTransition(),ue=C.useMemo(()=>vz(U),[U]),M=C.useRef(null),ae=C.useRef(le),Ee=C.useRef(j);ae.current=le,Ee.current=j,C.useEffect(()=>{var je,ct,Ft;if(t==="static")return;let fn=M.current;if(M.current=E,fn===null){E&&((je=ae.current)==null||je.call(ae));return}E&&!fn?(ct=ae.current)==null||ct.call(ae):!E&&fn&&((Ft=Ee.current)==null||Ft.call(Ee))},[E,t]);let ke=C.useMemo(()=>G?Object.keys(G):[],[G]),R=C.useMemo(()=>{if(typeof e!="string")return"";let je=t==="streaming"&&a?gM(e,q):e;return ne&&ne.length>0&&(je=RP(je,ne)),ke.length>0&&(je=kP(je,ke)),je},[e,t,a,q,ke,ne]),D=C.useMemo(()=>A(R),[R,A]),[te,O]=C.useState(D);C.useEffect(()=>{t==="streaming"&&!tt?de(()=>{O(D)}):O(D)},[D,t]);let Y=t==="streaming"?te:D,be=C.useMemo(()=>n==="auto"?Y.map(Ox):void 0,[Y,n]),ye=C.useMemo(()=>Y.map((je,ct)=>`${z}-${ct}`),[Y.length,z]),Oe=C.useMemo(()=>v===!0?"true":v?JSON.stringify(v):"",[v]),tt=C.useMemo(()=>Oe?Oe==="true"?Gp():Gp(v):null,[Oe]),Ie=C.useMemo(()=>{var je,ct;return{shikiTheme:(ct=(je=k?.code)==null?void 0:je.getThemes())!=null?ct:h,controls:b,isAnimating:E,mode:t,mermaid:m,linkSafety:P}},[h,b,E,t,m,P,k?.code]),Wt=C.useMemo(()=>F?JSON.stringify(F):"",[F]),Qt=C.useMemo(()=>({...j3,...F}),[Wt]),Dn=C.useMemo(()=>{let{inlineCode:je,...ct}=l??{},Ft={...rP,...ct};if(je){let fn=Ft.code;Ft.code=hr=>"data-block"in hr?fn?C.createElement(fn,hr):null:C.createElement(je,hr)}return Ft},[l]),fr=C.useMemo(()=>{let je=[];return k!=null&&k.cjk&&(je=[...je,...k.cjk.remarkPluginsBefore]),je=[...je,...d],k!=null&&k.cjk&&(je=[...je,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(je=[...je,k.math.remarkPlugin]),je},[d,k?.math,k?.cjk]),Xt=C.useMemo(()=>{var je;let ct=u;if(G&&Object.keys(G).length>0&&u===qx){let Ft={...$c,tagNames:[...(je=$c.tagNames)!=null?je:[],...Object.keys(G)],attributes:{...$c.attributes,...G}};ct=[Jp.raw,[uT,Ft],Jp.harden]}return ne&&ne.length>0&&(ct=[...ct,[OP,ne]]),k!=null&&k.math&&(ct=[...ct,k.math.rehypePlugin]),tt&&E&&(ct=[...ct,tt.rehypePlugin]),ct},[u,k?.math,tt,E,G,ne]),Tr=C.useMemo(()=>{if(!E||Y.length===0)return!1;let je=Y.at(-1);return Lx(je)||oP(je)},[E,Y]),ha=C.useMemo(()=>S&&E&&!Tr?{"--streamdown-caret":`"${PP[S]}"`}:void 0,[S,E,Tr]);return t==="static"?x.jsx(Qp.Provider,{value:Qt,children:x.jsx(Xp.Provider,{value:k??null,children:x.jsx(Qn.Provider,{value:Ie,children:x.jsx(Sx,{icons:J,children:x.jsx(Wp.Provider,{value:ue,children:x.jsx("div",{className:ue("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",f),dir:n==="auto"?Ox(R):n,children:x.jsx(gA,{components:Dn,rehypePlugins:Xt,remarkPlugins:fr,...H,children:R})})})})})})}):x.jsx(Qp.Provider,{value:Qt,children:x.jsx(Xp.Provider,{value:k??null,children:x.jsx(Qn.Provider,{value:Ie,children:x.jsx(Sx,{icons:J,children:x.jsx(Wp.Provider,{value:ue,children:x.jsxs("div",{className:ue("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",S&&!Tr?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,f),style:ha,children:[Y.length===0&&S&&E&&x.jsx("span",{}),Y.map((je,ct)=>{var Ft;let fn=ct===Y.length-1,hr=E&&fn&&Lx(je);return x.jsx(T,{animatePlugin:tt,components:Dn,content:je,dir:(Ft=be?.[ct])!=null?Ft:n!=="auto"?n:void 0,index:ct,isIncomplete:hr,rehypePlugins:Xt,remarkPlugins:fr,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:a,...H},ye[ct])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);l1.displayName="Streamdown";var jP=({children:e,className:t,minZoom:n=.5,maxZoom:a=3,zoomStep:s=.1,showControls:l=!0,initialZoom:u=1,fullscreen:d=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:h,ZoomOutIcon:m}=_r(),b=qe(),E=C.useRef(null),v=C.useRef(null),[T,A]=C.useState(u),[S,k]=C.useState({x:0,y:0}),[q,P]=C.useState(!1),[G,ne]=C.useState({x:0,y:0}),[F,J]=C.useState({x:0,y:0}),U=C.useCallback(M=>{A(ae=>Math.max(n,Math.min(a,ae+M)))},[n,a]),le=C.useCallback(()=>{U(s)},[U,s]),j=C.useCallback(()=>{U(-s)},[U,s]),H=C.useCallback(()=>{A(u),k({x:0,y:0})},[u]),z=C.useCallback(M=>{M.preventDefault();let ae=M.deltaY>0?-s:s;U(ae)},[U,s]),ve=C.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;P(!0),ne({x:M.clientX,y:M.clientY}),J(S);let ae=M.currentTarget;ae instanceof HTMLElement&&ae.setPointerCapture(M.pointerId)},[S]),de=C.useCallback(M=>{if(!q)return;M.preventDefault();let ae=M.clientX-G.x,Ee=M.clientY-G.y;k({x:F.x+ae,y:F.y+Ee})},[q,G,F]),ue=C.useCallback(M=>{P(!1);let ae=M.currentTarget;ae instanceof HTMLElement&&ae.releasePointerCapture(M.pointerId)},[]);return C.useEffect(()=>{let M=E.current;if(M)return M.addEventListener("wheel",z,{passive:!1}),()=>{M.removeEventListener("wheel",z)}},[z]),C.useEffect(()=>{let M=v.current;if(M&&q)return document.body.style.userSelect="none",M.addEventListener("pointermove",de,{passive:!1}),M.addEventListener("pointerup",ue),M.addEventListener("pointercancel",ue),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",de),M.removeEventListener("pointerup",ue),M.removeEventListener("pointercancel",ue)}},[q,de,ue]),x.jsxs("div",{className:b("relative flex flex-col",d?"h-full w-full":"min-h-28 w-full",t),ref:E,style:{cursor:q?"grabbing":"grab"},children:[l?x.jsxs("div",{className:b("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",d?"bottom-4 left-4":"bottom-2 left-2"),children:[x.jsx("button",{className:b("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:T>=a,onClick:le,title:"Zoom in",type:"button",children:x.jsx(h,{size:16})}),x.jsx("button",{className:b("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:T<=n,onClick:j,title:"Zoom out",type:"button",children:x.jsx(m,{size:16})}),x.jsx("button",{className:b("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:H,title:"Reset zoom and pan",type:"button",children:x.jsx(f,{size:16})})]}):null,x.jsx("div",{className:b("flex-1 origin-center transition-transform duration-150 ease-out",d?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:ve,ref:v,role:"application",style:{transform:`translate(${S.x}px, ${S.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},EA=({chart:e,className:t,config:n,fullscreen:a=!1,showControls:s=!0})=>{let l=qe(),[u,d]=C.useState(null),[f,h]=C.useState(!1),[m,b]=C.useState(""),[E,v]=C.useState(""),[T,A]=C.useState(0),{mermaid:S}=C.useContext(Qn),k=i1(),q=S?.errorComponent,{shouldRender:P,containerRef:G}=uz({immediate:a});if(C.useEffect(()=>{if(P){if(!k){d("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{d(null),h(!0);let F=k.getMermaid(n),J=e.split("").reduce((j,H)=>(j<<5)-j+H.charCodeAt(0)|0,0),U=`mermaid-${Math.abs(J)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:le}=await F.render(U,e);b(le),v(le)}catch(F){if(!(E||m)){let J=F instanceof Error?F.message:"Failed to render Mermaid chart";d(J)}}finally{h(!1)}})()}},[e,n,T,P,k]),!(P||m||E))return x.jsx("div",{className:l("my-4 min-h-[200px]",t),ref:G});if(f&&!m&&!E)return x.jsx("div",{className:l("my-4 flex justify-center p-4",t),ref:G,children:x.jsxs("div",{className:l("flex items-center space-x-2 text-muted-foreground"),children:[x.jsx("div",{className:l("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),x.jsx("span",{className:l("text-sm"),children:"Loading diagram..."})]})});if(u&&!m&&!E){let F=()=>A(J=>J+1);return q?x.jsx("div",{ref:G,children:x.jsx(q,{chart:e,error:u,retry:F})}):x.jsxs("div",{className:l("rounded-md bg-red-50 p-4",t),ref:G,children:[x.jsxs("p",{className:l("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",u]}),x.jsxs("details",{className:l("mt-2"),children:[x.jsx("summary",{className:l("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),x.jsx("pre",{className:l("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let ne=m||E;return x.jsx("div",{className:l("size-full",t),"data-streamdown":"mermaid",ref:G,children:x.jsx(jP,{className:l(a?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:a,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:x.jsx("div",{"aria-label":"Mermaid chart",className:l("flex justify-center",a?"size-full items-center":null),dangerouslySetInnerHTML:{__html:ne},role:"img"})})})};function FP(e){const t=typeof e.action=="string"?e.action:null,n=typeof e.direction=="string"?e.direction:null,a=typeof e.delta=="number"?e.delta:null,s=typeof e.mode=="string"?e.mode:null;return t==="focus_direction"?n?`Focus ${n}`:"Focus direction":t==="swap"?n?`Swap ${n}`:"Swap window":t==="resize"?a!==null?`Resize focused split ${a>0?"+":""}${a}`:"Resize focused split":t==="rotate"?"Rotate focused split":t==="equalize"?"Equalize focused split":t==="split_mode"?s?`Set split mode ${s}`:"Set split mode":t?`Layout ${t}`:"Layout"}function o1(e,t){const n=e.toLowerCase(),a=typeof t.path=="string"?t.path:typeof t.filePath=="string"?t.filePath:null,s=a?bC(a):null;if(n==="read")return s?`Read ${s}`:"Read file";if(n==="desktop"){const l=typeof t.action=="string"?t.action:null,u=typeof t.miniAppId=="string"?t.miniAppId:null,d=typeof t.windowId=="string"?t.windowId:null;return l==="list"?"List windows":l==="open"&&u?`Open ${u}`:l==="focus"?d?`Focus window ${d}`:"Focus window":l==="maximize"?d?`Maximize window ${d}`:"Maximize window":l==="close"?d?`Close window ${d}`:"Close window":l?`Desktop ${l}`:"Desktop"}if(n==="layout")return FP(t);if(n==="action"){const l=typeof t.name=="string"?t.name:null;return l?`Invoke ${l}`:"Invoke action"}if(n==="create_liveapp"){const l=typeof t.title=="string"?t.title:null;return l?`Create LiveApp: ${l}`:"Create LiveApp"}if(n==="generate_icon"){const l=typeof t.liveAppId=="string"?t.liveAppId:null;return l?`Generate icon: ${l}`:"Generate icon"}if(n==="edit")return s?`Edit ${s}`:"Edit file";if(n==="undo_edit")return s?`Undo edit ${s}`:"Undo edit";if(n==="redo_edit")return s?`Redo edit ${s}`:"Redo edit";if(n==="read_manual"){const l=typeof t.page=="string"?t.page:null;return l?`Read manual: ${l}`:"Read manual"}return n==="ask_user"?"Ask user":e}function $P(e){const t="Called the ",n=" tool with the following input:";if(!e.startsWith(t))return null;const a=e.indexOf(n);if(a===-1)return null;const s=e.slice(t.length,a).trim(),l=e.slice(a+n.length).trim(),u=l.indexOf("{");if(!s||u===-1)return null;let d=0,f=!1,h=!1;for(let m=u;m<l.length;m+=1){const b=l[m];if(h){h=!1;continue}if(b==="\\"){h=!0;continue}if(b==='"'){f=!f;continue}if(!f){if(b==="{")d+=1;else if(b==="}"&&(d-=1,d===0))return{toolName:s,rawParams:l.slice(u,m+1)}}}return null}function em(e){const t=e.split(`
139
+ `),n=[];let a=!1;for(const s of t){const l=s.trim(),u=$P(l);if(u){const{toolName:d,rawParams:f}=u;try{const h=JSON.parse(f);n.push(`- ${o1(d,h)}`)}catch{n.push(`- ${d}`)}a=!0;continue}if(a){if(l.startsWith("<path>")||l.startsWith("<type>")||l.startsWith("<content>")||l.startsWith("</path>")||l.startsWith("</type>")||l.startsWith("</content>")||l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")||/^\d+:\s/.test(l)||l.startsWith("(End of file"))continue;if(l.length===0){a=!1;continue}a=!1}n.push(s)}return n.join(`
140
+ `).replace(/\n{3,}/g,`
141
+
142
+ `).trim()}const qP="_thinkingBlock_x27ux_1",YP="_thinkingToggle_x27ux_9",VP="_thinkingChevron_x27ux_26",GP="_thinkingChevronOpen_x27ux_33",WP="_thinkingContent_x27ux_37",QP="_thinkingStreamingDot_x27ux_119",Rs={thinkingBlock:qP,thinkingToggle:YP,thinkingChevron:VP,thinkingChevronOpen:GP,thinkingContent:WP,thinkingStreamingDot:QP};function XP({content:e,isStreaming:t,defaultExpanded:n}){const[a,s]=C.useState(n);return C.useEffect(()=>{t&&s(!0)},[t]),x.jsxs("div",{className:Rs.thinkingBlock,children:[x.jsxs("button",{type:"button",className:Rs.thinkingToggle,onClick:()=>s(l=>!l),children:[x.jsx("span",{className:`${Rs.thinkingChevron} ${a?Rs.thinkingChevronOpen:""}`,children:"▶"}),"Thinking",t&&x.jsx("span",{className:Rs.thinkingStreamingDot})]}),a&&x.jsx(l1,{className:Rs.thinkingContent,isAnimating:t,animated:!0,children:e})]})}const KP="_answeredQuestion_3nr33_1",ZP="_pendingQuestion_3nr33_2",JP="_questionLabel_3nr33_20",eH="_prompt_3nr33_21",tH="_answerLabel_3nr33_26",nH="_controlsRow_3nr33_30",rH="_textInput_3nr33_36",aH="_optionList_3nr33_47",iH="_optionItem_3nr33_53",sH="_submitButton_3nr33_60",lH="_secondaryButton_3nr33_61",nn={answeredQuestion:KP,pendingQuestion:ZP,questionLabel:JP,prompt:eH,answerLabel:tH,controlsRow:nH,textInput:rH,optionList:aH,optionItem:iH,submitButton:sH,secondaryButton:lH};function oH(e){if(e.answer===void 0)return"Waiting for answer";if(e.questionType!=="multi_select")return e.answer;try{const t=JSON.parse(e.answer);if(Array.isArray(t))return t.filter(n=>typeof n=="string").join(", ")}catch{return e.answer}return e.answer}function xA({question:e,onAnswer:t}){const[n,a]=C.useState(""),[s,l]=C.useState(""),[u,d]=C.useState([]),f=C.useMemo(()=>oH(e),[e]),h=e.answer!==void 0,m=E=>{!t||!e.questionId||t(e.questionId,E)},b=E=>{if(E.preventDefault(),e.questionType==="text"){const v=n.trim();v&&m(v);return}if(e.questionType==="select"){s&&m(s);return}e.questionType==="multi_select"&&u.length>0&&m(JSON.stringify(u))};return h?x.jsxs("div",{className:nn.answeredQuestion,children:[x.jsx("span",{className:nn.questionLabel,children:e.question}),x.jsx("span",{className:nn.answerLabel,children:f})]}):x.jsxs("form",{className:nn.pendingQuestion,onSubmit:b,children:[x.jsx("div",{className:nn.prompt,children:e.question}),e.questionType==="text"&&x.jsxs("div",{className:nn.controlsRow,children:[x.jsx("input",{className:nn.textInput,type:"text",value:n,onChange:E=>a(E.target.value),placeholder:"Type your answer"}),x.jsx("button",{type:"submit",className:nn.submitButton,disabled:!n.trim(),children:"Submit"})]}),e.questionType==="select"&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:nn.optionList,children:(e.options??[]).map(E=>x.jsxs("label",{className:nn.optionItem,children:[x.jsx("input",{type:"radio",name:e.questionId,value:E,checked:s===E,onChange:()=>l(E)}),x.jsx("span",{children:E})]},E))}),x.jsx("button",{type:"submit",className:nn.submitButton,disabled:!s,children:"Submit"})]}),e.questionType==="multi_select"&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:nn.optionList,children:(e.options??[]).map(E=>x.jsxs("label",{className:nn.optionItem,children:[x.jsx("input",{type:"checkbox",value:E,checked:u.includes(E),onChange:v=>{d(T=>v.target.checked?[...T,E]:T.filter(A=>A!==E))}}),x.jsx("span",{children:E})]},E))}),x.jsx("button",{type:"submit",className:nn.submitButton,disabled:u.length===0,children:"Submit"})]}),e.questionType==="confirm"&&x.jsxs("div",{className:nn.controlsRow,children:[x.jsx("button",{type:"button",className:nn.submitButton,onClick:()=>m("yes"),children:"Yes"}),x.jsx("button",{type:"button",className:nn.secondaryButton,onClick:()=>m("no"),children:"No"})]})]})}const uH="_messageCompact_xcgfi_9",cH="_messageUser_xcgfi_17 _message_xcgfi_1",dH="_messageAssistant_xcgfi_23 _message_xcgfi_1",fH="_messageToolCall_xcgfi_29",hH="_toolCallLabel_xcgfi_42",pH="_messageHeader_xcgfi_48",mH="_messageSpeaker_xcgfi_55",gH="_compactMessageText_xcgfi_62",bH="_voiceSourceBadge_xcgfi_77",yH="_markdownContent_xcgfi_91",EH="_thinkingIndicator_xcgfi_166",xH="_thinkingDot_xcgfi_173",an={messageCompact:uH,messageUser:cH,messageAssistant:dH,messageToolCall:fH,toolCallLabel:hH,messageHeader:pH,messageSpeaker:mH,compactMessageText:gH,voiceSourceBadge:bH,markdownContent:yH,thinkingIndicator:EH,thinkingDot:xH};function Nc(e){return e.replace(/\s+/g," ").trim()}function vH(e){return e.answer===void 0?e.question:`${e.question}: ${e.answer}`}function _H(e,t){return e.toolCall?e.toolCall.toolName==="ask_user"?Nc(vH(e.toolCall.params)):Nc(o1(e.toolCall.toolName,e.toolCall.params)):e.content?Nc(em(e.content)):e.thinkingContent?Nc(em(e.thinkingContent)):t?"Thinking...":""}function TH({content:e,isStreaming:t}){return x.jsx(l1,{className:an.markdownContent,isAnimating:t,animated:!0,children:em(e)})}function AH({toolName:e,params:t}){const n=o1(e,t);return x.jsx("div",{className:an.messageToolCall,children:x.jsx("span",{className:an.toolCallLabel,children:n})})}function vA({message:e,isThinking:t,isStreaming:n,compact:a=!1}){if(a){const h=_H(e,t);return h?x.jsxs("div",{className:`${e.role==="user"?an.messageUser:an.messageAssistant} ${an.messageCompact}`,children:[x.jsx("span",{className:an.messageSpeaker,children:e.role==="user"?"ME":"AI"}),x.jsx("span",{className:an.compactMessageText,children:h})]}):null}if(e.toolCall)return e.toolCall.toolName==="ask_user"?x.jsx(xA,{question:e.toolCall.params}):x.jsx(AH,{toolName:e.toolCall.toolName,params:e.toolCall.params});const s=!!e.thinkingContent,l=!!e.content;if(e.role==="assistant"&&!l&&!s&&!t)return null;const d=n&&s&&!l,f=t&&!s&&!l;return x.jsxs("div",{className:e.role==="user"?an.messageUser:an.messageAssistant,children:[x.jsxs("div",{className:an.messageHeader,children:[x.jsx("span",{className:an.messageSpeaker,children:e.role==="user"?"ME":"AI"}),e.role==="user"&&e.source==="voice"&&x.jsx("span",{className:an.voiceSourceBadge,children:"voice"})]}),s&&x.jsx(XP,{content:e.thinkingContent,isStreaming:d,defaultExpanded:d}),f?x.jsxs("div",{className:an.thinkingIndicator,children:[x.jsx("span",{className:an.thinkingDot}),x.jsx("span",{className:an.thinkingDot}),x.jsx("span",{className:an.thinkingDot})]}):l?x.jsx(TH,{content:e.content,isStreaming:n}):null]})}const wH=C.memo(function({size:t=16}){return x.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),x.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),x.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),x.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),SH="_controlFrame_1v03g_2",kH="_controlFrameCompact_1v03g_8",CH="_slashMenu_1v03g_14",NH="_slashMenuItem_1v03g_32",RH="_slashMenuItemActive_1v03g_42",OH="_slashMenuName_1v03g_46",LH="_slashMenuDesc_1v03g_52",IH="_inputRow_1v03g_60",MH="_inputRowCompact_1v03g_67",DH="_input_1v03g_60",BH="_inputCompact_1v03g_98",zH="_statusRow_1v03g_103",PH="_statusItem_1v03g_114",HH="_voiceButton_1v03g_123",UH="_voiceButtonCompact_1v03g_143",jH="_voiceButtonActive_1v03g_148",rn={controlFrame:SH,controlFrameCompact:kH,slashMenu:CH,slashMenuItem:NH,slashMenuItemActive:RH,slashMenuName:OH,slashMenuDesc:LH,inputRow:IH,inputRowCompact:MH,input:DH,inputCompact:BH,statusRow:zH,statusItem:PH,voiceButton:HH,voiceButtonCompact:UH,voiceButtonActive:jH},Yx=200;function _A({onSubmit:e,onCancelAi:t,isAiRunning:n,queuedCount:a,isVoiceActive:s,onVoiceToggle:l,modelLabel:u,wsReady:d,compact:f=!1}){const h=at(H=>H.draftInput),m=at(H=>H.setDraftInput),b=at(H=>H.clearDraftInput),E=C.useRef(null),v=C.useRef(null),[T,A]=C.useState(0),[S,k]=C.useState(!1),[q,P]=C.useState(!1),G=Ds(()=>{v.current!==null&&(clearTimeout(v.current),v.current=null),k(!1),P(!1)}),ne=Ds(()=>{v.current!==null&&clearTimeout(v.current),k(!0),v.current=setTimeout(()=>{v.current=null,k(!1)},1500)}),F=C.useMemo(()=>{const H=h.trimStart();return!H.startsWith("/")||H.includes(" ")?null:H.slice(1)},[h]),J=C.useMemo(()=>F===null?[]:F===""?B4():D4(F),[F]),U=J.length>0,le=Ds(H=>{const z=J[H];z&&(m(`/${z.name} `),A(0),E.current?.focus())}),j=Ds(H=>{if(H.key==="Escape"&&n){H.preventDefault(),S?(v.current!==null&&(clearTimeout(v.current),v.current=null),k(!1),t()&&P(!0)):ne();return}if(U){if(H.key==="ArrowUp"){H.preventDefault(),A(z=>z<=0?J.length-1:z-1);return}if(H.key==="ArrowDown"){H.preventDefault(),A(z=>z>=J.length-1?0:z+1);return}if(H.key==="Tab"){H.preventDefault(),le(T);return}if(H.key==="Escape"){H.preventDefault(),b(),A(0);return}}H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),e())});return C.useLayoutEffect(()=>{A(0)},[J.length]),C.useLayoutEffect(()=>{n||G()},[n,G]),C.useLayoutEffect(()=>()=>{v.current!==null&&clearTimeout(v.current)},[]),C.useLayoutEffect(()=>{const H=E.current;H&&(H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,Yx)}px`,H.style.overflowY=H.scrollHeight>Yx?"auto":"hidden")},[h]),x.jsxs("div",{className:`${rn.controlFrame} ${f?rn.controlFrameCompact:""}`,children:[U&&x.jsx("ul",{className:rn.slashMenu,role:"listbox",children:J.map((H,z)=>x.jsxs("li",{role:"option","aria-selected":z===T,className:`${rn.slashMenuItem} ${z===T?rn.slashMenuItemActive:""}`,onMouseDown:ve=>{ve.preventDefault(),le(z)},onMouseEnter:()=>A(z),children:[x.jsxs("span",{className:rn.slashMenuName,children:["/",H.name]}),x.jsx("span",{className:rn.slashMenuDesc,children:H.description})]},H.name))}),x.jsxs("div",{className:`${rn.inputRow} ${f?rn.inputRowCompact:""}`,children:[x.jsx("textarea",{ref:E,className:`${rn.input} ${f?rn.inputCompact:""}`,value:h,onChange:H=>m(H.target.value),onKeyDown:j,rows:1,placeholder:q?"Cancelling AI...":n?S?"Press Esc again to cancel AI, or Enter to queue the next message":"AI is thinking... press Esc twice to cancel or Enter to queue the next message":"Ask the AI...",disabled:!d}),x.jsx("dt-tooltip",{content:s?"Stop voice input":"Start voice input",children:x.jsx("button",{className:`${rn.voiceButton} ${f?rn.voiceButtonCompact:""} ${s?rn.voiceButtonActive:""}`,onClick:l,children:x.jsx(wH,{})})})]}),!f&&x.jsxs("div",{className:rn.statusRow,children:[x.jsx("span",{className:rn.statusItem,children:d?u:"offline"}),a>0&&x.jsxs("span",{className:rn.statusItem,children:[a," queued"]})]})]})}const FH="_infoPanel_1fshd_1",$H="_header_1fshd_12",qH="_headerPrimary_1fshd_27",YH="_sessionControls_1fshd_36",VH="_newSessionButton_1fshd_49",GH="_headerControls_1fshd_75",WH="_tokenCount_1fshd_81",QH="_messages_1fshd_106",XH="_placeholder_1fshd_114",KH="_queuedMessage_1fshd_125",ZH="_queuedMessageHeader_1fshd_136",JH="_queuedSpeaker_1fshd_143",eU="_queuedBadge_1fshd_150",tU="_queuedMessageBody_1fshd_163",nU="_partialTranscript_1fshd_167",rU="_partialDot_1fshd_180",aU="_voiceListening_1fshd_190",iU="_voiceSpeaking_1fshd_191",sU="_voiceProcessing_1fshd_192",lU="_listeningDot_1fshd_204",oU="_speakingWave_1fshd_218",uU="_voiceError_1fshd_242",kt={infoPanel:FH,header:$H,headerPrimary:qH,sessionControls:YH,newSessionButton:VH,headerControls:GH,tokenCount:WH,messages:QH,placeholder:XH,queuedMessage:KH,queuedMessageHeader:ZH,queuedSpeaker:JH,queuedBadge:eU,queuedMessageBody:tU,partialTranscript:nU,partialDot:rU,voiceListening:aU,voiceSpeaking:iU,voiceProcessing:sU,listeningDot:lU,speakingWave:oU,voiceError:uU};function cU({socket:e,wsReady:t}){const[n,a]=C.useState([]),s=C.useRef(null),l=C.useRef(new Set),u=C.useRef([]),d=at(Y=>Y.messages),f=at(Y=>Y.isAiRunning),h=at(Y=>Y.activeRequestId),m=at(Y=>Y.modelLabel),b=at(Y=>Y.tokenCount),E=at(Y=>Y.currentSessionId),v=at(Y=>Y.sessions),T=at(Y=>Y.pendingQuestion),A=at(Y=>Y.loadProviders),S=at(Y=>Y.loadSessions),k=at(Y=>Y.switchSession),q=at(Y=>Y.createSession),P=at(Y=>Y.cancelAiRequest),G=at(Y=>Y.submitPrompt),ne=at(Y=>Y.answerQuestion),F=at(Y=>Y.clearDraftInput),J=at(Y=>Y.handleAiEvent),U=at(Y=>Y.clearMessages),le=at(Y=>Y.addSystemMessage),j=Ir(Y=>Y.status),H=Ir(Y=>Y.errorMessage),z=Ir(Y=>Y.partialText),ve=Ir(Y=>Y.transcripts),de=Ir(Y=>Y.startVoice),ue=Ir(Y=>Y.stopVoice),M=j!=="idle"&&j!=="error",ae=h?`assistant-${h}`:null,Ee=f||!e||e.readyState!==WebSocket.OPEN||!t;C.useEffect(()=>{t&&A()},[A,t]),C.useEffect(()=>{!e||!t||e.readyState!==WebSocket.OPEN||S(e)},[S,e,t]),C.useEffect(()=>{if(!e)return;const Y=be=>{try{const ye=JSON.parse(String(be.data));if(ye.type!=="ai:event"||!ye.event)return;J(ye.event)}catch{}};return e.addEventListener("message",Y),()=>{e.removeEventListener("message",Y)}},[e,J]);const ke=Ds(()=>{if(f||!e||e.readyState!==WebSocket.OPEN)return;const Y=u.current.shift();if(!Y)return;G(Y.text,"voice",e)||u.current.unshift(Y)});C.useEffect(()=>{for(const Y of ve)!Y.isFinal||l.current.has(Y.utteranceId)||(l.current.add(Y.utteranceId),u.current.push({utteranceId:Y.utteranceId,text:Y.text}));ke()},[ve,ke]),C.useEffect(()=>{f||ke()},[f,ke]),C.useEffect(()=>{a([]),u.current=[],l.current.clear()},[E]),C.useEffect(()=>{if(f||!e||e.readyState!==WebSocket.OPEN||n.length===0)return;const[Y]=n;G(Y.text,Y.source,e)&&a(ye=>ye.slice(1))},[f,n,e,G]);const R=Ds(()=>{const Y=at.getState().draftInput.trim();if(!Y||!e)return;if(Y.startsWith("/")&&M4(Y,{socket:e,createSession:q,clearMessages:U,addSystemMessage:le})){F();return}if(f){a(ye=>[...ye,{id:`queued-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,source:"text",text:Y}]),F();return}G(Y,"text",e)&&F()}),D=C.useCallback(()=>{M?ue():de()},[M,de,ue]);C.useEffect(()=>{s.current?.scrollIntoView({behavior:"smooth"})},[d,n,ve,z]);const te=C.useCallback(()=>{e&&q(e)&&F()},[F,q,e]),O=C.useCallback(()=>e?P(e):!1,[P,e]);return x.jsxs("div",{className:kt.infoPanel,children:[x.jsxs("div",{className:kt.header,children:[x.jsx("div",{className:kt.headerPrimary,children:x.jsxs("div",{className:kt.sessionControls,children:[x.jsx("dt-select",{value:E??"",options:v.map(Y=>({value:Y.id,label:Y.label})),placeholder:"New session",align:"right",disabled:Ee,"ondt-change":Y=>{e&&k(Y.detail.value,e)}}),x.jsx("button",{type:"button",className:kt.newSessionButton,onClick:te,disabled:Ee,"aria-label":"Create new session",title:"Create new session",children:"+"})]})}),x.jsx("div",{className:kt.headerControls,children:b>0&&x.jsxs("span",{className:kt.tokenCount,children:[b," tokens"]})})]}),x.jsxs("div",{className:kt.messages,children:[d.length===0&&n.length===0&&ve.length===0&&!z?x.jsx("div",{className:kt.placeholder,children:"Ask the AI to interact with your MiniApps, or use voice input"}):x.jsxs(x.Fragment,{children:[d.map(Y=>{const be=Y.id===ae,Oe=Y.role==="assistant"&&!Y.content&&!Y.thinkingContent&&f&&be;return x.jsx(vA,{message:Y,isThinking:Oe,isStreaming:Y.role==="assistant"&&f&&be},Y.id)}),n.map((Y,be)=>x.jsxs("div",{className:kt.queuedMessage,children:[x.jsxs("div",{className:kt.queuedMessageHeader,children:[x.jsx("span",{className:kt.queuedSpeaker,children:"ME"}),x.jsx("span",{className:kt.queuedBadge,children:be===0?"next":"queued"})]}),x.jsx("div",{className:kt.queuedMessageBody,children:Y.text})]},Y.id)),T&&e&&x.jsx(xA,{question:T,onAnswer:(Y,be)=>{ne(Y,be,e)}})]}),z&&x.jsxs("div",{className:kt.partialTranscript,children:[x.jsx("span",{className:kt.partialDot}),z]}),M&&!z&&j==="listening"&&x.jsxs("div",{className:kt.voiceListening,children:[x.jsx("span",{className:kt.listeningDot}),"Listening for speech..."]}),j==="speaking"&&!z&&x.jsxs("div",{className:kt.voiceSpeaking,children:[x.jsx("span",{className:kt.speakingWave}),"Detecting speech..."]}),j==="processing"&&x.jsx("div",{className:kt.voiceProcessing,children:"Transcribing..."}),H&&x.jsx("div",{className:kt.voiceError,children:H}),x.jsx("div",{ref:s})]}),x.jsx(_A,{onSubmit:R,onCancelAi:O,isAiRunning:f,queuedCount:n.length,isVoiceActive:M,onVoiceToggle:D,modelLabel:m,wsReady:t})]})}const dU="_compactPanel_gtst9_1",fU="_dragHandle_gtst9_30",hU="_dragHandleLine_gtst9_50",pU="_messageArea_gtst9_57",mU="_placeholder_gtst9_64",gU="_partialTranscript_gtst9_71",bU="_partialDot_gtst9_86",yU="_voiceListening_gtst9_104",EU="_voiceSpeaking_gtst9_105",xU="_voiceProcessing_gtst9_106",vU="_listeningDot_gtst9_116",_U="_speakingWave_gtst9_117",TU="_commandInputWrapper_gtst9_147",Yn={compactPanel:dU,dragHandle:fU,dragHandleLine:hU,messageArea:pU,placeholder:mU,partialTranscript:gU,partialDot:bU,voiceListening:yU,voiceSpeaking:EU,voiceProcessing:xU,listeningDot:vU,speakingWave:_U,commandInputWrapper:TU};function AU({socket:e,wsReady:t}){const[n,a]=C.useState({x:0,y:0}),[s,l]=C.useState(!1),u=C.useRef({x:0,y:0}),d=C.useRef(null),f=at(z=>z.messages),h=at(z=>z.isAiRunning),m=at(z=>z.activeRequestId),b=at(z=>z.modelLabel),E=at(z=>z.cancelAiRequest),v=at(z=>z.submitPrompt),T=at(z=>z.clearDraftInput),A=Ir(z=>z.status),S=Ir(z=>z.partialText),k=Ir(z=>z.startVoice),q=Ir(z=>z.stopVoice),P=A!=="idle"&&A!=="error",G=m?`assistant-${m}`:null,ne=f[f.length-1],F=C.useCallback(z=>{z.preventDefault(),l(!0),u.current={x:z.clientX-n.x,y:z.clientY-n.y},d.current?.setPointerCapture(z.pointerId)},[n]),J=C.useCallback(z=>{if(!s)return;const ve=z.clientX-u.current.x,de=z.clientY-u.current.y;a({x:ve,y:de})},[s]),U=C.useCallback(z=>{l(!1),d.current?.releasePointerCapture(z.pointerId)},[]),le=C.useCallback(()=>{const z=at.getState().draftInput.trim();if(!(!z||!e)){if(h){T();return}v(z,"text",e),at.getState().isAiRunning&&T()}},[h,e,v,T]),j=C.useCallback(()=>{P?q():k()},[P,k,q]),H=C.useCallback(()=>e?E(e):!1,[E,e]);return x.jsxs("div",{ref:d,className:Yn.compactPanel,style:{transform:`translate(${n.x}px, ${n.y}px)`},onPointerMove:J,onPointerUp:U,onPointerCancel:U,children:[x.jsx("div",{className:Yn.dragHandle,onPointerDown:F,role:"button","aria-label":"Drag to move",tabIndex:0,children:x.jsx("div",{className:Yn.dragHandleLine})}),x.jsxs("div",{className:Yn.messageArea,children:[ne?x.jsx(vA,{message:ne,compact:!0,isThinking:ne.id===G&&ne.role==="assistant"&&!ne.content&&!ne.thinkingContent&&h,isStreaming:ne.role==="assistant"&&h&&ne.id===G}):x.jsx("div",{className:Yn.placeholder,children:"Ask the AI to get started"}),S&&x.jsxs("div",{className:Yn.partialTranscript,children:[x.jsx("span",{className:Yn.partialDot}),S]}),P&&!S&&A==="listening"&&x.jsxs("div",{className:Yn.voiceListening,children:[x.jsx("span",{className:Yn.listeningDot}),"Listening for speech..."]}),A==="speaking"&&!S&&x.jsxs("div",{className:Yn.voiceSpeaking,children:[x.jsx("span",{className:Yn.speakingWave}),"Detecting speech..."]}),A==="processing"&&x.jsx("div",{className:Yn.voiceProcessing,children:"Transcribing..."})]}),x.jsx("div",{className:Yn.commandInputWrapper,children:x.jsx(_A,{onSubmit:le,onCancelAi:H,isAiRunning:h,queuedCount:0,isVoiceActive:P,onVoiceToggle:j,modelLabel:b,wsReady:t,compact:!0})})]})}const wU="_window_k9cdu_1",SU="_windowFocused_k9cdu_16",kU="_windowDragging_k9cdu_21",CU="_windowFullscreen_k9cdu_28",NU="_chrome_k9cdu_54",RU="_trafficLights_k9cdu_65",OU="_trafficLightClose_k9cdu_88 _trafficLight_k9cdu_65",LU="_trafficLightFullscreen_k9cdu_99 _trafficLight_k9cdu_65",IU="_title_k9cdu_110",MU="_body_k9cdu_124",Cr={window:wU,windowFocused:SU,windowDragging:kU,windowFullscreen:CU,chrome:NU,trafficLights:RU,trafficLightClose:OU,trafficLightFullscreen:LU,title:IU,body:MU},DU=5;function TA({window:e,tileRect:t,title:n,isFocused:a,showCloseButton:s=!0,showFullscreenButton:l=!0,draggable:u=!1,onFocus:d,isOverlayMaximized:f=!1,children:h}){const m=C.useRef(null),b=Ze(G=>G.fullscreenWindowId),E=e.id===b,v=a??e.focused,T=la(G=>G.isDragging&&G.dragWindowId===e.id),A=C.useRef(null),S=C.useCallback(()=>{if(d){d();return}const G=Ze.getState();G.focusedWindowId!==e.id&&G.focusWindow(e.id)},[d,e.id]);C.useEffect(()=>()=>{A.current=null},[]);const k=C.useCallback(G=>{if(!u||G.button!==0||G.target.closest("button")||Ze.getState().fullscreenWindowId)return;const J=G.clientX,U=G.clientY;A.current={startX:J,startY:U,activated:!1};let le=null;const j=()=>{A.current=null,document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z),document.removeEventListener("keydown",ve),document.body.style.cursor="",document.body.style.userSelect="",le&&(le.remove(),le=null)},H=de=>{const ue=A.current;if(!ue)return;const M=de.clientX-ue.startX,ae=de.clientY-ue.startY;!ue.activated&&Math.sqrt(M*M+ae*ae)>=DU&&(ue.activated=!0,la.getState().startDrag(e.id),le=document.createElement("style"),le.textContent="iframe { pointer-events: none !important; }",document.head.appendChild(le))},z=()=>{const de=A.current;if(j(),de?.activated){const M=la.getState().finishDrag();M&&Ze.getState().relocateWindow(M.sourceWindowId,M.target.windowId,M.target.edge)}},ve=de=>{de.key==="Escape"&&(j(),la.getState().cancelDrag())};document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),document.addEventListener("keydown",ve),document.body.style.cursor="grabbing",document.body.style.userSelect="none"},[u,e.id]),q=[Cr.window,v?Cr.windowFocused:"",E&&f?Cr.windowFullscreen:"",T?Cr.windowDragging:""].filter(Boolean).join(" "),P=E?{}:t?{position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height}:{};return x.jsxs("div",{ref:m,className:q,style:P,"data-window-id":e.id,onMouseDown:S,children:[x.jsxs("div",{className:Cr.chrome,onMouseDown:k,style:u?{cursor:"grab"}:void 0,children:[x.jsxs("div",{className:Cr.trafficLights,children:[s&&x.jsx("button",{className:Cr.trafficLightClose,onClick:G=>{G.stopPropagation(),Ze.getState().closeWindow(e.id)}}),l&&x.jsx("button",{className:Cr.trafficLightFullscreen,onClick:G=>{G.stopPropagation(),Ze.getState().maximizeWindow(e.id)}})]}),x.jsx("div",{className:Cr.title,children:n??e.title})]}),x.jsx("div",{className:Cr.body,children:h})]})}const Vx=1e3,BU=15e3;function zU(){const[e,t]=C.useState("connecting"),[n,a]=C.useState(null),[s,l]=C.useState(null),u=C.useRef(null),d=C.useRef(null),f=C.useRef(null),h=C.useRef(Vx),m=C.useRef(!1);return C.useEffect(()=>{const E=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`;let v=!1;const T=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null),f.current!==null&&(window.clearInterval(f.current),f.current=null)},A=()=>{if(v||d.current!==null)return;const k=h.current,q=Date.now()+k;t("reconnecting"),l(Math.max(1,Math.ceil(k/1e3))),f.current=window.setInterval(()=>{const P=Math.max(0,Math.ceil((q-Date.now())/1e3));l(P)},1e3),d.current=window.setTimeout(()=>{T(),l(null),S()},k),h.current=Math.min(h.current*2,BU)},S=()=>{if(v)return;T(),l(null),t(m.current?"reconnecting":"connecting");const k=new WebSocket(E);u.current=k,a(k),k.addEventListener("open",()=>{v||u.current!==k||(console.log("[shell] WebSocket connected"),m.current=!0,h.current=Vx,AC(k),t("connected"),l(null))}),k.addEventListener("close",()=>{u.current===k&&(u.current=null,a(null),!v&&(console.log("[shell] WebSocket disconnected"),A()))}),k.addEventListener("error",q=>{console.error("[shell] WebSocket error:",q)})};return S(),()=>{v=!0,T();const k=u.current;u.current=null,k&&(k.readyState===WebSocket.OPEN||k.readyState===WebSocket.CONNECTING)&&k.close()}},[]),{status:e,socket:n,retryInSeconds:s}}const PU={note:()=>ia(()=>import("./frontend-DRTe8-9o.js"),[]),"file-explorer":()=>ia(()=>import("./frontend-Dz_8vRz5.js"),[]),preference:()=>ia(()=>import("./frontend-CwxhooMD.js"),[]),preview:()=>ia(()=>import("./frontend-vY_f4fVI.js"),[]),player:()=>ia(()=>import("./frontend-BGrAEoc-.js"),[]),terminal:()=>ia(()=>import("./frontend-BWgJC5kX.js"),[]),"text-edit":()=>ia(()=>import("./frontend-CTdbpot-.js"),[])},Gx=new Map;async function HU(e){const t=Gx.get(e);if(t)return t;const n=PU[e];if(!n)throw new Error(`No frontend bundle found for miniapp: ${e}`);const a=await n();return Gx.set(e,a),a}function UU({miniAppId:e,message:t}){return x.jsxs("div",{style:{padding:24,color:"var(--dt-text-muted)"},children:[x.jsx("h3",{children:e}),x.jsx("p",{children:t})]})}function jU({miniAppId:e,windowId:t,args:n,themePreferences:a}){const s=C.useRef(null),[l,u]=C.useState(null),d=C.useRef(null),f=C.useRef(null);return C.useEffect(()=>{window.dispatchEvent(new CustomEvent("desktalk:theme-update",{detail:{windowId:t,miniAppId:e,theme:{accentColor:a.accentColor,mode:a.theme}}}))},[e,a.accentColor,a.theme,t]),C.useEffect(()=>{let h=!1;return HU(e).then(m=>{!h&&s.current&&(d.current=m,f.current=m.activate({root:s.current,miniAppId:e,windowId:t,args:n,theme:{accentColor:a.accentColor,mode:a.theme}}),u(null))}).catch(m=>{h||u(m.message)}),()=>{h=!0;const m=f.current;f.current=null,d.current=null,m&&queueMicrotask(()=>{m.deactivate()})}},[n,e,t]),l?x.jsx(UU,{miniAppId:e,message:l}):x.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}const FU="_tileSplit_zwnh1_1",$U="_tileSplitHorizontal_zwnh1_9",qU="_tileSplitVertical_zwnh1_14",YU="_tilePane_zwnh1_19",VU="_tileLeaf_zwnh1_20",Os={tileSplit:FU,tileSplitHorizontal:$U,tileSplitVertical:qU,tilePane:YU,tileLeaf:VU},Wx=4;function GU({win:e,themePreferences:t,isOverlayMaximized:n=!1,draggable:a=!1}){return x.jsx(TA,{window:e,isOverlayMaximized:n,draggable:a,children:x.jsx(jU,{miniAppId:e.miniAppId,windowId:e.id,args:e.args,themePreferences:t})})}function tm({node:e,windowsById:t,themePreferences:n,path:a=[],canDrag:s=!1}){if(e.type==="leaf"){const h=t.get(e.windowId);return h?x.jsx("div",{className:Os.tileLeaf,children:x.jsx(GU,{win:h,themePreferences:n,isOverlayMaximized:h.maximized,draggable:s})}):null}const[l,u]=e.children,d=e.split==="horizontal"?{gridTemplateColumns:`minmax(0, ${e.ratio}fr) ${Wx}px minmax(0, ${1-e.ratio}fr)`}:{gridTemplateRows:`minmax(0, ${e.ratio}fr) ${Wx}px minmax(0, ${1-e.ratio}fr)`},f=[Os.tileSplit,e.split==="horizontal"?Os.tileSplitHorizontal:Os.tileSplitVertical].filter(Boolean).join(" ");return x.jsxs("div",{className:f,style:d,children:[x.jsx("div",{className:Os.tilePane,children:x.jsx(tm,{node:l,windowsById:t,themePreferences:n,path:[...a,0],canDrag:s})}),x.jsx(s_,{path:a,split:e.split,ratio:e.ratio}),x.jsx("div",{className:Os.tilePane,children:x.jsx(tm,{node:u,windowsById:t,themePreferences:n,path:[...a,1],canDrag:s})})]})}function WU(){oo("desktalk:bridge:get-state",e=>{const t=e.detail;if(!t?.selector)return;const n=Ze.getState(),a=s=>({id:s.id,miniAppId:s.miniAppId,title:s.title,focused:s.id===n.focusedWindowId,maximized:s.id===n.fullscreenWindowId||!!s.maximized});try{switch(t.selector){case"desktop.summary":t.resolve({focusedWindowId:n.focusedWindowId,fullscreenWindowId:n.fullscreenWindowId,windows:n.windows.map(a)});return;case"desktop.windows":t.resolve(n.windows.map(a));return;case"desktop.focusedWindow":{const s=n.windows.find(l=>l.id===n.focusedWindowId);t.resolve(s?a(s):null);return}case"theme.current":{const s=getComputedStyle(document.documentElement),l=["--dt-bg","--dt-bg-subtle","--dt-surface","--dt-text","--dt-text-secondary","--dt-text-muted","--dt-border","--dt-accent","--dt-danger","--dt-success","--dt-warning","--dt-info"].reduce((u,d)=>(u[d]=s.getPropertyValue(d).trim(),u),{});t.resolve({mode:document.documentElement.dataset.theme==="dark"?"dark":"light",tokens:l});return}}}catch(s){t.reject(s.message)}})}const QU=new Set(["left","right","up","down"]),XU=new Set(["horizontal","vertical","auto"]);function Qx(e,t){const n=e?.direction;if(typeof n!="string"||!QU.has(n))throw new Error(`direction is required for action="${t}"`);return n}function KU(e){const t=e?.delta;if(typeof t!="number"||Number.isNaN(t))throw new Error('delta is required for action="resize"');return t}function ZU(e){const t=e?.mode;if(typeof t!="string"||!XU.has(t))throw new Error('mode is required for action="split_mode"');return t}function JU(e){const t=C.useRef(new Map),n=C.useCallback((a,s)=>{const l=t.current.get(a)??new Map;return s.map(u=>{const d=l.get(u.name);return d?{...u,handler:d}:null}).filter(u=>u!==null)},[]);return C.useEffect(()=>(Yy(e),()=>{Yy(null)}),[e]),C.useEffect(()=>{if(!e)return;const a=(l,u,d,f,h,m)=>{const b=Ze.getState();let E;try{switch(l){case"open":{if(!d||!f)break;dr.post(`/api/miniapps/${encodeURIComponent(d)}/activate`,{args:m}),E=b.openWindow(d,f,m);break}case"close":u&&b.closeWindow(u);break;case"focus":u&&b.focusWindow(u);break;case"maximize":u&&b.maximizeWindow(u);break;case"focus_direction":{const v=Qx(m,l),T=b.focusedWindowId;if(b.focusDirection(v),Ze.getState().focusedWindowId===T)throw new Error("No window found in that direction.");break}case"swap":{const v=Qx(m,l),T=b.tree;if(b.swapDirection(v),Ze.getState().tree===T)throw new Error("No neighboring window found to swap with.");break}case"resize":{const v=KU(m),T=b.tree;if(b.adjustFocusedRatio(v),Ze.getState().tree===T)throw new Error("Focused window has no adjustable parent split.");break}case"rotate":{const v=b.tree;if(b.rotateFocusedSplit(),Ze.getState().tree===v)throw new Error("Focused window has no rotatable parent split.");break}case"equalize":{const v=b.tree;if(b.equalizeFocusedRatio(),Ze.getState().tree===v)throw new Error("Focused window has no adjustable parent split.");break}case"split_mode":{const v=ZU(m);b.setNextSplitDirection(v);break}default:throw new Error(`Unknown AI window command: ${l}`)}if(h){const v=e;v&&v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"window:ai_command_result",requestId:h,ok:!0,action:l,windowId:E??u}))}}catch(v){if(h){const T=e;T&&T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:"window:ai_command_result",requestId:h,ok:!1,error:v.message}))}}},s=l=>{try{const u=JSON.parse(l.data);if(u.type==="window:state"){const d=u;Ze.getState().restoreFromBackend({version:2,windows:d.windows??[],tree:d.tree??null,focusedWindowId:typeof d.focusedWindowId=="string"?d.focusedWindowId:null,fullscreenWindowId:typeof d.fullscreenWindowId=="string"?d.fullscreenWindowId:null,windowIdCounter:typeof d.windowIdCounter=="number"?d.windowIdCounter:0,nextSplitDirection:d.nextSplitDirection==="horizontal"||d.nextSplitDirection==="vertical"||d.nextSplitDirection==="auto"?d.nextSplitDirection:"auto"});return}if(u.type==="window:ai_command"){const{action:d,windowId:f,miniAppId:h,title:m,requestId:b,args:E}=u;a(d,f,h,m,b,E);return}if(u.type==="window:invoke_action"){const d=u.requestId,f=u.windowId,h=u.actionName;if(!d||!f||!h)return;const m=t.current.get(f)?.get(h);if(!m){p0(d,void 0,`Action not available on window ${f}: ${h}`);return}m(u.params).then(b=>{p0(d,b)}).catch(b=>{p0(d,void 0,b.message)})}}catch{}};return e.addEventListener("message",s),()=>{e.removeEventListener("message",s)}},[e]),{actionHandlersRef:t,buildClientActions:n}}function ej(e){const t=e.target;if(!t)return!1;const n=t.tagName;return!!(n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||t.isContentEditable)}function tj(){C.useEffect(()=>{function e(t){if(!t.altKey||ej(t))return;const n=Ze.getState(),a=t.code;if(a==="Digit1"||a==="Digit2"||a==="Digit3"){t.preventDefault();const s=parseInt(a.charAt(5),10);n.focusNth(s);return}if(!t.shiftKey)switch(a){case"KeyH":t.preventDefault(),n.focusDirection("left");return;case"KeyL":t.preventDefault(),n.focusDirection("right");return;case"KeyK":t.preventDefault(),n.focusDirection("up");return;case"KeyJ":t.preventDefault(),n.focusDirection("down");return}if(t.shiftKey)switch(a){case"KeyH":t.preventDefault(),n.swapDirection("left");return;case"KeyL":t.preventDefault(),n.swapDirection("right");return;case"KeyK":t.preventDefault(),n.swapDirection("up");return;case"KeyJ":t.preventDefault(),n.swapDirection("down");return}if(a==="KeyF"&&!t.shiftKey){t.preventDefault(),n.toggleFullscreen();return}if(a==="KeyW"&&!t.shiftKey){t.preventDefault(),n.focusedWindowId&&n.closeWindow(n.focusedWindowId);return}if(a==="KeyV"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="vertical"?"auto":"vertical");return}if(a==="KeyB"&&!t.shiftKey){t.preventDefault(),n.setNextSplitDirection(n.nextSplitDirection==="horizontal"?"auto":"horizontal");return}if(a==="KeyR"&&!t.shiftKey){t.preventDefault(),n.rotateFocusedSplit();return}if(a==="BracketLeft"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(-.05);return}if(a==="BracketRight"&&!t.shiftKey){t.preventDefault(),n.adjustFocusedRatio(.05);return}if(a==="Equal"&&!t.shiftKey){t.preventDefault(),n.equalizeFocusedRatio();return}}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}var nj=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},AA=nj,rj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},aj=rj,ij=e=>AA(aj[e.toLowerCase()],6),sj=ij,lj=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,oj=e=>{let t;return(t=e.match(lj))?AA(parseInt(t[1],16),t[1].length):void 0},uj=oj,Wa="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ko=`${Wa}%`,u1=`(?:${Wa}%|${Wa})`,cj=`(?:${Wa}(deg|grad|rad|turn)|${Wa})`,Vs="\\s*,\\s*",dj=new RegExp(`^rgba?\\(\\s*${Wa}${Vs}${Wa}${Vs}${Wa}\\s*(?:,\\s*${u1}\\s*)?\\)$`),fj=new RegExp(`^rgba?\\(\\s*${ko}${Vs}${ko}${Vs}${ko}\\s*(?:,\\s*${u1}\\s*)?\\)$`),hj=e=>{let t={mode:"rgb"},n;if(n=e.match(dj))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(fj))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},pj=hj,mj=(e,t)=>e===void 0?void 0:typeof e!="object"?am(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,gj=mj,bj=(e="rgb")=>t=>(t=gj(t,e))!==void 0?t.mode===e?t:Dr[t.mode][e]?Dr[t.mode][e](t):e==="rgb"?Dr[t.mode].rgb(t):Dr.rgb[e](Dr[t.mode].rgb(t)):void 0,wA=bj,Dr={},SA={},id=[],kA={},yj=e=>e,lt=e=>(Dr[e.mode]={...Dr[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Dr[t]||(Dr[t]={}),Dr[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=yj)}),SA[e.mode]=e,(e.parse||[]).forEach(t=>{xj(t,e.mode)}),wA(e.mode)),Ej=e=>SA[e],xj=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");kA[e]=t}else typeof e=="function"&&id.indexOf(e)<0&&id.push(e)},nm=/[^\x00-\x7F]|[a-zA-Z_]/,vj=/[^\x00-\x7F]|[-\w]/,ge={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Me=0;function Rc(e){let t=e[Me],n=e[Me+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Me+2]):t==="."?/\d/.test(n):/\d/.test(t)}function rm(e){if(Me>=e.length)return!1;let t=e[Me];if(nm.test(t))return!0;if(t==="-"){if(e.length-Me<2)return!1;let n=e[Me+1];return!!(n==="-"||nm.test(n))}return!1}var _j={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function lo(e){let t="";if((e[Me]==="-"||e[Me]==="+")&&(t+=e[Me++]),t+=Oc(e),e[Me]==="."&&/\d/.test(e[Me+1])&&(t+=e[Me++]+Oc(e)),(e[Me]==="e"||e[Me]==="E")&&((e[Me+1]==="-"||e[Me+1]==="+")&&/\d/.test(e[Me+2])?t+=e[Me++]+e[Me++]+Oc(e):/\d/.test(e[Me+1])&&(t+=e[Me++]+Oc(e))),rm(e)){let n=sd(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:ge.Hue,value:t*_j[n]}:void 0}return e[Me]==="%"?(Me++,{type:ge.Percentage,value:+t}):{type:ge.Number,value:+t}}function Oc(e){let t="";for(;/\d/.test(e[Me]);)t+=e[Me++];return t}function sd(e){let t="";for(;Me<e.length&&vj.test(e[Me]);)t+=e[Me++];return t}function Tj(e){let t=sd(e);return e[Me]==="("?(Me++,{type:ge.Function,value:t}):t==="none"?{type:ge.None,value:void 0}:{type:ge.Ident,value:t}}function Aj(e=""){let t=e.trim(),n=[],a;for(Me=0;Me<t.length;){if(a=t[Me++],a===`
143
+ `||a===" "||a===" "){for(;Me<t.length&&(t[Me]===`
144
+ `||t[Me]===" "||t[Me]===" ");)Me++;continue}if(a===",")return;if(a===")"){n.push({type:ge.ParenClose});continue}if(a==="+"){if(Me--,Rc(t)){n.push(lo(t));continue}return}if(a==="-"){if(Me--,Rc(t)){n.push(lo(t));continue}if(rm(t)){n.push({type:ge.Ident,value:sd(t)});continue}return}if(a==="."){if(Me--,Rc(t)){n.push(lo(t));continue}return}if(a==="/"){for(;Me<t.length&&(t[Me]===`
145
+ `||t[Me]===" "||t[Me]===" ");)Me++;let s;if(Rc(t)&&(s=lo(t),s.type!==ge.Hue)){n.push({type:ge.Alpha,value:s});continue}if(rm(t)&&sd(t)==="none"){n.push({type:ge.Alpha,value:{type:ge.None,value:void 0}});continue}return}if(/\d/.test(a)){Me--,n.push(lo(t));continue}if(nm.test(a)){Me--,n.push(Tj(t));continue}return}return n}function wj(e){e._i=0;let t=e[e._i++];if(!t||t.type!==ge.Function||t.value!=="color"||(t=e[e._i++],t.type!==ge.Ident))return;let n=kA[t.value];if(!n)return;let a={mode:n},s=CA(e,!1);if(!s)return;let l=Ej(n).channels;for(let u=0,d,f;u<l.length;u++)d=s[u],f=l[u],d.type!==ge.None&&(a[f]=d.type===ge.Number?d.value:d.value/100,f==="alpha"&&(a[f]=Math.max(0,Math.min(1,a[f]))));return a}function CA(e,t){let n=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===ge.None||a.type===ge.Number||a.type===ge.Alpha||a.type===ge.Percentage||t&&a.type===ge.Hue){n.push(a);continue}if(a.type===ge.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==ge.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:ge.None,value:void 0}),n.every(s=>s.type!==ge.Alpha)?n:void 0}}function Sj(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==ge.Function)return;let a=CA(e,t);if(a)return a.unshift(n.value),a}var kj=e=>{if(typeof e!="string")return;let t=Aj(e),n=t?Sj(t,!0):void 0,a,s=0,l=id.length;for(;s<l;)if((a=id[s++](e,n))!==void 0)return a;return t?wj(t):void 0},am=kj;function Cj(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let n={mode:"rgb"},[,a,s,l,u]=t;if(!(a.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return a.type!==ge.None&&(n.r=a.type===ge.Number?a.value/255:a.value/100),s.type!==ge.None&&(n.g=s.type===ge.Number?s.value/255:s.value/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value/255:l.value/100),u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var Nj=Cj,Rj=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Oj=Rj,Lj=(e,t,n)=>e+n*(t-e),Ij=e=>{let t=[];for(let n=0;n<e.length-1;n++){let a=e[n],s=e[n+1];a===void 0&&s===void 0?t.push(void 0):a!==void 0&&s!==void 0?t.push([a,s]):t.push(a!==void 0?[a,a]:[s,s])}return t},Mj=e=>t=>{let n=Ij(t);return a=>{let s=a*n.length,l=a>=1?n.length-1:Math.max(Math.floor(s),0),u=n[l];return u===void 0?void 0:e(u[0],u[1],s-l)}},_e=Mj(Lj),jt=e=>{let t=!1,n=e.map(a=>a!==void 0?(t=!0,a):1);return t?n:e},Dj={mode:"rgb",channels:["r","g","b","alpha"],parse:[Nj,uj,pj,sj,Oj,"srgb"],serialize:"srgb",interpolate:{r:_e,g:_e,b:_e,alpha:{use:_e,fixup:jt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Js=Dj,F0=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Bj=e=>{let t=F0(e.r),n=F0(e.g),a=F0(e.b),s={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*a};return e.alpha!==void 0&&(s.alpha=e.alpha),s},Xx=Bj,$0=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),zj=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"a98",r:$0(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:$0(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:$0(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return a!==void 0&&(s.alpha=a),s},Kx=zj,q0=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Pj=({r:e,g:t,b:n,alpha:a})=>{let s={mode:"lrgb",r:q0(e),g:q0(t),b:q0(n)};return a!==void 0&&(s.alpha=a),s},el=Pj,Hj=e=>{let{r:t,g:n,b:a,alpha:s}=el(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*a};return s!==void 0&&(l.alpha=s),l},Fi=Hj,Y0=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Uj=({r:e,g:t,b:n,alpha:a},s="rgb")=>{let l={mode:s,r:Y0(e),g:Y0(t),b:Y0(n)};return a!==void 0&&(l.alpha=a),l},tl=Uj,jj=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=tl({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return a!==void 0&&(s.alpha=a),s},$i=jj,Fj={...Js,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Kx(Fi(e)),xyz65:Kx},toMode:{rgb:e=>$i(Xx(e)),xyz65:Xx}},$j=Fj,qj=e=>(e=e%360)<0?e+360:e,sn=qj,Yj=(e,t)=>e.map((n,a,s)=>{if(n===void 0)return n;let l=sn(n);return a===0||e[a-1]===void 0?l:t(l-sn(s[a-1]))}).reduce((n,a)=>!n.length||a===void 0||n[n.length-1]===void 0?(n.push(a),n):(n.push(a+n[n.length-1]),n),[]),da=e=>Yj(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Vt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Vj=Math.PI/180,Gj=180/Math.PI,Zx=Vt[3]*Vt[4],Jx=Vt[1]*Vt[4],ev=Vt[1]*Vt[2]-Vt[0]*Vt[3],Wj=({r:e,g:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(ev*n+e*Zx-t*Jx)/(ev+Zx-Jx),l=n-s,u=(Vt[4]*(t-s)-Vt[2]*l)/Vt[3],d={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(l*l+u*u)/(Vt[4]*s*(1-s))};return d.s&&(d.h=Math.atan2(u,l)*Gj-120),a!==void 0&&(d.alpha=a),d},Qj=Wj,Xj=({h:e,s:t,l:n,alpha:a})=>{let s={mode:"rgb"};e=(e===void 0?0:e+120)*Vj,n===void 0&&(n=0);let l=t===void 0?0:t*n*(1-n),u=Math.cos(e),d=Math.sin(e);return s.r=n+l*(Vt[0]*u+Vt[1]*d),s.g=n+l*(Vt[2]*u+Vt[3]*d),s.b=n+l*(Vt[4]*u+Vt[5]*d),a!==void 0&&(s.alpha=a),s},Kj=Xj,Od=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=sn(e.h),a=sn(t.h),s=Math.sin((a-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*s},Zj=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=sn(e.h),a=sn(t.h);return Math.abs(a-n)>180?n-(a-360*Math.sign(a-n)):a-n},Ld=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=sn(e.h),a=sn(t.h),s=Math.sin((a-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*s},fa=e=>{let t=e.reduce((a,s)=>{if(s!==void 0){let l=s*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},Jj={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Qj},toMode:{rgb:Kj},interpolate:{h:{use:_e,fixup:da},s:_e,l:_e,alpha:{use:_e,fixup:jt}},difference:{h:Od},average:{h:fa}},eF=Jj,tF=({l:e,a:t,b:n,alpha:a},s="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let l=Math.sqrt(t*t+n*n),u={mode:s,l:e,c:l};return l&&(u.h=sn(Math.atan2(n,t)*180/Math.PI)),a!==void 0&&(u.alpha=a),u},Ka=tF,nF=({l:e,c:t,h:n,alpha:a},s="lab")=>{n===void 0&&(n=0);let l={mode:s,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},Za=nF,NA=Math.pow(29,3)/Math.pow(3,3),RA=Math.pow(6,3)/Math.pow(29,3),zt={X:.9642956764295677,Y:1,Z:.8251046025104602},js={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},V0=e=>Math.pow(e,3)>RA?Math.pow(e,3):(116*e-16)/NA,rF=({l:e,a:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,u=s-n/200,d={mode:"xyz65",x:V0(l)*js.X,y:V0(s)*js.Y,z:V0(u)*js.Z};return a!==void 0&&(d.alpha=a),d},OA=rF,aF=e=>$i(OA(e)),Id=aF,G0=e=>e>RA?Math.cbrt(e):(NA*e+16)/116,iF=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=G0(e/js.X),l=G0(t/js.Y),u=G0(n/js.Z),d={mode:"lab65",l:116*l-16,a:500*(s-l),b:200*(l-u)};return a!==void 0&&(d.alpha=a),d},LA=iF,sF=e=>{let t=LA(Fi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Md=sF,Io=.14444444444444443*Math.PI,ld=Math.cos(Io),od=Math.sin(Io),IA=100/Math.log(139/100),lF=({l:e,c:t,h:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"lab65",l:(Math.exp(e*1/IA)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,u=l*Math.cos(n/180*Math.PI-Io),d=l*Math.sin(n/180*Math.PI-Io);return s.a=u*ld-d/.83*od,s.b=u*od+d/.83*ld,a!==void 0&&(s.alpha=a),s},im=lF,oF=({l:e,a:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=t*ld+n*od,l=.83*(n*ld-t*od),u=Math.sqrt(s*s+l*l),d={mode:"dlch",l:IA/1*Math.log(1+.0039*e),c:Math.log(1+.075*u)/(.0435*1*1)};return d.c&&(d.h=sn((Math.atan2(l,s)+Io)/Math.PI*180)),a!==void 0&&(d.alpha=a),d},sm=oF,tv=e=>im(Ka(e,"dlch")),nv=e=>Za(sm(e),"dlab"),uF={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:tv,rgb:e=>Id(tv(e))},fromMode:{lab65:nv,rgb:e=>nv(Md(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:_e,a:_e,b:_e,alpha:{use:_e,fixup:jt}}},cF=uF,dF={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:im,dlab:e=>Za(e,"dlab"),rgb:e=>Id(im(e))},fromMode:{lab65:sm,dlab:e=>Ka(e,"dlch"),rgb:e=>sm(Md(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:_e,c:_e,h:{use:_e,fixup:da},alpha:{use:_e,fixup:jt}},difference:{h:Ld},average:{h:fa}},fF=dF;function hF({h:e,s:t,i:n,alpha:a}){e=sn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1-t)};break;case 1:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1+t*(3/(2-s)-1)),b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n*(1+t*(3/(2-s)-1)),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;case 3:l={r:n*(1-t),g:n*(1+t*(3*(1-s)/(2-s)-1)),b:n*(1+t*(3/(2-s)-1))};break;case 4:l={r:n*(1+t*(3*(1-s)/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3/(2-s)-1))};break;case 5:l={r:n*(1+t*(3/(2-s)-1)),g:n*(1-t),b:n*(1+t*(3*(1-s)/(2-s)-1))};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function pF({r:e,g:t,b:n,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),u={mode:"hsi",s:e+t+n===0?0:1-3*l/(e+t+n),i:(e+t+n)/3};return s-l!==0&&(u.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),a!==void 0&&(u.alpha=a),u}var mF={mode:"hsi",toMode:{rgb:hF},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:pF},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:_e,fixup:da},s:_e,i:_e,alpha:{use:_e,fixup:jt}},difference:{h:Od},average:{h:fa}},gF=mF;function bF({h:e,s:t,l:n,alpha:a}){e=sn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=n+t*(n<.5?n:1-n),l=s-(s-n)*2*Math.abs(e/60%2-1),u;switch(Math.floor(e/60)){case 0:u={r:s,g:l,b:2*n-s};break;case 1:u={r:l,g:s,b:2*n-s};break;case 2:u={r:2*n-s,g:s,b:l};break;case 3:u={r:2*n-s,g:l,b:s};break;case 4:u={r:l,g:2*n-s,b:s};break;case 5:u={r:s,g:2*n-s,b:l};break;default:u={r:2*n-s,g:2*n-s,b:2*n-s}}return u.mode="rgb",a!==void 0&&(u.alpha=a),u}function yF({r:e,g:t,b:n,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),u={mode:"hsl",s:s===l?0:(s-l)/(1-Math.abs(s+l-1)),l:.5*(s+l)};return s-l!==0&&(u.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),a!==void 0&&(u.alpha=a),u}var EF=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},xF=EF,vF=new RegExp(`^hsla?\\(\\s*${cj}${Vs}${ko}${Vs}${ko}\\s*(?:,\\s*${u1}\\s*)?\\)$`),_F=e=>{let t=e.match(vF);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=xF(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n},TF=_F;function AF(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let n={mode:"hsl"},[,a,s,l,u]=t;if(a.type!==ge.None){if(a.type===ge.Percentage)return;n.h=a.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.s=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.l=l.value/100}return u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var wF=AF,SF={mode:"hsl",toMode:{rgb:bF},fromMode:{rgb:yF},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[wF,TF],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_e,fixup:da},s:_e,l:_e,alpha:{use:_e,fixup:jt}},difference:{h:Od},average:{h:fa}},MA=SF;function DA({h:e,s:t,v:n,alpha:a}){e=sn(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:n,g:n*(1-t*s),b:n*(1-t)};break;case 1:l={r:n*(1-t*s),g:n,b:n*(1-t)};break;case 2:l={r:n*(1-t),g:n,b:n*(1-t*s)};break;case 3:l={r:n*(1-t),g:n*(1-t*s),b:n};break;case 4:l={r:n*(1-t*s),g:n*(1-t),b:n};break;case 5:l={r:n,g:n*(1-t),b:n*(1-t*s)};break;default:l={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function BA({r:e,g:t,b:n,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.max(e,t,n),l=Math.min(e,t,n),u={mode:"hsv",s:s===0?0:1-l/s,v:s};return s-l!==0&&(u.h=(s===e?(t-n)/(s-l)+(t<n)*6:s===t?(n-e)/(s-l)+2:(e-t)/(s-l)+4)*60),a!==void 0&&(u.alpha=a),u}var kF={mode:"hsv",toMode:{rgb:DA},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:BA},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:_e,fixup:da},s:_e,v:_e,alpha:{use:_e,fixup:jt}},difference:{h:Od},average:{h:fa}},zA=kF;function CF({h:e,w:t,b:n,alpha:a}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let s=t+n;t/=s,n/=s}return DA({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:a})}function NF(e){let t=BA(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,s={mode:"hwb",w:(1-n)*a,b:1-a};return t.h!==void 0&&(s.h=t.h),t.alpha!==void 0&&(s.alpha=t.alpha),s}function RF(e,t){if(!t||t[0]!=="hwb")return;let n={mode:"hwb"},[,a,s,l,u]=t;if(a.type!==ge.None){if(a.type===ge.Percentage)return;n.h=a.value}if(s.type!==ge.None){if(s.type===ge.Hue)return;n.w=s.value/100}if(l.type!==ge.None){if(l.type===ge.Hue)return;n.b=l.value/100}return u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var OF=RF,LF={mode:"hwb",toMode:{rgb:CF},fromMode:{rgb:NF},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[OF],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_e,fixup:da},w:_e,b:_e,alpha:{use:_e,fixup:jt}},difference:{h:Zj},average:{h:fa}},IF=LF,Dd=.1593017578125,PA=78.84375,Bd=.8359375,zd=18.8515625,Pd=18.6875;function W0(e){if(e<0)return 0;let t=Math.pow(e,1/PA);return 1e4*Math.pow(Math.max(0,t-Bd)/(zd-Pd*t),1/Dd)}function Q0(e){if(e<0)return 0;let t=Math.pow(e/1e4,Dd);return Math.pow((Bd+zd*t)/(1+Pd*t),PA)}var X0=e=>Math.max(e/203,0),MF=({i:e,t,p:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=W0(e+.008609037037932761*t+.11102962500302593*n),l=W0(e-.00860903703793275*t-.11102962500302599*n),u=W0(e+.5600313357106791*t-.32062717498731885*n),d={mode:"xyz65",x:X0(2.070152218389422*s-1.3263473389671556*l+.2066510476294051*u),y:X0(.3647385209748074*s+.680566024947227*l-.0453045459220346*u),z:X0(-.049747207535812*s-.0492609666966138*l+1.1880659249923042*u)};return a!==void 0&&(d.alpha=a),d},rv=MF,K0=(e=0)=>Math.max(e*203,0),DF=({x:e,y:t,z:n,alpha:a})=>{let s=K0(e),l=K0(t),u=K0(n),d=Q0(.3592832590121217*s+.6976051147779502*l-.0358915932320289*u),f=Q0(-.1920808463704995*s+1.1004767970374323*l+.0753748658519118*u),h=Q0(.0070797844607477*s+.0748396662186366*l+.8433265453898765*u),m=.5*d+.5*f,b=1.61376953125*d-3.323486328125*f+1.709716796875*h,E=4.378173828125*d-4.24560546875*f-.132568359375*h,v={mode:"itp",i:m,t:b,p:E};return a!==void 0&&(v.alpha=a),v},av=DF,BF={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:rv,rgb:e=>$i(rv(e))},fromMode:{xyz65:av,rgb:e=>av(Fi(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:_e,t:_e,p:_e,alpha:{use:_e,fixup:jt}}},zF=BF,PF=134.03437499999998,HF=16295499532821565e-27,Z0=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Dd);return Math.pow((Bd+zd*t)/(1+Pd*t),PF)},J0=(e=0)=>Math.max(e*203,0),UF=({x:e,y:t,z:n,alpha:a})=>{e=J0(e),t=J0(t),n=J0(n);let s=1.15*e-.15*n,l=.66*t+.34*e,u=Z0(.41478972*s+.579999*l+.014648*n),d=Z0(-.20151*s+1.120649*l+.0531008*n),f=Z0(-.0166008*s+.2648*l+.6684799*n),h=(u+d)/2,m={mode:"jab",j:.44*h/(1-.56*h)-HF,a:3.524*u-4.066708*d+.542708*f,b:.199076*u+1.096799*d-1.295875*f};return a!==void 0&&(m.alpha=a),m},HA=UF,jF=134.03437499999998,iv=16295499532821565e-27,ep=e=>{if(e<0)return 0;let t=Math.pow(e,1/jF);return 1e4*Math.pow((Bd-t)/(Pd*t-zd),1/Dd)},tp=e=>e/203,FF=({j:e,a:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+iv)/(.44+.56*(e+iv)),l=ep(s+.13860504*t+.058047316*n),u=ep(s-.13860504*t-.058047316*n),d=ep(s-.096019242*t-.8118919*n),f={mode:"xyz65",x:tp(1.661373024652174*l-.914523081304348*u+.23136208173913045*d),y:tp(-.3250758611844533*l+1.571847026732543*u-.21825383453227928*d),z:tp(-.090982811*l-.31272829*u+1.5227666*d)};return a!==void 0&&(f.alpha=a),f},UA=FF,$F=e=>{let t=HA(Fi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},jA=$F,qF=e=>$i(UA(e)),FA=qF,YF={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:jA,xyz65:HA},toMode:{rgb:FA,xyz65:UA},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:_e,a:_e,b:_e,alpha:{use:_e,fixup:jt}}},VF=YF,GF=({j:e,a:t,b:n,alpha:a})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"jch",j:e,c:s};return s&&(l.h=sn(Math.atan2(n,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},sv=GF,WF=({j:e,c:t,h:n,alpha:a})=>{n===void 0&&(n=0);let s={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return a!==void 0&&(s.alpha=a),s},lv=WF,QF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:lv,rgb:e=>FA(lv(e))},fromMode:{rgb:e=>sv(jA(e)),jab:sv},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:_e,fixup:da},c:_e,j:_e,alpha:{use:_e,fixup:jt}},difference:{h:Ld},average:{h:fa}},XF=QF,Hd=Math.pow(29,3)/Math.pow(3,3),c1=Math.pow(6,3)/Math.pow(29,3),np=e=>Math.pow(e,3)>c1?Math.pow(e,3):(116*e-16)/Hd,KF=({l:e,a:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=(e+16)/116,l=t/500+s,u=s-n/200,d={mode:"xyz50",x:np(l)*zt.X,y:np(s)*zt.Y,z:np(u)*zt.Z};return a!==void 0&&(d.alpha=a),d},d1=KF,ZF=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=tl({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return a!==void 0&&(s.alpha=a),s},Ko=ZF,JF=e=>Ko(d1(e)),$A=JF,e$=e=>{let{r:t,g:n,b:a,alpha:s}=el(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*a};return s!==void 0&&(l.alpha=s),l},Zo=e$,rp=e=>e>c1?Math.cbrt(e):(Hd*e+16)/116,t$=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=rp(e/zt.X),l=rp(t/zt.Y),u=rp(n/zt.Z),d={mode:"lab",l:116*l-16,a:500*(s-l),b:200*(l-u)};return a!==void 0&&(d.alpha=a),d},f1=t$,n$=e=>{let t=f1(Zo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},qA=n$;function r$(e,t){if(!t||t[0]!=="lab")return;let n={mode:"lab"},[,a,s,l,u]=t;if(!(a.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return a.type!==ge.None&&(n.l=Math.min(Math.max(0,a.value),100)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*125/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*125/100),u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var a$=r$,i$={mode:"lab",toMode:{xyz50:d1,rgb:$A},fromMode:{xyz50:f1,rgb:qA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[a$],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:_e,a:_e,b:_e,alpha:{use:_e,fixup:jt}}},h1=i$,s$={...h1,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:OA,rgb:Id},fromMode:{xyz65:LA,rgb:Md},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},l$=s$;function o$(e,t){if(!t||t[0]!=="lch")return;let n={mode:"lch"},[,a,s,l,u]=t;if(a.type!==ge.None){if(a.type===ge.Hue)return;n.l=Math.min(Math.max(0,a.value),100)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*150/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var u$=o$,c$={mode:"lch",toMode:{lab:Za,rgb:e=>$A(Za(e))},fromMode:{rgb:e=>Ka(qA(e)),lab:Ka},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[u$],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_e,fixup:da},c:_e,l:_e,alpha:{use:_e,fixup:jt}},difference:{h:Ld},average:{h:fa}},p1=c$,d$={...p1,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Za(e,"lab65"),rgb:e=>Id(Za(e,"lab65"))},fromMode:{rgb:e=>Ka(Md(e),"lch65"),lab65:e=>Ka(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},f$=d$,h$=({l:e,u:t,v:n,alpha:a})=>{t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.sqrt(t*t+n*n),l={mode:"lchuv",l:e,c:s};return s&&(l.h=sn(Math.atan2(n,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},YA=h$,p$=({l:e,c:t,h:n,alpha:a})=>{n===void 0&&(n=0);let s={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return a!==void 0&&(s.alpha=a),s},VA=p$,GA=(e,t,n)=>4*e/(e+15*t+3*n),WA=(e,t,n)=>9*t/(e+15*t+3*n),m$=GA(zt.X,zt.Y,zt.Z),g$=WA(zt.X,zt.Y,zt.Z),b$=e=>e<=c1?Hd*e:116*Math.cbrt(e)-16,y$=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=b$(t/zt.Y),l=GA(e,t,n),u=WA(e,t,n);!isFinite(l)||!isFinite(u)?s=l=u=0:(l=13*s*(l-m$),u=13*s*(u-g$));let d={mode:"luv",l:s,u:l,v:u};return a!==void 0&&(d.alpha=a),d},lm=y$,E$=(e,t,n)=>4*e/(e+15*t+3*n),x$=(e,t,n)=>9*t/(e+15*t+3*n),v$=E$(zt.X,zt.Y,zt.Z),_$=x$(zt.X,zt.Y,zt.Z),T$=({l:e,u:t,v:n,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let s=t/(13*e)+v$,l=n/(13*e)+_$,u=zt.Y*(e<=8?e/Hd:Math.pow((e+16)/116,3)),d=u*(9*s)/(4*l),f=u*(12-3*s-20*l)/(4*l),h={mode:"xyz50",x:d,y:u,z:f};return a!==void 0&&(h.alpha=a),h},om=T$,A$=e=>YA(lm(Zo(e))),w$=e=>Ko(om(VA(e))),S$={mode:"lchuv",toMode:{luv:VA,rgb:w$},fromMode:{rgb:A$,luv:YA},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:_e,fixup:da},c:_e,l:_e,alpha:{use:_e,fixup:jt}},difference:{h:Ld},average:{h:fa}},k$=S$,C$={...Js,mode:"lrgb",toMode:{rgb:tl},fromMode:{rgb:el},parse:["srgb-linear"],serialize:"srgb-linear"},N$=C$,R$={mode:"luv",toMode:{xyz50:om,rgb:e=>Ko(om(e))},fromMode:{xyz50:lm,rgb:e=>lm(Zo(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:_e,u:_e,v:_e,alpha:{use:_e,fixup:jt}}},O$=R$,L$=({r:e,g:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),u=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),d={mode:"oklab",l:.210454268309314*s+.7936177747023054*l-.0040720430116193*u,a:1.9779985324311684*s-2.42859224204858*l+.450593709617411*u,b:.0259040424655478*s+.7827717124575296*l-.8086757549230774*u};return a!==void 0&&(d.alpha=a),d},QA=L$,I$=e=>{let t=QA(el(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Ud=I$,M$=({l:e,a:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),u=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),d={mode:"lrgb",r:4.076741636075957*s-3.3077115392580616*l+.2309699031821044*u,g:-1.2684379732850317*s+2.6097573492876887*l-.3413193760026573*u,b:-.0041960761386756*s-.7034186179359362*l+1.7076146940746117*u};return a!==void 0&&(d.alpha=a),d},Jo=M$,D$=e=>tl(Jo(e)),jd=D$;function um(e){let t=1.170873786407767;return .5*(t*e-.206+Math.sqrt((t*e-.206)*(t*e-.206)+4*.03*t*e))}function ud(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function B$(e,t){let n,a,s,l,u,d,f,h;-1.88170328*e-.80936493*t>1?(n=1.19086277,a=1.76576728,s=.59662641,l=.75515197,u=.56771245,d=4.0767416621,f=-3.3077115913,h=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,a=-.45954404,s=.08285427,l=.1254107,u=.14503204,d=-1.2684380046,f=2.6097574011,h=-.3413193965):(n=1.35733652,a=-.00915799,s=-1.1513021,l=-.50559606,u=.00692167,d=-.0041960863,f=-.7034186147,h=1.707614701);let m=n+a*e+s*t+l*e*e+u*e*t,b=.3963377774*e+.2158037573*t,E=-.1055613458*e-.0638541728*t,v=-.0894841775*e-1.291485548*t;{let T=1+m*b,A=1+m*E,S=1+m*v,k=T*T*T,q=A*A*A,P=S*S*S,G=3*b*T*T,ne=3*E*A*A,F=3*v*S*S,J=6*b*b*T,U=6*E*E*A,le=6*v*v*S,j=d*k+f*q+h*P,H=d*G+f*ne+h*F,z=d*J+f*U+h*le;m=m-j*H/(H*H-.5*j*z)}return m}function m1(e,t){let n=B$(e,t),a=Jo({l:1,a:n*e,b:n*t}),s=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=s*n;return[s,l]}function z$(e,t,n,a,s,l=null){l||(l=m1(e,t));let u;if((n-s)*l[1]-(l[0]-s)*a<=0)u=l[1]*s/(a*l[0]+l[1]*(s-n));else{u=l[1]*(s-1)/(a*(l[0]-1)+l[1]*(s-n));{let d=n-s,f=a,h=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,b=-.0894841775*e-1.291485548*t,E=d+f*h,v=d+f*m,T=d+f*b;{let A=s*(1-u)+u*n,S=u*a,k=A+S*h,q=A+S*m,P=A+S*b,G=k*k*k,ne=q*q*q,F=P*P*P,J=3*E*k*k,U=3*v*q*q,le=3*T*P*P,j=6*E*E*k,H=6*v*v*q,z=6*T*T*P,ve=4.0767416621*G-3.3077115913*ne+.2309699292*F-1,de=4.0767416621*J-3.3077115913*U+.2309699292*le,ue=4.0767416621*j-3.3077115913*H+.2309699292*z,M=de/(de*de-.5*ve*ue),ae=-ve*M,Ee=-1.2684380046*G+2.6097574011*ne-.3413193965*F-1,ke=-1.2684380046*J+2.6097574011*U-.3413193965*le,R=-1.2684380046*j+2.6097574011*H-.3413193965*z,D=ke/(ke*ke-.5*Ee*R),te=-Ee*D,O=-.0041960863*G-.7034186147*ne+1.707614701*F-1,Y=-.0041960863*J-.7034186147*U+1.707614701*le,be=-.0041960863*j-.7034186147*H+1.707614701*z,ye=Y/(Y*Y-.5*O*be),Oe=-O*ye;ae=M>=0?ae:1e6,te=D>=0?te:1e6,Oe=ye>=0?Oe:1e6,u+=Math.min(ae,Math.min(te,Oe))}}}return u}function g1(e,t,n=null){n||(n=m1(e,t));let a=n[0],s=n[1];return[s/a,s/(1-a)]}function XA(e,t,n){let a=m1(t,n),s=z$(t,n,e,1,e,a),l=g1(t,n,a),u=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),d=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),f=s/Math.min(e*l[0],(1-e)*l[1]),h=e*u,m=(1-e)*d,b=.9*f*Math.sqrt(Math.sqrt(1/(1/(h*h*h*h)+1/(m*m*m*m))));return h=e*.4,m=(1-e)*.8,[Math.sqrt(1/(1/(h*h)+1/(m*m))),b,s]}function ov(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,s={mode:"okhsl",l:um(t)};e.alpha!==void 0&&(s.alpha=e.alpha);let l=Math.sqrt(n*n+a*a);if(!l)return s.s=0,s;let[u,d,f]=XA(t,n/l,a/l),h;if(l<d){let m=0,b=.8*u,E=1-b/d;h=(l-m)/(b+E*(l-m))*.8}else{let m=d,b=.2*d*d*1.25*1.25/u,E=1-b/(f-d);h=.8+.2*((l-m)/(b+E*(l-m)))}return h&&(s.s=h,s.h=sn(Math.atan2(a,n)*180/Math.PI)),s}function uv(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,s={mode:"oklab",l:ud(a)};if(e.alpha!==void 0&&(s.alpha=e.alpha),!n||a===1)return s.a=s.b=0,s;let l=Math.cos(t/180*Math.PI),u=Math.sin(t/180*Math.PI),[d,f,h]=XA(s.l,l,u),m,b,E,v;n<.8?(m=1.25*n,b=0,E=.8*d,v=1-E/f):(m=5*(n-.8),b=f,E=.2*f*f*1.25*1.25/d,v=1-E/(h-f));let T=b+m*E/(1-v*m);return s.a=T*l,s.b=T*u,s}var P$={...MA,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ov,rgb:e=>ov(Ud(e))},toMode:{oklab:uv,rgb:e=>jd(uv(e))}},H$=P$;function cv(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,s=Math.sqrt(n*n+a*a),l=s?n/s:1,u=s?a/s:1,[d,f]=g1(l,u),h=.5,m=1-h/d,b=f/(s+t*f),E=b*t,v=b*s,T=ud(E),A=v*T/E,S=Jo({l:T,a:l*A,b:u*A}),k=Math.cbrt(1/Math.max(S.r,S.g,S.b,0));t=t/k,s=s/k*um(t)/t,t=um(t);let q={mode:"okhsv",s:s?(h+f)*v/(f*h+f*m*v):0,v:t?t/E:0};return q.s&&(q.h=sn(Math.atan2(a,n)*180/Math.PI)),e.alpha!==void 0&&(q.alpha=e.alpha),q}function dv(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,s=e.v!==void 0?e.v:0,l=Math.cos(n/180*Math.PI),u=Math.sin(n/180*Math.PI),[d,f]=g1(l,u),h=.5,m=1-h/d,b=1-a*h/(h+f-f*m*a),E=a*f*h/(h+f-f*m*a),v=ud(b),T=E*v/b,A=Jo({l:v,a:l*T,b:u*T}),S=Math.cbrt(1/Math.max(A.r,A.g,A.b,0)),k=ud(s*b),q=E*k/b;return t.l=k*S,t.a=q*l*S,t.b=q*u*S,t}var U$={...zA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:cv,rgb:e=>cv(Ud(e))},toMode:{oklab:dv,rgb:e=>jd(dv(e))}},j$=U$;function F$(e,t){if(!t||t[0]!=="oklab")return;let n={mode:"oklab"},[,a,s,l,u]=t;if(!(a.type===ge.Hue||s.type===ge.Hue||l.type===ge.Hue))return a.type!==ge.None&&(n.l=Math.min(Math.max(0,a.type===ge.Number?a.value:a.value/100),1)),s.type!==ge.None&&(n.a=s.type===ge.Number?s.value:s.value*.4/100),l.type!==ge.None&&(n.b=l.type===ge.Number?l.value:l.value*.4/100),u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var $$=F$,q$={...h1,mode:"oklab",toMode:{lrgb:Jo,rgb:jd},fromMode:{lrgb:QA,rgb:Ud},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[$$],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},Y$=q$;function V$(e,t){if(!t||t[0]!=="oklch")return;let n={mode:"oklch"},[,a,s,l,u]=t;if(a.type!==ge.None){if(a.type===ge.Hue)return;n.l=Math.min(Math.max(0,a.type===ge.Number?a.value:a.value/100),1)}if(s.type!==ge.None&&(n.c=Math.max(0,s.type===ge.Number?s.value:s.value*.4/100)),l.type!==ge.None){if(l.type===ge.Percentage)return;n.h=l.value}return u.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,u.type===ge.Number?u.value:u.value/100))),n}var G$=V$,W$={...p1,mode:"oklch",toMode:{oklab:e=>Za(e,"oklab"),rgb:e=>jd(Za(e,"oklab"))},fromMode:{rgb:e=>Ka(Ud(e),"oklch"),oklab:e=>Ka(e,"oklch")},parse:[G$],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Q$=W$,X$=e=>{let{r:t,g:n,b:a,alpha:s}=el(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*a,z:0*t+.0451133818589026*n+1.043944368900976*a};return s!==void 0&&(l.alpha=s),l},fv=X$,K$=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=tl({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return a!==void 0&&(s.alpha=a),s},hv=K$,Z$={...Js,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>hv(Fi(e)),xyz65:hv},toMode:{rgb:e=>$i(fv(e)),xyz65:fv}},J$=Z$,ap=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},eq=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"prophoto",r:ap(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:ap(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:ap(e*0+t*0+1.2119675456389452*n)};return a!==void 0&&(s.alpha=a),s},pv=eq,ip=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},tq=e=>{let t=ip(e.r),n=ip(e.g),a=ip(e.b),s={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*a,z:0*t+0*n+.8251046025104602*a};return e.alpha!==void 0&&(s.alpha=e.alpha),s},mv=tq,nq={...Js,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:pv,rgb:e=>pv(Zo(e))},toMode:{xyz50:mv,rgb:e=>Ko(mv(e))}},rq=nq,gv=1.09929682680944,aq=.018053968510807,sp=e=>{let t=Math.abs(e);return t>aq?(Math.sign(e)||1)*(gv*Math.pow(t,.45)-(gv-1)):4.5*e},iq=({x:e,y:t,z:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rec2020",r:sp(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:sp(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:sp(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return a!==void 0&&(s.alpha=a),s},bv=iq,yv=1.09929682680944,sq=.018053968510807,lp=(e=0)=>{let t=Math.abs(e);return t<sq*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+yv-1)/yv,1/.45)},lq=e=>{let t=lp(e.r),n=lp(e.g),a=lp(e.b),s={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*n+.059301716469862*a,z:0*t+.0280726930490874*n+1.0609850577107909*a};return e.alpha!==void 0&&(s.alpha=e.alpha),s},Ev=lq,oq={...Js,mode:"rec2020",fromMode:{xyz65:bv,rgb:e=>bv(Fi(e))},toMode:{xyz65:Ev,rgb:e=>$i(Ev(e))},parse:["rec2020"],serialize:"rec2020"},uq=oq,Li=.0037930732552754493,KA=Math.cbrt(Li),op=e=>Math.cbrt(e)-KA,cq=e=>{let{r:t,g:n,b:a,alpha:s}=el(e),l=op(.3*t+.622*n+.078*a+Li),u=op(.23*t+.692*n+.078*a+Li),d=op(.2434226892454782*t+.2047674442449682*n+.5518098665095535*a+Li),f={mode:"xyb",x:(l-u)/2,y:(l+u)/2,b:d-(l+u)/2};return s!==void 0&&(f.alpha=s),f},dq=cq,up=e=>Math.pow(e+KA,3),fq=({x:e,y:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s=up(e+t)-Li,l=up(t-e)-Li,u=up(n+t)-Li,d=tl({r:11.031566904639861*s-9.866943908131562*l-.16462299650829934*u,g:-3.2541473810744237*s+4.418770377582723*l-.16462299650829934*u,b:-3.6588512867136815*s+2.7129230459360922*l+1.9459282407775895*u});return a!==void 0&&(d.alpha=a),d},hq=fq,pq={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:hq},fromMode:{rgb:dq},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:_e,y:_e,b:_e,alpha:{use:_e,fixup:jt}}},mq=pq,gq={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Ko,lab:f1},fromMode:{rgb:Zo,lab:d1},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:_e,y:_e,z:_e,alpha:{use:_e,fixup:jt}}},bq=gq,yq=e=>{let{x:t,y:n,z:a,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*a};return s!==void 0&&(l.alpha=s),l},Eq=yq,xq=e=>{let{x:t,y:n,z:a,alpha:s}=e;t===void 0&&(t=0),n===void 0&&(n=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*a};return s!==void 0&&(l.alpha=s),l},vq=xq,_q={mode:"xyz65",toMode:{rgb:$i,xyz50:Eq},fromMode:{rgb:Fi,xyz50:vq},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:_e,y:_e,z:_e,alpha:{use:_e,fixup:jt}}},Tq=_q,Aq=({r:e,g:t,b:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return a!==void 0&&(s.alpha=a),s},wq=Aq,Sq=({y:e,i:t,q:n,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let s={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return a!==void 0&&(s.alpha=a),s},kq=Sq,Cq={mode:"yiq",toMode:{rgb:kq},fromMode:{rgb:wq},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:_e,i:_e,q:_e,alpha:{use:_e,fixup:jt}}},Nq=Cq;lt($j);lt(eF);lt(cF);lt(fF);lt(gF);lt(MA);lt(zA);lt(IF);lt(zF);lt(VF);lt(XF);lt(h1);lt(l$);lt(p1);lt(f$);lt(k$);lt(N$);lt(O$);lt(H$);lt(j$);lt(Y$);lt(Q$);lt(J$);lt(rq);lt(uq);lt(Js);lt(mq);lt(bq);lt(Tq);lt(Nq);var ZA="#7c6ff7",Rq=wA("oklch"),Oq=[["50",.98,.005],["100",.94,.01],["150",.88,.015],["200",.8,.02],["300",.7,.025],["400",.6,.03],["500",.5,.04],["600",.4,.03],["700",.32,.025],["800",.24,.03],["850",.2,.035],["900",.16,.04],["950",.12,.05]],Lq={danger:25,success:155,warning:80,info:250},oa={accentColor:ZA,theme:"dark"};function Co(e,t,n){return Math.min(Math.max(e,t),n)}function JA(e){let t=e%360;return t<0?t+360:t}function Ni(e){return e.toFixed(3).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function yt(e,t,n,a){let s=`oklch(${Ni(Co(e,0,1))} ${Ni(Co(t,0,.4))} ${Ni(JA(n))}`;return a===void 0?`${s})`:`${s} / ${Ni(Co(a,0,1))})`}function Iq(e){return e==="dark"?"dark":"light"}function Mq(e){let t=am(e)??am(ZA),n=t?Rq(t):null;return n?{l:Co(n.l??.623,0,1),c:Co(n.c??.234,0,.37),h:JA(n.h??286)}:{l:.623,c:.234,h:286}}function Dq(e){let t=Iq(e.theme)==="dark",{l:n,c:a,h:s}=Mq(e.accentColor),l=[],u=(m,b)=>{l.push(` ${m}: ${b};`)},d=m=>`var(--dt-scale-${m})`;u("--dt-accent-h",Ni(s)),u("--dt-accent-c",Ni(a)),u("--dt-accent-l",Ni(n)),u("--dt-mode-sign",t?"1":"-1");for(let[m,b,E]of Oq)u(`--dt-scale-${m}`,yt(b,E,s));u("--dt-bg",d(t?"950":"50")),u("--dt-bg-subtle",d(t?"900":"100")),u("--dt-surface",d(t?"850":"100")),u("--dt-surface-hover",d(t?"800":"150")),u("--dt-surface-active",d(t?"700":"200")),u("--dt-overlay",t?yt(.16,.04,s,.85):yt(.98,.005,s,.85)),u("--dt-text",d(t?"50":"950")),u("--dt-text-secondary",d(t?"300":"600")),u("--dt-text-muted",d(t?"400":"500")),u("--dt-border",d(t?"800":"200")),u("--dt-border-subtle",t?yt(.2,.035,s,.6):yt(.88,.015,s,.6)),u("--dt-border-strong",d(t?"700":"300"));let f=t?.05:-.05,h=t?.1:-.1;u("--dt-accent",yt(n,a,s)),u("--dt-accent-hover",yt(n+f,a,s)),u("--dt-accent-active",yt(n+h,a,s)),u("--dt-accent-subtle",yt(n,a,s,.15)),u("--dt-accent-ghost",yt(n,a,s,.08)),u("--dt-text-on-accent",n>.6?d("950"):d("50"));for(let[m,b]of Object.entries(Lq)){let E=t?.7:.45;u(`--dt-${m}`,yt(E,.18,b)),u(`--dt-${m}-subtle`,yt(E,.18,b,.15))}return u("--dt-dock-bg","var(--dt-overlay)"),u("--dt-actions-bar-bg","var(--dt-bg-subtle)"),u("--dt-window-chrome","var(--dt-surface)"),u("--dt-window-body","var(--dt-bg)"),u("--dt-info-panel-bg","var(--dt-bg-subtle)"),u("--dt-wallpaper",t?`linear-gradient(135deg, ${yt(.25,.08,s)} 0%, ${yt(.3,.1,s)} 50%, ${yt(.4,.04,s+30)} 100%)`:`linear-gradient(135deg, ${yt(.85,.06,s)} 0%, ${yt(.8,.08,s)} 50%, ${yt(.75,.03,s+30)} 100%)`),u("--dt-glass",t?yt(.2,.035,s,.7):yt(.94,.01,s,.7)),u("--dt-glass-border",t?yt(.98,.005,s,.1):yt(.12,.05,s,.12)),u("--dt-glass-highlight",t?yt(.98,.005,s,.05):yt(.98,.005,s,.45)),u("--dt-shadow-color",t?yt(.12,.05,s,.4):yt(.12,.05,s,.15)),u("--font-display","'Sora', system-ui, -apple-system, sans-serif"),u("--font-ui","'Work Sans', system-ui, -apple-system, sans-serif"),u("--font-mono","'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace"),`:root {
146
+ ${l.join(`
147
+ `)}
148
+ }`}var Bq=`
149
+ input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"] {
150
+ font-family: var(--font-mono, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace);
151
+ font-size: 0.8125rem;
152
+ font-weight: 600;
153
+ letter-spacing: 0.04em;
154
+ line-height: 1;
155
+ color: var(--dt-text);
156
+ background: var(--dt-surface);
157
+ border: 1px solid var(--dt-accent);
158
+ border-radius: 2px;
159
+ padding: 6px 10px;
160
+ outline: none;
161
+ width: 100%;
162
+ box-sizing: border-box;
163
+ transition: all 0.1s ease;
164
+ position: relative;
165
+ }
166
+ input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, input[type="url"]:hover {
167
+ background: var(--dt-accent);
168
+ color: var(--dt-text-on-accent);
169
+ }
170
+ input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="url"]:focus {
171
+ background: var(--dt-accent);
172
+ color: var(--dt-text-on-accent);
173
+ }
174
+ input[type="text"]:disabled, input[type="email"]:disabled, input[type="password"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="url"]:disabled {
175
+ cursor: not-allowed;
176
+ opacity: 0.4;
177
+ }
178
+ input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder, input[type="number"]::placeholder, input[type="search"]::placeholder, input[type="url"]::placeholder {
179
+ color: var(--dt-text-muted);
180
+ font-weight: 600;
181
+ letter-spacing: 0.04em;
182
+ }
183
+ `.trim();const xv="dt-theme";function zq(e){return e==="dark"?"dark":"light"}function Pq(){let e=document.getElementById(xv);return e||(e=document.createElement("style"),e.id=xv,document.head.appendChild(e)),e}function e6(e){const t=zq(e.theme),n=Pq();n.parentElement===document.head&&n!==document.head.lastElementChild&&document.head.appendChild(n),n.textContent=Dq({accentColor:e.accentColor,theme:t}),document.documentElement.dataset.theme=t}const Hq="_shell_1jqjo_1",Uq="_actionsBar_1jqjo_12",jq="_content_1jqjo_19",Fq="_desktop_1jqjo_28",$q="_assistantPane_1jqjo_36",qq="_maximizedMask_1jqjo_42",Ls={shell:Hq,actionsBar:Uq,content:jq,desktop:Fq,assistantPane:$q,maximizedMask:qq},Yq=4,Vq=.18,Gq=.45,Wq=.28,Qq="__assistant__",vv="dt-shell-form-controls",Xq="[data-dt-shell]";function Kq(e){return Math.min(Math.max(e,Vq),Gq)}function Zq(e){const t=Ze(n=>n.setDesktopBounds);C.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(s=>{for(const l of s){const{width:u,height:d}=l.contentRect;t({x:0,y:0,width:u,height:d})}});return a.observe(n),t({x:0,y:0,width:n.clientWidth,height:n.clientHeight}),()=>a.disconnect()},[e,t])}function Jq({themePreferences:e}){const{status:t,socket:n,retryInSeconds:a}=zU(),s=t==="connected",l=Ze(H=>H.windows),u=Ze(H=>H.tree),d=Ze(H=>H.fullscreenWindowId),f=Ze(H=>H.setWindowActions),h=la(H=>H.isDragging),[m,b]=C.useState([]),[E,v]=C.useState([]),[T,A]=C.useState(Wq),{actionHandlersRef:S,buildClientActions:k}=JU(n),q=C.useRef(null);Zq(q),tj(),WU(),C.useEffect(()=>{let H=document.getElementById(vv);return H||(H=document.createElement("style"),H.id=vv,document.head.appendChild(H)),H.textContent=Bq.replaceAll('input[type="',`${Xq} input[type="`),()=>{H?.remove()}},[]),oo("blur",()=>{requestAnimationFrame(()=>{const H=document.activeElement;if(!H||H.tagName!=="IFRAME")return;const z=H.closest("[data-window-id]");if(!z)return;const ve=z.dataset.windowId;if(!ve)return;const de=Ze.getState();de.focusedWindowId!==ve&&de.focusWindow(ve)})});const P=new Map(l.map(H=>[H.id,H])),G=d?P.get(d):void 0,ne=1-T,F={gridTemplateColumns:`minmax(0, ${ne}fr) ${Yq}px minmax(0, ${T}fr)`},J={id:Qq,miniAppId:"assistant",title:"AI Assistant",position:{x:0,y:0},size:{width:0,height:0},minimized:!1,maximized:!1,focused:!1,zIndex:1},U=C.useCallback(async()=>{try{const H=await dr.get("/api/liveapps");v(H.data)}catch(H){console.error("[shell] Could not load LiveApps:",H)}},[]);C.useEffect(()=>{let H=!1;return(async()=>{try{const z=await dr.get("/api/miniapps");H||b(z.data)}catch(z){console.error("[shell] Could not load MiniApps:",z)}try{const z=await dr.get("/api/liveapps");H||v(z.data)}catch(z){console.error("[shell] Could not load LiveApps:",z)}})(),()=>{H=!0}},[]),oo("desktalk:event",H=>{H.detail?.event==="liveapps.changed"&&U()});const le=[...m.map(H=>({id:`miniapp:${H.id}`,name:H.name,icon:H.icon,iconPng:H.iconPng,kind:"miniapp",miniAppId:H.id})),...E.map(H=>({id:`liveapp:${H.id}`,name:H.name,icon:H.icon,iconPng:H.iconPng,kind:"liveapp",miniAppId:"preview",args:{path:H.path,liveAppId:H.id}}))].sort((H,z)=>H.name.localeCompare(z.name));oo("desktalk:actions-changed",H=>{const z=H;if(!z.detail?.windowId)return;const ve=z.detail.actions??[];S.current.set(z.detail.windowId,new Map(ve.map(de=>[de.name,de.handler]))),FC(z.detail.windowId,ve.map(de=>({name:de.name,description:de.description,params:de.params}))),f(z.detail.windowId,k(z.detail.windowId,ve))}),oo("desktalk:open-window",H=>{const{miniAppId:z,args:ve}=H.detail;z&&(async()=>{try{await dr.post(`/api/miniapps/${encodeURIComponent(z)}/activate`,{args:ve});const ue=m.find(M=>M.id===z)?.name??z;Ze.getState().openWindow(z,ue,ve)}catch(de){console.error("[shell] Could not open MiniApp window:",de)}})()});const j=C.useCallback(async H=>{try{const z=H.kind==="liveapp"?{...H.args??{},bridgeToken:crypto.randomUUID()}:H.args;await dr.post(`/api/miniapps/${encodeURIComponent(H.miniAppId)}/activate`,{args:z}),Ze.getState().openWindow(H.miniAppId,H.name,z)}catch(z){console.error("[shell] Could not launch application:",z)}},[]);return x.jsxs("div",{className:Ls.shell,"data-dt-shell":!0,children:[x.jsx(y4,{status:t,retryInSeconds:a}),x.jsx("div",{className:Ls.actionsBar,children:x.jsx(f4,{apps:le,onLaunch:j})}),x.jsxs("div",{className:Ls.content,style:F,children:[x.jsxs("div",{ref:q,className:Ls.desktop,children:[s?u&&x.jsx(tm,{node:u,windowsById:P,themePreferences:e,canDrag:u.type==="container"}):null,h&&x.jsx(C4,{desktopRef:q})]}),x.jsx(s_,{path:[],split:"horizontal",ratio:ne,onRatioChange:H=>{A(Kq(1-H))}}),x.jsx("div",{className:Ls.assistantPane,children:x.jsx(TA,{window:J,title:"AI Assistant",showCloseButton:!1,showFullscreenButton:!1,children:x.jsx(cU,{socket:n,wsReady:s})})}),G&&x.jsx("div",{className:Ls.maximizedMask}),G&&x.jsx(AU,{socket:n,wsReady:s})]})]})}const eY="_page_1nc9w_1",tY="_logo_1nc9w_10",nY="_form_1nc9w_17",rY="_field_1nc9w_24",aY="_label_1nc9w_30",iY="_input_1nc9w_38",sY="_error_1nc9w_56",Nr={page:eY,logo:tY,form:nY,field:rY,label:aY,input:iY,error:sY},lY="_modal_2xb7m_1",oY="_small_2xb7m_13",uY="_medium_2xb7m_17",cY="_large_2xb7m_21",cp={modal:lY,small:oY,medium:uY,large:cY};function t6({children:e,className:t="",size:n="medium"}){const a=cp[n]??cp.medium,s=`${cp.modal} ${a} ${t}`.trim();return x.jsx("div",{className:s,children:e})}function dY({onLoginSuccess:e}){const[t,n]=C.useState(""),[a,s]=C.useState(""),[l,u]=C.useState(""),[d,f]=C.useState(!1);async function h(m){m.preventDefault(),u(""),f(!0);try{await dr.post("/api/auth/login",{username:t,password:a}),e()}catch(b){u(l_(b,"Network error. Please try again."))}finally{f(!1)}}return x.jsx("div",{className:Nr.page,children:x.jsxs(t6,{size:"small",children:[x.jsx("h1",{className:Nr.logo,children:"DeskTalk"}),x.jsxs("form",{className:Nr.form,onSubmit:h,children:[x.jsxs("div",{className:Nr.field,children:[x.jsx("label",{className:Nr.label,htmlFor:"login-username",children:"Username"}),x.jsx("input",{id:"login-username",className:Nr.input,type:"text",placeholder:"Enter your username",autoComplete:"username",autoFocus:!0,value:t,onChange:m=>n(m.target.value),disabled:d})]}),x.jsxs("div",{className:Nr.field,children:[x.jsx("label",{className:Nr.label,htmlFor:"login-password",children:"Password"}),x.jsx("input",{id:"login-password",className:Nr.input,type:"password",placeholder:"Enter your password",autoComplete:"current-password",value:a,onChange:m=>s(m.target.value),disabled:d})]}),x.jsx("div",{className:Nr.error,children:l}),x.jsx("dt-button",{variant:"primary",disabled:d||!t||!a,type:"submit",fullwidth:!0,children:d?"Signing in...":"Sign In"})]})]})})}const fY="_page_kb1dd_1",hY="_header_kb1dd_10",pY="_title_kb1dd_14",mY="_subtitle_kb1dd_21",gY="_stepIndicator_kb1dd_26",bY="_dot_kb1dd_32",yY="_dotActive_kb1dd_40 _dot_kb1dd_32",EY="_dotCompleted_kb1dd_45 _dot_kb1dd_32",xY="_body_kb1dd_50",vY="_welcomeOptions_kb1dd_56",_Y="_providerList_kb1dd_62",TY="_providerCard_kb1dd_68",AY="_providerCardBody_kb1dd_77",wY="_providerCardHeader_kb1dd_83",SY="_providerCardTitleRow_kb1dd_90",kY="_providerCardTitle_kb1dd_90",CY="_providerCardActions_kb1dd_102",NY="_providerActionButtonWrap_kb1dd_110",RY="_providerSelectWrap_kb1dd_119",OY="_providerFieldGrid_kb1dd_128",LY="_field_kb1dd_134",IY="_label_kb1dd_140",MY="_input_kb1dd_148",DY="_colorControl_kb1dd_167",BY="_colorInput_kb1dd_172",zY="_footer_kb1dd_183",PY="_error_kb1dd_189",HY="_welcomeText_kb1dd_196",UY="_hintText_kb1dd_203",jY="_doneText_kb1dd_211",FY="_footerActions_kb1dd_218",fe={page:fY,header:hY,title:pY,subtitle:mY,stepIndicator:gY,dot:bY,dotActive:yY,dotCompleted:EY,body:xY,welcomeOptions:vY,providerList:_Y,providerCard:TY,providerCardBody:AY,providerCardHeader:wY,providerCardTitleRow:SY,providerCardTitle:kY,providerCardActions:CY,providerActionButtonWrap:NY,providerSelectWrap:RY,providerFieldGrid:OY,field:LY,label:IY,input:MY,colorControl:DY,colorInput:BY,footer:zY,error:PY,welcomeText:HY,hintText:UY,doneText:jY,footerActions:FY},_v="en",qc=["welcome","account","aiConfig","voiceConfig","done"],n6={provider:"openai"};function Tv(e=n6.provider){return{provider:e,apiKey:"",model:"",baseUrl:""}}const r6={provider:"openai-whisper"};function Av(e=r6.provider){return e==="azure-openai-whisper"?{provider:e,apiKey:"",model:"",baseUrl:"",azureDeployment:"",azureApiVersion:"2024-06-01"}:{provider:e,apiKey:"",model:"whisper-1",baseUrl:"https://api.openai.com/v1",azureDeployment:"",azureApiVersion:"2024-06-01"}}const $Y=Fo((e,t)=>({step:"welcome",stepIndex:0,language:_v,accentColor:oa.accentColor,username:"",displayName:"",password:"",confirmPassword:"",aiProviders:[Tv()],voiceProviders:[Av()],error:"",loading:!1,goNext(){const{stepIndex:n}=t(),a=n+1;a<qc.length&&e({step:qc[a],stepIndex:a,error:""})},goBack(){const{stepIndex:n}=t(),a=n-1;a>=0&&e({step:qc[a],stepIndex:a,error:""})},setLanguage:n=>e({language:n}),setAccentColor:n=>e({accentColor:n}),setUsername:n=>e({username:n}),setDisplayName:n=>e({displayName:n}),setPassword:n=>e({password:n}),setConfirmPassword:n=>e({confirmPassword:n}),addAiProvider:(n=n6.provider)=>e(a=>a.aiProviders.some(s=>s.provider===n)?a:{aiProviders:[...a.aiProviders,Tv(n)]}),removeAiProvider:n=>e(a=>a.aiProviders.length===1?a:{aiProviders:a.aiProviders.filter(s=>s.provider!==n)}),setDefaultAiProvider:n=>e(a=>{const s=a.aiProviders.filter(u=>u.provider!==n),l=a.aiProviders.find(u=>u.provider===n);return l?{aiProviders:[l,...s]}:a}),updateAiProvider:(n,a,s)=>e(l=>({aiProviders:l.aiProviders.map(u=>u.provider===n?{...u,[a]:s}:u)})),addVoiceProvider:(n=r6.provider)=>e(a=>a.voiceProviders.some(s=>s.provider===n)?a:{voiceProviders:[...a.voiceProviders,Av(n)]}),removeVoiceProvider:n=>e(a=>a.voiceProviders.length===1?a:{voiceProviders:a.voiceProviders.filter(s=>s.provider!==n)}),setDefaultVoiceProvider:n=>e(a=>{const s=a.voiceProviders.filter(u=>u.provider!==n),l=a.voiceProviders.find(u=>u.provider===n);return l?{voiceProviders:[l,...s]}:a}),updateVoiceProvider:(n,a,s)=>e(l=>({voiceProviders:l.voiceProviders.map(u=>u.provider===n?{...u,[a]:s}:u)})),validateAccount(){const{username:n,displayName:a,password:s,confirmPassword:l}=t();return n.trim()?/^[a-zA-Z0-9_-]{1,32}$/.test(n)?a.trim()?s.length<8?(e({error:Ce({scope:"core",key:"onboard.account.errors.passwordShort",defaultText:"Password must be at least 8 characters."})}),!1):s!==l?(e({error:Ce({scope:"core",key:"onboard.account.errors.passwordMismatch",defaultText:"Passwords do not match."})}),!1):!0:(e({error:Ce({scope:"core",key:"onboard.account.errors.displayNameRequired",defaultText:"Display name is required."})}),!1):(e({error:Ce({scope:"core",key:"onboard.account.errors.usernameInvalid",defaultText:"Username must be 1-32 alphanumeric characters, hyphens, or underscores."})}),!1):(e({error:Ce({scope:"core",key:"onboard.account.errors.usernameRequired",defaultText:"Username is required."})}),!1)},async submit(n){const{username:a,displayName:s,password:l,language:u,accentColor:d,aiProviders:f,voiceProviders:h}=t();e({error:"",loading:!0});try{const m={language:u.trim()||_v,accentColor:d.trim()||oa.accentColor,username:a.trim(),displayName:s.trim(),password:l},b=f.map(A=>({provider:A.provider,apiKey:A.apiKey.trim(),model:A.model.trim(),baseUrl:A.baseUrl.trim()}));b.some(A=>A.apiKey||A.model||A.baseUrl||A.provider!=="openai")&&(m.aiConfig={defaultProvider:b[0]?.provider??"openai",providers:b.map(A=>({provider:A.provider,apiKey:A.apiKey||void 0,model:A.model||void 0,baseUrl:A.baseUrl||void 0}))});const v=h.map(A=>({provider:A.provider,apiKey:A.apiKey.trim(),model:A.model.trim(),baseUrl:A.baseUrl.trim(),azureDeployment:A.azureDeployment.trim(),azureApiVersion:A.azureApiVersion.trim()}));v.some(A=>A.apiKey||A.model||A.baseUrl||A.azureDeployment||A.azureApiVersion!=="2024-06-01"||A.provider!=="openai-whisper")&&(m.voiceConfig={defaultProvider:v[0]?.provider??"openai-whisper",providers:v.map(A=>({provider:A.provider,apiKey:A.apiKey||void 0,model:A.model||void 0,baseUrl:A.baseUrl||void 0,azureDeployment:A.azureDeployment||void 0,azureApiVersion:A.azureApiVersion||void 0}))}),await dr.post("/api/setup",m),n()}catch(m){e({error:l_(m,"Network error. Please try again.")})}finally{e({loading:!1})}}})),qY="en",YY=[{value:"en",label:"English"},{value:"zh",label:"简体中文"}],Lc=[{id:"openai",label:"OpenAI",supportsBaseUrl:!0},{id:"anthropic",label:"Anthropic",supportsBaseUrl:!1},{id:"google",label:"Google Gemini",supportsBaseUrl:!1},{id:"azure-openai-responses",label:"Azure OpenAI",supportsBaseUrl:!0},{id:"mistral",label:"Mistral",supportsBaseUrl:!0},{id:"groq",label:"Groq",supportsBaseUrl:!0},{id:"xai",label:"xAI",supportsBaseUrl:!0},{id:"openrouter",label:"OpenRouter",supportsBaseUrl:!0},{id:"ollama",label:"Ollama",supportsBaseUrl:!0}],Ic=[{id:"openai-whisper",label:"OpenAI Whisper",supportsModel:!0,supportsBaseUrl:!0,supportsAzureDeployment:!1,supportsAzureApiVersion:!1},{id:"azure-openai-whisper",label:"Azure OpenAI Whisper",supportsModel:!1,supportsBaseUrl:!0,supportsAzureDeployment:!0,supportsAzureApiVersion:!0}];function VY(e){return/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function GY({onComplete:e,locale:t,accentColor:n,onLanguageChange:a,onAccentColorChange:s}){const l=$Y(),u=Ce({scope:"core",key:"onboard.common.back",defaultText:"Back"}),d=Ce({scope:"core",key:"onboard.common.next",defaultText:"Next"}),f=Ce({scope:"core",key:"onboard.common.skip",defaultText:"Skip"}),h=Ce({scope:"core",key:"onboard.common.default",defaultText:"Default"}),m=Ce({scope:"core",key:"onboard.common.setDefault",defaultText:"Set as default"}),b=Ce({scope:"core",key:"onboard.common.delete",defaultText:"Delete"}),E=Ce({scope:"core",key:"onboard.common.provider",defaultText:"Provider"}),v=Ce({scope:"core",key:"onboard.common.apiKey",defaultText:"API Key"}),T=Ce({scope:"core",key:"onboard.common.addProvider",defaultText:"Add provider"}),A=Ce({scope:"core",key:"onboard.common.modelOptional",defaultText:"Model (optional)"}),S=Ce({scope:"core",key:"onboard.common.baseUrlOptional",defaultText:"Base URL (optional)"});C.useEffect(()=>{l.language===qY&&t!==l.language&&l.setLanguage(t)},[t,l]),C.useEffect(()=>{l.accentColor===oa.accentColor&&n!==l.accentColor&&l.setAccentColor(n)},[n,l]);function k(){return x.jsx("div",{className:fe.stepIndicator,children:qc.map((U,le)=>{let j=fe.dot;return le===l.stepIndex?j=fe.dotActive:le<l.stepIndex&&(j=fe.dotCompleted),x.jsx("div",{className:j},U)})})}function q(){const U=VY(l.accentColor)?l.accentColor:oa.accentColor;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:fe.header,children:[x.jsx("h1",{className:fe.title,children:Ce({scope:"core",key:"onboard.welcome.title",defaultText:"Welcome to DeskTalk"})}),x.jsx("p",{className:fe.subtitle,children:Ce({scope:"core",key:"onboard.welcome.subtitle",defaultText:"Choose your language and accent before creating your admin account"})})]}),x.jsxs("div",{className:fe.body,children:[x.jsx("p",{className:fe.welcomeText,children:Ce({scope:"core",key:"onboard.welcome.body",defaultText:"DeskTalk is a browser-based desktop environment with an AI assistant and modular MiniApps. Since this is the first time running DeskTalk, you'll need to create an administrator account."})}),x.jsxs("div",{className:fe.welcomeOptions,children:[x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-language",children:Ce({scope:"core",key:"onboard.welcome.languageLabel",defaultText:"Language"})}),x.jsx(dp,{id:"onboard-language",value:l.language,options:YY,onChange:async le=>{l.setLanguage(le),await a(le)}})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-accent-color-text",children:Ce({scope:"core",key:"onboard.welcome.accentColorLabel",defaultText:"Accent Color"})}),x.jsxs("div",{className:fe.colorControl,children:[x.jsx("input",{id:"onboard-accent-color",type:"color",className:fe.colorInput,value:U,onChange:le=>{const j=le.target.value;l.setAccentColor(j),s(j)},"aria-label":Ce({scope:"core",key:"onboard.welcome.accentColorPicker",defaultText:"Accent color picker"})}),x.jsx("input",{id:"onboard-accent-color-text",className:fe.input,type:"text",value:l.accentColor,placeholder:oa.accentColor,onChange:le=>{const j=le.target.value;l.setAccentColor(j),s(j)}})]})]})]})]}),x.jsxs("div",{className:fe.footer,children:[x.jsx("span",{}),x.jsx("dt-button",{variant:"primary",onClick:l.goNext,children:Ce({scope:"core",key:"onboard.welcome.getStarted",defaultText:"Get Started"})})]})]})}function P(){return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:fe.header,children:[x.jsx("h1",{className:fe.title,children:Ce({scope:"core",key:"onboard.account.title",defaultText:"Create Admin Account"})}),x.jsx("p",{className:fe.subtitle,children:Ce({scope:"core",key:"onboard.account.subtitle",defaultText:"Choose your credentials"})})]}),x.jsxs("div",{className:fe.body,children:[x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-username",children:Ce({scope:"core",key:"onboard.account.username",defaultText:"Username"})}),x.jsx("input",{id:"onboard-username",className:fe.input,type:"text",placeholder:Ce({scope:"core",key:"onboard.account.usernamePlaceholder",defaultText:"e.g. admin"}),autoComplete:"username",value:l.username,onChange:U=>l.setUsername(U.target.value)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-displayname",children:Ce({scope:"core",key:"onboard.account.displayName",defaultText:"Display Name"})}),x.jsx("input",{id:"onboard-displayname",className:fe.input,type:"text",placeholder:Ce({scope:"core",key:"onboard.account.displayNamePlaceholder",defaultText:"Your display name"}),autoComplete:"name",value:l.displayName,onChange:U=>l.setDisplayName(U.target.value)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-password",children:Ce({scope:"core",key:"onboard.account.password",defaultText:"Password"})}),x.jsx("input",{id:"onboard-password",className:fe.input,type:"password",placeholder:Ce({scope:"core",key:"onboard.account.passwordPlaceholder",defaultText:"At least 8 characters"}),autoComplete:"new-password",value:l.password,onChange:U=>l.setPassword(U.target.value)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:"onboard-confirm",children:Ce({scope:"core",key:"onboard.account.confirmPassword",defaultText:"Confirm Password"})}),x.jsx("input",{id:"onboard-confirm",className:fe.input,type:"password",placeholder:Ce({scope:"core",key:"onboard.account.confirmPasswordPlaceholder",defaultText:"Re-enter your password"}),autoComplete:"new-password",value:l.confirmPassword,onChange:U=>l.setConfirmPassword(U.target.value)})]}),x.jsx("div",{className:fe.error,children:l.error})]}),x.jsxs("div",{className:fe.footer,children:[x.jsx("dt-button",{variant:"secondary",onClick:l.goBack,children:u}),x.jsx("dt-button",{variant:"primary",onClick:()=>{l.validateAccount()&&l.goNext()},disabled:!l.username||!l.displayName||!l.password||!l.confirmPassword,children:d})]})]})}function G(){return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:fe.header,children:[x.jsx("h1",{className:fe.title,children:Ce({scope:"core",key:"onboard.ai.title",defaultText:"AI Configuration"})}),x.jsx("p",{className:fe.subtitle,children:Ce({scope:"core",key:"onboard.ai.subtitle",defaultText:"Configure your AI provider (optional)"})})]}),x.jsxs("div",{className:fe.body,children:[x.jsx("p",{className:fe.hintText,children:Ce({scope:"core",key:"onboard.ai.body",defaultText:"Set up an AI provider so DeskTalk's assistant is ready to use. You can change these settings later in Preferences."})}),x.jsx("div",{className:fe.providerList,children:l.aiProviders.map((U,le)=>{const j=Lc.find(z=>z.id===U.provider),H=Lc.filter(z=>z.id===U.provider||!l.aiProviders.some(ve=>ve.provider===z.id));return x.jsx("div",{className:fe.providerCard,children:x.jsx("dt-card",{variant:"outlined",children:x.jsxs("div",{className:fe.providerCardBody,children:[x.jsxs("div",{className:fe.providerCardHeader,children:[x.jsxs("div",{className:fe.providerCardTitleRow,children:[x.jsx("div",{className:fe.providerCardTitle,children:j?.label??U.provider}),le===0&&x.jsx("dt-badge",{variant:"default",children:h})]}),x.jsxs("div",{className:fe.providerCardActions,children:[x.jsx("dt-button",{onClick:()=>l.setDefaultAiProvider(U.provider),disabled:le===0,variant:"secondary",size:"sm",children:m}),x.jsx("dt-button",{onClick:()=>l.removeAiProvider(U.provider),disabled:l.aiProviders.length===1,variant:"danger",size:"sm",children:b})]})]}),x.jsxs("div",{className:fe.providerFieldGrid,children:[x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-ai-provider-${U.provider}`,children:E}),x.jsx(dp,{id:`onboard-ai-provider-${U.provider}`,value:U.provider,options:H.map(z=>({value:z.id,label:z.label})),onChange:z=>l.updateAiProvider(U.provider,"provider",z)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-ai-apikey-${U.provider}`,children:v}),x.jsx("input",{id:`onboard-ai-apikey-${U.provider}`,className:fe.input,type:"password",placeholder:Ce({scope:"core",key:"onboard.ai.apiKeyPlaceholder",defaultText:"Enter your API key"}),autoComplete:"off",value:U.apiKey,onChange:z=>l.updateAiProvider(U.provider,"apiKey",z.target.value)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-ai-model-${U.provider}`,children:A}),x.jsx("input",{id:`onboard-ai-model-${U.provider}`,className:fe.input,type:"text",placeholder:Ce({scope:"core",key:"onboard.ai.modelPlaceholder",defaultText:"e.g. gpt-4o"}),value:U.model,onChange:z=>l.updateAiProvider(U.provider,"model",z.target.value)})]}),j?.supportsBaseUrl&&x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-ai-baseurl-${U.provider}`,children:S}),x.jsx("input",{id:`onboard-ai-baseurl-${U.provider}`,className:fe.input,type:"text",placeholder:Ce({scope:"core",key:"onboard.ai.baseUrlPlaceholder",defaultText:"Custom API endpoint"}),value:U.baseUrl,onChange:z=>l.updateAiProvider(U.provider,"baseUrl",z.target.value)})]})]})]})})},U.provider)})}),x.jsx("div",{className:fe.providerActionButtonWrap,children:x.jsx("dt-button",{onClick:()=>{const U=Lc.find(le=>!l.aiProviders.some(j=>j.provider===le.id));U&&l.addAiProvider(U.id)},disabled:l.aiProviders.length>=Lc.length,variant:"secondary",children:T})})]}),x.jsxs("div",{className:fe.footer,children:[x.jsx("dt-button",{variant:"secondary",onClick:l.goBack,children:u}),x.jsxs("div",{className:fe.footerActions,children:[x.jsx("dt-button",{variant:"ghost",onClick:l.goNext,children:f}),x.jsx("dt-button",{variant:"primary",onClick:l.goNext,children:d})]})]})]})}function ne(){return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:fe.header,children:[x.jsx("h1",{className:fe.title,children:Ce({scope:"core",key:"onboard.voice.title",defaultText:"Voice Configuration"})}),x.jsx("p",{className:fe.subtitle,children:Ce({scope:"core",key:"onboard.voice.subtitle",defaultText:"Configure speech-to-text (optional)"})})]}),x.jsxs("div",{className:fe.body,children:[x.jsx("p",{className:fe.hintText,children:Ce({scope:"core",key:"onboard.voice.body",defaultText:"Set up a speech-to-text provider for voice input. You can change these settings later in Preferences."})}),x.jsx("div",{className:fe.providerList,children:l.voiceProviders.map((U,le)=>{const j=Ic.find(z=>z.id===U.provider),H=Ic.filter(z=>z.id===U.provider||!l.voiceProviders.some(ve=>ve.provider===z.id));return x.jsx("div",{className:fe.providerCard,children:x.jsx("dt-card",{variant:"outlined",children:x.jsxs("div",{className:fe.providerCardBody,children:[x.jsxs("div",{className:fe.providerCardHeader,children:[x.jsxs("div",{className:fe.providerCardTitleRow,children:[x.jsx("div",{className:fe.providerCardTitle,children:j?.label??U.provider}),le===0&&x.jsx("dt-badge",{variant:"default",children:h})]}),x.jsxs("div",{className:fe.providerCardActions,children:[x.jsx("dt-button",{onClick:()=>l.setDefaultVoiceProvider(U.provider),disabled:le===0,variant:"secondary",size:"sm",children:m}),x.jsx("dt-button",{onClick:()=>l.removeVoiceProvider(U.provider),disabled:l.voiceProviders.length===1,variant:"danger",size:"sm",children:b})]})]}),x.jsxs("div",{className:fe.providerFieldGrid,children:[x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,children:Ce({scope:"core",key:"onboard.voice.provider",defaultText:"STT Provider"})}),x.jsx(dp,{value:U.provider,options:H.map(z=>({value:z.id,label:z.label})),onChange:z=>l.updateVoiceProvider(U.provider,"provider",z)})]}),x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-stt-apikey-${U.provider}`,children:v}),x.jsx("input",{id:`onboard-stt-apikey-${U.provider}`,className:fe.input,type:"password",placeholder:Ce({scope:"core",key:"onboard.voice.apiKeyPlaceholder",defaultText:"Enter your STT API key"}),autoComplete:"off",value:U.apiKey,onChange:z=>l.updateVoiceProvider(U.provider,"apiKey",z.target.value)})]}),j?.supportsModel&&x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-stt-model-${U.provider}`,children:Ce({scope:"core",key:"onboard.voice.model",defaultText:"Model"})}),x.jsx("input",{id:`onboard-stt-model-${U.provider}`,className:fe.input,type:"text",value:U.model,onChange:z=>l.updateVoiceProvider(U.provider,"model",z.target.value)})]}),j?.supportsBaseUrl&&x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-stt-baseurl-${U.provider}`,children:Ce({scope:"core",key:"onboard.voice.baseUrl",defaultText:"Base URL"})}),x.jsx("input",{id:`onboard-stt-baseurl-${U.provider}`,className:fe.input,type:"text",value:U.baseUrl,onChange:z=>l.updateVoiceProvider(U.provider,"baseUrl",z.target.value)})]}),j?.supportsAzureDeployment&&x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-stt-deployment-${U.provider}`,children:Ce({scope:"core",key:"onboard.voice.azureDeployment",defaultText:"Azure Deployment"})}),x.jsx("input",{id:`onboard-stt-deployment-${U.provider}`,className:fe.input,type:"text",value:U.azureDeployment,onChange:z=>l.updateVoiceProvider(U.provider,"azureDeployment",z.target.value)})]}),j?.supportsAzureApiVersion&&x.jsxs("div",{className:fe.field,children:[x.jsx("label",{className:fe.label,htmlFor:`onboard-stt-api-version-${U.provider}`,children:Ce({scope:"core",key:"onboard.voice.azureApiVersion",defaultText:"Azure API Version"})}),x.jsx("input",{id:`onboard-stt-api-version-${U.provider}`,className:fe.input,type:"text",value:U.azureApiVersion,onChange:z=>l.updateVoiceProvider(U.provider,"azureApiVersion",z.target.value)})]})]})]})})},U.provider)})}),x.jsx("div",{className:fe.providerActionButtonWrap,children:x.jsx("dt-button",{onClick:()=>{const U=Ic.find(le=>!l.voiceProviders.some(j=>j.provider===le.id));U&&l.addVoiceProvider(U.id)},disabled:l.voiceProviders.length>=Ic.length,variant:"secondary",children:T})})]}),x.jsxs("div",{className:fe.footer,children:[x.jsx("dt-button",{variant:"secondary",onClick:l.goBack,children:u}),x.jsxs("div",{className:fe.footerActions,children:[x.jsx("dt-button",{variant:"ghost",onClick:l.goNext,children:f}),x.jsx("dt-button",{variant:"primary",onClick:l.goNext,children:d})]})]})]})}function F(){const U=l.displayName||l.username;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:fe.header,children:[x.jsx("h1",{className:fe.title,children:Ce({scope:"core",key:"onboard.done.title",defaultText:"All Set!"})}),x.jsx("p",{className:fe.subtitle,children:Ce({scope:"core",key:"onboard.done.subtitle",defaultText:"Your admin account is ready"})})]}),x.jsxs("div",{className:fe.body,children:[x.jsx("p",{className:fe.doneText,children:Ce({scope:"core",key:"onboard.done.body",defaultText:"Welcome, {displayUserName}. Click below to enter your DeskTalk desktop.",params:{displayUserName:U}})}),x.jsx("div",{className:fe.error,children:l.error})]}),x.jsxs("div",{className:fe.footer,children:[x.jsx("dt-button",{variant:"secondary",onClick:l.goBack,children:u}),x.jsx("dt-button",{variant:"primary",onClick:()=>l.submit(e),disabled:l.loading,children:l.loading?Ce({scope:"core",key:"onboard.done.loading",defaultText:"Setting up..."}):Ce({scope:"core",key:"onboard.done.enter",defaultText:"Enter Desktop"})})]})]})}const J={welcome:q,account:P,aiConfig:G,voiceConfig:ne,done:F};return x.jsx("div",{className:fe.page,children:x.jsxs(t6,{size:"medium",children:[k(),J[l.step]()]})})}function dp({id:e,value:t,options:n,disabled:a=!1,onChange:s}){return x.jsx("div",{className:fe.providerSelectWrap,children:x.jsx("dt-select",{id:e,value:t,options:n,disabled:a,"ondt-change":l=>{s(l.detail.value)}})})}var WY=`.dt-tooltip-popup {
184
+ position: fixed;
185
+ z-index: 2147483647;
186
+ padding: 6px 10px;
187
+ border: 1px solid var(--dt-accent);
188
+ border-radius: 2px;
189
+ background: var(--dt-surface);
190
+ color: var(--dt-text-secondary);
191
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
192
+ font-size: 12px;
193
+ font-weight: 500;
194
+ line-height: 1.4;
195
+ white-space: nowrap;
196
+ pointer-events: none;
197
+ user-select: none;
198
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
199
+ }
200
+
201
+ /* Tech corner accents */
202
+ .dt-tooltip-popup::before {
203
+ content: '';
204
+ position: absolute;
205
+ top: -1px;
206
+ left: -1px;
207
+ width: 4px;
208
+ height: 4px;
209
+ border-top: 1px solid var(--dt-accent);
210
+ border-left: 1px solid var(--dt-accent);
211
+ }
212
+
213
+ .dt-tooltip-popup::after {
214
+ content: '';
215
+ position: absolute;
216
+ bottom: -1px;
217
+ right: -1px;
218
+ width: 4px;
219
+ height: 4px;
220
+ border-bottom: 1px solid var(--dt-accent);
221
+ border-right: 1px solid var(--dt-accent);
222
+ }
223
+
224
+ /* Arrow styling - tech/minimal */
225
+ .dt-tooltip-popup[data-actual-placement='top'] {
226
+ transform: translateX(-50%);
227
+ }
228
+
229
+ .dt-tooltip-popup[data-actual-placement='top']::before {
230
+ top: auto;
231
+ bottom: -4px;
232
+ left: 50%;
233
+ transform: translateX(-50%);
234
+ width: 0;
235
+ height: 0;
236
+ border: 4px solid transparent;
237
+ border-top-color: var(--dt-accent);
238
+ border-left: none;
239
+ border-right: none;
240
+ }
241
+
242
+ .dt-tooltip-popup[data-actual-placement='bottom'] {
243
+ transform: translateX(-50%);
244
+ }
245
+
246
+ .dt-tooltip-popup[data-actual-placement='bottom']::before {
247
+ bottom: auto;
248
+ top: -4px;
249
+ left: 50%;
250
+ transform: translateX(-50%);
251
+ width: 0;
252
+ height: 0;
253
+ border: 4px solid transparent;
254
+ border-bottom-color: var(--dt-accent);
255
+ border-left: none;
256
+ border-right: none;
257
+ }
258
+
259
+ .dt-tooltip-popup[data-actual-placement='left'] {
260
+ transform: translateY(-50%);
261
+ }
262
+
263
+ .dt-tooltip-popup[data-actual-placement='left']::before {
264
+ left: auto;
265
+ top: 50%;
266
+ right: -4px;
267
+ transform: translateY(-50%);
268
+ width: 0;
269
+ height: 0;
270
+ border: 4px solid transparent;
271
+ border-left-color: var(--dt-accent);
272
+ border-top: none;
273
+ border-bottom: none;
274
+ }
275
+
276
+ .dt-tooltip-popup[data-actual-placement='right'] {
277
+ transform: translateY(-50%);
278
+ }
279
+
280
+ .dt-tooltip-popup[data-actual-placement='right']::before {
281
+ right: auto;
282
+ top: 50%;
283
+ left: -4px;
284
+ transform: translateY(-50%);
285
+ width: 0;
286
+ height: 0;
287
+ border: 4px solid transparent;
288
+ border-right-color: var(--dt-accent);
289
+ border-top: none;
290
+ border-bottom: none;
291
+ }
292
+ `,QY="dt-tooltip-popup",Fa=8,wv=!1;function XY(){if(wv)return;let e=document.createElement("style");e.setAttribute("data-dt-tooltip",""),e.textContent=WY,document.head.appendChild(e),wv=!0}var KY=class extends HTMLElement{_popup=null;_showTimeout=null;_tooltipId="";_visible=!1;static get observedAttributes(){return["content","placement","delay","disabled"]}get content(){return this.getAttribute("content")??""}set content(e){this.setAttribute("content",e)}get placement(){let e=this.getAttribute("placement");return e==="bottom"||e==="left"||e==="right"?e:"top"}set placement(e){this.setAttribute("placement",e)}get delay(){let e=Number(this.getAttribute("delay"));return Number.isFinite(e)&&e>0?e:0}set delay(e){this.setAttribute("delay",String(e))}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML="<slot></slot>",this._tooltipId=`dt-tip-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){XY(),this.addEventListener("mouseenter",this._onEnter),this.addEventListener("mouseleave",this._onLeave),this.addEventListener("focusin",this._onEnter),this.addEventListener("focusout",this._onLeave)}disconnectedCallback(){this.removeEventListener("mouseenter",this._onEnter),this.removeEventListener("mouseleave",this._onLeave),this.removeEventListener("focusin",this._onEnter),this.removeEventListener("focusout",this._onLeave),this._hide()}attributeChangedCallback(e,t,n){e==="disabled"&&this.disabled&&this._hide(),e==="content"&&this._popup&&(this._popup.textContent=this.content)}_onEnter=()=>{if(this.disabled||!this.content)return;this._showTimeout!==null&&clearTimeout(this._showTimeout);let e=()=>{this._createPopup(),this._position(),this._visible=!0};this.delay>0?this._showTimeout=setTimeout(e,this.delay):e()};_onLeave=()=>{this._hide()};_createPopup(){if(this._popup)return;let e=document.createElement("div");e.className=QY,e.id=this._tooltipId,e.setAttribute("role","tooltip"),e.textContent=this.content,document.body.appendChild(e),this._popup=e;let t=this._getTrigger();t&&t.setAttribute("aria-describedby",this._tooltipId)}_hide(){if(this._showTimeout!==null&&(clearTimeout(this._showTimeout),this._showTimeout=null),this._popup){let e=this._getTrigger();e&&e.removeAttribute("aria-describedby"),this._popup.remove(),this._popup=null,this._visible=!1}}_getTrigger(){let e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length>0?e[0]:null}_position(){let e=this._popup;if(!e)return;let t=this.getBoundingClientRect(),n=e.getBoundingClientRect(),a=window.innerWidth,s=window.innerHeight,l=this.placement;l==="top"&&t.top-n.height-Fa<0?l="bottom":l==="bottom"&&t.bottom+n.height+Fa>s?l="top":l==="left"&&t.left-n.width-Fa<0?l="right":l==="right"&&t.right+n.width+Fa>a&&(l="left"),e.setAttribute("data-actual-placement",l);let u,d;switch(l){case"top":d=t.left+t.width/2,u=t.top-n.height-Fa;break;case"bottom":d=t.left+t.width/2,u=t.bottom+Fa;break;case"left":d=t.left-n.width-Fa,u=t.top+t.height/2;break;case"right":d=t.right+Fa,u=t.top+t.height/2;break}e.style.left=`${d}px`,e.style.top=`${u}px`}},ZY=`:host {
293
+ display: block;
294
+ margin-bottom: 12px;
295
+ }
296
+
297
+ .dt-card-inner {
298
+ background: var(--dt-surface);
299
+ border: 1px solid var(--dt-accent);
300
+ border-radius: 2px;
301
+ padding: 12px;
302
+ color: var(--dt-text);
303
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
304
+ position: relative;
305
+ height: 100%;
306
+ }
307
+
308
+ /* Corner accents for sci-fi feel */
309
+ .dt-card-inner::before {
310
+ content: '';
311
+ position: absolute;
312
+ top: -1px;
313
+ left: -1px;
314
+ width: 8px;
315
+ height: 8px;
316
+ border-top: 2px solid var(--dt-accent);
317
+ border-left: 2px solid var(--dt-accent);
318
+ }
319
+
320
+ .dt-card-inner::after {
321
+ content: '';
322
+ position: absolute;
323
+ bottom: -1px;
324
+ right: -1px;
325
+ width: 8px;
326
+ height: 8px;
327
+ border-bottom: 2px solid var(--dt-accent);
328
+ border-right: 2px solid var(--dt-accent);
329
+ }
330
+
331
+ :host([variant='outlined']) .dt-card-inner {
332
+ background: transparent;
333
+ border-style: dashed;
334
+ }
335
+
336
+ :host([variant='filled']) .dt-card-inner {
337
+ background: var(--dt-accent-subtle);
338
+ border-style: solid;
339
+ }
340
+
341
+ ::slotted(h1),
342
+ ::slotted(h2),
343
+ ::slotted(h3),
344
+ ::slotted(h4),
345
+ ::slotted(h5),
346
+ ::slotted(h6) {
347
+ color: var(--dt-accent);
348
+ margin: 0 0 6px;
349
+ line-height: 1.2;
350
+ font-family: var(--font-display, 'Sora', system-ui, sans-serif);
351
+ font-weight: 600;
352
+ text-transform: uppercase;
353
+ letter-spacing: 0.1em;
354
+ font-size: 0.85rem;
355
+ }
356
+
357
+ ::slotted(p) {
358
+ color: var(--dt-text-secondary);
359
+ margin: 0 0 6px;
360
+ line-height: 1.4;
361
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
362
+ font-size: 0.8125rem;
363
+ }
364
+
365
+ ::slotted(p:last-child) {
366
+ margin-bottom: 0;
367
+ }
368
+ `,JY="dt-card-inner",eV=class extends HTMLElement{static get observedAttributes(){return["variant"]}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=ZY,e.appendChild(t);let n=document.createElement("div");n.className=JY,n.innerHTML="<slot></slot>",e.appendChild(n)}},tV=`.dt-select-menu {
369
+ position: fixed;
370
+ z-index: 2147483646;
371
+ display: flex;
372
+ min-width: 200px;
373
+ max-width: min(300px, 72vw);
374
+ max-height: 240px;
375
+ flex-direction: column;
376
+ overflow-y: auto;
377
+ border: 1px solid var(--dt-accent);
378
+ border-radius: 2px;
379
+ background: var(--dt-surface);
380
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
381
+ opacity: 0;
382
+ pointer-events: none;
383
+ transition: opacity 100ms ease;
384
+ }
385
+
386
+ .dt-select-menu[data-open] {
387
+ opacity: 1;
388
+ pointer-events: auto;
389
+ }
390
+
391
+ .dt-select-option {
392
+ display: flex;
393
+ width: 100%;
394
+ align-items: center;
395
+ justify-content: space-between;
396
+ padding: 8px 10px;
397
+ border: 0;
398
+ border-bottom: 1px solid var(--dt-border-subtle);
399
+ background: transparent;
400
+ color: var(--dt-text);
401
+ font-family: var(
402
+ --font-mono,
403
+ 'SF Mono',
404
+ Monaco,
405
+ 'Cascadia Code',
406
+ 'Roboto Mono',
407
+ Consolas,
408
+ monospace
409
+ );
410
+ font-size: 0.8125rem;
411
+ font-weight: 600;
412
+ letter-spacing: 0.04em;
413
+ text-align: left;
414
+ cursor: pointer;
415
+ transition: all 0.1s ease;
416
+ user-select: none;
417
+ }
418
+
419
+ .dt-select-option:last-child {
420
+ border-bottom: none;
421
+ }
422
+
423
+ .dt-select-option:hover {
424
+ background: var(--dt-accent);
425
+ color: var(--dt-text-on-accent);
426
+ }
427
+
428
+ .dt-select-option.dt-select-option--active {
429
+ background: var(--dt-accent-subtle);
430
+ color: var(--dt-accent);
431
+ }
432
+
433
+ .dt-select-option span {
434
+ overflow: hidden;
435
+ text-overflow: ellipsis;
436
+ white-space: nowrap;
437
+ }
438
+ `,nV=`:host {
439
+ display: block;
440
+ width: 100%;
441
+ min-width: 0;
442
+ position: relative;
443
+ }
444
+
445
+ :host([disabled]) .dt-select-trigger {
446
+ cursor: not-allowed;
447
+ opacity: 0.4;
448
+ }
449
+
450
+ .dt-select-trigger {
451
+ display: flex;
452
+ width: 100%;
453
+ min-width: 0;
454
+ max-width: 100%;
455
+ box-sizing: border-box;
456
+ align-items: center;
457
+ gap: 6px;
458
+ padding: 6px 10px;
459
+ border: 1px solid var(--dt-accent);
460
+ border-radius: 2px;
461
+ background: var(--dt-surface);
462
+ color: var(--dt-text);
463
+ font-family: var(
464
+ --font-mono,
465
+ 'SF Mono',
466
+ Monaco,
467
+ 'Cascadia Code',
468
+ 'Roboto Mono',
469
+ Consolas,
470
+ monospace
471
+ );
472
+ font-size: 0.8125rem;
473
+ font-weight: 600;
474
+ letter-spacing: 0.04em;
475
+ line-height: 1;
476
+ cursor: pointer;
477
+ transition: all 0.1s ease;
478
+ user-select: none;
479
+ position: relative;
480
+ }
481
+
482
+ /* Corner accents */
483
+ .dt-select-trigger::before {
484
+ content: '';
485
+ position: absolute;
486
+ top: 0;
487
+ left: 0;
488
+ width: 4px;
489
+ height: 4px;
490
+ border-top: 1px solid var(--dt-accent);
491
+ border-left: 1px solid var(--dt-accent);
492
+ }
493
+
494
+ .dt-select-trigger::after {
495
+ content: '';
496
+ position: absolute;
497
+ bottom: 0;
498
+ right: 0;
499
+ width: 4px;
500
+ height: 4px;
501
+ border-bottom: 1px solid var(--dt-accent);
502
+ border-right: 1px solid var(--dt-accent);
503
+ }
504
+
505
+ .dt-select-trigger:hover:not([disabled]) {
506
+ background: var(--dt-accent);
507
+ color: var(--dt-text-on-accent);
508
+ }
509
+
510
+ .dt-select-trigger:hover:not([disabled])::before,
511
+ .dt-select-trigger:hover:not([disabled])::after {
512
+ border-color: var(--dt-text-on-accent);
513
+ }
514
+
515
+ .dt-select-trigger[aria-expanded='true'] {
516
+ background: var(--dt-accent);
517
+ color: var(--dt-text-on-accent);
518
+ }
519
+
520
+ .dt-select-trigger[aria-expanded='true']::before,
521
+ .dt-select-trigger[aria-expanded='true']::after {
522
+ border-color: var(--dt-text-on-accent);
523
+ }
524
+
525
+ .dt-select-label {
526
+ overflow: hidden;
527
+ text-overflow: ellipsis;
528
+ white-space: nowrap;
529
+ }
530
+
531
+ .dt-select-chevron {
532
+ color: currentColor;
533
+ font-size: 10px;
534
+ transition: transform 140ms ease;
535
+ opacity: 0.7;
536
+ }
537
+
538
+ .dt-select-trigger[aria-expanded='true'] .dt-select-chevron {
539
+ transform: rotate(180deg);
540
+ }
541
+ `,rV="dt-select-trigger",Sv="dt-select-label",aV="dt-select-chevron",iV="dt-select-menu",sV="dt-select-option",lV="dt-select-option--active",kv=!1;function oV(){if(kv)return;let e=document.createElement("style");e.setAttribute("data-dt-select",""),e.textContent=tV,document.head.appendChild(e),kv=!0}var uV=class extends HTMLElement{_menu=null;_trigger=null;_options=[];_open=!1;_menuId="";static get observedAttributes(){return["value","placeholder","disabled","align"]}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}get placeholder(){return this.getAttribute("placeholder")??"Select…"}set placeholder(e){this.setAttribute("placeholder",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get align(){return this.getAttribute("align")==="right"?"right":"left"}set align(e){this.setAttribute("align",e)}get options(){return this._options}set options(e){this._options=e,this._updateLabel(),this._open&&this._renderMenuItems()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=nV,e.appendChild(t);let n=document.createElement("button");n.type="button",n.className=rV,n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded","false");let a=document.createElement("span");a.className=Sv,n.appendChild(a);let s=document.createElement("span");s.className=aV,s.setAttribute("aria-hidden","true"),s.textContent="▾",n.appendChild(s),e.appendChild(n),this._trigger=n,this._menuId=`dt-sel-${Math.random().toString(36).slice(2,9)}`}connectedCallback(){oV(),this._trigger.addEventListener("click",this._onTriggerClick),this._updateLabel()}disconnectedCallback(){this._trigger.removeEventListener("click",this._onTriggerClick),this._close()}attributeChangedCallback(e){e==="value"&&(this._updateLabel(),this._open&&this._renderMenuItems()),e==="placeholder"&&!this.value&&this._updateLabel(),e==="disabled"&&this.disabled&&this._close()}_updateLabel(){let e=this._trigger.querySelector(`.${Sv}`),t=this._options.find(n=>n.value===this.value);e.textContent=t?.label??this.placeholder}_onTriggerClick=()=>{this.disabled||(this._open?this._close():this._openMenu())};_openMenu(){if(this._open)return;let e=document.createElement("div");e.className=iV,e.id=this._menuId,e.setAttribute("role","listbox"),document.body.appendChild(e),this._menu=e,this._renderMenuItems(),this._position(),requestAnimationFrame(()=>{e.setAttribute("data-open","")}),this._open=!0,this._trigger.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{document.addEventListener("mousedown",this._onOutsideClick),document.addEventListener("keydown",this._onKeyDown)})}_close(){if(this._open){if(document.removeEventListener("mousedown",this._onOutsideClick),document.removeEventListener("keydown",this._onKeyDown),this._menu){this._menu.removeAttribute("data-open");let e=this._menu;setTimeout(()=>e.remove(),140),this._menu=null}this._open=!1,this._trigger.setAttribute("aria-expanded","false")}}_onOutsideClick=e=>{let t=e.target;this._menu?.contains(t)||this.contains(t)||this._close()};_onKeyDown=e=>{e.key==="Escape"&&(this._close(),this._trigger.focus())};_renderMenuItems(){let e=this._menu;if(e){e.innerHTML="";for(let t of this._options){let n=document.createElement("button");n.type="button",n.className=sV,n.setAttribute("role","option"),n.setAttribute("aria-selected",String(t.value===this.value)),t.value===this.value&&n.classList.add(lV);let a=document.createElement("span");a.textContent=t.label,n.appendChild(a),n.addEventListener("click",()=>{this._selectValue(t.value)}),e.appendChild(n)}}}_selectValue(e){let t=this.value;this.value=e,this._updateLabel(),this._close(),e!==t&&this.dispatchEvent(new CustomEvent("dt-change",{detail:{value:e},bubbles:!0,composed:!0}))}_position(){let e=this._menu;if(!e)return;let t=this.getBoundingClientRect(),n=10,a=Math.max(t.width,240),s=t.bottom+n,l=e.scrollHeight||260,u=window.innerHeight;if(s+l>u&&t.top-l-n>0&&(s=t.top-l-n),e.style.minWidth=`${a}px`,this.align==="right"){let d=window.innerWidth;e.style.right=`${d-t.right}px`,e.style.left="auto"}else e.style.left=`${t.left}px`,e.style.right="auto";e.style.top=`${s}px`}},cV=`:host {
542
+ display: block;
543
+ margin-bottom: 12px;
544
+ }
545
+
546
+ .dt-grid-inner {
547
+ display: grid;
548
+ gap: var(--grid-gap, 12px);
549
+ grid-template-columns: repeat(auto-fit, minmax(var(--min-width, 220px), 1fr));
550
+ }
551
+
552
+ :host([cols='1']) .dt-grid-inner {
553
+ grid-template-columns: repeat(1, 1fr);
554
+ }
555
+
556
+ :host([cols='2']) .dt-grid-inner {
557
+ grid-template-columns: repeat(2, 1fr);
558
+ }
559
+
560
+ :host([cols='3']) .dt-grid-inner {
561
+ grid-template-columns: repeat(3, 1fr);
562
+ }
563
+
564
+ :host([cols='4']) .dt-grid-inner {
565
+ grid-template-columns: repeat(4, 1fr);
566
+ }
567
+
568
+ :host([cols='5']) .dt-grid-inner {
569
+ grid-template-columns: repeat(5, 1fr);
570
+ }
571
+
572
+ :host([cols='6']) .dt-grid-inner {
573
+ grid-template-columns: repeat(6, 1fr);
574
+ }
575
+
576
+ @media (max-width: 480px) {
577
+ :host([cols='2']) .dt-grid-inner,
578
+ :host([cols='3']) .dt-grid-inner,
579
+ :host([cols='4']) .dt-grid-inner,
580
+ :host([cols='5']) .dt-grid-inner,
581
+ :host([cols='6']) .dt-grid-inner {
582
+ grid-template-columns: 1fr;
583
+ }
584
+ }
585
+
586
+ :host([gap='0']) .dt-grid-inner {
587
+ --grid-gap: 0;
588
+ }
589
+ :host([gap='4']) .dt-grid-inner {
590
+ --grid-gap: 4px;
591
+ }
592
+ :host([gap='8']) .dt-grid-inner {
593
+ --grid-gap: 8px;
594
+ }
595
+ :host([gap='12']) .dt-grid-inner {
596
+ --grid-gap: 12px;
597
+ }
598
+ :host([gap='16']) .dt-grid-inner {
599
+ --grid-gap: 16px;
600
+ }
601
+ :host([gap='20']) .dt-grid-inner {
602
+ --grid-gap: 20px;
603
+ }
604
+ :host([gap='24']) .dt-grid-inner {
605
+ --grid-gap: 24px;
606
+ }
607
+ :host([gap='32']) .dt-grid-inner {
608
+ --grid-gap: 32px;
609
+ }
610
+
611
+ :host([min-width='150']) .dt-grid-inner {
612
+ --min-width: 150px;
613
+ }
614
+ :host([min-width='180']) .dt-grid-inner {
615
+ --min-width: 180px;
616
+ }
617
+ :host([min-width='200']) .dt-grid-inner {
618
+ --min-width: 200px;
619
+ }
620
+ :host([min-width='220']) .dt-grid-inner {
621
+ --min-width: 220px;
622
+ }
623
+ :host([min-width='260']) .dt-grid-inner {
624
+ --min-width: 260px;
625
+ }
626
+ :host([min-width='300']) .dt-grid-inner {
627
+ --min-width: 300px;
628
+ }
629
+
630
+ ::slotted(*) {
631
+ min-width: 0;
632
+ }
633
+ `,dV="dt-grid-inner",fV=class extends HTMLElement{static get observedAttributes(){return["cols","gap","min-width"]}get cols(){let e=this.getAttribute("cols");return e==="1"||e==="2"||e==="3"||e==="4"||e==="5"||e==="6"?e:null}set cols(e){e===null?this.removeAttribute("cols"):this.setAttribute("cols",e)}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get minWidth(){let e=this.getAttribute("min-width");return e==="150"||e==="180"||e==="200"||e==="260"||e==="300"?e:"220"}set minWidth(e){this.setAttribute("min-width",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=cV,e.appendChild(t);let n=document.createElement("div");n.className=dV,n.innerHTML="<slot></slot>",e.appendChild(n)}},hV=`:host {
634
+ display: block;
635
+ margin-bottom: 12px;
636
+ }
637
+
638
+ .dt-stack-inner {
639
+ display: flex;
640
+ flex-direction: var(--flex-direction, column);
641
+ gap: var(--stack-gap, 12px);
642
+ align-items: var(--align-items, stretch);
643
+ }
644
+
645
+ :host([direction='column']) .dt-stack-inner {
646
+ --flex-direction: column;
647
+ }
648
+ :host([direction='row']) .dt-stack-inner {
649
+ --flex-direction: row;
650
+ }
651
+
652
+ :host([gap='0']) .dt-stack-inner {
653
+ --stack-gap: 0;
654
+ }
655
+ :host([gap='4']) .dt-stack-inner {
656
+ --stack-gap: 4px;
657
+ }
658
+ :host([gap='8']) .dt-stack-inner {
659
+ --stack-gap: 8px;
660
+ }
661
+ :host([gap='12']) .dt-stack-inner {
662
+ --stack-gap: 12px;
663
+ }
664
+ :host([gap='16']) .dt-stack-inner {
665
+ --stack-gap: 16px;
666
+ }
667
+ :host([gap='20']) .dt-stack-inner {
668
+ --stack-gap: 20px;
669
+ }
670
+ :host([gap='24']) .dt-stack-inner {
671
+ --stack-gap: 24px;
672
+ }
673
+ :host([gap='32']) .dt-stack-inner {
674
+ --stack-gap: 32px;
675
+ }
676
+
677
+ :host([align='start']) .dt-stack-inner {
678
+ --align-items: flex-start;
679
+ }
680
+ :host([align='center']) .dt-stack-inner {
681
+ --align-items: center;
682
+ }
683
+ :host([align='end']) .dt-stack-inner {
684
+ --align-items: flex-end;
685
+ }
686
+ :host([align='stretch']) .dt-stack-inner {
687
+ --align-items: stretch;
688
+ }
689
+
690
+ @media (max-width: 480px) {
691
+ :host([direction='row']) .dt-stack-inner {
692
+ --flex-direction: column;
693
+ }
694
+ }
695
+
696
+ ::slotted(*) {
697
+ min-width: 0;
698
+ }
699
+ `,pV="dt-stack-inner";function fp(e){return e==="row"||e==="horizontal"?"row":"column"}var mV=class extends HTMLElement{static get observedAttributes(){return["direction","gap","align"]}get direction(){return fp(this.getAttribute("direction"))}set direction(e){this.setAttribute("direction",fp(e))}get gap(){let e=this.getAttribute("gap");return e==="0"||e==="4"||e==="8"||e==="12"||e==="20"||e==="24"||e==="32"?e:"16"}set gap(e){this.setAttribute("gap",e)}get align(){let e=this.getAttribute("align");return e==="start"||e==="center"||e==="end"?e:"stretch"}set align(e){this.setAttribute("align",e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e==="direction"&&this.#e()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=hV,e.appendChild(t);let n=document.createElement("div");n.className=pV,n.innerHTML="<slot></slot>",e.appendChild(n)}#e(){let e=this.getAttribute("direction"),t=fp(e);e!==null&&e!==t&&this.setAttribute("direction",t)}},gV=`:host {
700
+ display: block;
701
+ }
702
+
703
+ .dt-stat-inner {
704
+ background: var(--dt-surface);
705
+ border: 1px solid var(--dt-accent);
706
+ border-radius: 2px;
707
+ padding: 12px;
708
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
709
+ display: flex;
710
+ flex-direction: column;
711
+ gap: 4px;
712
+ position: relative;
713
+ }
714
+
715
+ /* Corner accents */
716
+ .dt-stat-inner::before {
717
+ content: '';
718
+ position: absolute;
719
+ top: 0;
720
+ left: 0;
721
+ width: 6px;
722
+ height: 6px;
723
+ border-top: 1px solid var(--dt-accent);
724
+ border-left: 1px solid var(--dt-accent);
725
+ }
726
+
727
+ .dt-stat-inner .label {
728
+ font-size: 0.625rem;
729
+ font-weight: 600;
730
+ color: var(--dt-text-muted);
731
+ text-transform: uppercase;
732
+ letter-spacing: 0.12em;
733
+ }
734
+
735
+ .dt-stat-inner .value {
736
+ font-size: 1.5rem;
737
+ font-weight: 600;
738
+ color: var(--dt-accent);
739
+ line-height: 1.1;
740
+ white-space: nowrap;
741
+ overflow: hidden;
742
+ text-overflow: ellipsis;
743
+ font-family: var(--font-display, 'Sora', system-ui, sans-serif);
744
+ }
745
+
746
+ .dt-stat-inner .description {
747
+ font-size: 0.75rem;
748
+ color: var(--dt-text-secondary);
749
+ line-height: 1.3;
750
+ }
751
+
752
+ /* Size variants */
753
+ :host([size='sm']) .dt-stat-inner .value {
754
+ font-size: 1.125rem;
755
+ }
756
+
757
+ :host([size='sm']) .dt-stat-inner {
758
+ padding: 8px;
759
+ }
760
+
761
+ :host([size='lg']) .dt-stat-inner .value {
762
+ font-size: 2rem;
763
+ }
764
+
765
+ :host([size='lg']) .dt-stat-inner {
766
+ padding: 16px;
767
+ }
768
+
769
+ /* Variant: outlined */
770
+ :host([variant='outlined']) .dt-stat-inner {
771
+ background: transparent;
772
+ border-style: dashed;
773
+ }
774
+
775
+ /* Variant: filled */
776
+ :host([variant='filled']) .dt-stat-inner {
777
+ background: var(--dt-accent-subtle);
778
+ border-style: solid;
779
+ }
780
+
781
+ /* Trend indicators */
782
+ .dt-stat-inner .trend {
783
+ display: inline-flex;
784
+ align-items: center;
785
+ gap: 3px;
786
+ font-size: 0.6875rem;
787
+ font-weight: 600;
788
+ margin-top: 2px;
789
+ text-transform: uppercase;
790
+ letter-spacing: 0.05em;
791
+ }
792
+
793
+ .dt-stat-inner .trend.positive {
794
+ color: var(--dt-success);
795
+ }
796
+
797
+ .dt-stat-inner .trend.negative {
798
+ color: var(--dt-danger);
799
+ }
800
+
801
+ .dt-stat-inner .trend.neutral {
802
+ color: var(--dt-text-muted);
803
+ }
804
+ `,bV="dt-stat-inner",yV=class extends HTMLElement{static get observedAttributes(){return["label","value","description","size","variant","trend","trend-value"]}_container;_labelEl;_valueEl;_descEl;_trendEl;get label(){return this.getAttribute("label")}set label(e){e===null?this.removeAttribute("label"):this.setAttribute("label",e)}get value(){return this.getAttribute("value")}set value(e){e===null?this.removeAttribute("value"):this.setAttribute("value",e)}get description(){return this.getAttribute("description")}set description(e){e===null?this.removeAttribute("description"):this.setAttribute("description",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get variant(){let e=this.getAttribute("variant");return e==="outlined"||e==="filled"?e:"default"}set variant(e){this.setAttribute("variant",e)}get trend(){let e=this.getAttribute("trend");return e==="up"||e==="down"||e==="neutral"?e:null}set trend(e){e===null?this.removeAttribute("trend"):this.setAttribute("trend",e)}get trendValue(){return this.getAttribute("trend-value")}set trendValue(e){e===null?this.removeAttribute("trend-value"):this.setAttribute("trend-value",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=gV,e.appendChild(t),this._container=document.createElement("div"),this._container.className=bV,this._labelEl=document.createElement("div"),this._labelEl.className="label",this._container.appendChild(this._labelEl),this._valueEl=document.createElement("div"),this._valueEl.className="value",this._container.appendChild(this._valueEl),this._descEl=document.createElement("div"),this._descEl.className="description",this._container.appendChild(this._descEl),this._trendEl=document.createElement("div"),this._trendEl.className="trend",this._container.appendChild(this._trendEl),e.appendChild(this._container),this._render()}attributeChangedCallback(e,t,n){(e==="label"||e==="value"||e==="description"||e==="size"||e==="variant"||e==="trend"||e==="trend-value")&&this._render()}_render(){this._labelEl.textContent=this.label??"",this._labelEl.style.display=this.label?"block":"none",this._valueEl.textContent=this.value??"",this._valueEl.style.display=this.value?"block":"none",this._descEl.textContent=this.description??"",this._descEl.style.display=this.description?"block":"none";let e=this.trend,t=this.trendValue;if(e&&t){this._trendEl.style.display="inline-flex",this._trendEl.className=`trend ${e==="up"?"positive":e==="down"?"negative":"neutral"}`;let n="";e==="up"?n="↑":e==="down"?n="↓":n="→",this._trendEl.textContent=`${n} ${t}`}else this._trendEl.style.display="none"}},EV=`:host {
805
+ display: inline-flex;
806
+ vertical-align: middle;
807
+ }
808
+
809
+ .dt-badge-inner {
810
+ display: inline-flex;
811
+ align-items: center;
812
+ padding: 2px 6px;
813
+ border: 1px solid;
814
+ border-radius: 2px;
815
+ font-size: 0.6875rem;
816
+ font-weight: 600;
817
+ font-family: var(
818
+ --font-mono,
819
+ 'SF Mono',
820
+ Monaco,
821
+ 'Cascadia Code',
822
+ 'Roboto Mono',
823
+ Consolas,
824
+ monospace
825
+ );
826
+ line-height: 1.2;
827
+ white-space: nowrap;
828
+ text-transform: uppercase;
829
+ letter-spacing: 0.1em;
830
+ }
831
+
832
+ /* Variant: accent (default) */
833
+ :host([variant='accent']) .dt-badge-inner,
834
+ .dt-badge-inner {
835
+ background: var(--dt-accent-subtle);
836
+ border-color: var(--dt-accent);
837
+ color: var(--dt-accent);
838
+ }
839
+
840
+ /* Variant: success */
841
+ :host([variant='success']) .dt-badge-inner {
842
+ background: var(--dt-success-subtle);
843
+ border-color: var(--dt-success);
844
+ color: var(--dt-success);
845
+ }
846
+
847
+ /* Variant: danger */
848
+ :host([variant='danger']) .dt-badge-inner {
849
+ background: var(--dt-danger-subtle);
850
+ border-color: var(--dt-danger);
851
+ color: var(--dt-danger);
852
+ }
853
+
854
+ /* Variant: warning */
855
+ :host([variant='warning']) .dt-badge-inner {
856
+ background: var(--dt-warning-subtle);
857
+ border-color: var(--dt-warning);
858
+ color: var(--dt-warning);
859
+ }
860
+
861
+ /* Variant: info */
862
+ :host([variant='info']) .dt-badge-inner {
863
+ background: var(--dt-info-subtle);
864
+ border-color: var(--dt-info);
865
+ color: var(--dt-info);
866
+ }
867
+
868
+ /* Variant: default/neutral */
869
+ :host([variant='default']) .dt-badge-inner,
870
+ :host([variant='neutral']) .dt-badge-inner {
871
+ background: transparent;
872
+ border-color: var(--dt-border);
873
+ color: var(--dt-text-secondary);
874
+ }
875
+
876
+ /* Size variants */
877
+ :host([size='sm']) .dt-badge-inner {
878
+ padding: 1px 4px;
879
+ font-size: 0.625rem;
880
+ }
881
+
882
+ :host([size='lg']) .dt-badge-inner {
883
+ padding: 3px 8px;
884
+ font-size: 0.75rem;
885
+ }
886
+ `,xV="dt-badge-inner",vV=class extends HTMLElement{static get observedAttributes(){return["variant","size","text"]}_container;_slot;get variant(){let e=this.getAttribute("variant");return e==="success"||e==="danger"||e==="warning"||e==="info"||e==="default"||e==="neutral"?e:"accent"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get text(){return this.getAttribute("text")}set text(e){e===null?this.removeAttribute("text"):this.setAttribute("text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=EV,e.appendChild(t),this._container=document.createElement("span"),this._container.className=xV;let n=this.text;n!==null?this._container.textContent=n:(this._slot=document.createElement("slot"),this._container.appendChild(this._slot)),e.appendChild(this._container)}attributeChangedCallback(e,t,n){e==="text"&&this._render()}_render(){let e=this.text;e!==null&&(this._container.textContent=e)}},_V=`:host {
887
+ display: inline-flex;
888
+ vertical-align: middle;
889
+ }
890
+
891
+ .dt-button-inner {
892
+ display: inline-flex;
893
+ align-items: center;
894
+ justify-content: center;
895
+ gap: 4px;
896
+ padding: 6px 12px;
897
+ border: 1px solid var(--dt-accent);
898
+ border-radius: 2px;
899
+ font-size: 0.8125rem;
900
+ font-weight: 600;
901
+ font-family: var(--font-ui, 'Work Sans', system-ui, sans-serif);
902
+ line-height: 1.2;
903
+ cursor: pointer;
904
+ transition: all 0.1s ease;
905
+ background: var(--dt-surface);
906
+ color: var(--dt-accent);
907
+ text-transform: uppercase;
908
+ letter-spacing: 0.08em;
909
+ position: relative;
910
+ }
911
+
912
+ /* Corner accents */
913
+ .dt-button-inner::before {
914
+ content: '';
915
+ position: absolute;
916
+ top: 0;
917
+ left: 0;
918
+ width: 4px;
919
+ height: 4px;
920
+ border-top: 1px solid var(--dt-accent);
921
+ border-left: 1px solid var(--dt-accent);
922
+ }
923
+
924
+ .dt-button-inner::after {
925
+ content: '';
926
+ position: absolute;
927
+ bottom: 0;
928
+ right: 0;
929
+ width: 4px;
930
+ height: 4px;
931
+ border-bottom: 1px solid var(--dt-accent);
932
+ border-right: 1px solid var(--dt-accent);
933
+ }
934
+
935
+ .dt-button-inner:hover:not(:disabled) {
936
+ background: var(--dt-accent);
937
+ color: var(--dt-text-on-accent);
938
+ }
939
+
940
+ .dt-button-inner:hover:not(:disabled)::before,
941
+ .dt-button-inner:hover:not(:disabled)::after {
942
+ border-color: var(--dt-text-on-accent);
943
+ }
944
+
945
+ .dt-button-inner:active:not(:disabled) {
946
+ background: var(--dt-accent-active);
947
+ }
948
+
949
+ .dt-button-inner:disabled {
950
+ opacity: 0.4;
951
+ cursor: not-allowed;
952
+ border-color: var(--dt-border);
953
+ color: var(--dt-text-muted);
954
+ }
955
+
956
+ .dt-button-inner:disabled::before,
957
+ .dt-button-inner:disabled::after {
958
+ border-color: var(--dt-border);
959
+ }
960
+
961
+ /* Variant: primary - filled accent */
962
+ :host([variant='primary']) .dt-button-inner {
963
+ background: var(--dt-accent);
964
+ color: var(--dt-text-on-accent);
965
+ }
966
+
967
+ :host([variant='primary']) .dt-button-inner:hover:not(:disabled) {
968
+ background: var(--dt-accent-hover);
969
+ }
970
+
971
+ /* Variant: secondary - outlined */
972
+ :host([variant='secondary']) .dt-button-inner {
973
+ background: transparent;
974
+ border-color: var(--dt-border);
975
+ color: var(--dt-text);
976
+ }
977
+
978
+ :host([variant='secondary']) .dt-button-inner:hover:not(:disabled) {
979
+ background: var(--dt-surface-hover);
980
+ border-color: var(--dt-accent);
981
+ color: var(--dt-accent);
982
+ }
983
+
984
+ /* Variant: ghost - minimal */
985
+ :host([variant='ghost']) .dt-button-inner {
986
+ background: transparent;
987
+ border-color: transparent;
988
+ color: var(--dt-text-secondary);
989
+ }
990
+
991
+ :host([variant='ghost']) .dt-button-inner:hover:not(:disabled) {
992
+ background: var(--dt-surface);
993
+ border-color: var(--dt-border);
994
+ color: var(--dt-text);
995
+ }
996
+
997
+ :host([variant='ghost']) .dt-button-inner::before,
998
+ :host([variant='ghost']) .dt-button-inner::after {
999
+ display: none;
1000
+ }
1001
+
1002
+ /* Variant: danger */
1003
+ :host([variant='danger']) .dt-button-inner {
1004
+ background: transparent;
1005
+ border-color: var(--dt-danger);
1006
+ color: var(--dt-danger);
1007
+ }
1008
+
1009
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled) {
1010
+ background: var(--dt-danger);
1011
+ color: var(--dt-text-on-accent);
1012
+ }
1013
+
1014
+ :host([variant='danger']) .dt-button-inner::before,
1015
+ :host([variant='danger']) .dt-button-inner::after {
1016
+ border-color: var(--dt-danger);
1017
+ }
1018
+
1019
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled)::before,
1020
+ :host([variant='danger']) .dt-button-inner:hover:not(:disabled)::after {
1021
+ border-color: var(--dt-text-on-accent);
1022
+ }
1023
+
1024
+ /* Size: sm */
1025
+ :host([size='sm']) .dt-button-inner {
1026
+ padding: 4px 8px;
1027
+ font-size: 0.75rem;
1028
+ }
1029
+
1030
+ /* Size: lg */
1031
+ :host([size='lg']) .dt-button-inner {
1032
+ padding: 8px 16px;
1033
+ font-size: 0.875rem;
1034
+ }
1035
+
1036
+ :host([fullwidth]) .dt-button-inner {
1037
+ width: 100%;
1038
+ }
1039
+
1040
+ ::slotted([slot='icon']) {
1041
+ display: inline-flex;
1042
+ width: 1em;
1043
+ height: 1em;
1044
+ }
1045
+ `,TV="dt-button-inner",AV=class extends HTMLElement{static get observedAttributes(){return["variant","size","disabled","fullwidth","type"]}_button;_slot;get variant(){let e=this.getAttribute("variant");return e==="secondary"||e==="ghost"||e==="danger"?e:"primary"}set variant(e){this.setAttribute("variant",e)}get size(){let e=this.getAttribute("size");return e==="sm"||e==="lg"?e:"md"}set size(e){this.setAttribute("size",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get fullwidth(){return this.hasAttribute("fullwidth")}set fullwidth(e){e?this.setAttribute("fullwidth",""):this.removeAttribute("fullwidth")}get type(){let e=this.getAttribute("type");return e==="submit"||e==="reset"?e:"button"}set type(e){this.setAttribute("type",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=_V,e.appendChild(t),this._button=document.createElement("button"),this._button.className=TV,this._button.type=this.type,this._button.disabled=this.disabled,this._slot=document.createElement("slot"),this._button.appendChild(this._slot),this._button.addEventListener("click",()=>{if(this.type==="submit"&&!this.disabled){let n=this.closest("form");n&&n.requestSubmit()}}),e.appendChild(this._button)}attributeChangedCallback(e,t,n){switch(e){case"disabled":this._button.disabled=this.disabled;break;case"type":this._button.type=this.type;break}}},wV=`:host {
1046
+ display: block;
1047
+ }
1048
+
1049
+ .dt-divider-inner {
1050
+ border: none;
1051
+ margin: 0;
1052
+ flex-shrink: 0;
1053
+ }
1054
+
1055
+ /* Horizontal (default) */
1056
+ :host([direction='horizontal']) .dt-divider-inner,
1057
+ .dt-divider-inner {
1058
+ width: 100%;
1059
+ height: 1px;
1060
+ background: var(--dt-accent);
1061
+ opacity: 0.5;
1062
+ }
1063
+
1064
+ /* Vertical */
1065
+ :host([direction='vertical']) .dt-divider-inner {
1066
+ width: 1px;
1067
+ height: 100%;
1068
+ min-height: 1em;
1069
+ background: var(--dt-accent);
1070
+ opacity: 0.5;
1071
+ }
1072
+
1073
+ /* Style variants */
1074
+ :host([style-variant='subtle']) .dt-divider-inner {
1075
+ background: var(--dt-border);
1076
+ opacity: 1;
1077
+ }
1078
+
1079
+ :host([style-variant='strong']) .dt-divider-inner {
1080
+ background: var(--dt-accent);
1081
+ opacity: 1;
1082
+ height: 2px;
1083
+ }
1084
+
1085
+ :host([direction='vertical'][style-variant='strong']) .dt-divider-inner {
1086
+ width: 2px;
1087
+ height: 100%;
1088
+ }
1089
+
1090
+ /* Spacing */
1091
+ :host([spacing='sm']) .dt-divider-inner {
1092
+ margin: 6px 0;
1093
+ }
1094
+ :host([spacing='md']) .dt-divider-inner {
1095
+ margin: 12px 0;
1096
+ }
1097
+ :host([spacing='lg']) .dt-divider-inner {
1098
+ margin: 18px 0;
1099
+ }
1100
+
1101
+ :host([direction='vertical'][spacing='sm']) .dt-divider-inner {
1102
+ margin: 0 6px;
1103
+ }
1104
+ :host([direction='vertical'][spacing='md']) .dt-divider-inner {
1105
+ margin: 0 12px;
1106
+ }
1107
+ :host([direction='vertical'][spacing='lg']) .dt-divider-inner {
1108
+ margin: 0 18px;
1109
+ }
1110
+ `,SV="dt-divider-inner",kV=class extends HTMLElement{static get observedAttributes(){return["direction","style-variant","spacing"]}get direction(){return this.getAttribute("direction")==="vertical"?"vertical":"horizontal"}set direction(e){this.setAttribute("direction",e)}get styleVariant(){let e=this.getAttribute("style-variant");return e==="subtle"||e==="strong"?e:"default"}set styleVariant(e){this.setAttribute("style-variant",e)}get spacing(){let e=this.getAttribute("spacing");return e==="sm"||e==="md"||e==="lg"?e:null}set spacing(e){e===null?this.removeAttribute("spacing"):this.setAttribute("spacing",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=wV,e.appendChild(t);let n=document.createElement("hr");n.className=SV,e.appendChild(n)}},CV=`:host {
1111
+ display: block;
1112
+ min-height: 180px;
1113
+ color: var(--dt-text);
1114
+ font-family: var(
1115
+ --font-mono,
1116
+ 'SF Mono',
1117
+ Monaco,
1118
+ 'Cascadia Code',
1119
+ 'Roboto Mono',
1120
+ Consolas,
1121
+ monospace
1122
+ );
1123
+ }
1124
+
1125
+ .dt-table-view {
1126
+ display: flex;
1127
+ flex-direction: column;
1128
+ min-height: inherit;
1129
+ height: 100%;
1130
+ overflow: hidden;
1131
+ background: var(--dt-surface);
1132
+ border: 1px solid var(--dt-border);
1133
+ border-radius: 2px;
1134
+ position: relative;
1135
+ }
1136
+
1137
+ .dt-table-view::before,
1138
+ .dt-table-view::after {
1139
+ content: '';
1140
+ position: absolute;
1141
+ width: 8px;
1142
+ height: 8px;
1143
+ pointer-events: none;
1144
+ z-index: 3;
1145
+ }
1146
+
1147
+ .dt-table-view::before {
1148
+ top: -1px;
1149
+ left: -1px;
1150
+ border-top: 2px solid var(--dt-accent);
1151
+ border-left: 2px solid var(--dt-accent);
1152
+ }
1153
+
1154
+ .dt-table-view::after {
1155
+ right: -1px;
1156
+ bottom: -1px;
1157
+ border-right: 2px solid var(--dt-accent);
1158
+ border-bottom: 2px solid var(--dt-accent);
1159
+ }
1160
+
1161
+ .dt-table-scroll {
1162
+ min-height: inherit;
1163
+ height: 100%;
1164
+ overflow: auto;
1165
+ }
1166
+
1167
+ .dt-table-header,
1168
+ .dt-table-row {
1169
+ display: grid;
1170
+ grid-template-columns: var(--dt-table-columns, minmax(0, 1fr));
1171
+ min-width: fit-content;
1172
+ }
1173
+
1174
+ .dt-table-header {
1175
+ position: sticky;
1176
+ top: 0;
1177
+ z-index: 2;
1178
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1179
+ border-bottom: 1px solid var(--dt-border);
1180
+ }
1181
+
1182
+ .dt-table-header-cell,
1183
+ .dt-table-cell {
1184
+ min-width: 0;
1185
+ padding: 10px 12px;
1186
+ overflow: hidden;
1187
+ text-overflow: ellipsis;
1188
+ white-space: nowrap;
1189
+ font-size: 0.8125rem;
1190
+ }
1191
+
1192
+ .dt-table-header-cell {
1193
+ color: var(--dt-accent);
1194
+ font-size: 0.75rem;
1195
+ font-weight: 600;
1196
+ letter-spacing: 0.1em;
1197
+ text-transform: uppercase;
1198
+ }
1199
+
1200
+ .dt-table-header-cell--sortable {
1201
+ cursor: pointer;
1202
+ user-select: none;
1203
+ }
1204
+
1205
+ .dt-table-header-cell--sortable:hover {
1206
+ background: var(--dt-surface-hover);
1207
+ }
1208
+
1209
+ .dt-table-header-label {
1210
+ display: inline-flex;
1211
+ align-items: center;
1212
+ gap: 6px;
1213
+ }
1214
+
1215
+ .dt-table-sort-indicator {
1216
+ color: var(--dt-text-secondary);
1217
+ font-size: 0.7rem;
1218
+ }
1219
+
1220
+ .dt-table-body {
1221
+ position: relative;
1222
+ }
1223
+
1224
+ .dt-table-canvas {
1225
+ position: relative;
1226
+ }
1227
+
1228
+ .dt-table-row {
1229
+ position: absolute;
1230
+ left: 0;
1231
+ right: 0;
1232
+ border-bottom: 1px solid var(--dt-border-subtle);
1233
+ }
1234
+
1235
+ .dt-table-row--clickable {
1236
+ cursor: pointer;
1237
+ }
1238
+
1239
+ .dt-table-row--clickable:hover {
1240
+ background: var(--dt-surface-hover);
1241
+ }
1242
+
1243
+ :host([striped]) .dt-table-row:nth-child(even) {
1244
+ background: color-mix(in srgb, var(--dt-surface) 92%, var(--dt-accent) 8%);
1245
+ }
1246
+
1247
+ :host([bordered]) .dt-table-header-cell,
1248
+ :host([bordered]) .dt-table-cell {
1249
+ border-right: 1px solid var(--dt-border-subtle);
1250
+ }
1251
+
1252
+ :host([bordered]) .dt-table-header-cell:last-child,
1253
+ :host([bordered]) .dt-table-cell:last-child {
1254
+ border-right: 0;
1255
+ }
1256
+
1257
+ .dt-table-cell[data-align='center'],
1258
+ .dt-table-header-cell[data-align='center'] {
1259
+ text-align: center;
1260
+ }
1261
+
1262
+ .dt-table-cell[data-align='right'],
1263
+ .dt-table-header-cell[data-align='right'] {
1264
+ text-align: right;
1265
+ }
1266
+
1267
+ .dt-table-empty {
1268
+ display: flex;
1269
+ align-items: center;
1270
+ justify-content: center;
1271
+ min-height: 140px;
1272
+ padding: 20px;
1273
+ color: var(--dt-text-muted);
1274
+ text-transform: uppercase;
1275
+ letter-spacing: 0.08em;
1276
+ font-size: 0.75rem;
1277
+ }
1278
+ `;function NV(e){return e==null||e===!1?null:e===!0?"":String(e)}function RV(e,t){let n=e.querySelectorAll("*");for(let a of n){let s=a.getAttribute("data-field");if(s){let l=t[s];a.textContent=l==null?"":String(l)}for(let l of a.getAttributeNames()){if(l==="data-field"||!l.startsWith("data-field-"))continue;let u=l.slice(11);if(!u)continue;let d=a.getAttribute(l);if(!d)continue;let f=NV(t[d]);f===null?a.removeAttribute(u):a.setAttribute(u,f)}}}function a6(e,t){let n=e.content.cloneNode(!0);return RV(n,t),n}var i6=class{_count=0;_estimateSize=56;_overscan=5;_fixedSize=null;_viewportHeight=0;_scrollTop=0;_sizes=new Map;constructor(e={}){this._count=e.count??0,this._estimateSize=e.estimateSize??56,this._overscan=e.overscan??5,this._fixedSize=e.fixedSize??null}setCount(e){this._count=Math.max(0,e);for(let t of this._sizes.keys())t>=this._count&&this._sizes.delete(t)}setViewportHeight(e){this._viewportHeight=Math.max(0,e)}setScrollTop(e){this._scrollTop=Math.max(0,e)}setEstimateSize(e){this._estimateSize=Math.max(1,e)}setFixedSize(e){this._fixedSize=e&&e>0?e:null}resetMeasurements(){this._sizes.clear()}measure(e,t){if(this._fixedSize!==null||e<0||e>=this._count)return 0;let n=Math.max(1,Math.round(t)),a=this._sizes.get(e);return a===n?0:(this._sizes.set(e,n),this.getOffset(e+1)<=this._scrollTop?n-(a??this._estimateSize):0)}getOffset(e){if(e<=0)return 0;let t=Math.min(e,this._count);if(this._fixedSize!==null)return t*this._fixedSize;let n=0;for(let a=0;a<t;a+=1)n+=this._sizes.get(a)??this._estimateSize;return n}getTotalHeight(){return this.getOffset(this._count)}getRange(){if(this._count===0)return{start:0,end:0,paddingTop:0,paddingBottom:0,totalHeight:0};if(this._fixedSize!==null){let d=Math.max(1,Math.ceil(this._viewportHeight/this._fixedSize)),f=Math.max(0,Math.floor(this._scrollTop/this._fixedSize)-this._overscan),h=Math.min(this._count,f+d+this._overscan*2),m=f*this._fixedSize,b=this._count*this._fixedSize,E=Math.max(0,b-m-(h-f)*this._fixedSize);return{start:f,end:h,paddingTop:m,paddingBottom:E,totalHeight:b}}let e=0,t=0;for(;e<this._count;){let d=this._sizes.get(e)??this._estimateSize;if(t+d>this._scrollTop)break;t+=d,e+=1}e=Math.max(0,e-this._overscan);let n=this.getOffset(e),a=e,s=0;for(;a<this._count&&s<this._viewportHeight;)s+=this._sizes.get(a)??this._estimateSize,a+=1;a=Math.min(this._count,a+this._overscan);let l=this.getTotalHeight(),u=Math.max(0,l-this.getOffset(a));return{start:e,end:a,paddingTop:n,paddingBottom:u,totalHeight:l}}};function OV(e){return e&&typeof e=="object"?e:{value:e}}function LV(e){return e==="center"||e==="right"?e:"left"}var s6=class extends HTMLElement{static get observedAttributes(){return["field","header","width","min-width","align"]}get field(){return this.getAttribute("field")??""}get header(){return this.getAttribute("header")??this.field}get width(){return this.getAttribute("width")??"auto"}get minWidth(){return this.getAttribute("min-width")??"0"}get align(){return LV(this.getAttribute("align"))}connectedCallback(){this.hidden=!0}attributeChangedCallback(){this.dispatchEvent(new CustomEvent("dt-column-change",{bubbles:!0,composed:!0}))}},IV=class extends HTMLElement{_rows=[];_columns=[];_virtualizer=new i6({estimateSize:40,overscan:5,fixedSize:40});_root;_scroll;_header;_body;_canvas;_emptyState;_resizeObserver=null;_mutationObserver=null;_sortField=null;_sortDirection="asc";static get observedAttributes(){return["row-height","sortable","striped","bordered","empty-text"]}get rows(){return this._rows}set rows(e){this._rows=Array.isArray(e)?e:[],this._virtualizer.setCount(this._rows.length),this._render()}get rowHeight(){let e=Number(this.getAttribute("row-height")??"40");return Number.isFinite(e)&&e>0?e:40}set rowHeight(e){this.setAttribute("row-height",String(e))}get sortable(){return this.hasAttribute("sortable")}get emptyText(){return this.getAttribute("empty-text")??"No data"}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=CV,e.appendChild(t),this._root=document.createElement("div"),this._root.className="dt-table-view",this._scroll=document.createElement("div"),this._scroll.className="dt-table-scroll",this._scroll.addEventListener("scroll",this._onScroll,{passive:!0}),this._header=document.createElement("div"),this._header.className="dt-table-header",this._body=document.createElement("div"),this._body.className="dt-table-body",this._canvas=document.createElement("div"),this._canvas.className="dt-table-canvas",this._emptyState=document.createElement("div"),this._emptyState.className="dt-table-empty",this._body.append(this._canvas,this._emptyState),this._scroll.append(this._header,this._body),this._root.appendChild(this._scroll),e.appendChild(this._root)}connectedCallback(){this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight),this._syncColumns(),this._resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this._scroll){let n=this._header.offsetHeight;this._virtualizer.setViewportHeight(Math.max(0,t.contentRect.height-n)),this._render()}}),this._resizeObserver.observe(this._scroll),this._mutationObserver=new MutationObserver(()=>{this._syncColumns(),this._render()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["field","header","width","min-width","align"]}),this._virtualizer.setCount(this._rows.length),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight)),this._render()}disconnectedCallback(){this._scroll.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this._resizeObserver=null,this._mutationObserver=null}attributeChangedCallback(e){e==="row-height"&&(this._virtualizer.setFixedSize(this.rowHeight),this._virtualizer.setEstimateSize(this.rowHeight)),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._renderBody()};_syncColumns(){this._columns=Array.from(this.children).filter(e=>e instanceof s6).map(e=>({field:e.field,header:e.header,width:e.width,minWidth:e.minWidth,align:e.align,template:Array.from(e.children).find(t=>t instanceof HTMLTemplateElement)??null})).filter(e=>e.field)}_render(){if(!this.isConnected)return;this._emptyState.textContent=this.emptyText;let e=this._columns.length>0?this._columns.map(t=>this._toGridColumn(t)).join(" "):"minmax(0, 1fr)";this._header.style.setProperty("--dt-table-columns",e),this._canvas.style.setProperty("--dt-table-columns",e),this._renderHeader(),this._renderBody()}_renderHeader(){let e=document.createDocumentFragment();for(let t of this._columns){let n=document.createElement("div");n.className="dt-table-header-cell",n.dataset.align=t.align,this.sortable&&(n.classList.add("dt-table-header-cell--sortable"),n.tabIndex=0,n.setAttribute("role","button"),n.setAttribute("aria-label",`Sort by ${t.header}`),n.addEventListener("click",()=>this._requestSort(t.field)),n.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),this._requestSort(t.field))}));let a=document.createElement("span");if(a.className="dt-table-header-label",a.textContent=t.header,this.sortable){let s=document.createElement("span");s.className="dt-table-sort-indicator",this._sortField===t.field?s.textContent=this._sortDirection==="asc"?"▲":"▼":s.textContent="↕",a.appendChild(s)}n.appendChild(a),e.appendChild(n)}this._header.replaceChildren(e)}_renderBody(){if(this._rows.length===0||this._columns.length===0){this._emptyState.hidden=!1,this._canvas.replaceChildren(),this._body.style.height="140px",this._canvas.style.height="0px";return}this._emptyState.hidden=!0,this._virtualizer.setCount(this._rows.length),this._virtualizer.setScrollTop(Math.max(0,this._scroll.scrollTop-this._header.offsetHeight)),this._virtualizer.setViewportHeight(Math.max(0,this._scroll.clientHeight-this._header.offsetHeight));let e=this._virtualizer.getRange();this._body.style.height=`${Math.max(e.totalHeight,this._scroll.clientHeight-this._header.offsetHeight)}px`,this._canvas.style.height=`${e.totalHeight}px`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderRow(n));this._canvas.replaceChildren(t)}_renderRow(e){let t=this._rows[e],n=document.createElement("div");n.className="dt-table-row dt-table-row--clickable",n.style.top=`${this._virtualizer.getOffset(e)}px`,n.style.height=`${this.rowHeight}px`,n.style.setProperty("--dt-table-columns",this._header.style.getPropertyValue("--dt-table-columns")),n.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("dt-row-click",{detail:{row:t,index:e},bubbles:!0,composed:!0}))});let a=OV(t);for(let s of this._columns){let l=document.createElement("div");if(l.className="dt-table-cell",l.dataset.align=s.align,s.template)l.appendChild(a6(s.template,a));else{let u=a[s.field];l.textContent=u==null?"":String(u)}n.appendChild(l)}return n}_requestSort(e){this._sortField===e?this._sortDirection=this._sortDirection==="asc"?"desc":"asc":(this._sortField=e,this._sortDirection="asc"),this._renderHeader(),this.dispatchEvent(new CustomEvent("dt-sort",{detail:{field:e,direction:this._sortDirection},bubbles:!0,composed:!0}))}_toGridColumn(e){let t=/^\d+$/.test(e.minWidth)?`${e.minWidth}px`:e.minWidth;if(e.width==="auto")return`minmax(${t}, 1fr)`;let n=/^\d+$/.test(e.width)?`${e.width}px`:e.width;return`minmax(${t}, ${n})`}},MV=`:host {
1279
+ display: block;
1280
+ min-height: 120px;
1281
+ color: var(--dt-text);
1282
+ font-family: var(
1283
+ --font-mono,
1284
+ 'SF Mono',
1285
+ Monaco,
1286
+ 'Cascadia Code',
1287
+ 'Roboto Mono',
1288
+ Consolas,
1289
+ monospace
1290
+ );
1291
+ }
1292
+
1293
+ .dt-list-view {
1294
+ position: relative;
1295
+ display: block;
1296
+ min-height: inherit;
1297
+ height: 100%;
1298
+ overflow: auto;
1299
+ background: var(--dt-surface);
1300
+ border: 1px solid var(--dt-border);
1301
+ border-radius: 2px;
1302
+ }
1303
+
1304
+ .dt-list-view::before,
1305
+ .dt-list-view::after {
1306
+ content: '';
1307
+ position: sticky;
1308
+ z-index: 2;
1309
+ width: 8px;
1310
+ height: 8px;
1311
+ pointer-events: none;
1312
+ }
1313
+
1314
+ .dt-list-view::before {
1315
+ top: 0;
1316
+ left: 0;
1317
+ display: block;
1318
+ border-top: 2px solid var(--dt-accent);
1319
+ border-left: 2px solid var(--dt-accent);
1320
+ }
1321
+
1322
+ .dt-list-view::after {
1323
+ right: 0;
1324
+ bottom: 0;
1325
+ float: right;
1326
+ border-right: 2px solid var(--dt-accent);
1327
+ border-bottom: 2px solid var(--dt-accent);
1328
+ }
1329
+
1330
+ .dt-list-spacer {
1331
+ position: relative;
1332
+ min-height: 100%;
1333
+ }
1334
+
1335
+ .dt-list-items {
1336
+ position: relative;
1337
+ }
1338
+
1339
+ .dt-list-item {
1340
+ box-sizing: border-box;
1341
+ width: 100%;
1342
+ padding: 12px;
1343
+ color: inherit;
1344
+ }
1345
+
1346
+ .dt-list-item--interactive {
1347
+ cursor: pointer;
1348
+ }
1349
+
1350
+ .dt-list-item--interactive:hover {
1351
+ background: var(--dt-surface-hover);
1352
+ }
1353
+
1354
+ .dt-list-item--selected {
1355
+ background: var(--dt-accent-subtle);
1356
+ }
1357
+
1358
+ :host([dividers]) .dt-list-item {
1359
+ border-bottom: 1px solid var(--dt-border-subtle);
1360
+ }
1361
+
1362
+ :host([dividers]) .dt-list-item:last-child {
1363
+ border-bottom: 0;
1364
+ }
1365
+
1366
+ .dt-list-empty {
1367
+ display: flex;
1368
+ align-items: center;
1369
+ justify-content: center;
1370
+ min-height: 120px;
1371
+ padding: 20px;
1372
+ color: var(--dt-text-muted);
1373
+ text-transform: uppercase;
1374
+ letter-spacing: 0.08em;
1375
+ font-size: 0.75rem;
1376
+ }
1377
+ `,Cv=56;function DV(e){return e&&typeof e=="object"?e:{value:e}}var BV=class extends HTMLElement{_items=[];_selectedIndices=new Set;_renderItem=null;_virtualizer=new i6({estimateSize:Cv,overscan:5});_viewport;_spacer;_itemsLayer;_emptyState;_resizeObserver=null;_itemResizeObserver=null;static get observedAttributes(){return["item-height","dividers","selectable","empty-text"]}get items(){return this._items}set items(e){this._items=Array.isArray(e)?e:[],this._selectedIndices=new Set([...this._selectedIndices].filter(t=>t<this._items.length)),this._virtualizer.setCount(this._items.length),this._syncSizingMode(!0),this._render()}get selectedItems(){return[...this._selectedIndices].sort((e,t)=>e-t).map(e=>this._items[e])}get renderItem(){return this._renderItem}set renderItem(e){this._renderItem=typeof e=="function"?e:null,this._render()}get itemHeight(){let e=this.getAttribute("item-height");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}set itemHeight(e){if(e===null||e<=0){this.removeAttribute("item-height");return}this.setAttribute("item-height",String(e))}get selectable(){let e=this.getAttribute("selectable");return e==="single"||e==="multi"?e:"none"}set selectable(e){this.setAttribute("selectable",e)}get emptyText(){return this.getAttribute("empty-text")??"No items"}set emptyText(e){this.setAttribute("empty-text",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=MV,e.appendChild(t),this._viewport=document.createElement("div"),this._viewport.className="dt-list-view",this._viewport.addEventListener("scroll",this._onScroll,{passive:!0}),this._spacer=document.createElement("div"),this._spacer.className="dt-list-spacer",this._itemsLayer=document.createElement("div"),this._itemsLayer.className="dt-list-items",this._emptyState=document.createElement("div"),this._emptyState.className="dt-list-empty",this._spacer.append(this._itemsLayer,this._emptyState),this._viewport.appendChild(this._spacer),e.appendChild(this._viewport)}connectedCallback(){this._resizeObserver=new ResizeObserver(e=>{for(let t of e)t.target===this._viewport&&(this._virtualizer.setViewportHeight(t.contentRect.height),this._render())}),this._resizeObserver.observe(this._viewport),this._itemResizeObserver=new ResizeObserver(e=>{let t=0;for(let n of e){let a=n.target,s=Number(a.dataset.index);Number.isFinite(s)&&(t+=this._virtualizer.measure(s,n.contentRect.height))}t!==0&&(this._viewport.scrollTop+=t),e.length>0&&this._render()}),this._virtualizer.setCount(this._items.length),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._syncSizingMode(!1),this._render()}disconnectedCallback(){this._viewport.removeEventListener("scroll",this._onScroll),this._resizeObserver?.disconnect(),this._itemResizeObserver?.disconnect(),this._resizeObserver=null,this._itemResizeObserver=null}attributeChangedCallback(e){e==="item-height"&&this._syncSizingMode(!0),e==="selectable"&&this.selectable==="none"&&this._selectedIndices.size>0&&(this._selectedIndices.clear(),this._emitSelectionChange()),this._render()}_onScroll=()=>{this._virtualizer.setScrollTop(this._viewport.scrollTop),this._render()};_syncSizingMode(e){let t=this.itemHeight;this._virtualizer.setFixedSize(t),this._virtualizer.setEstimateSize(t??Cv),e&&this._virtualizer.resetMeasurements()}_render(){if(!this.isConnected)return;if(this._emptyState.textContent=this.emptyText,this._emptyState.hidden=this._items.length>0,this._items.length===0){this._itemsLayer.replaceChildren(),this._spacer.style.height="100%";return}this._virtualizer.setScrollTop(this._viewport.scrollTop),this._virtualizer.setViewportHeight(this._viewport.clientHeight),this._virtualizer.setCount(this._items.length);let e=this._virtualizer.getRange();this._spacer.style.height=`${Math.max(e.totalHeight,this._viewport.clientHeight)}px`,this._itemsLayer.style.transform=`translateY(${e.paddingTop}px)`;let t=document.createDocumentFragment();for(let n=e.start;n<e.end;n+=1)t.appendChild(this._renderVisibleItem(n));this._itemsLayer.replaceChildren(t)}_renderVisibleItem(e){let t=this._items[e],n=document.createElement("div");if(n.className="dt-list-item",n.dataset.index=String(e),this.selectable!=="none"&&(n.classList.add("dt-list-item--interactive"),n.setAttribute("role","option"),n.setAttribute("aria-selected",String(this._selectedIndices.has(e))),n.tabIndex=0),this._selectedIndices.has(e)&&n.classList.add("dt-list-item--selected"),this.itemHeight!==null&&(n.style.minHeight=`${this.itemHeight}px`),this._renderItem)this._renderItem(t,n,e);else{let a=this._getTemplate();a?n.appendChild(a6(a,DV(t))):n.textContent=String(t??"")}return n.addEventListener("click",()=>this._handleItemClick(e)),n.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this._handleItemClick(e))}),this.itemHeight===null&&this._itemResizeObserver?.observe(n),n}_handleItemClick(e){let t=this._items[e],n=this.selectable;n==="single"?(this._selectedIndices=new Set([e]),this._emitSelectionChange(),this._render()):n==="multi"&&(this._selectedIndices.has(e)?this._selectedIndices.delete(e):this._selectedIndices.add(e),this._emitSelectionChange(),this._render()),this.dispatchEvent(new CustomEvent("dt-item-click",{detail:{item:t,index:e},bubbles:!0,composed:!0}))}_emitSelectionChange(){this.dispatchEvent(new CustomEvent("dt-selection-change",{detail:{selected:this.selectedItems},bubbles:!0,composed:!0}))}_getTemplate(){for(let e of Array.from(this.children))if(e instanceof HTMLTemplateElement)return e;return null}},zV=`:host {
1378
+ display: block;
1379
+ min-height: 220px;
1380
+ color: var(--dt-text);
1381
+ font-family: var(
1382
+ --font-mono,
1383
+ 'SF Mono',
1384
+ Monaco,
1385
+ 'Cascadia Code',
1386
+ 'Roboto Mono',
1387
+ Consolas,
1388
+ monospace
1389
+ );
1390
+ }
1391
+
1392
+ .dt-chart {
1393
+ position: relative;
1394
+ display: block;
1395
+ min-height: inherit;
1396
+ height: 100%;
1397
+ overflow: hidden;
1398
+ border: 1px solid var(--dt-border);
1399
+ border-radius: 2px;
1400
+ background:
1401
+ radial-gradient(
1402
+ circle at top left,
1403
+ color-mix(in srgb, var(--dt-accent) 16%, transparent),
1404
+ transparent 42%
1405
+ ),
1406
+ linear-gradient(
1407
+ 180deg,
1408
+ color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%),
1409
+ var(--dt-surface)
1410
+ );
1411
+ }
1412
+
1413
+ .dt-chart::before,
1414
+ .dt-chart::after {
1415
+ content: '';
1416
+ position: absolute;
1417
+ z-index: 3;
1418
+ width: 8px;
1419
+ height: 8px;
1420
+ pointer-events: none;
1421
+ }
1422
+
1423
+ .dt-chart::before {
1424
+ top: -1px;
1425
+ left: -1px;
1426
+ border-top: 2px solid var(--dt-accent);
1427
+ border-left: 2px solid var(--dt-accent);
1428
+ }
1429
+
1430
+ .dt-chart::after {
1431
+ right: -1px;
1432
+ bottom: -1px;
1433
+ border-right: 2px solid var(--dt-accent);
1434
+ border-bottom: 2px solid var(--dt-accent);
1435
+ }
1436
+
1437
+ .dt-chart__canvas {
1438
+ position: relative;
1439
+ z-index: 1;
1440
+ display: block;
1441
+ width: 100%;
1442
+ height: 100%;
1443
+ }
1444
+
1445
+ .dt-chart__status {
1446
+ position: absolute;
1447
+ inset: 0;
1448
+ z-index: 2;
1449
+ display: flex;
1450
+ align-items: center;
1451
+ justify-content: center;
1452
+ padding: 20px;
1453
+ color: var(--dt-text-muted);
1454
+ font-size: 0.75rem;
1455
+ letter-spacing: 0.08em;
1456
+ text-align: center;
1457
+ text-transform: uppercase;
1458
+ background: color-mix(in srgb, var(--dt-surface) 72%, transparent);
1459
+ }
1460
+
1461
+ .dt-chart__status[hidden] {
1462
+ display: none;
1463
+ }
1464
+ `,hp=null;function PV(){return window.__DtChart?Promise.resolve(window.__DtChart):hp||(hp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/chart.umd.js",n.async=!0,n.dataset.dtChart="true",n.onload=()=>{if(window.__DtChart){e(window.__DtChart);return}t(new Error("Chart runtime loaded without a __DtChart export."))},n.onerror=()=>t(new Error("Failed to load the Chart.js runtime bundle.")),document.head.appendChild(n)}),hp)}function Mo(e,t,n){return Math.min(n,Math.max(t,e))}function HV(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function cm(e){let t=e.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(t){let s=t[1],l=s.length===3?s.split("").map(h=>`${h}${h}`).join(""):s,u=parseInt(l.slice(0,2),16)/255,d=parseInt(l.slice(2,4),16)/255,f=parseInt(l.slice(4,6),16)/255;return Nv(u,d,f)}let n=e.trim().match(/^rgba?\((\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)[,\s]+(\d+(?:\.\d+)?)(?:[,/\s]+[\d.]+)?\)$/i);if(n)return Nv(Number(n[1])/255,Number(n[2])/255,Number(n[3])/255);let a=e.trim().match(/^hsla?\(([-\d.]+)(?:deg)?[,\s]+([\d.]+)%[,\s]+([\d.]+)%(?:[,/\s]+[\d.]+)?\)$/i);return a?{h:(Number(a[1])%360+360)%360,s:Mo(Number(a[2]),0,100),l:Mo(Number(a[3]),0,100)}:null}function Nv(e,t,n){let a=Math.max(e,t,n),s=Math.min(e,t,n),l=a-s,u=0,d=(a+s)/2,f=l===0?0:l/(1-Math.abs(2*d-1));if(l!==0)switch(a){case e:u=60*((t-n)/l%6);break;case t:u=60*((n-e)/l+2);break;default:u=60*((e-t)/l+4);break}return{h:(u+360)%360,s:Math.round(f*100),l:Math.round(d*100)}}function Ms(e,t=1){return`hsla(${Math.round(e.h)} ${Math.round(e.s)}% ${Math.round(e.l)}% / ${t})`}function UV(e){let t=cm(e)??{h:185,s:88,l:56};return[0,32,68,118,164,212,258,304].map((n,a)=>({h:(t.h+n)%360,s:Mo(t.s-a*2,55,90),l:Mo(t.l+(a%2===0?0:6)-a,38,66)}))}function Mc(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function l6(e,t){if(!Mc(e)||!Mc(t))return t??e;let n={...e};for(let[a,s]of Object.entries(t)){let l=n[a];n[a]=Mc(l)&&Mc(s)?l6(l,s):s}return n}function jV(e){return e==="top"||e==="bottom"||e==="left"||e==="right"?e:"none"}function FV(e){return e==="bar"||e==="line"||e==="area"||e==="pie"||e==="doughnut"||e==="radar"||e==="scatter"||e==="bubble"?e:"bar"}function $V(e){return e==="bar"||e==="line"||e==="area"||e==="scatter"||e==="bubble"}function qV(e){return e.map(t=>t.trim()).filter(Boolean)}var YV=class extends HTMLElement{_canvas;_status;_runtime=null;_loadPromise=null;_chart=null;_renderedType=null;_dataInput=null;_optionsOverride=null;_syncFrame=0;static get observedAttributes(){return["type","legend","stacked","labels"]}get type(){return FV(this.getAttribute("type"))}set type(e){this.setAttribute("type",e)}get legend(){return jV(this.getAttribute("legend"))}set legend(e){this.setAttribute("legend",e)}get stacked(){return this.hasAttribute("stacked")}set stacked(e){this.toggleAttribute("stacked",e)}get labels(){return qV(HV(this.getAttribute("labels")))}set labels(e){this.setAttribute("labels",e.join(","))}get data(){return this._dataInput}set data(e){this._dataInput=e?structuredClone(e):null,this._scheduleSync()}get options(){return this._optionsOverride}set options(e){this._optionsOverride=e?structuredClone(e):null,this._renderChart()}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=zV,e.appendChild(t);let n=document.createElement("div");n.className="dt-chart",this._canvas=document.createElement("canvas"),this._canvas.className="dt-chart__canvas",this._status=document.createElement("div"),this._status.className="dt-chart__status",this._status.textContent="Loading chart",n.append(this._canvas,this._status),e.appendChild(n)}connectedCallback(){this._canvas.addEventListener("click",this._handleCanvasClick),this._ensureRuntime().then(()=>this._renderChart()),this._scheduleSync()}disconnectedCallback(){this._canvas.removeEventListener("click",this._handleCanvasClick),this._syncFrame!==0&&(cancelAnimationFrame(this._syncFrame),this._syncFrame=0),this._chart?.destroy(),this._chart=null,this._renderedType=null}attributeChangedCallback(){this._scheduleSync()}_handleCanvasClick=e=>{if(!this._chart)return;let t=this._chart.getElementsAtEventForMode(e,"nearest",{intersect:!0},!0)[0];if(!t)return;let n=Array.isArray(this._chart.data.labels)?this._chart.data.labels[t.index]??null:null,a=this._chart.data.datasets[t.datasetIndex],s=Array.isArray(a?.data)?a.data[t.index]:void 0;this.dispatchEvent(new CustomEvent("dt-chart-click",{bubbles:!0,composed:!0,detail:{label:n,datasetIndex:t.datasetIndex,index:t.index,value:s}}))};_scheduleSync(){this._syncFrame===0&&(this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncFromCurrentSource()}))}_syncFromCurrentSource(){this._renderChart()}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=PV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _renderChart(){let e=this._dataInput;if(!e){this._setStatus("Waiting for data");return}let t=await this._ensureRuntime(),n=this._buildConfig(t,e),a=n.type;!this._chart||this._renderedType!==a?(this._chart?.destroy(),this._chart=new t.Chart(this._canvas,n),this._renderedType=a):(this._chart.data=n.data,this._chart.options=n.options,this._chart.update()),this._setStatus(e.datasets.length>0?null:"Waiting for data")}_buildConfig(e,t){let n=getComputedStyle(this),a=n.getPropertyValue("--dt-accent").trim()||"#42d4ff",s=n.getPropertyValue("--dt-text").trim()||"#d6ebff",l=n.getPropertyValue("--dt-text-muted").trim()||"#7b93a6",u=n.getPropertyValue("--dt-border").trim()||"rgba(123, 147, 166, 0.3)",d=n.getPropertyValue("--font-mono").trim()||"'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace",f=UV(a),h=this.type==="area"?"line":this.type,m={labels:t.labels??this.labels,datasets:t.datasets.map((E,v)=>{let T=f[v%f.length],A=E.color??Ms(T,1),S={label:E.label??"",data:E.data,backgroundColor:h==="line"||h==="radar"||h==="scatter"?Ms(T,h==="scatter"?.95:.24):A,borderColor:A,pointBackgroundColor:A,pointBorderColor:A,pointHoverBackgroundColor:A,pointRadius:this.type==="line"||this.type==="area"?3:4,pointHoverRadius:this.type==="line"||this.type==="area"?5:6,borderWidth:2,tension:h==="line"||this.type==="area"?.32:void 0,fill:this.type==="area"};return h==="pie"||h==="doughnut"?{...S,backgroundColor:Array.isArray(E.data)?E.data.map((k,q)=>Ms(f[q%f.length],.86)):A,borderColor:Array.isArray(E.data)?E.data.map((k,q)=>Ms(f[q%f.length],1)):A,borderWidth:1}:h==="scatter"||h==="bubble"?{...S,showLine:!1,backgroundColor:Ms(T,.78)}:S})},b={responsive:!0,maintainAspectRatio:!1,animation:{duration:320},interaction:{mode:"nearest",intersect:!0},plugins:{legend:{display:this.legend!=="none",position:this.legend==="none"?"top":this.legend,labels:{color:s,boxWidth:12,boxHeight:12,padding:14,font:{family:d,size:11}}},tooltip:{backgroundColor:"rgba(10, 18, 24, 0.92)",borderColor:VV(u,a,.35),borderWidth:1,titleColor:s,bodyColor:s,footerColor:l,titleFont:{family:d,size:11},bodyFont:{family:d,size:11},padding:10}},scales:$V(this.type)?{x:{stacked:this.stacked,grid:{display:!1,color:u},border:{color:u},ticks:{color:l,font:{family:d,size:11}}},y:{stacked:this.stacked,beginAtZero:!0,grid:{display:!1,color:u},border:{color:u},ticks:{color:l,font:{family:d,size:11}}}}:h==="radar"?{r:{angleLines:{color:u},grid:{color:u},pointLabels:{color:l,font:{family:d,size:11}},ticks:{color:l,backdropColor:"transparent",font:{family:d,size:10}}}}:void 0};return{type:h,data:m,options:l6(b,this._optionsOverride??{})}}_setStatus(e){if(!e){this._status.hidden=!0;return}this._status.hidden=!1,this._status.textContent=e}};function VV(e,t,n){let a=cm(e),s=cm(t);if(!a||!s)return e;let l=Mo(n,0,1),u=((s.h-a.h)%360+540)%360-180;return Ms({h:(a.h+u*l+360)%360,s:a.s+(s.s-a.s)*l,l:a.l+(s.l-a.l)*l})}var GV=`:host {
1465
+ display: block;
1466
+ color: var(--dt-text);
1467
+ font-family: var(--font-sans, 'Inter', sans-serif);
1468
+ }
1469
+
1470
+ .dt-markdown {
1471
+ color: inherit;
1472
+ line-height: 1.7;
1473
+ word-break: break-word;
1474
+ }
1475
+
1476
+ .dt-markdown > :first-child {
1477
+ margin-top: 0;
1478
+ }
1479
+
1480
+ .dt-markdown > :last-child {
1481
+ margin-bottom: 0;
1482
+ }
1483
+
1484
+ .dt-markdown :is(h1, h2, h3, h4, h5, h6) {
1485
+ margin: 1.2em 0 0.55em;
1486
+ color: var(--dt-text);
1487
+ font-family: var(--font-sans, 'Inter', sans-serif);
1488
+ line-height: 1.2;
1489
+ }
1490
+
1491
+ .dt-markdown h1 {
1492
+ color: var(--dt-accent);
1493
+ font-size: 1.6rem;
1494
+ letter-spacing: 0.08em;
1495
+ text-transform: uppercase;
1496
+ }
1497
+
1498
+ .dt-markdown h2 {
1499
+ font-size: 1.3rem;
1500
+ }
1501
+
1502
+ .dt-markdown h3 {
1503
+ font-size: 1.1rem;
1504
+ }
1505
+
1506
+ .dt-markdown p,
1507
+ .dt-markdown ul,
1508
+ .dt-markdown ol,
1509
+ .dt-markdown blockquote,
1510
+ .dt-markdown pre,
1511
+ .dt-markdown table {
1512
+ margin: 0.8em 0;
1513
+ }
1514
+
1515
+ .dt-markdown ul,
1516
+ .dt-markdown ol {
1517
+ padding-left: 1.4rem;
1518
+ }
1519
+
1520
+ .dt-markdown li + li {
1521
+ margin-top: 0.28em;
1522
+ }
1523
+
1524
+ .dt-markdown strong {
1525
+ color: var(--dt-text);
1526
+ }
1527
+
1528
+ .dt-markdown a,
1529
+ .dt-markdown .dt-md-link {
1530
+ color: var(--dt-accent);
1531
+ text-decoration: none;
1532
+ }
1533
+
1534
+ .dt-markdown a:hover,
1535
+ .dt-markdown .dt-md-link:hover {
1536
+ text-decoration: underline;
1537
+ }
1538
+
1539
+ .dt-markdown code {
1540
+ padding: 0.12rem 0.35rem;
1541
+ border-radius: 2px;
1542
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1543
+ color: var(--dt-accent);
1544
+ font-family: var(
1545
+ --font-mono,
1546
+ 'SF Mono',
1547
+ Monaco,
1548
+ 'Cascadia Code',
1549
+ 'Roboto Mono',
1550
+ Consolas,
1551
+ monospace
1552
+ );
1553
+ font-size: 0.92em;
1554
+ }
1555
+
1556
+ .dt-md-pre {
1557
+ overflow-x: auto;
1558
+ padding: 14px 16px;
1559
+ border: 1px solid var(--dt-border);
1560
+ border-radius: 2px;
1561
+ background: var(--dt-surface);
1562
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dt-surface) 85%, var(--dt-accent) 15%);
1563
+ }
1564
+
1565
+ .dt-md-pre code {
1566
+ display: block;
1567
+ padding: 0;
1568
+ background: transparent;
1569
+ color: var(--dt-text);
1570
+ }
1571
+
1572
+ .dt-md-blockquote {
1573
+ margin: 0.9em 0;
1574
+ padding: 0.15rem 0 0.15rem 1rem;
1575
+ border-left: 3px solid var(--dt-accent);
1576
+ color: var(--dt-text-muted);
1577
+ }
1578
+
1579
+ .dt-md-table {
1580
+ width: 100%;
1581
+ border-collapse: collapse;
1582
+ border: 1px solid var(--dt-border);
1583
+ background: var(--dt-surface);
1584
+ }
1585
+
1586
+ .dt-md-table th,
1587
+ .dt-md-table td {
1588
+ padding: 0.6rem 0.8rem;
1589
+ border: 1px solid var(--dt-border-subtle, var(--dt-border));
1590
+ text-align: left;
1591
+ vertical-align: top;
1592
+ }
1593
+
1594
+ .dt-md-table th {
1595
+ color: var(--dt-accent);
1596
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1597
+ font-size: 0.75rem;
1598
+ letter-spacing: 0.08em;
1599
+ text-transform: uppercase;
1600
+ }
1601
+
1602
+ .dt-markdown hr {
1603
+ border: 0;
1604
+ border-top: 1px solid var(--dt-border);
1605
+ }
1606
+
1607
+ .dt-md-image {
1608
+ display: block;
1609
+ max-width: 100%;
1610
+ border: 1px solid var(--dt-border);
1611
+ border-radius: 2px;
1612
+ }
1613
+
1614
+ .dt-markdown__caret {
1615
+ display: inline-block;
1616
+ margin-left: 0.15rem;
1617
+ color: var(--dt-accent);
1618
+ animation: dt-markdown-caret 0.9s steps(1) infinite;
1619
+ }
1620
+
1621
+ .dt-markdown__caret[hidden] {
1622
+ display: none;
1623
+ }
1624
+
1625
+ @keyframes dt-markdown-caret {
1626
+ 0%,
1627
+ 49% {
1628
+ opacity: 1;
1629
+ }
1630
+
1631
+ 50%,
1632
+ 100% {
1633
+ opacity: 0;
1634
+ }
1635
+ }
1636
+ `,pp=null;function WV(){return window.__DtMarked?Promise.resolve(window.__DtMarked):pp||(pp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/marked.js",n.async=!0,n.dataset.dtMarked="true",n.onload=()=>{if(window.__DtMarked){e(window.__DtMarked);return}t(new Error("Marked runtime loaded without a __DtMarked export."))},n.onerror=()=>t(new Error("Failed to load the marked runtime bundle.")),document.head.appendChild(n)}),pp)}function o6(e){return e.replaceAll(`\r
1637
+ `,`
1638
+ `)}function QV(e){let t=o6(e).split(`
1639
+ `);for(;t.length>0&&t[0].trim()==="";)t.shift();for(;t.length>0&&t[t.length-1].trim()==="";)t.pop();let n=t.filter(s=>s.trim()!=="").map(s=>s.match(/^\s*/)?.[0].length??0),a=n.length>0?Math.min(...n):0;return a===0?t.join(`
1640
+ `):t.map(s=>s.slice(a)).join(`
1641
+ `)}function XV(e){let t=o6(e);if((t.match(/(^|\n)(```|~~~)/g)??[]).length%2===0)return t;let n=t.includes("~~~")&&!t.includes("```")?"~~~":"```";return`${t}
1642
+ ${n}`}var KV=class extends HTMLElement{_body;_caret;_contentOverride=null;_runtime=null;_loadPromise=null;_observer=null;_renderFrame=0;static get observedAttributes(){return["streaming","unsafe-html"]}get content(){return this._contentOverride??this._readInlineMarkdown()}set content(e){this._contentOverride=String(e??""),this._scheduleRender()}get streaming(){return this.hasAttribute("streaming")}set streaming(e){this.toggleAttribute("streaming",e)}get unsafeHtml(){return this.hasAttribute("unsafe-html")}set unsafeHtml(e){this.toggleAttribute("unsafe-html",e)}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=GV,e.appendChild(t),this._body=document.createElement("div"),this._body.className="dt-markdown",this._body.addEventListener("click",this._onLinkClick),this._caret=document.createElement("span"),this._caret.className="dt-markdown__caret",this._caret.textContent="▌",this._caret.hidden=!0,e.append(this._body,this._caret)}connectedCallback(){this._observer||(this._observer=new MutationObserver(()=>{this._contentOverride===null&&this._scheduleRender()}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0})),this._ensureRuntime(),this._scheduleRender()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._renderFrame!==0&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=0)}attributeChangedCallback(){this._scheduleRender()}_onLinkClick=e=>{let t=e.composedPath().find(n=>n instanceof HTMLAnchorElement);t&&(e.preventDefault(),this.dispatchEvent(new CustomEvent("dt-link-click",{bubbles:!0,composed:!0,detail:{href:t.getAttribute("href")??"#"}})))};_readInlineMarkdown(){return QV(this.textContent??"")}_scheduleRender(){this._renderFrame===0&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=0,this._render()}))}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=WV().then(e=>(this._runtime=e,e))),this._loadPromise)}async _render(){let e=await this._ensureRuntime(),t=this.content;this.streaming&&(t=XV(t)),this._body.innerHTML=e.render(t,{unsafeHtml:this.unsafeHtml}),this._caret.hidden=!this.streaming}},ZV=`:host {
1643
+ display: block;
1644
+ min-height: 240px;
1645
+ color: var(--dt-text);
1646
+ font-family: var(--font-sans, 'Inter', sans-serif);
1647
+ }
1648
+
1649
+ .dt-markdown-editor {
1650
+ position: relative;
1651
+ height: 100%;
1652
+ min-height: inherit;
1653
+ overflow: hidden;
1654
+ border: 1px solid var(--dt-border);
1655
+ border-radius: 2px;
1656
+ }
1657
+
1658
+ .dt-markdown-editor::before,
1659
+ .dt-markdown-editor::after {
1660
+ content: '';
1661
+ position: absolute;
1662
+ z-index: 3;
1663
+ width: 8px;
1664
+ height: 8px;
1665
+ pointer-events: none;
1666
+ }
1667
+
1668
+ .dt-markdown-editor::before {
1669
+ top: -1px;
1670
+ left: -1px;
1671
+ border-top: 2px solid var(--dt-accent);
1672
+ border-left: 2px solid var(--dt-accent);
1673
+ }
1674
+
1675
+ .dt-markdown-editor::after {
1676
+ right: -1px;
1677
+ bottom: -1px;
1678
+ border-right: 2px solid var(--dt-accent);
1679
+ border-bottom: 2px solid var(--dt-accent);
1680
+ }
1681
+
1682
+ .dt-markdown-editor__surface {
1683
+ height: 100%;
1684
+ min-height: inherit;
1685
+ }
1686
+
1687
+ .dt-markdown-editor__content {
1688
+ height: 100%;
1689
+ min-height: inherit;
1690
+ }
1691
+
1692
+ .dt-markdown-editor__status {
1693
+ position: absolute;
1694
+ inset: 0;
1695
+ display: flex;
1696
+ align-items: center;
1697
+ justify-content: center;
1698
+ padding: 20px;
1699
+ background: color-mix(in srgb, var(--dt-surface) 84%, transparent);
1700
+ color: var(--dt-text-muted);
1701
+ font-size: 0.75rem;
1702
+ letter-spacing: 0.08em;
1703
+ text-transform: uppercase;
1704
+ }
1705
+
1706
+ .dt-markdown-editor__status[hidden] {
1707
+ display: none;
1708
+ }
1709
+
1710
+ .milkdown {
1711
+ --crepe-color-background: transparent;
1712
+ --crepe-color-on-background: var(--dt-text);
1713
+ --crepe-color-surface: var(--dt-surface);
1714
+ --crepe-color-surface-low: color-mix(in srgb, var(--dt-surface) 94%, var(--dt-accent) 6%);
1715
+ --crepe-color-on-surface: var(--dt-text);
1716
+ --crepe-color-on-surface-variant: var(--dt-text-muted);
1717
+ --crepe-color-outline: var(--dt-border);
1718
+ --crepe-color-primary: var(--dt-accent);
1719
+ --crepe-color-secondary: color-mix(in srgb, var(--dt-surface) 84%, var(--dt-accent) 16%);
1720
+ --crepe-color-on-secondary: var(--dt-text);
1721
+ --crepe-color-inverse: var(--dt-text);
1722
+ --crepe-color-on-inverse: var(--dt-surface);
1723
+ --crepe-color-inline-code: var(--dt-accent);
1724
+ --crepe-color-error: var(--dt-danger, #ff6a6a);
1725
+ --crepe-color-hover: var(--dt-surface-hover);
1726
+ --crepe-color-selected: color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
1727
+ --crepe-color-inline-area: color-mix(in srgb, var(--dt-surface) 90%, var(--dt-accent) 10%);
1728
+ --crepe-font-title: var(--font-sans, 'Inter', sans-serif);
1729
+ --crepe-font-default: var(--font-sans, 'Inter', sans-serif);
1730
+ --crepe-font-code: var(
1731
+ --font-mono,
1732
+ 'SF Mono',
1733
+ Monaco,
1734
+ 'Cascadia Code',
1735
+ 'Roboto Mono',
1736
+ Consolas,
1737
+ monospace
1738
+ );
1739
+ --crepe-shadow-1: 0 0 0 1px color-mix(in srgb, var(--dt-surface) 82%, var(--dt-accent) 18%);
1740
+ --crepe-shadow-2:
1741
+ 0 0 0 1px color-mix(in srgb, var(--dt-surface) 78%, var(--dt-accent) 22%),
1742
+ 0 8px 24px color-mix(in srgb, var(--dt-accent) 12%, transparent);
1743
+
1744
+ height: 100%;
1745
+ background: transparent;
1746
+ color: var(--dt-text);
1747
+ }
1748
+
1749
+ .milkdown .editor {
1750
+ min-height: 100%;
1751
+ padding: 16px 18px 20px;
1752
+ outline: none;
1753
+ color: var(--dt-text);
1754
+ font-family: var(--font-sans, 'Inter', sans-serif);
1755
+ font-size: 14px;
1756
+ line-height: 1.7;
1757
+ }
1758
+
1759
+ .milkdown .editor > :first-child {
1760
+ margin-top: 0;
1761
+ }
1762
+
1763
+ .milkdown .editor h1,
1764
+ .milkdown .editor h2,
1765
+ .milkdown .editor h3,
1766
+ .milkdown .editor h4,
1767
+ .milkdown .editor h5,
1768
+ .milkdown .editor h6 {
1769
+ margin: 0.95em 0 0.45em;
1770
+ line-height: 1.2;
1771
+ }
1772
+
1773
+ .milkdown .editor h1 {
1774
+ color: var(--dt-accent);
1775
+ font-size: 1.6rem;
1776
+ letter-spacing: 0.08em;
1777
+ text-transform: uppercase;
1778
+ }
1779
+
1780
+ .milkdown .editor h2 {
1781
+ font-size: 1.28rem;
1782
+ }
1783
+
1784
+ .milkdown .editor h3 {
1785
+ font-size: 1.08rem;
1786
+ }
1787
+
1788
+ .milkdown .editor p {
1789
+ margin: 0.65em 0;
1790
+ }
1791
+
1792
+ .milkdown .editor code {
1793
+ padding: 2px 5px;
1794
+ border-radius: 2px;
1795
+ background: color-mix(in srgb, var(--dt-surface) 88%, var(--dt-accent) 12%);
1796
+ font-family: var(
1797
+ --font-mono,
1798
+ 'SF Mono',
1799
+ Monaco,
1800
+ 'Cascadia Code',
1801
+ 'Roboto Mono',
1802
+ Consolas,
1803
+ monospace
1804
+ );
1805
+ font-size: 0.9em;
1806
+ }
1807
+
1808
+ .milkdown .editor pre {
1809
+ overflow-x: auto;
1810
+ margin: 0.9em 0;
1811
+ padding: 12px 14px;
1812
+ border: 1px solid var(--dt-border);
1813
+ border-radius: 2px;
1814
+ background: var(--dt-surface);
1815
+ }
1816
+
1817
+ .milkdown .editor pre code {
1818
+ padding: 0;
1819
+ background: transparent;
1820
+ }
1821
+
1822
+ .milkdown .editor blockquote {
1823
+ margin: 0.9em 0;
1824
+ padding-left: 12px;
1825
+ border-left: 3px solid var(--dt-accent);
1826
+ color: var(--dt-text-muted);
1827
+ }
1828
+
1829
+ .milkdown .editor a {
1830
+ color: var(--dt-accent);
1831
+ text-decoration: none;
1832
+ }
1833
+
1834
+ .milkdown .editor a:hover {
1835
+ text-decoration: underline;
1836
+ }
1837
+
1838
+ .milkdown .editor hr {
1839
+ border: 0;
1840
+ border-top: 1px solid var(--dt-border);
1841
+ }
1842
+
1843
+ .milkdown .editor ul,
1844
+ .milkdown .editor ol {
1845
+ padding-left: 1.5rem;
1846
+ }
1847
+
1848
+ .milkdown .editor img {
1849
+ max-width: 100%;
1850
+ border-radius: 2px;
1851
+ }
1852
+
1853
+ .milkdown .editor table {
1854
+ width: 100%;
1855
+ border-collapse: collapse;
1856
+ }
1857
+
1858
+ .milkdown .editor th,
1859
+ .milkdown .editor td {
1860
+ border: 1px solid var(--dt-border);
1861
+ }
1862
+ `,mp=null;function JV(){return window.__DtMilkdown?Promise.resolve(window.__DtMilkdown):mp||(mp=new Promise((e,t)=>{let n=document.createElement("script");n.src="/api/ui/milkdown.umd.js",n.async=!0,n.dataset.dtMilkdown="true",n.onload=()=>{if(window.__DtMilkdown){e(window.__DtMilkdown);return}t(new Error("Milkdown runtime loaded without a __DtMilkdown export."))},n.onerror=()=>t(new Error("Failed to load the Milkdown runtime bundle.")),document.head.appendChild(n)}),mp)}var eG=class extends HTMLElement{_runtimeStyle;_surface;_content;_status;_runtime=null;_loadPromise=null;_editor=null;_pendingValue="";_changeTimer=null;_setupToken=0;_suppressNextChange=!1;static get observedAttributes(){return["placeholder","readonly"]}get placeholder(){return this.getAttribute("placeholder")??""}set placeholder(e){this.setAttribute("placeholder",e)}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",e)}get value(){return this._editor&&(this._pendingValue=this._editor.getMarkdown()),this._pendingValue}set value(e){let t=String(e??"");this._pendingValue=t,this._editor&&this._runtime&&this._editor.getMarkdown()!==t&&(this._suppressNextChange=!0,this._editor.editor.action(this._runtime.replaceAll(t)))}constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=ZV,e.appendChild(t),this._runtimeStyle=document.createElement("style"),e.appendChild(this._runtimeStyle),this._surface=document.createElement("div"),this._surface.className="dt-markdown-editor",this._content=document.createElement("div"),this._content.className="dt-markdown-editor__surface";let n=document.createElement("div");n.className="dt-markdown-editor__content",this._content.appendChild(n),this._status=document.createElement("div"),this._status.className="dt-markdown-editor__status",this._status.textContent="Loading editor",this._surface.append(this._content,this._status),e.appendChild(this._surface)}connectedCallback(){this._initializeEditor()}disconnectedCallback(){this._setupToken+=1,this._clearChangeTimer(),this._destroyEditor()}attributeChangedCallback(e){if(e==="readonly"){this._editor?.setReadonly(this.readonly);return}e==="placeholder"&&this.isConnected&&this._initializeEditor(!0)}async _ensureRuntime(){return this._runtime?this._runtime:(this._loadPromise||(this._loadPromise=JV().then(e=>(this._runtime=e,this._runtimeStyle.textContent=e.cssText,e))),this._loadPromise)}async _initializeEditor(e=!1){let t=++this._setupToken;if(this._setStatus("Loading editor"),e)await this._destroyEditor();else if(this._editor){this._setStatus(null);return}try{let n=await this._ensureRuntime();if(!this.isConnected||t!==this._setupToken)return;this._content.replaceChildren();let a=document.createElement("div");a.className="dt-markdown-editor__content",this._content.appendChild(a);let s=new n.Crepe({root:a,defaultValue:this._pendingValue,features:{[n.Crepe.Feature.CodeMirror]:!1,[n.Crepe.Feature.ImageBlock]:!1,[n.Crepe.Feature.Latex]:!1},featureConfigs:{[n.Crepe.Feature.Placeholder]:{text:this.placeholder,mode:"doc"}}});if(s.on(l=>{l.markdownUpdated((u,d)=>{if(this._pendingValue=d,this._suppressNextChange){this._suppressNextChange=!1;return}this._queueChange(d)}),l.focus(()=>{this.dispatchEvent(new CustomEvent("dt-focus",{bubbles:!0,composed:!0}))}),l.blur(()=>{this.dispatchEvent(new CustomEvent("dt-blur",{bubbles:!0,composed:!0}))})}),await s.create(),!this.isConnected||t!==this._setupToken){await s.destroy();return}this._editor=s,this._editor.setReadonly(this.readonly),this._pendingValue=this._editor.getMarkdown(),this._setStatus(null)}catch{t===this._setupToken&&this._setStatus("Failed to load editor")}}async _destroyEditor(){let e=this._editor;if(this._editor=null,!!e)try{await e.destroy()}catch{}}_queueChange(e){this._clearChangeTimer(),this._changeTimer=setTimeout(()=>{this._changeTimer=null,this.dispatchEvent(new CustomEvent("dt-change",{bubbles:!0,composed:!0,detail:{value:e}}))},300)}_clearChangeTimer(){this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)}_setStatus(e){if(e){this._status.hidden=!1,this._status.textContent=e;return}this._status.hidden=!0}};customElements.get("dt-tooltip")||customElements.define("dt-tooltip",KY);customElements.get("dt-card")||customElements.define("dt-card",eV);customElements.get("dt-select")||customElements.define("dt-select",uV);customElements.get("dt-grid")||customElements.define("dt-grid",fV);customElements.get("dt-stack")||customElements.define("dt-stack",mV);customElements.get("dt-stat")||customElements.define("dt-stat",yV);customElements.get("dt-badge")||customElements.define("dt-badge",vV);customElements.get("dt-button")||customElements.define("dt-button",AV);customElements.get("dt-divider")||customElements.define("dt-divider",kV);customElements.get("dt-list-view")||customElements.define("dt-list-view",BV);customElements.get("dt-table-view")||customElements.define("dt-table-view",IV);customElements.get("dt-column")||customElements.define("dt-column",s6);customElements.get("dt-chart")||customElements.define("dt-chart",YV);customElements.get("dt-markdown")||customElements.define("dt-markdown",KV);customElements.get("dt-markdown-editor")||customElements.define("dt-markdown-editor",eG);e6(oa);function tG(){const[e,t]=C.useState("en"),[n,a]=C.useState({}),[s,l]=C.useState(oa),[u,d]=C.useState("loading"),f=C.useRef(0),h=C.useRef(!1),m=C.useCallback(async()=>{try{const{data:v}=await dr.get("/api/auth/me");if(!v.authenticated){v.needsSetup?d("onboard"):d("login");return}d("desktop")}catch{d("login")}},[]),b=C.useCallback(async v=>{const T=v?`?locale=${encodeURIComponent(v)}`:"",A=f.current+1;f.current=A;const{data:S}=await dr.get(`/api/i18n/catalog${T}`);A===f.current&&(t(S.locale),a(S.messages))},[]);if(C.useEffect(()=>{async function v(){const{data:A}=await dr.get("/api/preferences/public");h.current||l({theme:A.theme,accentColor:A.accentColor})}v().catch(A=>{console.error("[theme] Could not load preferences:",A)}),m(),b().catch(A=>{if(At.isAxiosError(A)){const S=A.response?.status;console.error(`[i18n] Could not load catalog (${S??"unknown"}):`,A);return}console.error("[i18n] Could not load catalog:",A)});const T=A=>{const S=A.detail;if(S?.event==="preferences:resetAll"){l(oa),b("en").catch(k=>{console.error("[i18n] Could not refresh catalog:",k)});return}S?.event==="preferences:changed"&&(S.data?.key==="general.language"&&b(String(S.data.value??"en")).catch(k=>{console.error("[i18n] Could not refresh catalog:",k)}),S.data?.key==="general.theme"&&l(k=>({...k,theme:S.data?.value==="dark"?"dark":"light"})),S.data?.key==="general.accentColor"&&l(k=>({...k,accentColor:String(S.data?.value??oa.accentColor)})))};return window.addEventListener("desktalk:event",T),()=>{window.removeEventListener("desktalk:event",T)}},[m,b]),C.useEffect(()=>{e6(s)},[s]),u==="loading")return null;let E;return u==="login"?E=x.jsx(dY,{onLoginSuccess:m}):u==="onboard"?E=x.jsx(GY,{onComplete:m,locale:e,accentColor:s.accentColor,onLanguageChange:v=>b(v).catch(T=>{console.error("[i18n] Could not refresh onboarding catalog:",T)}),onAccentColorChange:v=>{h.current=!0,l(T=>({...T,accentColor:v}))}}):E=x.jsx(Jq,{themePreferences:s}),x.jsx(CC,{locale:e,messages:n,children:E})}window.React=Va;window.ReactDOM={...uC,createRoot:xp.createRoot,hydrateRoot:xp.hydrateRoot};window.__desktalk_jsx_runtime=kS;const u6=document.getElementById("root");if(!u6)throw new Error("Root element #root not found");const nG=xp.createRoot(u6);nG.render(x.jsx(Va.StrictMode,{children:x.jsx(tG,{})}));const rG=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:EA},Symbol.toStringTag,{value:"Module"}));export{AG as A,Az as B,BG as M,Qn as R,TG as W,Ce as _,SG as a,wG as b,NG as c,CG as d,RG as e,ia as f,yC as g,x as j,C as r,bC as s,kG as u};
1863
+ //# sourceMappingURL=index-CI5Mxo87.js.map