/*! For license information please see main.da2e3b68.js.LICENSE.txt */ (()=>{var e={3001:(e,t,n)=>{"use strict";var r={};n.r(r),n.d(r,{attentionMarkers:()=>uf,contentInitial:()=>rf,disable:()=>hf,document:()=>nf,flow:()=>sf,flowInitial:()=>of,insideSpan:()=>cf,string:()=>af,text:()=>lf});var i={};n.r(i),n.d(i,{safe:()=>ck,spec:()=>lk});var o={};n.r(o),n.d(o,{angle:()=>hx,decibel:()=>gx,flex:()=>mx,frequency:()=>fx,length:()=>ux,resolution:()=>px,semitones:()=>Ox,time:()=>dx});var s={};n.r(s),n.d(s,{getTrace:()=>$S,isKeyword:()=>FS,isProperty:()=>IS,isType:()=>LS});var a={};n.r(a),n.d(a,{generate:()=>Ow,name:()=>pw,parse:()=>gw,structure:()=>mw});var l={};n.r(l),n.d(l,{generate:()=>ww,name:()=>vw,parse:()=>Sw,structure:()=>xw,walkContext:()=>kw});var c={};n.r(c),n.d(c,{generate:()=>_w,name:()=>Tw,parse:()=>Cw,structure:()=>Ew,walkContext:()=>Aw});var u={};n.r(u),n.d(u,{generate:()=>zw,name:()=>Iw,parse:()=>Bw,structure:()=>Fw});var h={};n.r(h),n.d(h,{generate:()=>Vw,name:()=>Ww,parse:()=>Gw,structure:()=>Yw,walkContext:()=>qw});var d={};n.r(d),n.d(d,{generate:()=>tT,name:()=>Kw,parse:()=>eT,structure:()=>Jw});var f={};n.r(f),n.d(f,{generate:()=>oT,name:()=>nT,parse:()=>iT,structure:()=>rT});var p={};n.r(p),n.d(p,{generate:()=>cT,name:()=>sT,parse:()=>lT,structure:()=>aT});var m={};n.r(m),n.d(m,{generate:()=>pT,name:()=>hT,parse:()=>fT,structure:()=>dT});var g={};n.r(g),n.d(g,{generate:()=>xT,name:()=>yT,parse:()=>kT,structure:()=>vT});var O={};n.r(O),n.d(O,{generate:()=>CT,name:()=>TT,parse:()=>ET,structure:()=>AT});var b={};n.r(b),n.d(b,{generate:()=>jT,name:()=>FT,parse:()=>ZT,structure:()=>zT,walkContext:()=>BT});var y={};n.r(y),n.d(y,{generate:()=>VT,name:()=>qT,parse:()=>GT,structure:()=>YT});var v={};n.r(v),n.d(v,{generate:()=>tA,name:()=>KT,parse:()=>eA,structure:()=>JT});var k={};n.r(k),n.d(k,{generate:()=>sA,name:()=>nA,parse:()=>oA,structure:()=>iA,walkContext:()=>rA});var x={};n.r(x),n.d(x,{generate:()=>hA,name:()=>lA,parse:()=>uA,structure:()=>cA,xxx:()=>aA});var S={};n.r(S),n.d(S,{generate:()=>mA,name:()=>dA,parse:()=>pA,structure:()=>fA});var w={};n.r(w),n.d(w,{generate:()=>yA,name:()=>gA,parse:()=>bA,structure:()=>OA});var T={};n.r(T),n.d(T,{generate:()=>SA,name:()=>vA,parse:()=>xA,structure:()=>kA});var A={};n.r(A),n.d(A,{generate:()=>EA,name:()=>wA,parse:()=>AA,structure:()=>TA});var E={};n.r(E),n.d(E,{generate:()=>RA,name:()=>CA,parse:()=>PA,structure:()=>_A});var C={};n.r(C),n.d(C,{generate:()=>$A,name:()=>NA,parse:()=>MA,structure:()=>QA});var _={};n.r(_),n.d(_,{generate:()=>BA,name:()=>LA,parse:()=>FA,structure:()=>IA});var P={};n.r(P),n.d(P,{generate:()=>UA,name:()=>zA,parse:()=>jA,structure:()=>ZA});var R={};n.r(R),n.d(R,{generate:()=>qA,name:()=>XA,parse:()=>WA,structure:()=>HA});var D={};n.r(D),n.d(D,{generate:()=>KA,name:()=>YA,parse:()=>VA,structure:()=>GA});var N={};n.r(N),n.d(N,{generate:()=>nE,name:()=>JA,parse:()=>tE,structure:()=>eE});var Q={};n.r(Q),n.d(Q,{generate:()=>aE,name:()=>rE,parse:()=>sE,structure:()=>oE,walkContext:()=>iE});var M={};n.r(M),n.d(M,{generate:()=>dE,name:()=>lE,parse:()=>hE,structure:()=>uE,walkContext:()=>cE});var $={};n.r($),n.d($,{generate:()=>yE,name:()=>gE,parse:()=>bE,structure:()=>OE});var L={};n.r(L),n.d(L,{generate:()=>wE,name:()=>kE,parse:()=>SE,structure:()=>xE});var I={};n.r(I),n.d(I,{generate:()=>RE,name:()=>EE,parse:()=>PE,structure:()=>_E,walkContext:()=>CE});var F={};n.r(F),n.d(F,{generate:()=>ME,name:()=>DE,parse:()=>QE,structure:()=>NE});var B={};n.r(B),n.d(B,{generate:()=>BE,name:()=>$E,parse:()=>FE,structure:()=>IE,walkContext:()=>LE});var z={};n.r(z),n.d(z,{generate:()=>qE,name:()=>XE,parse:()=>WE,structure:()=>HE});var Z={};n.r(Z),n.d(Z,{generate:()=>tC,name:()=>VE,parse:()=>eC,structure:()=>JE,walkContext:()=>KE});var j={};n.r(j),n.d(j,{generate:()=>lC,name:()=>oC,parse:()=>aC,structure:()=>sC});var U={};n.r(U),n.d(U,{generate:()=>yC,name:()=>gC,parse:()=>bC,structure:()=>OC});var X={};n.r(X),n.d(X,{generate:()=>_C,name:()=>AC,parse:()=>CC,structure:()=>EC});var H={};n.r(H),n.d(H,{generate:()=>NC,name:()=>PC,parse:()=>DC,structure:()=>RC});var W={};n.r(W),n.d(W,{generate:()=>IC,name:()=>MC,parse:()=>LC,structure:()=>$C});var q={};n.r(q),n.d(q,{AnPlusB:()=>a,Atrule:()=>l,AtrulePrelude:()=>c,AttributeSelector:()=>u,Block:()=>h,Brackets:()=>d,CDC:()=>f,CDO:()=>p,ClassSelector:()=>m,Combinator:()=>g,Comment:()=>O,Declaration:()=>b,DeclarationList:()=>y,Dimension:()=>v,Function:()=>k,Hash:()=>x,IdSelector:()=>w,Identifier:()=>S,MediaFeature:()=>T,MediaQuery:()=>A,MediaQueryList:()=>E,NestingSelector:()=>C,Nth:()=>_,Number:()=>P,Operator:()=>R,Parentheses:()=>D,Percentage:()=>N,PseudoClassSelector:()=>Q,PseudoElementSelector:()=>M,Ratio:()=>$,Raw:()=>L,Rule:()=>I,Selector:()=>F,SelectorList:()=>B,String:()=>z,StyleSheet:()=>Z,TypeSelector:()=>j,UnicodeRange:()=>U,Url:()=>X,Value:()=>H,WhiteSpace:()=>W});var Y={};n.r(Y),n.d(Y,{AtrulePrelude:()=>zC,Selector:()=>ZC,Value:()=>UC});var G={};function V(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.r(G),n.d(G,{AnPlusB:()=>gw,Atrule:()=>Sw,AtrulePrelude:()=>Cw,AttributeSelector:()=>Bw,Block:()=>Gw,Brackets:()=>eT,CDC:()=>iT,CDO:()=>lT,ClassSelector:()=>fT,Combinator:()=>kT,Comment:()=>ET,Declaration:()=>ZT,DeclarationList:()=>GT,Dimension:()=>eA,Function:()=>oA,Hash:()=>uA,IdSelector:()=>bA,Identifier:()=>pA,MediaFeature:()=>xA,MediaQuery:()=>AA,MediaQueryList:()=>PA,NestingSelector:()=>MA,Nth:()=>FA,Number:()=>jA,Operator:()=>WA,Parentheses:()=>VA,Percentage:()=>tE,PseudoClassSelector:()=>sE,PseudoElementSelector:()=>hE,Ratio:()=>bE,Raw:()=>SE,Rule:()=>PE,Selector:()=>QE,SelectorList:()=>FE,String:()=>WE,StyleSheet:()=>eC,TypeSelector:()=>aC,UnicodeRange:()=>bC,Url:()=>CC,Value:()=>DC,WhiteSpace:()=>LC});var K,J=n(905),ee=n.t(J,2),te=n(8721),ne=n(4824),re=n.t(ne,2);function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function de(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=K.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function h(){a=K.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:f.location,delta:t})}function d(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:ue(e);return n=n.replace(/ $/,"%20"),se(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(ie({},s.state,{idx:c}),""));let f={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(oe,h),l=e,()=>{i.removeEventListener(oe,h),l=null}},createHref:e=>t(i,e),createURL:d,encodeLocation(e){let t=d(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=K.Push;let r=ce(f.location,e,t);n&&n(r,e),c=u()+1;let h=le(r,c),d=f.createHref(r);try{s.pushState(h,"",d)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;i.location.assign(d)}o&&l&&l({action:a,location:f.location,delta:1})},replace:function(e,t){a=K.Replace;let r=ce(f.location,e,t);n&&n(r,e),c=u();let i=le(r,c),h=f.createHref(r);s.replaceState(i,"",h),o&&l&&l({action:a,location:f.location,delta:0})},go:e=>s.go(e)};return f}var fe;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(fe||(fe={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function pe(e,t,n){return void 0===n&&(n="/"),me(e,t,n,!1)}function me(e,t,n,r){let i=_e(("string"===typeof t?he(t):t).pathname||"/",n);if(null==i)return null;let o=ge(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let s=null;for(let a=0;null==s&&a{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(se(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let a=Qe([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(se(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),ge(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:Te(a,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Oe(e.path))i(e,t,r);else i(e,t)})),t}function Oe(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=Oe(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}const be=/^:[\w-]+$/,ye=3,ve=2,ke=1,xe=10,Se=-2,we=e=>"*"===e;function Te(e,t){let n=e.split("/"),r=n.length;return n.some(we)&&(r+=Se),t&&(r+=ve),n.filter((e=>!we(e))).reduce(((e,t)=>e+(be.test(t)?ye:""===t?ke:xe)),r)}function Ae(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=a[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:o,pathnameBase:s,pattern:e}}function Ce(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return ae(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function _e(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Pe(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function Re(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function De(e,t){let n=Re(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function Ne(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=he(e):(i=ie({},e),se(!i.pathname||!i.pathname.includes("?"),Pe("?","pathname","search",i)),se(!i.pathname||!i.pathname.includes("#"),Pe("#","pathname","hash",i)),se(!i.search||!i.search.includes("#"),Pe("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?he(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:$e(r),hash:Le(i)}}(i,o),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const Qe=e=>e.join("/").replace(/\/\/+/g,"/"),Me=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$e=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Le=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Ie(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Fe=["post","put","patch","delete"],Be=(new Set(Fe),["get",...Fe]);new Set(Be),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let r=J.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,ze({fromRouteId:t},i)))}),[e,t]);return r}():function(){qe()||se(!1);let e=J.useContext(Ze),{basename:t,future:n,navigator:r}=J.useContext(Ue),{matches:i}=J.useContext(He),{pathname:o}=Ye(),s=JSON.stringify(De(i,n.v7_relativeSplatPath)),a=J.useRef(!1);Ge((()=>{a.current=!0}));let l=J.useCallback((function(n,i){if(void 0===i&&(i={}),!a.current)return;if("number"===typeof n)return void r.go(n);let l=Ne(n,JSON.parse(s),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Qe([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}),[t,r,s,o,e]);return l}()}const Ke=J.createContext(null);function Je(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=J.useContext(Ue),{matches:i}=J.useContext(He),{pathname:o}=Ye(),s=JSON.stringify(De(i,r.v7_relativeSplatPath));return J.useMemo((()=>Ne(e,JSON.parse(s),o,"path"===n)),[e,s,o,n])}function et(e,t,n,r){qe()||se(!1);let{navigator:i}=J.useContext(Ue),{matches:o}=J.useContext(He),s=o[o.length-1],a=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let c,u=Ye();if(t){var h;let e="string"===typeof t?he(t):t;"/"===l||(null==(h=e.pathname)?void 0:h.startsWith(l))||se(!1),c=e}else c=u;let d=c.pathname||"/",f=d;if("/"!==l){let e=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=pe(e,{pathname:f});let m=ot(p&&p.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Qe([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Qe([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n,r);return t&&m?J.createElement(Xe.Provider,{value:{location:ze({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:K.Pop}},m):m}function tt(){let e=function(){var e;let t=J.useContext(We),n=ct(at.UseRouteError),r=ut(at.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=Ie(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return J.createElement(J.Fragment,null,J.createElement("h2",null,"Unexpected Application Error!"),J.createElement("h3",{style:{fontStyle:"italic"}},t),n?J.createElement("pre",{style:i},n):null,null)}const nt=J.createElement(tt,null);class rt extends J.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?J.createElement(He.Provider,{value:this.props.routeContext},J.createElement(We.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function it(e){let{routeContext:t,match:n,children:r}=e,i=J.useContext(Ze);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),J.createElement(He.Provider,{value:t},r)}function ot(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}let s=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=s.findIndex((e=>e.route.id&&void 0!==(null==a?void 0:a[e.route.id])));e>=0||se(!1),s=s.slice(0,Math.min(s.length,e+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s.slice(0,c+1):[s[0]];break}}}return s.reduceRight(((e,r,i)=>{let o,u=!1,h=null,d=null;n&&(o=a&&r.route.id?a[r.route.id]:void 0,h=r.route.errorElement||nt,l&&(c<0&&0===i?(!function(e,t,n){t||ht[e]||(ht[e]=!0)}("route-fallback",!1),u=!0,d=null):c===i&&(u=!0,d=r.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,i+1)),p=()=>{let t;return t=o?h:u?d:r.route.Component?J.createElement(r.route.Component,null):r.route.element?r.route.element:e,J.createElement(it,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?J.createElement(rt,{location:n.location,revalidation:n.revalidation,component:h,error:o,children:p(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):p()}),null)}var st=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(st||{}),at=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(at||{});function lt(e){let t=J.useContext(Ze);return t||se(!1),t}function ct(e){let t=J.useContext(je);return t||se(!1),t}function ut(e){let t=function(e){let t=J.useContext(He);return t||se(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||se(!1),n.route.id}const ht={};ee.startTransition;function dt(e){return function(e){let t=J.useContext(He).outlet;return t?J.createElement(Ke.Provider,{value:e},t):t}(e.context)}function ft(e){se(!1)}function pt(e){let{basename:t="/",children:n=null,location:r,navigationType:i=K.Pop,navigator:o,static:s=!1,future:a}=e;qe()&&se(!1);let l=t.replace(/^\/*/,"/"),c=J.useMemo((()=>({basename:l,navigator:o,static:s,future:ze({v7_relativeSplatPath:!1},a)})),[l,a,o,s]);"string"===typeof r&&(r=he(r));let{pathname:u="/",search:h="",hash:d="",state:f=null,key:p="default"}=r,m=J.useMemo((()=>{let e=_e(u,l);return null==e?null:{location:{pathname:e,search:h,hash:d,state:f,key:p},navigationType:i}}),[l,u,h,d,f,p,i]);return null==m?null:J.createElement(Ue.Provider,{value:c},J.createElement(Xe.Provider,{children:n,value:m}))}function mt(e){let{children:t,location:n}=e;return et(gt(t),n)}new Promise((()=>{}));J.Component;function gt(e,t){void 0===t&&(t=[]);let n=[];return J.Children.forEach(e,((e,r)=>{if(!J.isValidElement(e))return;let i=[...t,r];if(e.type===J.Fragment)return void n.push.apply(n,gt(e.props.children,i));e.type!==ft&&se(!1),e.props.index&&e.props.children&&se(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=gt(e.props.children,i)),n.push(o)})),n}function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function yt(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const vt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],kt=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(sR){}const xt=J.createContext({isTransitioning:!1});new Map;const St=ee.startTransition;re.flushSync,ee.useId;function wt(e){let{basename:t,children:n,future:r,window:i}=e,o=J.useRef();var s;null==o.current&&(o.current=(void 0===(s={window:i,v5Compat:!0})&&(s={}),de((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=he(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),ce("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:ue(t))}),(function(e,t){ae("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),s)));let a=o.current,[l,c]=J.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},h=J.useCallback((e=>{u&&St?St((()=>c(e))):c(e)}),[c,u]);return J.useLayoutEffect((()=>a.listen(h)),[a,h]),J.createElement(pt,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const Tt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,At=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Et=J.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:h}=e,d=bt(e,vt),{basename:f}=J.useContext(Ue),p=!1;if("string"===typeof c&&At.test(c)&&(n=c,Tt))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=_e(t.pathname,f);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:p=!0}catch(sR){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;qe()||se(!1);let{basename:r,navigator:i}=J.useContext(Ue),{hash:o,pathname:s,search:a}=Je(e,{relative:n}),l=s;return"/"!==r&&(l="/"===s?r:Qe([r,s])),i.createHref({pathname:l,search:a,hash:o})}(c,{relative:i}),g=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=void 0===t?{}:t,l=Ve(),c=Ye(),u=Je(e,{relative:s});return J.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:ue(c)===ue(u);l(e,{replace:n,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}}),[c,l,u,r,i,n,e,o,s,a])}(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:h});return J.createElement("a",Ot({},d,{href:n||m,onClick:p||o?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:l}))}));const Ct=J.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:o=!1,style:s,to:a,unstable_viewTransition:l,children:c}=e,u=bt(e,kt),h=Je(a,{relative:u.relative}),d=Ye(),f=J.useContext(je),{navigator:p,basename:m}=J.useContext(Ue),g=null!=f&&function(e,t){void 0===t&&(t={});let n=J.useContext(xt);null==n&&se(!1);let{basename:r}=Rt(_t.useViewTransitionState),i=Je(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=_e(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=_e(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=Ee(i.pathname,s)||null!=Ee(i.pathname,o)}(h)&&!0===l,O=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,b=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(b=b.toLowerCase(),y=y?y.toLowerCase():null,O=O.toLowerCase()),y&&m&&(y=_e(y,m)||y);const v="/"!==O&&O.endsWith("/")?O.length-1:O.length;let k,x=b===O||!o&&b.startsWith(O)&&"/"===b.charAt(v),S=null!=y&&(y===O||!o&&y.startsWith(O)&&"/"===y.charAt(O.length)),w={isActive:x,isPending:S,isTransitioning:g},T=x?n:void 0;k="function"===typeof i?i(w):[i,x?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let A="function"===typeof s?s(w):s;return J.createElement(Et,Ot({},u,{"aria-current":T,className:k,ref:t,style:A,to:a,unstable_viewTransition:l}),"function"===typeof c?c(w):c)}));var _t,Pt;function Rt(e){let t=J.useContext(Ze);return t||se(!1),t}function Dt(e){let t=J.useRef(yt(e)),n=J.useRef(!1),r=Ye(),i=J.useMemo((()=>function(e,t){let n=yt(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),o=Ve(),s=J.useCallback(((e,t)=>{const r=yt("function"===typeof e?e(i):e);n.current=!0,o("?"+r,t)}),[o,i]);return[i,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_t||(_t={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Pt||(Pt={}));function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}var Mt=n(8557),$t=["className","prefixCls","element","top","size","strokeWidth","smooth","hideProgress","children"],Lt={position:"sticky",bottom:15,right:15,visibility:"visible",opacity:0,transition:"visibility 0.3s linear 0s, opacity 0.3s linear 0s",cursor:"pointer",userSelect:"none"},It={display:"block",transform:"rotate(-90deg)"},Ft={transition:"stroke-dashoffset 0.3s linear 0s"},Bt={position:"absolute",top:0,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:12},zt=document.documentElement;function Zt(e){void 0===e&&(e={});var{className:t,prefixCls:n="w-back-to-up",element:r=zt,top:i=120,size:o=35,strokeWidth:s=3,smooth:a=!0,hideProgress:l=!1,children:c}=e,u=Qt(e,$t),h=(0,J.useRef)(null),d=[t,n].filter(Boolean).join(" "),f=Object.assign({},Lt,{position:r===zt?"fixed":"sticky"},u.style,{width:o,height:o,opacity:0===i?1:0}),p=(0,J.useMemo)((()=>o/2),[o]),m=(0,J.useMemo)((()=>o/2-s/2),[o,s]),g=(0,J.useMemo)((()=>Math.PI*m*2),[m]),[O,b]=(0,J.useState)(g||0),y=e=>{var{clientHeight:t,scrollHeight:n,scrollTop:o}=r||zt;b(g-g*(o/(n-t))||0),h.current&&i>0&&(h.current.style.opacity=o>i?"1":"0")};(0,J.useEffect)((()=>{var e=r===zt?document:r;return e&&e.addEventListener("scroll",y,{passive:!0}),()=>{e&&e.removeEventListener("scroll",y)}}),[r]);return(0,Mt.jsxs)("div",Nt({className:d,ref:h},u,{onClick:e=>{r.scrollTo({top:0,behavior:a?"smooth":"auto"})},style:f,children:[!l&&(0,Mt.jsxs)("svg",{viewBox:"0 0 "+o+" "+o,width:o,height:o,focusable:"false",style:It,children:[(0,Mt.jsx)("circle",{fill:"rgb(0 0 0 / 75%)",stroke:"rgb(200 200 200 / 85%)",strokeWidth:s,r:m,cx:p,cy:p}),(0,Mt.jsx)("circle",{fill:"none",stroke:"rgb(0 0 0 / 50%)",strokeWidth:s,r:m,cx:p,cy:p,strokeDasharray:g,strokeDashoffset:O||0,style:Ft})]}),c&&(0,Mt.jsx)("div",{style:Bt,children:c})]}))}let jt={data:""},Ut=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||jt,Xt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ht=/\/\*[^]*?\*\/| +/g,Wt=/\n+/g,qt=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+s+";":r+="f"==o[1]?qt(s,o):o+"{"+qt(s,"k"==o[1]?"":t)+"}":"object"==typeof s?r+=qt(s,t?t.replace(/([^,])+/g,(e=>o.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=qt.p?qt.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Yt={},Gt=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Gt(e[n]);return t}return e},Vt=(e,t,n,r,i)=>{let o=Gt(e),s=Yt[o]||(Yt[o]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(o));if(!Yt[s]){let t=o!==e?e:(e=>{let t,n,r=[{}];for(;t=Xt.exec(e.replace(Ht,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Wt," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Wt," ").trim();return r[0]})(e);Yt[s]=qt(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}let a=n&&Yt.g?Yt.g:null;return n&&(Yt.g=Yt[s]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Yt[s],t,r,a),s},Kt=(e,t,n)=>e.reduce(((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":qt(e,""):!1===e?"":e}return e+r+(null==o?"":o)}),"");function Jt(e){let t=this||{},n=e.call?e(t.p):e;return Vt(n.unshift?n.raw?Kt(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,Ut(t.target),t.g,t.o,t.k)}Jt.bind({g:1});let en,tn,nn,rn=Jt.bind({k:1});function on(e,t){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),l=a.className||i.className;n.p=Object.assign({theme:tn&&tn()},a),n.o=/ *go\d+/.test(l),a.className=Jt.apply(n,r)+(l?" "+l:""),t&&(a.ref=s);let c=e;return e[0]&&(c=a.as||e,delete a.as),nn&&c[0]&&nn(a),en(c,a)}return t?t(i):i}}var sn,an,ln,cn,un,hn,dn,fn,pn,mn,gn,On,bn,yn,vn,kn,xn=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,Sn=(()=>{let e=0;return()=>(++e).toString()})(),wn=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Tn=new Map,An=e=>{if(Tn.has(e))return;let t=setTimeout((()=>{Tn.delete(e),Pn({type:4,toastId:e})}),1e3);Tn.set(e,t)},En=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return t.toast.id&&(e=>{let t=Tn.get(e);t&&clearTimeout(t)})(t.toast.id),{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return e.toasts.find((e=>e.id===n.id))?En(e,{type:1,toast:n}):En(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?An(r):e.toasts.forEach((e=>{An(e.id)})),{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+i})))}}},Cn=[],_n={toasts:[],pausedAt:void 0},Pn=e=>{_n=En(_n,e),Cn.forEach((e=>{e(_n)}))},Rn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Dn=e=>(t,n)=>{let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"blank",n=arguments.length>2?arguments[2]:void 0;return{createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||Sn()}}(t,e,n);return Pn({type:2,toast:r}),r.id},Nn=(e,t)=>Dn("blank")(e,t);Nn.error=Dn("error"),Nn.success=Dn("success"),Nn.loading=Dn("loading"),Nn.custom=Dn("custom"),Nn.dismiss=e=>{Pn({type:3,toastId:e})},Nn.remove=e=>Pn({type:4,toastId:e}),Nn.promise=(e,t,n)=>{let r=Nn.loading(t.loading,{...n,...null==n?void 0:n.loading});return e.then((e=>(Nn.success(xn(t.success,e),{id:r,...n,...null==n?void 0:n.success}),e))).catch((e=>{Nn.error(xn(t.error,e),{id:r,...n,...null==n?void 0:n.error})})),e};var Qn=(e,t)=>{Pn({type:1,toast:{id:e,height:t}})},Mn=()=>{Pn({type:5,time:Date.now()})},$n=e=>{let{toasts:t,pausedAt:n}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=(0,J.useState)(_n);(0,J.useEffect)((()=>(Cn.push(n),()=>{let e=Cn.indexOf(n);e>-1&&Cn.splice(e,1)})),[t]);let r=t.toasts.map((t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Rn[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}}));return{...t,toasts:r}}(e);(0,J.useEffect)((()=>{if(n)return;let e=Date.now(),r=t.map((t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout((()=>Nn.dismiss(t.id)),n);t.visible&&Nn.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,J.useCallback)((()=>{n&&Pn({type:6,time:Date.now()})}),[n]),i=(0,J.useCallback)(((e,n)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:o}=n||{},s=t.filter((t=>(t.position||o)===(e.position||o)&&t.height)),a=s.findIndex((t=>t.id===e.id)),l=s.filter(((e,t)=>te.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+i),0)}),[t]);return{toasts:t,handlers:{updateHeight:Qn,startPause:Mn,endPause:r,calculateOffset:i}}},Ln=rn(sn||(sn=V(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}"]))),In=rn(an||(an=V(["\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),Fn=rn(ln||(ln=V(["\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]))),Bn=on("div")(cn||(cn=V(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ",";\n position: relative;\n transform: rotate(45deg);\n\n animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: "," 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ",";\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: "," 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n"])),(e=>e.primary||"#ff4b4b"),Ln,In,(e=>e.secondary||"#fff"),Fn),zn=rn(un||(un=V(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))),Zn=on("div")(hn||(hn=V(["\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ",";\n border-right-color: ",";\n animation: "," 1s linear infinite;\n"])),(e=>e.secondary||"#e0e0e0"),(e=>e.primary||"#616161"),zn),jn=rn(dn||(dn=V(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]))),Un=rn(fn||(fn=V(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}"]))),Xn=on("div")(pn||(pn=V(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ",";\n position: relative;\n transform: rotate(45deg);\n\n animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: "," 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ",";\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n"])),(e=>e.primary||"#61d345"),jn,Un,(e=>e.secondary||"#fff")),Hn=on("div")(mn||(mn=V(["\n position: absolute;\n"]))),Wn=on("div")(gn||(gn=V(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n"]))),qn=rn(On||(On=V(["\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),Yn=on("div")(bn||(bn=V(["\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: "," 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n"])),qn),Gn=e=>{let{toast:t}=e,{icon:n,type:r,iconTheme:i}=t;return void 0!==n?"string"==typeof n?J.createElement(Yn,null,n):n:"blank"===r?null:J.createElement(Wn,null,J.createElement(Zn,{...i}),"loading"!==r&&J.createElement(Hn,null,"error"===r?J.createElement(Bn,{...i}):J.createElement(Xn,{...i})))},Vn=e=>"\n0% {transform: translate3d(0,".concat(-200*e,"%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n"),Kn=e=>"\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,".concat(-150*e,"%,-1px) scale(.6); opacity:0;}\n"),Jn=on("div")(yn||(yn=V(["\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n"]))),er=on("div")(vn||(vn=V(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]))),tr=J.memo((e=>{let{toast:t,position:n,style:r,children:i}=e,o=t.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,i]=wn()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[Vn(n),Kn(n)];return{animation:t?"".concat(rn(r)," 0.35s cubic-bezier(.21,1.02,.73,1) forwards"):"".concat(rn(i)," 0.4s forwards cubic-bezier(.06,.71,.55,1)")}})(t.position||n||"top-center",t.visible):{opacity:0},s=J.createElement(Gn,{toast:t}),a=J.createElement(er,{...t.ariaProps},xn(t.message,t));return J.createElement(Jn,{className:t.className,style:{...o,...r,...t.style}},"function"==typeof i?i({icon:s,message:a}):J.createElement(J.Fragment,null,s,a))}));!function(e,t,n,r){qt.p=t,en=e,tn=n,nn=r}(J.createElement);var nr=e=>{let{id:t,className:n,style:r,onHeightUpdate:i,children:o}=e,s=J.useCallback((e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;i(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}}),[t,i]);return J.createElement("div",{ref:s,className:n,style:r},o)},rr=Jt(kn||(kn=V(["\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n"]))),ir=e=>{let{reverseOrder:t,position:n="top-center",toastOptions:r,gutter:i,children:o,containerStyle:s,containerClassName:a}=e,{toasts:l,handlers:c}=$n(r);return J.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...s},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map((e=>{let r=e.position||n,s=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:wn()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY(".concat(t*(n?1:-1),"px)"),...r,...i}})(r,c.calculateOffset(e,{reverseOrder:t,gutter:i,defaultPosition:n}));return J.createElement(nr,{id:e.id,key:e.id,onHeightUpdate:c.updateHeight,className:e.visible?rr:"",style:s},"custom"===e.type?xn(e.message,e):o?o(e):J.createElement(tr,{toast:e,position:r}))})))},or=Nn;var sr=function(){return sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?Ar(Lr,--Mr):0,Nr--,10===$r&&(Nr=1,Dr--),$r}function Zr(){return $r=Mr2||Hr($r)>3?"":" "}function Vr(e,t){for(;--t&&Zr()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Xr(e,Ur()+(t<6&&32==jr()&&32==Zr()))}function Kr(e){for(;Zr();)switch($r){case e:return Mr;case 34:case 39:34!==e&&39!==e&&Kr($r);break;case 40:41===e&&Kr(e);break;case 92:Zr()}return Mr}function Jr(e,t){for(;Zr()&&e+$r!==57&&(e+$r!==84||47!==jr()););return"/*"+Xr(t,Mr-1)+"*"+vr(47===e?e:Zr())}function ei(e){for(;!Hr(jr());)Zr();return Xr(e,Mr)}function ti(e,t){for(var n="",r=0;r6)switch(Ar(e,t+1)){case 109:if(45!==Ar(e,t+4))break;case 102:return wr(e,/(.+:)(.+)-([^]+)/,"$1"+dr+"$2-$3$1"+hr+(108==Ar(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Tr(e,"stretch",0)?ri(wr(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return wr(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,i,o,s,a){return ur+n+":"+r+a+(i?ur+n+"-span:"+(o?s:+s-+r)+a:"")+e}));case 4949:if(121===Ar(e,t+6))return wr(e,":",":"+dr)+e;break;case 6444:switch(Ar(e,45===Ar(e,14)?18:11)){case 120:return wr(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+dr+(45===Ar(e,14)?"inline-":"")+"box$3$1"+dr+"$2$3$1"+ur+"$2box$3")+e;case 100:return wr(e,":",":"+ur)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return wr(e,"scroll-","scroll-snap-")+e}return e}function ii(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case mr:return void(e.return=ri(e.value,e.length,n));case Or:return ti([Fr(e,{value:wr(e.value,"@","@"+dr)})],r);case pr:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(Sr(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Br(Fr(e,{props:[wr(t,/:(read-\w+)/,":"+hr+"$1")]})),Br(Fr(e,{props:[t]})),kr(e,{props:Rr(n,r)});break;case"::placeholder":Br(Fr(e,{props:[wr(t,/:(plac\w+)/,":"+dr+"input-$1")]})),Br(Fr(e,{props:[wr(t,/:(plac\w+)/,":"+hr+"$1")]})),Br(Fr(e,{props:[wr(t,/:(plac\w+)/,ur+"input-$1")]})),Br(Fr(e,{props:[t]})),kr(e,{props:Rr(n,r)})}return""}))}}function oi(e){return qr(si("",null,null,null,[""],e=Wr(e),0,[0],e))}function si(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,h=s,d=0,f=0,p=0,m=1,g=1,O=1,b=0,y="",v=i,k=o,x=r,S=y;g;)switch(p=b,b=Zr()){case 40:if(108!=p&&58==Ar(S,h-1)){-1!=Tr(S+=wr(Yr(b),"&","&\f"),"&\f",yr(c?a[c-1]:0))&&(O=-1);break}case 34:case 39:case 91:S+=Yr(b);break;case 9:case 10:case 13:case 32:S+=Gr(p);break;case 92:S+=Vr(Ur()-1,7);continue;case 47:switch(jr()){case 42:case 47:Pr(li(Jr(Zr(),Ur()),t,n,l),l);break;default:S+="/"}break;case 123*m:a[c++]=Cr(S)*O;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==O&&(S=wr(S,/\f/g,"")),f>0&&Cr(S)-h&&Pr(f>32?ci(S+";",r,n,h-1,l):ci(wr(S," ","")+";",r,n,h-2,l),l);break;case 59:S+=";";default:if(Pr(x=ai(S,t,n,c,u,i,a,y,v=[],k=[],h,o),o),123===b)if(0===u)si(S,t,x,x,v,o,h,a,k);else switch(99===d&&110===Ar(S,3)?100:d){case 100:case 108:case 109:case 115:si(e,x,x,r&&Pr(ai(e,x,x,0,0,i,a,y,i,v=[],h,k),k),i,k,h,a,r?v:k);break;default:si(S,x,x,x,[""],k,0,a,k)}}c=u=f=0,m=O=1,y=S="",h=s;break;case 58:h=1+Cr(S),f=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==zr())continue;switch(S+=vr(b),b*m){case 38:O=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Cr(S)-1)*O,O=1;break;case 64:45===jr()&&(S+=Yr(Zr())),d=jr(),u=h=Cr(y=S+=ei(Ur())),b++;break;case 45:45===p&&2==Cr(S)&&(m=0)}}return o}function ai(e,t,n,r,i,o,s,a,l,c,u,h){for(var d=i-1,f=0===i?o:[""],p=_r(f),m=0,g=0,O=0;m0?f[b]+" "+y:wr(y,/&\f/g,f[b])))&&(l[O++]=v);return Ir(e,t,n,0===i?pr:a,l,c,u,h)}function li(e,t,n,r){return Ir(e,t,n,fr,vr($r),Er(e,2,-2),0,r)}function ci(e,t,n,r,i){return Ir(e,t,n,mr,Er(e,0,r),Er(e,r+1,-1),r,i)}var ui={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hi=n(5683),di="undefined"!=typeof hi&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_ATTR)||"data-styled",fi="active",pi="data-styled-version",mi="6.1.11",gi="/*!sc*/\n",Oi="undefined"!=typeof window&&"HTMLElement"in window,bi=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof hi&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof hi&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY)),yi={},vi=(new Set,Object.freeze([])),ki=Object.freeze({});function xi(e,t,n){return void 0===n&&(n=ki),e.theme!==n.theme&&e.theme||t||n.theme}var Si=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),wi=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ti=/(^-|-$)/g;function Ai(e){return e.replace(wi,"-").replace(Ti,"")}var Ei=/(a)(d)/gi,Ci=52,_i=function(e){return String.fromCharCode(e+(e>25?39:97))};function Pi(e){var t,n="";for(t=Math.abs(e);t>Ci;t=t/Ci|0)n=_i(t%Ci)+n;return(_i(t%Ci)+n).replace(Ei,"$1-$2")}var Ri,Di=5381,Ni=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Qi=function(e){return Ni(Di,e)};function Mi(e){return Pi(Qi(e)>>>0)}function $i(e){return e.displayName||e.name||"Component"}function Li(e){return"string"==typeof e&&!0}var Ii="function"==typeof Symbol&&Symbol.for,Fi=Ii?Symbol.for("react.memo"):60115,Bi=Ii?Symbol.for("react.forward_ref"):60112,zi={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Zi={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ji={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ui=((Ri={})[Bi]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ri[Fi]=ji,Ri);function Xi(e){return("type"in(t=e)&&t.type.$$typeof)===Fi?ji:"$$typeof"in e?Ui[e.$$typeof]:zi;var t}var Hi=Object.defineProperty,Wi=Object.getOwnPropertyNames,qi=Object.getOwnPropertySymbols,Yi=Object.getOwnPropertyDescriptor,Gi=Object.getPrototypeOf,Vi=Object.prototype;function Ki(e,t,n){if("string"!=typeof t){if(Vi){var r=Gi(t);r&&r!==Vi&&Ki(e,r,n)}var i=Wi(t);qi&&(i=i.concat(qi(t)));for(var o=Xi(e),s=Xi(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var ao=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw so(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(s).concat(a,'{content:"').concat(l,'"}').concat(gi)},o=0;o0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===pr&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Ao,n).replace(r,c))})),s.prefix&&u.push(ii),u.push(ni);var h=function(e,i,o,a){void 0===i&&(i=""),void 0===o&&(o=""),void 0===a&&(a="&"),t=a,n=i,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(Eo,""),c=oi(o||i?"".concat(o," ").concat(i," { ").concat(l," }"):l);s.namespace&&(c=Co(c,s.namespace));var h,d=[];return ti(c,function(e){var t=_r(e);return function(n,r,i,o){for(var s="",a=0;a="A"&&e<="Z"};function Io(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,o)){var s=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}r=to(r,o),this.staticRulesId=o}else{for(var a=Ni(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=to(r,d)}}return r},e}(),Xo=J.createContext(void 0);Xo.Consumer;var Ho={};new Set;function Wo(e,t,n){var r=eo(e),i=e,o=!Li(e),s=t.attrs,a=void 0===s?vi:s,l=t.componentId,c=void 0===l?function(e,t){var n="string"!=typeof e?"sc":Ai(e);Ho[n]=(Ho[n]||0)+1;var r="".concat(n,"-").concat(Mi(mi+n+Ho[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):l,u=t.displayName,h=void 0===u?function(e){return Li(e)?"styled.".concat(e):"Styled(".concat($i(e),")")}(e):u,d=t.displayName&&t.componentId?"".concat(Ai(t.displayName),"-").concat(t.componentId):t.componentId||c,f=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a,p=t.shouldForwardProp;if(r&&i.shouldForwardProp){var m=i.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;p=function(e,t){return m(e,t)&&g(e,t)}}else p=m}var O=new Uo(n,d,r?i.componentStyle:void 0);function b(e,t){return function(e,t,n){var r=e.attrs,i=e.componentStyle,o=e.defaultProps,s=e.foldedComponentIds,a=e.styledComponentId,l=e.target,c=J.useContext(Xo),u=Qo(),h=e.shouldForwardProp||u.shouldForwardProp,d=xi(t,c,o)||ki,f=function(e,t,n){for(var r,i=sr(sr({},t),{className:void 0,theme:n}),o=0;o2&&To.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=bo(),r=no([n&&'nonce="'.concat(n,'"'),"".concat(di,'="true"'),"".concat(pi,'="').concat(mi,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw so(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw so(2);var n=((t={})[di]="",t[pi]=mi,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=bo();return r&&(n.nonce=r),[J.createElement("style",sr({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new To({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw so(2);return J.createElement(Mo,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw so(3)}})(),"__sc-".concat(di,"__");const ts="undefined"===typeof window||"Deno"in window;function ns(){}function rs(e){return"number"===typeof e&&e>=0&&e!==1/0}function is(e,t){return Math.max(e+(t||0)-Date.now(),0)}function os(e,t,n){return bs(e)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function ss(e,t,n){return bs(e)?[{...t,queryKey:e},n]:[e||{},t]}function as(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(bs(s))if(r){if(t.queryHash!==cs(s,t.options))return!1}else if(!hs(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof a||t.isStale()===a)&&(("undefined"===typeof i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function ls(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(bs(o)){if(!t.options.mutationKey)return!1;if(n){if(us(t.options.mutationKey)!==us(o))return!1}else if(!hs(t.options.mutationKey,o))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(i&&!i(t))}function cs(e,t){return((null==t?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,((e,t)=>gs(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function hs(e,t){return ds(e,t)}function ds(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!ds(e[n],t[n]))))}function fs(e,t){if(e===t)return e;const n=ms(e)&&ms(t);if(n||gs(e)&&gs(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let l=0;l{setTimeout(t,e)}))}function vs(e){ys(0).then(e)}function ks(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?fs(e,t):t}const xs=console;const Ss=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()};const i=r=>{t?e.push(r):vs((()=>{n(r)}))},o=()=>{const t=e;e=[],t.length&&vs((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r{e(...n)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class ws{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Ts=new class extends ws{constructor(){super(),this.setup=e=>{if(!ts&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach((e=>{let{listener:t}=e;t()}))}isFocused(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},As=["online","offline"];const Es=new class extends ws{constructor(){super(),this.setup=e=>{if(!ts&&window.addEventListener){const t=()=>e();return As.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{As.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach((e=>{let{listener:t}=e;t()}))}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}};function Cs(e){return Math.min(1e3*2**e,3e4)}function _s(e){return"online"!==(null!=e?e:"online")||Es.isOnline()}class Ps{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function Rs(e){return e instanceof Ps}function Ds(e){let t,n,r,i=!1,o=0,s=!1;const a=new Promise(((e,t)=>{n=e,r=t})),l=()=>!Ts.isFocused()||"always"!==e.networkMode&&!Es.isOnline(),c=r=>{s||(s=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},u=n=>{s||(s=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},h=()=>new Promise((n=>{t=e=>{const t=s||!l();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,s||null==e.onContinue||e.onContinue()})),d=()=>{if(s)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(c).catch((t=>{var n,r;if(s)return;const a=null!=(n=e.retry)?n:3,c=null!=(r=e.retryDelay)?r:Cs,f="function"===typeof c?c(o,t):c,p=!0===a||"number"===typeof a&&o{if(l())return h()})).then((()=>{i?u(t):d()}))):u(t)}))};return _s(e.networkMode)?d():h().then(d),{promise:a,cancel:t=>{s||(u(new Ps(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?a:Promise.resolve(),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1}}}class Ns{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rs(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:ts?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Qs extends Ns{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||xs,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=ks(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(ns).catch(ns):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||!this.state.dataUpdatedAt||!is(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=function(){if("function"===typeof AbortController)return new AbortController}(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};a(s);const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};var c;(a(l),null==(n=this.options.behavior)||n.onFetch(l),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=l.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(c=l.fetchOptions)?void 0:c.meta});const u=e=>{var t,n,r,i;(Rs(e)&&e.silent||this.dispatch({type:"error",error:e}),Rs(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Ds({fn:l.fetchFn,abort:null==o?void 0:o.abort.bind(o),onSuccess:e=>{var t,n,r,i;"undefined"!==typeof e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):u(new Error(this.queryHash+" data is undefined"))},onError:u,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:_s(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Rs(i)&&i.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Ss.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}class Ms extends ws{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const i=t.queryKey,o=null!=(r=t.queryHash)?r:cs(i,t);let s=this.get(o);return s||(s=new Qs({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){Ss.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=ss(e,t);return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((e=>as(n,e)))}findAll(e,t){const[n]=ss(e,t);return Object.keys(n).length>0?this.queries.filter((e=>as(n,e))):this.queries}notify(e){Ss.batch((()=>{this.listeners.forEach((t=>{let{listener:n}=t;n(e)}))}))}onFocus(){Ss.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){Ss.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}class $s extends Ns{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||xs,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=Ds({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,i,o,s,a,l,c;if(!t){var u,h,d,f;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(u=(h=this.mutationCache.config).onMutate)?void 0:u.call(h,this.state.variables,this));const e=await(null==(d=(f=this.options).onMutate)?void 0:d.call(f,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const p=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,p,this.state.variables,this.state.context,this)),await(null==(i=(o=this.options).onSuccess)?void 0:i.call(o,p,this.state.variables,this.state.context)),await(null==(s=(a=this.mutationCache.config).onSettled)?void 0:s.call(a,p,null,this.state.variables,this.state.context,this)),await(null==(l=(c=this.options).onSettled)?void 0:l.call(c,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(x){try{var p,m,g,O,b,y,v,k;throw await(null==(p=(m=this.mutationCache.config).onError)?void 0:p.call(m,x,this.state.variables,this.state.context,this)),await(null==(g=(O=this.options).onError)?void 0:g.call(O,x,this.state.variables,this.state.context)),await(null==(b=(y=this.mutationCache.config).onSettled)?void 0:b.call(y,void 0,x,this.state.variables,this.state.context,this)),await(null==(v=(k=this.options).onSettled)?void 0:v.call(k,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!_s(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),Ss.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}class Ls extends ws{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new $s({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){Ss.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((t=>ls(e,t)))}findAll(e){return this.mutations.filter((t=>ls(e,t)))}notify(e){Ss.batch((()=>{this.listeners.forEach((t=>{let{listener:n}=t;n(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return Ss.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(ns)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function Is(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,l=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,c=null==l?void 0:l.pageParam,u="forward"===(null==l?void 0:l.direction),h="backward"===(null==l?void 0:l.direction),d=(null==(o=e.state.data)?void 0:o.pages)||[],f=(null==(s=e.state.data)?void 0:s.pageParams)||[];let p=f,m=!1;const g=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),O=(e,t,n,r)=>(p=r?[t,...p]:[...p,t],r?[n,...e]:[...e,n]),b=(t,n,r,i)=>{if(m)return Promise.reject("Cancelled");if("undefined"===typeof r&&!n&&t.length)return Promise.resolve(t);const o={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var s;s=o,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?m=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{m=!0})),e.signal}});const a=g(o),l=Promise.resolve(a).then((e=>O(t,r,e,i)));return l};let y;if(d.length)if(u){const t="undefined"!==typeof c,n=t?c:Fs(e.options,d);y=b(d,t,n)}else if(h){const t="undefined"!==typeof c,n=t?c:Bs(e.options,d);y=b(d,t,n,!0)}else{p=[];const t="undefined"===typeof e.options.getNextPageParam;y=!a||!d[0]||a(d[0],0,d)?b([],t,f[0]):Promise.resolve(O([],f[0],d[0]));for(let n=1;n{if(!a||!d[n]||a(d[n],n,d)){const i=t?f[n]:Fs(e.options,r);return b(r,t,i)}return Promise.resolve(O(r,f[n],d[n]))}))}else y=b([]);return y.then((e=>({pages:e,pageParams:p})))}}}}function Fs(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function Bs(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}const zs=J.createContext(void 0),Zs=J.createContext(!1);function js(e,t){return e||(t&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=zs),window.ReactQueryClientContext):zs)}const Us=function(){let{context:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=J.useContext(js(e,J.useContext(Zs)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Xs=e=>{let{client:t,children:n,context:r,contextSharing:i=!1}=e;J.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]);const o=js(r,i);return J.createElement(Zs.Provider,{value:!r&&i},J.createElement(o.Provider,{value:t},n))};var Hs;n(1784);function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;tt.sql({dialect:t[e]})))}const ga=[fa.t$.of({name:"C",extensions:["c","h","ino"],load:()=>n.e(2266).then(n.bind(n,2266)).then((e=>e.cpp()))}),fa.t$.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load:()=>n.e(2266).then(n.bind(n,2266)).then((e=>e.cpp()))}),fa.t$.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load:()=>ma("Cassandra")}),fa.t$.of({name:"CSS",extensions:["css"],load:()=>Promise.resolve().then(n.bind(n,8244)).then((e=>e.css()))}),fa.t$.of({name:"Go",extensions:["go"],load:()=>n.e(6769).then(n.bind(n,6769)).then((e=>e.go()))}),fa.t$.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load:()=>Promise.resolve().then(n.bind(n,5221)).then((e=>e.html()))}),fa.t$.of({name:"Java",extensions:["java"],load:()=>n.e(9e3).then(n.bind(n,6619)).then((e=>e.java()))}),fa.t$.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load:()=>Promise.resolve().then(n.bind(n,4013)).then((e=>e.javascript()))}),fa.t$.of({name:"JSON",alias:["json5"],extensions:["json","map"],load:()=>n.e(9407).then(n.bind(n,9407)).then((e=>e.json()))}),fa.t$.of({name:"JSX",extensions:["jsx"],load:()=>Promise.resolve().then(n.bind(n,4013)).then((e=>e.javascript({jsx:!0})))}),fa.t$.of({name:"LESS",extensions:["less"],load:()=>n.e(8615).then(n.bind(n,996)).then((e=>e.less()))}),fa.t$.of({name:"Liquid",extensions:["liquid"],load:()=>n.e(4).then(n.bind(n,4)).then((e=>e.liquid()))}),fa.t$.of({name:"MariaDB SQL",load:()=>ma("MariaSQL")}),fa.t$.of({name:"Markdown",extensions:["md","markdown","mkd"],load:()=>Promise.resolve().then(n.bind(n,7469)).then((e=>e.markdown()))}),fa.t$.of({name:"MS SQL",load:()=>ma("MSSQL")}),fa.t$.of({name:"MySQL",load:()=>ma("MySQL")}),fa.t$.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load:()=>n.e(9188).then(n.bind(n,9188)).then((e=>e.php()))}),fa.t$.of({name:"PLSQL",extensions:["pls"],load:()=>ma("PLSQL")}),fa.t$.of({name:"PostgreSQL",load:()=>ma("PostgreSQL")}),fa.t$.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load:()=>n.e(9223).then(n.bind(n,9223)).then((e=>e.python()))}),fa.t$.of({name:"Rust",extensions:["rs"],load:()=>n.e(4089).then(n.bind(n,4089)).then((e=>e.rust()))}),fa.t$.of({name:"Sass",extensions:["sass"],load:()=>n.e(3450).then(n.bind(n,3450)).then((e=>e.sass({indented:!0})))}),fa.t$.of({name:"SCSS",extensions:["scss"],load:()=>n.e(3450).then(n.bind(n,3450)).then((e=>e.sass()))}),fa.t$.of({name:"SQL",extensions:["sql"],load:()=>ma("StandardSQL")}),fa.t$.of({name:"SQLite",load:()=>ma("SQLite")}),fa.t$.of({name:"TSX",extensions:["tsx"],load:()=>Promise.resolve().then(n.bind(n,4013)).then((e=>e.javascript({jsx:!0,typescript:!0})))}),fa.t$.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load:()=>Promise.resolve().then(n.bind(n,4013)).then((e=>e.javascript({typescript:!0})))}),fa.t$.of({name:"WebAssembly",extensions:["wat","wast"],load:()=>n.e(7873).then(n.bind(n,7873)).then((e=>e.wast()))}),fa.t$.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load:()=>n.e(1994).then(n.bind(n,1994)).then((e=>e.xml()))}),fa.t$.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load:()=>n.e(6576).then(n.bind(n,6576)).then((e=>e.yaml()))}),fa.t$.of({name:"APL",extensions:["dyalog","apl"],load:()=>n.e(6175).then(n.bind(n,8556)).then((e=>pa(e.apl)))}),fa.t$.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load:()=>n.e(9468).then(n.bind(n,9468)).then((e=>pa(e.asciiArmor)))}),fa.t$.of({name:"ASN.1",extensions:["asn","asn1"],load:()=>n.e(2007).then(n.bind(n,2007)).then((e=>pa(e.asn1({}))))}),fa.t$.of({name:"Asterisk",filename:/^extensions\.conf$/i,load:()=>n.e(866).then(n.bind(n,866)).then((e=>pa(e.asterisk)))}),fa.t$.of({name:"Brainfuck",extensions:["b","bf"],load:()=>n.e(6339).then(n.bind(n,6339)).then((e=>pa(e.brainfuck)))}),fa.t$.of({name:"Cobol",extensions:["cob","cpy"],load:()=>n.e(6547).then(n.bind(n,6547)).then((e=>pa(e.cobol)))}),fa.t$.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.csharp)))}),fa.t$.of({name:"Clojure",extensions:["clj","cljc","cljx"],load:()=>n.e(3368).then(n.bind(n,3368)).then((e=>pa(e.clojure)))}),fa.t$.of({name:"ClojureScript",extensions:["cljs"],load:()=>n.e(3368).then(n.bind(n,3368)).then((e=>pa(e.clojure)))}),fa.t$.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load:()=>n.e(2463).then(n.bind(n,2463)).then((e=>pa(e.gss)))}),fa.t$.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load:()=>n.e(935).then(n.bind(n,935)).then((e=>pa(e.cmake)))}),fa.t$.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load:()=>n.e(5473).then(n.bind(n,5473)).then((e=>pa(e.coffeeScript)))}),fa.t$.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load:()=>n.e(7607).then(n.bind(n,7607)).then((e=>pa(e.commonLisp)))}),fa.t$.of({name:"Cypher",extensions:["cyp","cypher"],load:()=>n.e(4269).then(n.bind(n,4269)).then((e=>pa(e.cypher)))}),fa.t$.of({name:"Cython",extensions:["pyx","pxd","pxi"],load:()=>n.e(4884).then(n.bind(n,4884)).then((e=>pa(e.cython)))}),fa.t$.of({name:"Crystal",extensions:["cr"],load:()=>n.e(8130).then(n.bind(n,8130)).then((e=>pa(e.crystal)))}),fa.t$.of({name:"D",extensions:["d"],load:()=>n.e(8448).then(n.bind(n,8448)).then((e=>pa(e.d)))}),fa.t$.of({name:"Dart",extensions:["dart"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.dart)))}),fa.t$.of({name:"diff",extensions:["diff","patch"],load:()=>n.e(4829).then(n.bind(n,4829)).then((e=>pa(e.diff)))}),fa.t$.of({name:"Dockerfile",filename:/^Dockerfile$/,load:()=>n.e(5912).then(n.bind(n,5912)).then((e=>pa(e.dockerFile)))}),fa.t$.of({name:"DTD",extensions:["dtd"],load:()=>n.e(6736).then(n.bind(n,6736)).then((e=>pa(e.dtd)))}),fa.t$.of({name:"Dylan",extensions:["dylan","dyl","intr"],load:()=>n.e(8898).then(n.bind(n,8898)).then((e=>pa(e.dylan)))}),fa.t$.of({name:"EBNF",load:()=>n.e(6013).then(n.bind(n,6013)).then((e=>pa(e.ebnf)))}),fa.t$.of({name:"ECL",extensions:["ecl"],load:()=>n.e(3212).then(n.bind(n,3212)).then((e=>pa(e.ecl)))}),fa.t$.of({name:"edn",extensions:["edn"],load:()=>n.e(3368).then(n.bind(n,3368)).then((e=>pa(e.clojure)))}),fa.t$.of({name:"Eiffel",extensions:["e"],load:()=>n.e(4989).then(n.bind(n,4989)).then((e=>pa(e.eiffel)))}),fa.t$.of({name:"Elm",extensions:["elm"],load:()=>n.e(5208).then(n.bind(n,5208)).then((e=>pa(e.elm)))}),fa.t$.of({name:"Erlang",extensions:["erl"],load:()=>n.e(7717).then(n.bind(n,7717)).then((e=>pa(e.erlang)))}),fa.t$.of({name:"Esper",load:()=>n.e(1188).then(n.bind(n,1188)).then((e=>pa(e.esper)))}),fa.t$.of({name:"Factor",extensions:["factor"],load:()=>n.e(9553).then(n.bind(n,9553)).then((e=>pa(e.factor)))}),fa.t$.of({name:"FCL",load:()=>n.e(6193).then(n.bind(n,6193)).then((e=>pa(e.fcl)))}),fa.t$.of({name:"Forth",extensions:["forth","fth","4th"],load:()=>n.e(1899).then(n.bind(n,1899)).then((e=>pa(e.forth)))}),fa.t$.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load:()=>n.e(3726).then(n.bind(n,3726)).then((e=>pa(e.fortran)))}),fa.t$.of({name:"F#",alias:["fsharp"],extensions:["fs"],load:()=>n.e(3492).then(n.bind(n,3492)).then((e=>pa(e.fSharp)))}),fa.t$.of({name:"Gas",extensions:["s"],load:()=>n.e(685).then(n.bind(n,685)).then((e=>pa(e.gas)))}),fa.t$.of({name:"Gherkin",extensions:["feature"],load:()=>n.e(2678).then(n.bind(n,2678)).then((e=>pa(e.gherkin)))}),fa.t$.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load:()=>n.e(4388).then(n.bind(n,4388)).then((e=>pa(e.groovy)))}),fa.t$.of({name:"Haskell",extensions:["hs"],load:()=>n.e(5692).then(n.bind(n,5692)).then((e=>pa(e.haskell)))}),fa.t$.of({name:"Haxe",extensions:["hx"],load:()=>n.e(9354).then(n.bind(n,9354)).then((e=>pa(e.haxe)))}),fa.t$.of({name:"HXML",extensions:["hxml"],load:()=>n.e(9354).then(n.bind(n,9354)).then((e=>pa(e.hxml)))}),fa.t$.of({name:"HTTP",load:()=>n.e(3790).then(n.bind(n,3790)).then((e=>pa(e.http)))}),fa.t$.of({name:"IDL",extensions:["pro"],load:()=>n.e(8219).then(n.bind(n,8219)).then((e=>pa(e.idl)))}),fa.t$.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load:()=>n.e(8437).then(n.bind(n,8437)).then((e=>pa(e.jsonld)))}),fa.t$.of({name:"Jinja2",extensions:["j2","jinja","jinja2"],load:()=>n.e(7316).then(n.bind(n,7316)).then((e=>pa(e.jinja2)))}),fa.t$.of({name:"Julia",extensions:["jl"],load:()=>n.e(7485).then(n.bind(n,7485)).then((e=>pa(e.julia)))}),fa.t$.of({name:"Kotlin",extensions:["kt","kts"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.kotlin)))}),fa.t$.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load:()=>n.e(8063).then(n.bind(n,8063)).then((e=>pa(e.liveScript)))}),fa.t$.of({name:"Lua",extensions:["lua"],load:()=>n.e(2682).then(n.bind(n,2682)).then((e=>pa(e.lua)))}),fa.t$.of({name:"mIRC",extensions:["mrc"],load:()=>n.e(5039).then(n.bind(n,5039)).then((e=>pa(e.mirc)))}),fa.t$.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load:()=>n.e(5516).then(n.bind(n,5516)).then((e=>pa(e.mathematica)))}),fa.t$.of({name:"Modelica",extensions:["mo"],load:()=>n.e(1086).then(n.bind(n,1086)).then((e=>pa(e.modelica)))}),fa.t$.of({name:"MUMPS",extensions:["mps"],load:()=>n.e(3640).then(n.bind(n,3640)).then((e=>pa(e.mumps)))}),fa.t$.of({name:"Mbox",extensions:["mbox"],load:()=>n.e(9986).then(n.bind(n,9986)).then((e=>pa(e.mbox)))}),fa.t$.of({name:"Nginx",filename:/nginx.*\.conf$/i,load:()=>n.e(5188).then(n.bind(n,5188)).then((e=>pa(e.nginx)))}),fa.t$.of({name:"NSIS",extensions:["nsh","nsi"],load:()=>n.e(1677).then(n.bind(n,1677)).then((e=>pa(e.nsis)))}),fa.t$.of({name:"NTriples",extensions:["nt","nq"],load:()=>n.e(8945).then(n.bind(n,8945)).then((e=>pa(e.ntriples)))}),fa.t$.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.objectiveC)))}),fa.t$.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.objectiveCpp)))}),fa.t$.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load:()=>n.e(3492).then(n.bind(n,3492)).then((e=>pa(e.oCaml)))}),fa.t$.of({name:"Octave",extensions:["m"],load:()=>n.e(9750).then(n.bind(n,9750)).then((e=>pa(e.octave)))}),fa.t$.of({name:"Oz",extensions:["oz"],load:()=>n.e(5395).then(n.bind(n,5395)).then((e=>pa(e.oz)))}),fa.t$.of({name:"Pascal",extensions:["p","pas"],load:()=>n.e(4374).then(n.bind(n,4374)).then((e=>pa(e.pascal)))}),fa.t$.of({name:"Perl",extensions:["pl","pm"],load:()=>n.e(1615).then(n.bind(n,1615)).then((e=>pa(e.perl)))}),fa.t$.of({name:"Pig",extensions:["pig"],load:()=>n.e(1140).then(n.bind(n,1140)).then((e=>pa(e.pig)))}),fa.t$.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load:()=>n.e(1839).then(n.bind(n,1839)).then((e=>pa(e.powerShell)))}),fa.t$.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load:()=>n.e(5323).then(n.bind(n,5323)).then((e=>pa(e.properties)))}),fa.t$.of({name:"ProtoBuf",extensions:["proto"],load:()=>n.e(2433).then(n.bind(n,2433)).then((e=>pa(e.protobuf)))}),fa.t$.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load:()=>n.e(3632).then(n.bind(n,3632)).then((e=>pa(e.pug)))}),fa.t$.of({name:"Puppet",extensions:["pp"],load:()=>n.e(9484).then(n.bind(n,9484)).then((e=>pa(e.puppet)))}),fa.t$.of({name:"Q",extensions:["q"],load:()=>n.e(3171).then(n.bind(n,3171)).then((e=>pa(e.q)))}),fa.t$.of({name:"R",alias:["rscript"],extensions:["r","R"],load:()=>n.e(6054).then(n.bind(n,6054)).then((e=>pa(e.r)))}),fa.t$.of({name:"RPM Changes",load:()=>n.e(1993).then(n.bind(n,1993)).then((e=>pa(e.rpmChanges)))}),fa.t$.of({name:"RPM Spec",extensions:["spec"],load:()=>n.e(1993).then(n.bind(n,1993)).then((e=>pa(e.rpmSpec)))}),fa.t$.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load:()=>n.e(4702).then(n.bind(n,4702)).then((e=>pa(e.ruby)))}),fa.t$.of({name:"SAS",extensions:["sas"],load:()=>n.e(4505).then(n.bind(n,4505)).then((e=>pa(e.sas)))}),fa.t$.of({name:"Scala",extensions:["scala"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.scala)))}),fa.t$.of({name:"Scheme",extensions:["scm","ss"],load:()=>n.e(2565).then(n.bind(n,2565)).then((e=>pa(e.scheme)))}),fa.t$.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load:()=>n.e(8226).then(n.bind(n,8226)).then((e=>pa(e.shell)))}),fa.t$.of({name:"Sieve",extensions:["siv","sieve"],load:()=>n.e(642).then(n.bind(n,642)).then((e=>pa(e.sieve)))}),fa.t$.of({name:"Smalltalk",extensions:["st"],load:()=>n.e(5381).then(n.bind(n,5381)).then((e=>pa(e.smalltalk)))}),fa.t$.of({name:"Solr",load:()=>n.e(9562).then(n.bind(n,9562)).then((e=>pa(e.solr)))}),fa.t$.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load:()=>n.e(3492).then(n.bind(n,3492)).then((e=>pa(e.sml)))}),fa.t$.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load:()=>n.e(5311).then(n.bind(n,5311)).then((e=>pa(e.sparql)))}),fa.t$.of({name:"Spreadsheet",alias:["excel","formula"],load:()=>n.e(3498).then(n.bind(n,3498)).then((e=>pa(e.spreadsheet)))}),fa.t$.of({name:"Squirrel",extensions:["nut"],load:()=>n.e(2146).then(n.bind(n,2146)).then((e=>pa(e.squirrel)))}),fa.t$.of({name:"Stylus",extensions:["styl"],load:()=>n.e(7164).then(n.bind(n,7164)).then((e=>pa(e.stylus)))}),fa.t$.of({name:"Swift",extensions:["swift"],load:()=>n.e(7743).then(n.bind(n,7743)).then((e=>pa(e.swift)))}),fa.t$.of({name:"sTeX",load:()=>n.e(3884).then(n.bind(n,3884)).then((e=>pa(e.stex)))}),fa.t$.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load:()=>n.e(3884).then(n.bind(n,3884)).then((e=>pa(e.stex)))}),fa.t$.of({name:"SystemVerilog",extensions:["v","sv","svh"],load:()=>n.e(7062).then(n.bind(n,7062)).then((e=>pa(e.verilog)))}),fa.t$.of({name:"Tcl",extensions:["tcl"],load:()=>n.e(6555).then(n.bind(n,6555)).then((e=>pa(e.tcl)))}),fa.t$.of({name:"Textile",extensions:["textile"],load:()=>n.e(8373).then(n.bind(n,8373)).then((e=>pa(e.textile)))}),fa.t$.of({name:"TiddlyWiki",load:()=>n.e(2290).then(n.bind(n,2290)).then((e=>pa(e.tiddlyWiki)))}),fa.t$.of({name:"Tiki wiki",load:()=>n.e(4517).then(n.bind(n,4517)).then((e=>pa(e.tiki)))}),fa.t$.of({name:"TOML",extensions:["toml"],load:()=>n.e(7534).then(n.bind(n,7534)).then((e=>pa(e.toml)))}),fa.t$.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load:()=>n.e(3743).then(n.bind(n,3743)).then((e=>pa(e.troff)))}),fa.t$.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load:()=>n.e(1947).then(n.bind(n,1947)).then((e=>pa(e.ttcn)))}),fa.t$.of({name:"TTCN_CFG",extensions:["cfg"],load:()=>n.e(588).then(n.bind(n,588)).then((e=>pa(e.ttcnCfg)))}),fa.t$.of({name:"Turtle",extensions:["ttl"],load:()=>n.e(7628).then(n.bind(n,7628)).then((e=>pa(e.turtle)))}),fa.t$.of({name:"Web IDL",extensions:["webidl"],load:()=>n.e(8047).then(n.bind(n,8047)).then((e=>pa(e.webIDL)))}),fa.t$.of({name:"VB.NET",extensions:["vb"],load:()=>n.e(9978).then(n.bind(n,9978)).then((e=>pa(e.vb)))}),fa.t$.of({name:"VBScript",extensions:["vbs"],load:()=>n.e(6881).then(n.bind(n,6881)).then((e=>pa(e.vbScript)))}),fa.t$.of({name:"Velocity",extensions:["vtl"],load:()=>n.e(9557).then(n.bind(n,9557)).then((e=>pa(e.velocity)))}),fa.t$.of({name:"Verilog",extensions:["v"],load:()=>n.e(7062).then(n.bind(n,7062)).then((e=>pa(e.verilog)))}),fa.t$.of({name:"VHDL",extensions:["vhd","vhdl"],load:()=>n.e(7472).then(n.bind(n,7472)).then((e=>pa(e.vhdl)))}),fa.t$.of({name:"XQuery",extensions:["xy","xquery"],load:()=>n.e(854).then(n.bind(n,854)).then((e=>pa(e.xQuery)))}),fa.t$.of({name:"Yacas",extensions:["ys"],load:()=>n.e(3067).then(n.bind(n,3067)).then((e=>pa(e.yacas)))}),fa.t$.of({name:"Z80",extensions:["z80"],load:()=>n.e(8206).then(n.bind(n,8206)).then((e=>pa(e.z80)))}),fa.t$.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load:()=>n.e(5251).then(n.bind(n,5251)).then((e=>pa(e.mscgen)))}),fa.t$.of({name:"X\xf9",extensions:["xu"],load:()=>n.e(5251).then(n.bind(n,5251)).then((e=>pa(e.xu)))}),fa.t$.of({name:"MsGenny",extensions:["msgenny"],load:()=>n.e(5251).then(n.bind(n,5251)).then((e=>pa(e.msgenny)))}),fa.t$.of({name:"Vue",extensions:["vue"],load:()=>n.e(2066).then(n.bind(n,2066)).then((e=>e.vue()))}),fa.t$.of({name:"Angular Template",load:()=>n.e(624).then(n.bind(n,624)).then((e=>e.angular()))})];var Oa=n(4563);function ba(e){var{type:t="scroll",events:n,props:r}=e;return Oa.Z9.fromClass(class{constructor(e){(this.dom=void 0,this.view=void 0,this.view=e,this.dom="dom"===t?e.dom:"content"===t?e.contentDOM:e.scrollDOM,this.dom&&r)&&Object.keys(r).forEach((e=>{this.dom[e]=r[e]}));Object.keys(n||{}).forEach((e=>{n&&n[e]&&this.dom&&this.dom.addEventListener(e,n[e])}))}destroy(){Object.keys(n||{}).forEach((e=>{n&&n[e]&&this.dom&&this.dom.removeEventListener(e,n[e])}))}})}var ya=n(8070),va=n(4450);function ka(e,t){return n=>{let{state:r,dispatch:i}=n;if(r.readOnly)return!1;let o=e(t,r);return!!o&&(i(r.update(o)),!0)}}const xa=ka(Ca,0),Sa=ka(Ea,0),wa=ka(((e,t)=>Ea(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t))),0);function Ta(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const Aa=50;function Ea(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=n.map((e=>Ta(t,e.from).block));if(!r.every((e=>e)))return null;let i=n.map(((e,n)=>function(e,t,n,r){let i,o,{open:s,close:a}=t,l=e.sliceDoc(n-Aa,n),c=e.sliceDoc(r,r+Aa),u=/\s*$/.exec(l)[0].length,h=/^\s*/.exec(c)[0].length,d=l.length-u;if(l.slice(d-s.length,d)==s&&c.slice(h,h+a.length)==a)return{open:{pos:n-u,margin:u&&1},close:{pos:r+h,margin:h&&1}};r-n<=2*Aa?i=o=e.sliceDoc(n,r):(i=e.sliceDoc(n,n+Aa),o=e.sliceDoc(r-Aa,r));let f=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return i.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:n+f+s.length,margin:/\s/.test(i.charAt(f+s.length))?1:0},close:{pos:r-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!i.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&i.some((e=>e))){let e=[];for(let t,n=0;n2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=[],i=-1;for(let{from:o,to:s}of n){let e=r.length,n=1e9,a=Ta(t,o).line;if(a){for(let e=o;e<=s;){let l=t.doc.lineAt(e);if(l.from>i&&(o==s||s>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,o=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:i,indent:o,empty:s,single:a}of r)!a&&s||e.push({from:t.from+o,insert:i+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}const _a=ya.YH.define(),Pa=ya.YH.define(),Ra=ya.sj.define(),Da=ya.sj.define({combine:e=>(0,ya.QR)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),Na=ya.sU.define({create:()=>Ya.empty,update(e,t){let n=t.state.facet(Da),r=t.annotation(_a);if(r){let i=Fa.fromTransaction(t,r.selection),o=r.side,s=0==o?e.undone:e.done;return s=i?Ba(s,s.length,n.minDepth,i):Ua(s,t.startState.selection),new Ya(0==o?r.rest:s,0==o?s:r.rest)}let i=t.annotation(Pa);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(ya.ZX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=Fa.fromTransaction(t),s=t.annotation(ya.ZX.time),a=t.annotation(ya.ZX.userEvent);return o?e=e.addChanges(o,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new Ya(e.done.map(Fa.fromJSON),e.undone.map(Fa.fromJSON))});function Qa(e,t){return function(n){let{state:r,dispatch:i}=n;if(!t&&r.readOnly)return!1;let o=r.field(Na,!1);if(!o)return!1;let s=o.pop(e,r,t);return!!s&&(i(s),!0)}}const Ma=Qa(0,!1),$a=Qa(1,!1),La=Qa(0,!0),Ia=Qa(1,!0);class Fa{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Fa(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new Fa(e.changes&&ya.VR.fromJSON(e.changes),[],e.mapped&&ya.Gu.fromJSON(e.mapped),e.startSelection&&ya.OF.fromJSON(e.startSelection),e.selectionsAfter.map(ya.OF.fromJSON))}static fromTransaction(e,t){let n=Za;for(let r of e.startState.facet(Ra)){let t=r(e);t.length&&(n=n.concat(t))}return!n.length&&e.changes.empty?null:new Fa(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Za)}static selection(e){return new Fa(void 0,Za,void 0,void 0,e)}}function Ba(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function za(e,t){return e.length?t.length?e.concat(t):e:t}const Za=[],ja=200;function Ua(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-ja));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Ba(e,e.length-1,1e9,n.setSelAfter(r)))}return[Fa.selection([t])]}function Xa(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ha(e,t){if(!e.length)return e;let n=e.length,r=Za;for(;n;){let i=Wa(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Fa.selection(r)]:Za}function Wa(e,t,n){let r=za(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Za,n);if(!e.changes)return Fa.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new Fa(i,ya.Pe.mapEffects(e.effects,t),s,e.startSelection.map(o),r)}const qa=/^(input\.type|delete)($|\.)/;class Ya{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new Ya(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||qa.test(n))&&(!s.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,i,o)=>{for(let s=0;s=e&&i<=t&&(r=!0)}})),r}(s.changes,e.changes))||"input.type.compose"==n)?Ba(o,o.length-1,r.minDepth,new Fa(e.changes.compose(s.changes),za(e.effects,s.effects),s.mapped,s.startSelection,Za)):Ba(o,o.length,r.minDepth,e),new Ya(o,Za,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Za;return i.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(i[i.length-1],e)?this:new Ya(Ua(this.done,e),this.undone,t,n)}addMapping(e){return new Ya(Ha(this.done,e),Ha(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],o=i.selectionsAfter[0]||t.selection;if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:_a.of({side:e,rest:Xa(r),selection:o}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?Za:r.slice(0,r.length-1);return i.mapped&&(n=Ha(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:_a.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}Ya.empty=new Ya(Za,Za);const Ga=[{key:"Mod-z",run:Ma,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:$a,preventDefault:!0},{linux:"Ctrl-Shift-z",run:$a,preventDefault:!0},{key:"Mod-u",run:La,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Ia,preventDefault:!0}];function Va(e,t){return ya.OF.create(e.ranges.map(t),e.mainIndex)}function Ka(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Ja(e,t){let{state:n,dispatch:r}=e,i=Va(n.selection,t);return!i.eq(n.selection,!0)&&(r(Ka(n,i)),!0)}function el(e,t){return ya.OF.cursor(t?e.to:e.from)}function tl(e,t){return Ja(e,(n=>n.empty?e.moveByChar(n,t):el(n,t)))}function nl(e){return e.textDirectionAt(e.state.selection.main.head)==Oa.OP.LTR}const rl=e=>tl(e,!nl(e)),il=e=>tl(e,nl(e));function ol(e,t){return Ja(e,(n=>n.empty?e.moveByGroup(n,t):el(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function sl(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function al(e,t,n){let r,i,o=(0,fa.mv)(e).resolveInner(t.head),s=n?va.uY.closedBy:va.uY.openedBy;for(let a=t.head;;){let t=n?o.childAfter(a):o.childBefore(a);if(!t)break;sl(e,t,s)?o=t:a=n?t.to:t.from}return i=o.type.prop(s)&&(r=n?(0,fa.jU)(e,o.from,1):(0,fa.jU)(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,ya.OF.cursor(i,n?-1:1)}function ll(e,t){return Ja(e,(n=>{if(!n.empty)return el(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const cl=e=>ll(e,!1),ul=e=>ll(e,!0);function hl(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):el(n,t)));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>a&&t.bottomdl(e,!1),pl=e=>dl(e,!0);function ml(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=ya.OF.cursor(r.from+n))}return i}function gl(e,t,n){let r=!1,i=Va(e.selection,(t=>{let i=(0,fa.jU)(e,t.head,-1)||(0,fa.jU)(e,t.head,1)||t.head>0&&(0,fa.jU)(e,t.head-1,1)||t.head{let n=t(e);return ya.OF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(Ka(e.state,n)),!0)}function bl(e,t){return Ol(e,(n=>e.moveByChar(n,t)))}const yl=e=>bl(e,!nl(e)),vl=e=>bl(e,nl(e));function kl(e,t){return Ol(e,(n=>e.moveByGroup(n,t)))}function xl(e,t){return Ol(e,(n=>e.moveVertically(n,t)))}const Sl=e=>xl(e,!1),wl=e=>xl(e,!0);function Tl(e,t){return Ol(e,(n=>e.moveVertically(n,t,hl(e).height)))}const Al=e=>Tl(e,!1),El=e=>Tl(e,!0),Cl=e=>{let{state:t,dispatch:n}=e;return n(Ka(t,{anchor:0})),!0},_l=e=>{let{state:t,dispatch:n}=e;return n(Ka(t,{anchor:t.doc.length})),!0},Pl=e=>{let{state:t,dispatch:n}=e;return n(Ka(t,{anchor:t.selection.main.anchor,head:0})),!0},Rl=e=>{let{state:t,dispatch:n}=e;return n(Ka(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function Dl(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange((r=>{let{from:i,to:o}=r;if(i==o){let s=t(r);si&&(n="delete.forward",s=Nl(e,s,!0)),i=Math.min(i,s),o=Math.max(o,s)}else i=Nl(e,i,!1),o=Nl(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:ya.OF.cursor(i,it(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const Ql=(e,t,n)=>Dl(e,(r=>{let i,o,s=r.from,{state:a}=e,l=a.doc.lineAt(s);if(n&&!t&&s>l.from&&sQl(e,!1,!0),$l=e=>Ql(e,!0,!1),Ll=(e,t)=>Dl(e,(n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=(0,ya.zK)(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(l);if(null!=e&&c!=e)break;" "==l&&r==n.head||(e=c),r=a}return r})),Il=e=>Ll(e,!1);function Fl(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function Bl(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let o of Fl(e)){if(n?o.to==e.doc.length:0==o.from)continue;let t=e.doc.lineAt(n?o.to+1:o.from-1),s=t.length+1;if(n){r.push({from:o.to,to:t.to},{from:o.from,insert:t.text+e.lineBreak});for(let t of o.ranges)i.push(ya.OF.range(Math.min(e.doc.length,t.anchor+s),Math.min(e.doc.length,t.head+s)))}else{r.push({from:t.from,to:o.from},{from:o.to,insert:e.lineBreak+t.text});for(let e of o.ranges)i.push(ya.OF.range(e.anchor-s,e.head-s))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:ya.OF.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function zl(e,t,n){if(e.readOnly)return!1;let r=[];for(let i of Fl(e))n?r.push({from:i.from,insert:e.doc.slice(i.from,i.to)+e.lineBreak}):r.push({from:i.to,insert:e.lineBreak+e.doc.slice(i.from,i.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Zl=Ul(!1),jl=Ul(!0);function Ul(e){return t=>{let{state:n,dispatch:r}=t;if(n.readOnly)return!1;let i=n.changeByRange((t=>{let{from:r,to:i}=t,o=n.doc.lineAt(r),s=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=(0,fa.mv)(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(va.uY.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(i.to,o.from))?{from:i.to,to:o.from}:null}(n,r);e&&(r=i=(i<=o.to?o:n.doc.lineAt(i)).to);let a=new fa.KB(n,{simulateBreak:r,simulateDoubleBreak:!!s}),l=(0,fa._v)(a,r);for(null==l&&(l=(0,ya.y$)(/^\s*/.exec(n.doc.lineAt(r).text)[0],n.tabSize));io.from&&r{let i=[];for(let s=r.from;s<=r.to;){let o=e.doc.lineAt(s);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),s=o.to+1}let o=e.changes(i);return{changes:i,range:ya.OF.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}}))}const Hl=e=>{let{state:t,dispatch:n}=e;return!t.readOnly&&(n(t.update(Xl(t,((e,n)=>{n.push({from:e.from,insert:t.facet(fa.Xt)})})),{userEvent:"input.indent"})),!0)},Wl=e=>{let{state:t,dispatch:n}=e;return!t.readOnly&&(n(t.update(Xl(t,((e,n)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let i=(0,ya.y$)(r,t.tabSize),o=0,s=(0,fa.EI)(t,Math.max(0,i-(0,fa.tp)(t)));for(;oJa(e,(t=>ya.OF.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>Ol(e,(t=>ya.OF.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>Ja(e,(t=>ya.OF.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>Ol(e,(t=>ya.OF.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:$l},{key:"Ctrl-h",run:Ml},{key:"Ctrl-k",run:e=>Dl(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=t.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:ya.EY.of(["",""])},range:ya.OF.cursor(e.from)})));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:e=>{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,r=t.doc.lineAt(n),i=n==r.from?n-1:(0,ya.zK)(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:(0,ya.zK)(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:t.doc.slice(n,o).append(t.doc.slice(i,n))},range:ya.OF.cursor(o)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:pl}],Yl=[{key:"ArrowLeft",run:rl,shift:yl,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>ol(e,!nl(e)),shift:e=>kl(e,!nl(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Ja(e,(t=>ml(e,t,!nl(e)))),shift:e=>Ol(e,(t=>ml(e,t,!nl(e)))),preventDefault:!0},{key:"ArrowRight",run:il,shift:vl,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>ol(e,nl(e)),shift:e=>kl(e,nl(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Ja(e,(t=>ml(e,t,nl(e)))),shift:e=>Ol(e,(t=>ml(e,t,nl(e)))),preventDefault:!0},{key:"ArrowUp",run:cl,shift:Sl,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Cl,shift:Pl},{mac:"Ctrl-ArrowUp",run:fl,shift:Al},{key:"ArrowDown",run:ul,shift:wl,preventDefault:!0},{mac:"Cmd-ArrowDown",run:_l,shift:Rl},{mac:"Ctrl-ArrowDown",run:pl,shift:El},{key:"PageUp",run:fl,shift:Al},{key:"PageDown",run:pl,shift:El},{key:"Home",run:e=>Ja(e,(t=>ml(e,t,!1))),shift:e=>Ol(e,(t=>ml(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:Cl,shift:Pl},{key:"End",run:e=>Ja(e,(t=>ml(e,t,!0))),shift:e=>Ol(e,(t=>ml(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:_l,shift:Rl},{key:"Enter",run:Zl},{key:"Mod-a",run:e=>{let{state:t,dispatch:n}=e;return n(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0}},{key:"Backspace",run:Ml,shift:Ml},{key:"Delete",run:$l},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Il},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Ll(e,!0)},{mac:"Mod-Backspace",run:e=>Dl(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>Dl(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head({mac:e.key,run:e.run,shift:e.shift})))),Gl=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Ja(e,(t=>al(e.state,t,!nl(e)))),shift:e=>Ol(e,(t=>al(e.state,t,!nl(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Ja(e,(t=>al(e.state,t,nl(e)))),shift:e=>Ol(e,(t=>al(e.state,t,nl(e))))},{key:"Alt-ArrowUp",run:e=>{let{state:t,dispatch:n}=e;return Bl(t,n,!1)}},{key:"Shift-Alt-ArrowUp",run:e=>{let{state:t,dispatch:n}=e;return zl(t,n,!1)}},{key:"Alt-ArrowDown",run:e=>{let{state:t,dispatch:n}=e;return Bl(t,n,!0)}},{key:"Shift-Alt-ArrowDown",run:e=>{let{state:t,dispatch:n}=e;return zl(t,n,!0)}},{key:"Escape",run:e=>{let{state:t,dispatch:n}=e,r=t.selection,i=null;return r.ranges.length>1?i=ya.OF.create([r.main]):r.main.empty||(i=ya.OF.create([ya.OF.cursor(r.main.head)])),!!i&&(n(Ka(t,i)),!0)}},{key:"Mod-Enter",run:jl},{key:"Alt-l",mac:"Ctrl-l",run:e=>{let{state:t,dispatch:n}=e,r=Fl(t).map((e=>{let{from:n,to:r}=e;return ya.OF.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:ya.OF.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:e=>{let{state:t,dispatch:n}=e,r=Va(t.selection,(e=>{var n;for(let r=(0,fa.mv)(t).resolveStack(e.from,1);r;r=r.next){let{node:t}=r;if((t.from=e.to||t.to>e.to&&t.from<=e.from)&&(null===(n=t.parent)||void 0===n?void 0:n.parent))return ya.OF.range(t.to,t.from)}return e}));return n(Ka(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:Wl},{key:"Mod-]",run:Hl},{key:"Mod-Alt-\\",run:e=>{let{state:t,dispatch:n}=e;if(t.readOnly)return!1;let r=Object.create(null),i=new fa.KB(t,{overrideIndentation:e=>{let t=r[e];return null==t?-1:t}}),o=Xl(t,((e,n,o)=>{let s=(0,fa._v)(i,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let a=/^\s*/.exec(e.text)[0],l=(0,fa.EI)(t,s);(a!=l||o.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Fl(t).map((e=>{let{from:n,to:r}=e;return n>0?n--:r{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:e=>{let{state:t,dispatch:n}=e;return gl(t,n,!1)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=Ta(e.state,n.from);return r.line?xa(e):!!r.block&&wa(e)}},{key:"Alt-A",run:Sa},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(Yl),Vl={key:"Tab",run:Hl,shift:Wl};function Kl(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;te.normalize("NFKD"):e=>e;class tc{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(ec(e)):ec,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,ya.vS)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,ya.MK)(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,ya.Fh)(e);let r=this.normalize(t);for(let i=0,o=n;;i++){let e=r.charCodeAt(i),s=this.match(e,o,this.bufferPos+this.bufferStart);if(i==r.length-1){if(s)return this.value=s,this;break}o==n&&i3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length;if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=nc,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new ac(e,t,n,r,i);this.re=new RegExp(t,rc+((null===n||void 0===n?void 0:n.ignoreCase)?"i":"")),this.test=null===n||void 0===n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=lc(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=lc(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new sc(t,e.sliceString(t,n));return oc.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=lc(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=sc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function lc(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function cc(e){let t=Kl("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,s,a,l]=n,c=a?+a.slice(1):0,u=s?+s:i.number;if(s&&l){let e=u/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else s&&o&&(u=u*("-"==o?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),d=ya.OF.cursor(h.from+Math.max(0,Math.min(c,h.length)));e.dispatch({effects:[uc.of(!1),Oa.Lz.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:Kl("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:uc.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},Kl("label",e.state.phrase("Go to line"),": ",t)," ",Kl("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(ic.prototype[Symbol.iterator]=ac.prototype[Symbol.iterator]=function(){return this});const uc=ya.Pe.define(),hc=ya.sU.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(uc)&&(e=n.value);return e},provide:e=>Oa.S7.from(e,(e=>e?cc:null))}),dc=Oa.Lz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),fc={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},pc=ya.sj.define({combine:e=>(0,ya.QR)(e,fc,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});const mc=Oa.NZ.mark({class:"cm-selectionMatch"}),gc=Oa.NZ.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Oc(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=ya.Je.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=ya.Je.Word)}const bc=Oa.Z9.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(pc),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Oa.NZ.none;let i,o=r.main,s=null;if(o.empty){if(!t.highlightWordAroundCursor)return Oa.NZ.none;let e=n.wordAt(o.head);if(!e)return Oa.NZ.none;s=n.charCategorizer(o.head),i=n.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e200)return Oa.NZ.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!Oc(s,n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==ya.Je.Word&&e(t.sliceDoc(r-1,r))==ya.Je.Word}(s,n,o.from,o.to))return Oa.NZ.none}else if(i=n.sliceDoc(o.from,o.to),!i)return Oa.NZ.none}let a=[];for(let l of e.visibleRanges){let e=new tc(n.doc,i,l.from,l.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!s||Oc(s,n,r,i))&&(o.empty&&r<=o.from&&i>=o.to?a.push(gc.range(r,i)):(r>=o.to||i<=o.from)&&a.push(mc.range(r,i)),a.length>t.maxMatches))return Oa.NZ.none}}return Oa.NZ.set(a)}},{decorations:e=>e.decorations}),yc=Oa.Lz.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const vc=ya.sj.define({combine:e=>(0,ya.QR)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Yc(e),scrollToMatch:e=>Oa.Lz.scrollIntoView(e)})});class kc{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,rc),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Cc(this):new wc(this)}getCursor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=e.doc?e:ya.$t.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?Tc(this,r,t,n):Sc(this,r,t,n)}}class xc{constructor(e){this.spec=e}}function Sc(e,t,n,r){return new tc(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(i=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Sc(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function Tc(e,t,n,r){return new ic(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(Ac(n.input,n.index))!=ya.Je.Word||i(Ec(n.input,n.index))!=ya.Je.Word)&&(i(Ec(n.input,n.index+n[0].length))!=ya.Je.Word||i(Ac(n.input,n.index+n[0].length))!=ya.Je.Word)):void 0},n,r);var i}function Ac(e,t){return e.slice((0,ya.zK)(e,t,!1),t)}function Ec(e,t){return e.slice(t,(0,ya.zK)(e,t))}class Cc extends xc{nextMatch(e,t,n){let r=Tc(this.spec,e,n,e.doc.length).next();return r.done&&(r=Tc(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=Tc(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Tc(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const _c=ya.Pe.define(),Pc=ya.Pe.define(),Rc=ya.sU.define({create:e=>new Dc(jc(e).create(),null),update(e,t){for(let n of t.effects)n.is(_c)?e=new Dc(n.value.create(),e.panel):n.is(Pc)&&(e=new Dc(e.query,n.value?Zc:null));return e},provide:e=>Oa.S7.from(e,(e=>e.panel))});class Dc{constructor(e,t){this.query=e,this.panel=t}}const Nc=Oa.NZ.mark({class:"cm-searchMatch"}),Qc=Oa.NZ.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Mc=Oa.Z9.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Rc))}update(e){let t=e.state.field(Rc);(t!=e.startState.field(Rc)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight(e){let{query:t,panel:n}=e;if(!n||!t.spec.valid)return Oa.NZ.none;let{view:r}=this,i=new ya.vB;for(let o=0,s=r.visibleRanges,a=s.length;os[o+1].from-500;)n=s[++o].to;t.highlight(r.state,e,n,((e,t)=>{let n=r.state.selection.ranges.some((n=>n.from==e&&n.to==t));i.add(e,t,n?Qc:Nc)}))}return i.finish()}},{decorations:e=>e.decorations});function $c(e){return t=>{let n=t.state.field(Rc,!1);return n&&n.query.spec.valid?e(t,n):Hc(t)}}const Lc=$c(((e,t)=>{let{query:n}=t,{to:r}=e.state.selection.main,i=n.nextMatch(e.state,r,r);if(!i)return!1;let o=ya.OF.single(i.from,i.to),s=e.state.facet(vc);return e.dispatch({selection:o,effects:[Jc(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),Xc(e),!0})),Ic=$c(((e,t)=>{let{query:n}=t,{state:r}=e,{from:i}=r.selection.main,o=n.prevMatch(r,i,i);if(!o)return!1;let s=ya.OF.single(o.from,o.to),a=e.state.facet(vc);return e.dispatch({selection:s,effects:[Jc(e,o),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),Xc(e),!0})),Fc=$c(((e,t)=>{let{query:n}=t,r=n.matchAll(e.state,1e3);return!(!r||!r.length)&&(e.dispatch({selection:ya.OF.create(r.map((e=>ya.OF.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),Bc=$c(((e,t)=>{let{query:n}=t,{state:r}=e,{from:i,to:o}=r.selection.main;if(r.readOnly)return!1;let s=n.nextMatch(r,i,i);if(!s)return!1;let a,l,c=[],u=[];if(s.from==i&&s.to==o&&(l=r.toText(n.getReplacement(s)),c.push({from:s.from,to:s.to,insert:l}),s=n.nextMatch(r,s.from,s.to),u.push(Oa.Lz.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(i).number)+"."))),s){let t=0==c.length||c[0].from>=s.to?0:s.to-s.from-l.length;a=ya.OF.single(s.from-t,s.to-t),u.push(Jc(e,s)),u.push(r.facet(vc).scrollToMatch(a.main,e))}return e.dispatch({changes:c,selection:a,effects:u,userEvent:"input.replace"}),!0})),zc=$c(((e,t)=>{let{query:n}=t;if(e.state.readOnly)return!1;let r=n.matchAll(e.state,1e9).map((e=>{let{from:t,to:r}=e;return{from:t,to:r,insert:n.getReplacement(e)}}));if(!r.length)return!1;let i=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:Oa.Lz.announce.of(i),userEvent:"input.replace.all"}),!0}));function Zc(e){return e.state.facet(vc).createPanel(e)}function jc(e,t){var n,r,i,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(vc);return new kc({search:(null!==(n=null===t||void 0===t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null===t||void 0===t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(i=null===t||void 0===t?void 0:t.literal)&&void 0!==i?i:c.literal,regexp:null!==(o=null===t||void 0===t?void 0:t.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null===t||void 0===t?void 0:t.wholeWord)&&void 0!==s?s:c.wholeWord})}function Uc(e){let t=(0,Oa.ld)(e,Zc);return t&&t.dom.querySelector("[main-field]")}function Xc(e){let t=Uc(e);t&&t==e.root.activeElement&&t.select()}const Hc=e=>{let t=e.state.field(Rc,!1);if(t&&t.panel){let n=Uc(e);if(n&&n!=e.root.activeElement){let r=jc(e.state,t.query.spec);r.valid&&e.dispatch({effects:_c.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[Pc.of(!0),t?_c.of(jc(e.state,t.query.spec)):ya.Pe.appendConfig.of(tu)]});return!0},Wc=e=>{let t=e.state.field(Rc,!1);if(!t||!t.panel)return!1;let n=(0,Oa.ld)(e,Zc);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Pc.of(!1)}),!0},qc=[{key:"Mod-f",run:Hc,scope:"editor search-panel"},{key:"F3",run:Lc,shift:Ic,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Lc,shift:Ic,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Wc,scope:"editor search-panel"},{key:"Mod-Shift-l",run:e=>{let{state:t,dispatch:n}=e,r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:i,to:o}=r.main,s=[],a=0;for(let l=new tc(t.doc,t.sliceDoc(i,o));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(a=s.length),s.push(ya.OF.range(l.value.from,l.value.to))}return n(t.update({selection:ya.OF.create(s,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=(0,Oa.ld)(e,cc);if(!t){let n=[uc.of(!0)];null==e.state.field(hc,!1)&&n.push(ya.Pe.appendConfig.of([hc,dc])),e.dispatch({effects:n}),t=(0,Oa.ld)(e,cc)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:e=>{let{state:t,dispatch:n}=e,{ranges:r}=t.selection;if(r.some((e=>e.from===e.to)))return(e=>{let{state:t,dispatch:n}=e,{selection:r}=t,i=ya.OF.create(r.ranges.map((e=>t.wordAt(e.head)||ya.OF.cursor(e.head))),r.mainIndex);return!i.eq(r)&&(n(t.update({selection:i})),!0)})({state:t,dispatch:n});let i=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=i)))return!1;let o=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new tc(e.doc,t,r[r.length-1].to);;){if(a.next(),!a.done){if(s&&r.some((e=>e.from==a.value.from)))continue;if(o){let t=e.wordAt(a.value.from);if(!t||t.from!=a.value.from||t.to!=a.value.to)continue}return a.value}if(s)return null;a=new tc(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),s=!0}}(t,i);return!!o&&(n(t.update({selection:t.selection.addRange(ya.OF.range(o.from,o.to),!1),effects:Oa.Lz.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class Yc{constructor(e){this.view=e;let t=this.query=e.state.field(Rc).query.spec;function n(e,t,n){return Kl("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Kl("input",{value:t.search,placeholder:Gc(e,"Find"),"aria-label":Gc(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Kl("input",{value:t.replace,placeholder:Gc(e,"Replace"),"aria-label":Gc(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Kl("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Kl("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Kl("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Kl("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>Lc(e)),[Gc(e,"next")]),n("prev",(()=>Ic(e)),[Gc(e,"previous")]),n("select",(()=>Fc(e)),[Gc(e,"all")]),Kl("label",null,[this.caseField,Gc(e,"match case")]),Kl("label",null,[this.reField,Gc(e,"regexp")]),Kl("label",null,[this.wordField,Gc(e,"by word")]),...e.state.readOnly?[]:[Kl("br"),this.replaceField,n("replace",(()=>Bc(e)),[Gc(e,"replace")]),n("replaceAll",(()=>zc(e)),[Gc(e,"replace all")])],Kl("button",{name:"close",onclick:()=>Wc(e),"aria-label":Gc(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new kc({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:_c.of(e)}))}keydown(e){(0,Oa.TS)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ic:Lc)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Bc(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(_c)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(vc).top}}function Gc(e,t){return e.state.phrase(t)}const Vc=30,Kc=/[\s\.,:;?!]/;function Jc(e,t){let{from:n,to:r}=t,i=e.state.doc.lineAt(n),o=e.state.doc.lineAt(r).to,s=Math.max(i.from,n-Vc),a=Math.min(o,r+Vc),l=e.state.sliceDoc(s,a);if(s!=i.from)for(let c=0;cl.length-Vc;c--)if(!Kc.test(l[c-1])&&Kc.test(l[c])){l=l.slice(0,c);break}return Oa.Lz.announce.of("".concat(e.state.phrase("current match"),". ").concat(l," ").concat(e.state.phrase("on line")," ").concat(i.number,"."))}const eu=Oa.Lz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tu=[Rc,ya.Nb.low(Mc),eu];var nu=n(5045);class ru{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class iu{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(Ou).markerFilter;i&&(r=i(r,n));let o=Oa.NZ.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?Oa.NZ.widget({widget:new vu(e),diagnostic:e}).range(e.from):Oa.NZ.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to))),!0);return new iu(o,t,ou(o))}}function ou(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,((e,n,i)=>{let{spec:o}=i;if(!t||o.diagnostic==t)return r=new ru(e,n,o.diagnostic),!1})),r}function su(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(Ou).hideOn(e,n,r);if(null!=i)return i;let o=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(lu)))&&!e.changes.touchesRange(o.from,Math.max(o.to,r)))}function au(e,t){return e.field(hu,!1)?t:t.concat(ya.Pe.appendConfig.of(Au))}const lu=ya.Pe.define(),cu=ya.Pe.define(),uu=ya.Pe.define(),hu=ya.sU.define({create:()=>new iu(Oa.NZ.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=ou(n,e.selected.diagnostic,i)||ou(n,null,i)}!n.size&&i&&t.state.facet(Ou).autoPanel&&(i=null),e=new iu(n,i,r)}for(let n of t.effects)if(n.is(lu)){let r=t.state.facet(Ou).autoPanel?n.value.length?xu.open:null:e.panel;e=iu.init(n.value,r,t.state)}else n.is(cu)?e=new iu(e.diagnostics,n.value?xu.open:null,e.selected):n.is(uu)&&(e=new iu(e.diagnostics,e.panel,n.value));return e},provide:e=>[Oa.S7.from(e,(e=>e.panel)),Oa.Lz.decorations.from(e,(e=>e.diagnostics))]});const du=Oa.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function fu(e,t,n){let{diagnostics:r}=e.state.field(hu),i=[],o=2e8,s=0;r.between(t-(n<0?1:0),t+(n>0?1:0),((e,r,a)=>{let{spec:l}=a;t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t({dom:pu(e,i)})}:null}function pu(e,t){return Kl("ul",{class:"cm-tooltip-lint"},t.map((t=>yu(e,t,!1))))}const mu=e=>{let t=e.state.field(hu,!1);return!(!t||!t.panel)&&(e.dispatch({effects:cu.of(!1)}),!0)},gu=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(hu,!1);t&&t.panel||e.dispatch({effects:au(e.state,[cu.of(!0)])});let n=(0,Oa.ld)(e,xu.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(hu,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],Ou=ya.sj.define({combine:e=>Object.assign({sources:e.map((e=>e.source)).filter((e=>null!=e))},(0,ya.QR)(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function bu(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function yu(e,t,n){var r;let i=n?bu(t.actions):[];return Kl("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Kl("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let i=ou(e.state.field(hu).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),Kl("u",a.slice(l,l+1)),a.slice(l+1)];return Kl("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":" Action: ".concat(a).concat(l<0?"":' (access key "'.concat(i[r],')"'),".")},c)})),t.source&&Kl("div",{class:"cm-diagnosticSource"},t.source))}class vu extends Oa.xO{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Kl("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class ku{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=yu(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class xu{constructor(e){this.view=e,this.items=[];this.list=Kl("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)mu(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=bu(n.actions);for(let i=0;i{for(let t=0;tmu(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field(hu).selected;if(!e)return-1;for(let t=0;t{let a,{spec:l}=s,c=-1;for(let t=n;tn&&(this.items.splice(n,c-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:e=>{let{sel:t,panel:n}=e,r=n.height/this.list.offsetHeight;t.topn.bottom&&(this.list.scrollTop+=(t.bottom-n.bottom)/r)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=ou(this.view.state.field(hu).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:uu.of(t)})}static open(e){return new xu(e)}}function Su(e){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(e),"')")}function wu(e){return Su(''),'width="6" height="3"')}const Tu=Oa.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:wu("#d11")},".cm-lintRange-warning":{backgroundImage:wu("orange")},".cm-lintRange-info":{backgroundImage:wu("#999")},".cm-lintRange-hint":{backgroundImage:wu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});Oa.wJ;const Au=[hu,Oa.Lz.decorations.compute([hu],(e=>{let{selected:t,panel:n}=e.field(hu);return t&&n&&t.from!=t.to?Oa.NZ.set([du.range(t.from,t.to)]):Oa.NZ.none})),(0,Oa.Ux)(fu,{hideOn:su}),Tu];var Eu=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(nu.Bc)),!1!==e.defaultKeymap&&(n=n.concat(Gl)),!1!==e.searchKeymap&&(n=n.concat(qc)),!1!==e.historyKeymap&&(n=n.concat(Ga)),!1!==e.foldKeymap&&(n=n.concat(fa.f7)),!1!==e.completionKeymap&&(n=n.concat(nu.OO)),!1!==e.lintKeymap&&(n=n.concat(gu));var r=[];return!1!==e.lineNumbers&&r.push((0,Oa.$K)()),!1!==e.highlightActiveLineGutter&&r.push((0,Oa.Wu)()),!1!==e.highlightSpecialChars&&r.push((0,Oa.N$)()),!1!==e.history&&r.push(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[Na,Da.of(e),Oa.Lz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?Ma:"historyRedo"==e.inputType?$a:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push((0,fa.Lv)()),!1!==e.drawSelection&&r.push((0,Oa.VH)()),!1!==e.dropCursor&&r.push((0,Oa.A)()),!1!==e.allowMultipleSelections&&r.push(ya.$t.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push((0,fa.WD)()),!1!==e.syntaxHighlighting&&r.push((0,fa.y9)(fa.Zt,{fallback:!0})),!1!==e.bracketMatching&&r.push((0,fa.SG)()),!1!==e.closeBrackets&&r.push((0,nu.wm)()),!1!==e.autocompletion&&r.push((0,nu.yU)()),!1!==e.rectangularSelection&&r.push((0,Oa.D4)()),!1!==t&&r.push((0,Oa.HJ)()),!1!==e.highlightActiveLine&&r.push((0,Oa.dz)()),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[yc,bc];return e&&t.push(pc.of(e)),t}()),e.tabSize&&"number"===typeof e.tabSize&&r.push(fa.Xt.of(" ".repeat(e.tabSize))),r.concat([Oa.w4.of(n.flat())]).filter(Boolean)},Cu=n(1345);const _u="#e5c07b",Pu="#e06c75",Ru="#56b6c2",Du="#ffffff",Nu="#abb2bf",Qu="#7d8799",Mu="#61afef",$u="#98c379",Lu="#d19a66",Iu="#c678dd",Fu="#21252b",Bu="#2c313a",zu="#282c34",Zu="#353a42",ju="#3E4451",Uu="#528bff",Xu=Oa.Lz.theme({"&":{color:Nu,backgroundColor:zu},".cm-content":{caretColor:Uu},".cm-cursor, .cm-dropCursor":{borderLeftColor:Uu},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ju},".cm-panels":{backgroundColor:Fu,color:Nu},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:zu,color:Qu,border:"none"},".cm-activeLineGutter":{backgroundColor:Bu},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Zu},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Zu,borderBottomColor:Zu},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Bu,color:Nu}}},{dark:!0}),Hu=fa.cr.define([{tag:Cu._A.keyword,color:Iu},{tag:[Cu._A.name,Cu._A.deleted,Cu._A.character,Cu._A.propertyName,Cu._A.macroName],color:Pu},{tag:[Cu._A.function(Cu._A.variableName),Cu._A.labelName],color:Mu},{tag:[Cu._A.color,Cu._A.constant(Cu._A.name),Cu._A.standard(Cu._A.name)],color:Lu},{tag:[Cu._A.definition(Cu._A.name),Cu._A.separator],color:Nu},{tag:[Cu._A.typeName,Cu._A.className,Cu._A.number,Cu._A.changed,Cu._A.annotation,Cu._A.modifier,Cu._A.self,Cu._A.namespace],color:_u},{tag:[Cu._A.operator,Cu._A.operatorKeyword,Cu._A.url,Cu._A.escape,Cu._A.regexp,Cu._A.link,Cu._A.special(Cu._A.string)],color:Ru},{tag:[Cu._A.meta,Cu._A.comment],color:Qu},{tag:Cu._A.strong,fontWeight:"bold"},{tag:Cu._A.emphasis,fontStyle:"italic"},{tag:Cu._A.strikethrough,textDecoration:"line-through"},{tag:Cu._A.link,color:Qu,textDecoration:"underline"},{tag:Cu._A.heading,fontWeight:"bold",color:Pu},{tag:[Cu._A.atom,Cu._A.bool,Cu._A.special(Cu._A.variableName)],color:Lu},{tag:[Cu._A.processingInstruction,Cu._A.string,Cu._A.inserted],color:$u},{tag:Cu._A.invalid,color:Du}]),Wu=[Xu,(0,fa.y9)(Hu)];var qu=Oa.Lz.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Yu=ya.YH.define(),Gu=[];function Vu(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=Gu,autoFocus:l,theme:c="light",height:u=null,minHeight:h=null,maxHeight:d=null,width:f=null,minWidth:p=null,maxWidth:m=null,placeholder:g="",editable:O=!0,readOnly:b=!1,indentWithTab:y=!0,basicSetup:v=!0,root:k,initialState:x}=e,[S,w]=(0,J.useState)(),[T,A]=(0,J.useState)(),[E,C]=(0,J.useState)(),_=Oa.Lz.theme({"&":{height:u,minHeight:h,maxHeight:d,width:f,minWidth:p,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),P=Oa.Lz.updateListener.of((e=>{if(e.docChanged&&"function"===typeof r&&!e.transactions.some((e=>e.annotation(Yu)))){var t=e.state.doc.toString();r(t,e)}i&&i((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),R=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:o="",basicSetup:s=!0}=e,a=[];switch(t&&a.unshift(Oa.w4.of([Vl])),s&&("boolean"===typeof s?a.unshift(Eu()):a.unshift(Eu(s))),o&&a.unshift((0,Oa.qf)(o)),i){case"light":a.push(qu);break;case"dark":a.push(Wu);break;case"none":break;default:a.push(i)}return!1===n&&a.push(Oa.Lz.editable.of(!1)),r&&a.push(ya.$t.readOnly.of(!0)),[...a]}({theme:c,editable:O,readOnly:b,placeholder:g,indentWithTab:y,basicSetup:v}),D=[P,_,...R];return s&&"function"===typeof s&&D.push(Oa.Lz.updateListener.of(s)),D=D.concat(a),(0,J.useEffect)((()=>{if(S&&!E){var e={doc:t,selection:n,extensions:D},r=x?ya.$t.fromJSON(x.json,e,x.fields):ya.$t.create(e);if(C(r),!T){var i=new Oa.Lz({state:r,parent:S,root:k});A(i),o&&o(i,r)}}return()=>{T&&(C(void 0),A(void 0))}}),[S,E]),(0,J.useEffect)((()=>w(e.container)),[e.container]),(0,J.useEffect)((()=>()=>{T&&(T.destroy(),A(void 0))}),[T]),(0,J.useEffect)((()=>{l&&T&&T.focus()}),[l,T]),(0,J.useEffect)((()=>{T&&T.dispatch({effects:ya.Pe.reconfigure.of(D)})}),[c,a,u,h,d,f,p,m,g,O,b,y,v,r,s]),(0,J.useEffect)((()=>{if(void 0!==t){var e=T?T.state.doc.toString():"";T&&t!==e&&T.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[Yu.of(!0)]})}}),[t,T]),{state:E,setState:C,view:T,setView:A,container:S,setContainer:w}}var Ku=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Ju=(0,J.forwardRef)(((e,t)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:h="light",height:d,minHeight:f,maxHeight:p,width:m,minWidth:g,maxWidth:O,basicSetup:b,placeholder:y,indentWithTab:v,editable:k,readOnly:x,root:S,initialState:w}=e,T=Qt(e,Ku),A=(0,J.useRef)(null),{state:E,view:C,container:_}=Vu({container:A.current,root:S,value:r,autoFocus:u,theme:h,height:d,minHeight:f,maxHeight:p,width:m,minWidth:g,maxWidth:O,basicSetup:b,placeholder:y,indentWithTab:v,editable:k,readOnly:x,selection:i,onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:o,initialState:w});if((0,J.useImperativeHandle)(t,(()=>({editor:A.current,state:E,view:C})),[A,_,E,C]),"string"!==typeof r)throw new Error("value must be typeof string but got "+typeof r);var P="string"===typeof h?"cm-theme-"+h:"cm-theme";return(0,Mt.jsx)("div",Nt({ref:A,className:P+(n?" "+n:"")},T))}));Ju.displayName="CodeMirror";const eh=Ju;var th=n(4631);function nh(e){return e&&"object"===typeof e?"position"in e||"type"in e?ih(e.position):"start"in e||"end"in e?ih(e):"line"in e||"column"in e?rh(e):"":""}function rh(e){return oh(e&&e.line)+":"+oh(e&&e.column)}function ih(e){return rh(e&&e.start)+"-"+rh(e&&e.end)}function oh(e){return e&&"number"===typeof e?e:1}class sh extends Error{constructor(e,t,n){const r=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"===typeof t&&(n=t,t=void 0),"string"===typeof n){const e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(i=t.position):"start"in t||"end"in t?i=t:("line"in t||"column"in t)&&(i.start=t)),this.name=nh(t)||"1:1",this.message="object"===typeof e?e.message:e,this.stack="","object"===typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=r[0],this.ruleId=r[1],this.file,this.actual,this.expected,this.url,this.note}}sh.prototype.file="",sh.prototype.name="",sh.prototype.reason="",sh.prototype.message="",sh.prototype.stack="",sh.prototype.fatal=null,sh.prototype.column=null,sh.prototype.line=null,sh.prototype.source=null,sh.prototype.ruleId=null,sh.prototype.position=null;const ah={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');lh(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(i=o):(a=-1,i=s));r===i?i=s:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(lh(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){lh(e);let t,n=e.length,r=-1,i=0,o=-1,s=0;for(;n--;){const a=e.charCodeAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===s||1===s&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(){let e,t=-1;for(var n=arguments.length,r=new Array(n),i=0;i2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),s=l,a=0;continue}}else if(i.length>0){i="",o=0,s=l,a=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(s+1,l):i=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function lh(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ch={cwd:function(){return"/"}};function uh(e){return null!==e&&"object"===typeof e&&e.href&&e.origin}function hh(e){if("string"===typeof e)e=new URL(e);else if(!uh(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n1?l-1:0),u=1;ui.length;let c;l&&i.push(o);try{c=e.apply(this,i)}catch(r){if(l&&n)throw r;return o(r)}l||(c&&c.then&&"function"===typeof c.then?c.then(s,o):c instanceof Error?o(c):s(c))}function o(e){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{if(!e&&t&&n){const r=s.stringify(t,n);void 0===r||null===r||(!function(e){return"string"===typeof e||th(e)}(r)?n.result=r:n.value=r),o(e,n)}else o(e)}))}n(null,t)},s.processSync=function(e){let t;s.freeze(),wh("processSync",s.Parser),Th("processSync",s.Compiler);const n=_h(e);return s.process(n,r),Ch("processSync","process",t),n;function r(e){t=!0,Oh(e)}},s;function s(){const t=e();let r=-1;for(;++r1?t-1:0),a=1;ai?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s0?(Nh(e,e.length,0,t),e):t}const Mh={}.hasOwnProperty;function $h(e){const t={};let n=-1;for(;++no))return;const n=t.events.length;let i,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){a=t.events[l][1].end;break}i=!0}for(O(s),e=n;er;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},td={tokenize:function(e,t,n){return Kh(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const nd={tokenize:function(e,t,n){return function(t){return qh(t)?Kh(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Hh(e)?t(e):n(e)}},partial:!0};function rd(e){const t={};let n,r,i,o,s,a,l,c=-1;for(;++c=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};const ad={tokenize:function(e){const t=this,n=e.attempt(nd,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Kh(e,e.attempt(this.parser.constructs.flow,r,e.attempt(od,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const ld={resolveAll:dd()},cd=hd("string"),ud=hd("text");function hd(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i-1){const e=s[0];"string"===typeof e?s[0]=e.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}(s,e)}function p(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:o}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:o}}function m(){let e;for(;r._index=3&&(null===o||Hh(o))?(e.exit("thematicBreak"),t(o)):n(o)}function s(t){return t===r?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),qh(t)?Kh(e,o,"whitespace")(t):o(t))}}};const Od={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:jh(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(gd,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return jh(t)&&++s<10?(e.consume(t),a):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(nd,r.interrupt?n:c,e.attempt(bd,h,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,h(e)}function u(t){return qh(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):n(t)}function h(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(nd,i,o);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Kh(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!qh(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yd,t,s)(n))}function s(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Kh(e,e.attempt(Od,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},bd={tokenize:function(e,t,n){const r=this;return Kh(e,(function(e){const i=r.events[r.events.length-1];return!qh(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},yd={tokenize:function(e,t,n){const r=this;return Kh(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const vd={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return qh(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(qh(t))return Kh(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(vd,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function kd(e,t,n,r,i,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),h;if(null===t||32===t||41===t||Zh(t))return n(t);return e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function h(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),h(t)):null===t||60===t||Hh(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(i){return u||null!==i&&41!==i&&!Wh(i)?u999||null===h||91===h||93===h&&!a||94===h&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):93===h?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):Hh(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||Hh(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!qh(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Sd(e,t,n,r,i,o){let s;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a;return n(t)};function a(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):Hh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Kh(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||Hh(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function wd(e,t){let n;return function r(i){if(Hh(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(qh(i))return Kh(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function Td(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ad={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return xd.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=Td(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return Wh(t)?wd(e,a)(t):a(t)}function a(t){return kd(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ed,c,c)(t)}function c(t){return qh(t)?Kh(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Hh(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},Ed={tokenize:function(e,t,n){return function(t){return Wh(t)?wd(e,r)(t):n(t)};function r(t){return Sd(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return qh(t)?Kh(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Hh(e)?t(e):n(e)}},partial:!0};const Cd={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Kh(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?a(t):Hh(t)?e.attempt(_d,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||Hh(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},_d={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Hh(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Kh(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Hh(e)?i(e):n(e)}},partial:!0};const Pd={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Wh(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||Hh(n)?(e.exit("atxHeading"),t(n)):qh(n)?Kh(e,o,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||Wh(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}},resolve:function(e,t){let n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},Nh(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};const Rd={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let s,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){s="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),qh(t)?Kh(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||Hh(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s;return e.push(["exit",s,t]),e}};const Dd=["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"],Nd=["pre","script","style","textarea"],Qd={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,o,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),o=!0,f):63===a?(e.consume(a),i=3,r.interrupt?t:Q):Fh(a)?(e.consume(a),s=String.fromCharCode(a),p):n(a)}function u(o){return 45===o?(e.consume(o),i=2,h):91===o?(e.consume(o),i=5,a=0,d):Fh(o)?(e.consume(o),i=4,r.interrupt?t:Q):n(o)}function h(i){return 45===i?(e.consume(i),r.interrupt?t:Q):n(i)}function d(i){const o="CDATA[";return i===o.charCodeAt(a++)?(e.consume(i),6===a?r.interrupt?t:A:d):n(i)}function f(t){return Fh(t)?(e.consume(t),s=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||Wh(a)){const l=47===a,c=s.toLowerCase();return l||o||!Nd.includes(c)?Dd.includes(s.toLowerCase())?(i=6,l?(e.consume(a),m):r.interrupt?t(a):A(a)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):o?g(a):O(a)):(i=1,r.interrupt?t(a):A(a))}return 45===a||Bh(a)?(e.consume(a),s+=String.fromCharCode(a),p):n(a)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:A):n(i)}function g(t){return qh(t)?(e.consume(t),g):w(t)}function O(t){return 47===t?(e.consume(t),w):58===t||95===t||Fh(t)?(e.consume(t),b):qh(t)?(e.consume(t),O):w(t)}function b(t){return 45===t||46===t||58===t||95===t||Bh(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),v):qh(t)?(e.consume(t),y):O(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):qh(t)?(e.consume(t),v):x(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||Hh(t)?n(t):(e.consume(t),k)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wh(t)?y(t):(e.consume(t),x)}function S(e){return 47===e||62===e||qh(e)?O(e):n(e)}function w(t){return 62===t?(e.consume(t),T):n(t)}function T(t){return null===t||Hh(t)?A(t):qh(t)?(e.consume(t),T):n(t)}function A(t){return 45===t&&2===i?(e.consume(t),P):60===t&&1===i?(e.consume(t),R):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),Q):93===t&&5===i?(e.consume(t),N):!Hh(t)||6!==i&&7!==i?null===t||Hh(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),A):(e.exit("htmlFlowData"),e.check(Md,$,E)(t))}function E(t){return e.check($d,C,$)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||Hh(t)?E(t):(e.enter("htmlFlowData"),A(t))}function P(t){return 45===t?(e.consume(t),Q):A(t)}function R(t){return 47===t?(e.consume(t),s="",D):A(t)}function D(t){if(62===t){const n=s.toLowerCase();return Nd.includes(n)?(e.consume(t),M):A(t)}return Fh(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),D):A(t)}function N(t){return 93===t?(e.consume(t),Q):A(t)}function Q(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),Q):A(t)}function M(t){return null===t||Hh(t)?(e.exit("htmlFlowData"),$(t)):(e.consume(t),M)}function $(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},Md={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(nd,t,n)}},partial:!0},$d={tokenize:function(e,t,n){const r=this;return function(t){if(Hh(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};const Ld={tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},Id={name:"codeFenced",tokenize:function(e,t,n){const r=this,i={tokenize:function(e,t,n){let i=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),qh(t)?Kh(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(i++,e.consume(t),u):i>=a?(e.exit("codeFencedFenceSequence"),qh(t)?Kh(e,h,"whitespace")(t):h(t)):n(t)}function h(r){return null===r||Hh(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let o,s=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),qh(t)?Kh(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Hh(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ld,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Hh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):qh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Kh(e,h,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function h(t){return null===t||Hh(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Hh(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),d)}function f(t){return e.attempt(i,b,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&qh(t)?Kh(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||Hh(t)?e.check(Ld,f,b)(t):(e.enter("codeFlowValue"),O(t))}function O(t){return null===t||Hh(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),O)}function b(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var Fd=n(3789);const Bd={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=Bh,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=Uh,c):(e.enter("characterReferenceValue"),i=7,o=jh,c(t))}function c(a){if(59===a&&s){const i=e.exit("characterReferenceValue");return o!==Bh||(0,Fd.s)(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return o(a)&&s++1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),d=Object.assign({},e[u][1].start);Gd(h,-a),Gd(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:d},i={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Qh(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Qh(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=Qh(l,pd(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Qh(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Qh(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Nh(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCharCode(n)}const pf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mf(e){return e.replace(pf,gf)}function gf(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ff(n.slice(t?2:1),t?16:10)}return(0,Fd.s)(n)||e}const Of={}.hasOwnProperty,bf=function(e,t,n){return"string"!==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ne),autolinkProtocol:E,autolinkEmail:E,atxHeading:a(K),blockQuote:a(W),characterEscape:E,characterReference:E,codeFenced:a(q),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(q,l),codeText:a(Y,l),codeTextData:E,data:E,codeFlowValue:E,definition:a(G),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(V),hardBreakEscape:a(J),hardBreakTrailing:a(J),htmlFlow:a(ee,l),htmlFlowData:E,htmlText:a(ee,l),htmlTextData:E,image:a(te),label:l,link:a(ne),listItem:a(ie),listItemValue:p,listOrdered:a(re,f),listUnordered:a(re),paragraph:a(oe),reference:z,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(K),strong:a(se),thematicBreak:a(le)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:H,autolinkProtocol:X,blockQuote:u(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,codeFenced:u(b),codeFencedFence:O,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:C,codeIndented:u(y),codeText:u(N),codeTextData:C,data:C,definition:u(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(R),htmlFlowData:C,htmlText:u(D),htmlTextData:C,image:u(M),label:L,labelText:$,lineEnding:_,link:u(Q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Z,resourceDestinationString:I,resourceTitleString:F,resource:B,setextHeading:u(A),setextHeadingLineSequence:T,setextHeadingText:w,strong:u(),thematicBreak:u()}};vf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let n={type:"root",children:[]};const r={stack:[n],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:d,setData:o,getData:s},a=[];let u=-1;for(;++u0){const e=r.tokenStack[r.tokenStack.length-1];(e[1]||xf).call(r,void 0,e[0])}for(n.position={start:yf(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:yf(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u{const n=this.data("settings");return bf(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function wf(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),i=1):s="\ufffd"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}const Tf=function(e){if(void 0===e||null===e)return Ef;if("string"===typeof e)return function(e){return Af(t);function t(t){return t&&t.type===e}}(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n1?n-1:0),i=1;i":"")+")"})}return u;function u(){let c,u,h,d=[];if((!t||i(s,a,l[l.length-1]||null))&&(d=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[Cf,e];return[e]}(n(s,l)),d[0]===_f))return d;if(s.children&&d[0]!==Pf)for(u=(r?s.children.length:-1)+o,h=l.concat(s);u>-1&&u-1?n.offset:null}}}const $f={}.hasOwnProperty;function Lf(e){return String(e||"").toUpperCase()}function If(e,t){const n=String(t.identifier).toUpperCase(),r=wf(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;-1===i?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const s=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function Ff(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&"text"===s.type?s.value+=r:i.push({type:"text",value:r}),i}function Bf(e){const t=e.spread;return void 0===t||null===t?e.children.length>1:t}const zf=9,Zf=32;function jf(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Uf(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Uf(t.slice(i),i>0,!1)),o.join("")}function Uf(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===zf||t===Zf;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===zf||t===Zf;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const Xf={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:If,footnote:function(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},If(e,{type:"footnoteReference",identifier:i,position:t.position})},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Ff(e,t);const r={src:wf(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:wf(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Ff(e,t);const r={href:wf(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:wf(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Nf(t.children[1]),s=Qf(t.children[t.children.length-1]);o.line&&s.line&&(r.position={start:o,end:s}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const l=[];for(;++a{const n=Lf(e.identifier);n&&!$f.call(t,n)&&(t[n]=e)})),function(e){const n=Lf(e);return n&&$f.call(t,n)?t[n]:null}}(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.patch=Yf,s.applyData=Gf,s.one=function(e,t){return Vf(s,e,t)},s.all=function(e){return Kf(s,e)},s.wrap=Jf,s.augment=o,Df(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Wf.call(i,t)||(i[t]=e)})),s;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};(function(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column})(n)||(t.position={start:Nf(n),end:Qf(n)})}return t}function s(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function Yf(e,t){e.position&&(t.position=function(e){return{start:Nf(e),end:Qf(e)}}(e))}function Gf(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"===typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function Vf(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Wf.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Kf(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){const n=t.data||{},r=!("value"in t)||Wf.call(n,"hProperties")||Wf.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:Kf(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function Kf(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:"\n"}),n}function ep(e,t){const n=qf(e,t),r=n.one(e,null),i=function(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21a9"}]};a>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(t)}const c=i[i.length-1];if(c&&"element"===c.type&&"p"===c.tagName){const e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else i.push(...l);const u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(i,!0)};e.patch(r,u),t.push(u)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return i&&r.children.push({type:"text",value:"\n"},i),Array.isArray(r)?{type:"root",children:r}:r}const tp=function(e,t){return e&&"run"in e?function(e,t){return(n,r,i)=>{e.run(ep(n,t),r,(e=>{i(e)}))}}(e,t):function(e){return t=>ep(t,e)}(e||t)};var np=n(8987),rp=n(2699);function ip(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Df(t,"element",((t,n,r)=>{const i=r;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&"number"===typeof n&&(o=!e.allowElement(t,n,i)),o&&"number"===typeof n)return e.unwrapDisallowed&&t.children?i.children.splice(n,1,...t.children):i.children.splice(n,1),n}))}}var op=n(8876);function sp(e){const t=e&&"object"===typeof e&&"text"===e.type?e.value||"":e;return"string"===typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}var ap=n(4390);const lp={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"};var cp=n(4818),up=n(8461);const hp=n(4565),dp=["http","https","mailto","tel"];function fp(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const r=t.indexOf(":");if(-1===r)return t;let i=-1;for(;++ii?t:(i=t.indexOf("#"),-1!==i&&r>i?t:"javascript:void(0)")}const pp={}.hasOwnProperty,mp=new Set(["table","thead","tbody","tfoot","tr"]);function gp(e,t){const n=[];let r,i=-1;for(;++i0?J.createElement(f,l,h):J.createElement(f,l)}function bp(e,t){let n=-1,r=0;for(;++n for more info)")),delete xp[o]}const t=kh().use(Sf).use(e.remarkPlugins||[]).use(tp,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(ip,e),n=new fh;"string"===typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));const r=t.runSync(t.parse(n),n);if("root"!==r.type)throw new TypeError("Expected a `root` node");let i=J.createElement(J.Fragment,{},gp({options:e,schema:rp.qy,listDepth:0},r));return e.className&&(i=J.createElement("div",{className:e.className},i)),i}Sp.propTypes={children:np.string,className:np.string,allowElement:np.func,allowedElements:np.arrayOf(np.string),disallowedElements:np.arrayOf(np.string),unwrapDisallowed:np.bool,remarkPlugins:np.arrayOf(np.oneOfType([np.object,np.func,np.arrayOf(np.oneOfType([np.bool,np.string,np.object,np.func,np.arrayOf(np.any)]))])),rehypePlugins:np.arrayOf(np.oneOfType([np.object,np.func,np.arrayOf(np.oneOfType([np.bool,np.string,np.object,np.func,np.arrayOf(np.any)]))])),sourcePos:np.bool,rawSourcePos:np.bool,skipHtml:np.bool,includeElementIndex:np.bool,transformLinkUri:np.oneOfType([np.func,np.bool]),linkTarget:np.oneOfType([np.func,np.string]),transformImageUri:np.func,components:np.object};const wp={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),i;return n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},Tp={tokenize:function(e,t,n){let r,i,o;return s;function s(t){return 46===t||95===t?e.check(Ep,l,a)(t):null===t||Wh(t)||Gh(t)||45!==t&&Yh(t)?l(t):(o=!0,e.consume(t),s)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),s}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},Ap={tokenize:function(e,t){let n=0,r=0;return i;function i(s){return 40===s?(n++,e.consume(s),i):41===s&&r0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Dp[43]=Rp,Dp[45]=Rp,Dp[46]=Rp,Dp[95]=Rp,Dp[72]=[Rp,Pp],Dp[104]=[Rp,Pp],Dp[87]=[Rp,_p],Dp[119]=[Rp,_p];const Bp={tokenize:function(e,t,n){const r=this;return Kh(e,(function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function zp(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!s||!s._balanced)return n(i);const a=Td(r.sliceSerialize({start:s.end,end:r.now()}));if(94!==a.codePointAt(0)||!o.includes(a.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function Zp(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...l),e}function jp(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!o||null===a||91===a||Wh(a))return n(a);if(93===a){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(Td(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return Wh(a)||(o=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function Up(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||Wh(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=Td(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Wh(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),Kh(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function Xp(e,t,n){return e.check(nd,t,e.attempt(Bp,t,n))}function Hp(e){e.exit("gfmFootnoteDefinition")}function Wp(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const i=this.previous,o=this.events;let s=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(o){const l=qd(i);if(126===o)return s>1?r(o):(e.consume(o),s++,a);if(s<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=qd(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++ne[0]-t[0])),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1])),n.push(this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function Yp(e,t){let n=!1;const r=[];for(;t-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?v:a;if(o===v&&r.parser.lazy[r.now().line])return n(e);return o(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return i=!0,s+=1,l(e)}(t)}function l(t){return null===t?n(t):Hh(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):qh(t)?Kh(e,l,"whitespace")(t):(s+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Wh(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function h(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,qh(t)?Kh(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):y(t)}function f(t){return qh(t)?Kh(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||Hh(t)?b(t):y(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):y(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(t))}function O(t){return qh(t)?Kh(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?d(n):(null===n||Hh(n))&&i&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function v(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||Hh(n)?(e.exit("tableRow"),t(n)):qh(n)?Kh(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Wh(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}},resolveAll:function(e,t){let n,r,i,o=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,h=0;const d=new qp;for(;++on[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==i&&(o.end=Object.assign({},Jp(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Kp(e,t,n,r,i){const o=[],s=Jp(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Jp(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const em={tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Wh(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return Hh(r)?t(r):qh(r)?e.check({tokenize:nm},t,n)(r):n(r)}}},tm={text:{91:em}};function nm(e,t,n){return Kh(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}function rm(e,t){const n=String(e);if("string"!==typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}const im={}.hasOwnProperty,om=function(e,t,n,r){let i,o;"string"===typeof t||t instanceof RegExp?(o=[[t,n]],i=r):(o=t,i=n),i||(i={});const s=Tf(i.ignore||[]),a=function(e){const t=[];if("object"!==typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n0?{type:"text",value:a}:void 0),!1!==a&&(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),o=n+h[0].length,c=!0),!r.global)break;h=r.exec(e.value)}c?(oe}const lm="phrasing",cm=["autolink","link","image","label"],um={transforms:[function(e){om(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fm],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,pm]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:dm,literalAutolinkHttp:dm,literalAutolinkWww:dm},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}}},hm={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lm,notInConstruct:cm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lm,notInConstruct:cm},{character:":",before:"[ps]",after:"\\/",inConstruct:lm,notInConstruct:cm}]};function dm(e){this.config.enter.autolinkProtocol.call(this,e)}function fm(e,t,n,r,i){let o="";if(!mm(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=rm(e,"(");let o=rm(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function pm(e,t,n,r){return!(!mm(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function mm(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Gh(n)||Yh(n))&&(!t||47!==n)}function gm(e){return e.label||!e.identifier?e.label||"":mf(e.identifier)}function Om(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(!0===o||1===o)break;if("number"===typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const bm=/\r?\n|\r/g;function ym(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function vm(e,t){return km(e,t.inConstruct,!0)&&!km(e,t.notInConstruct,!1)}function km(e,t,n){if("string"===typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r=c||(e+10?" ":"")),i.shift(4),o+=i.move(function(e,t){const n=[];let r,i=0,o=0;for(;r=bm.exec(e);)s(e.slice(i,r.index)),n.push(r[0]),i=r.index+r[0].length,o++;return s(e.slice(i)),n.join("");function s(e){n.push(t(e,o,!e))}}(function(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a0&&("\r"===a||"\n"===a)&&"html"===c.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(o.join(""))),o.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:u}))),a=o[o.length-1].slice(-1)}return r.pop(),o.join("")}Qm.peek=function(){return"["};Bm.peek=function(){return"~"};const Im={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Fm={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:Bm}};function Bm(e,t,n,r){const i=Tm(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=Lm(e,n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function zm(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:Wm,tableHeader:Wm,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,qm));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Hm,tableHeader:Hm,tableRow:Hm}};function Hm(e){this.exit(e)}function Wm(e){this.enter({type:"tableCell",children:[]},e)}function qm(e,t){return"|"===t?t:e}function Ym(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let i=-1;const o=[],s=t.enter("table");for(;++i1&&void 0!==arguments[1]?arguments[1]:{};const n=(t.align||[]).concat(),r=t.stringLength||jm,i=[],o=[],s=[],a=[];let l=0,c=-1;for(;++cl&&(l=e[c].length);++ua[u])&&(a[u]=e)}n.push(o)}o[c]=n,s[c]=i}let u=-1;if("object"===typeof n&&"length"in n)for(;++ua[u]&&(a[u]=o),d[u]=o),h[u]=s}o.splice(1,0,h),s.splice(1,0,d),c=-1;const f=[];for(;++c-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let s=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(s))+e;return(n?o:o+" ".repeat(s-o.length))+e}));return l(),c}const Vm={exit:{taskListCheckValueChecked:Jm,taskListCheckValueUnchecked:Jm,paragraph:function(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"===typeof t.checked){const e=this.stack[this.stack.length-1],n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,o=-1;for(;++o0&&void 0!==arguments[0]?arguments[0]:{};const t=this.data();function n(e,n){(t[e]?t[e]:t[e]=[]).push(n)}n("micromarkExtensions",function(e){return $h([Np,{document:{91:{tokenize:Up,continuation:{tokenize:Xp},exit:Hp}},text:{91:{tokenize:jp},93:{add:"after",tokenize:zp,resolveTo:Zp}}},Wp(e),Gp,tm])}(e)),n("fromMarkdownExtensions",[um,{enter:{gfmFootnoteDefinition:Am,gfmFootnoteDefinitionLabelString:Em,gfmFootnoteCall:Pm,gfmFootnoteCallString:Rm},exit:{gfmFootnoteDefinition:_m,gfmFootnoteDefinitionLabelString:Cm,gfmFootnoteCall:Nm,gfmFootnoteCallString:Dm}},Im,Xm,Vm]),n("toMarkdownExtensions",function(e){return{extensions:[hm,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Mm,footnoteReference:Qm}},Fm,Ym(e),Km]}}(e))}var tg=n(9838);const ng=(0,n(8842).I)(rp.JW,"g",["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"]);var rg=n(1927);const ig={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/"},og={}.hasOwnProperty,sg=Object.prototype;function ag(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},cg(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:lg(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[],r=/\r?\n|\r/g;for(;r.test(t);)n.push(r.lastIndex);return n.push(t.length+1),{toPoint:function(e){let t=-1;if("number"===typeof e&&e>-1&&ee)return{line:t+1,column:e-(t>0?n[t-1]:0)+1,offset:e};return{line:void 0,column:void 0,offset:void 0}},toOffset:function(e){const t=e&&e.line,r=e&&e.column;if("number"===typeof t&&"number"===typeof r&&!Number.isNaN(t)&&!Number.isNaN(r)&&t-1 in n){const e=(n[t-2]||0)+r-1||0;if(e>-1&&e1?o-1:0),a=1;a{const r=e;if(r.value.stitch&&null!==n&&null!==t)return n.children[t]=r.value.stitch,t})),"root"!==e.type&&"root"===h.type&&1===h.children.length?h.children[0]:h;function d(e){let t=-1;if(e)for(;++t0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>xg(t,n,e)}var Cg=n(7323),_g=n.n(Cg);function Pg(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?Pg(t.parentElement):null}function Rg(e){var t=e=>{var t=Pg(e.target);t&&(t.classList.add("active"),_g()(t.dataset.code,(function(){setTimeout((()=>{t.classList.remove("active")}),2e3)})))};(0,J.useEffect)((()=>{var n,r;return null==(n=e.current)||n.removeEventListener("click",t,!1),null==(r=e.current)||r.addEventListener("click",t,!1),()=>{var n;null==(n=e.current)||n.removeEventListener("click",t,!1)}}),[e])}var Dg=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement"];const Ng=J.forwardRef(((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:i,style:o,disableCopy:s=!1,skipHtml:a=!0,onScroll:l,onMouseOver:c,pluginsFilter:u,wrapperElement:h={},warpperElement:d={}}=e,f=Qt(e,Dg),p=J.useRef(null);(0,J.useImperativeHandle)(t,(()=>Nt({},e,{mdp:p})),[p,e]);var m=(n||"")+" "+(r||"");Rg(p);var g=[...f.rehypePlugins||[]],O={allowElement:(e,t,n)=>f.allowElement?f.allowElement(e,t,n):/^[A-Za-z0-9]+$/.test(e.tagName)};a&&g.push(Eg);var b=[...f.remarkPlugins||[],eg],y=Nt({},d,h);return(0,Mt.jsx)("div",Nt({ref:p,onScroll:l,onMouseOver:c},y,{className:m,style:o,children:(0,Mt.jsx)(Sp,Nt({},O,f,{skipHtml:a,rehypePlugins:u?u("rehype",g):g,remarkPlugins:u?u("remark",b):b,children:i||""}))}))}));function Qg(e){return"children"in e?$g(e):"value"in e?e.value:""}function Mg(e){return"text"===e.type?e.value:"children"in e?$g(e):""}function $g(e){let t=-1;const n=[];for(;++t]+)>/g,(function(e,t){var n=o[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof i){var s=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,s)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},zg.apply(this,arguments)}function Zg(e,t){return Zg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zg(e,t)}function jg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Xg=function(e){return function(t){return void 0===t&&(t={}),function(e,t){if(t&&!e.registered(t))throw new Error('The default language "'+t+'" is not registered with refractor.')}(e,t.defaultLanguage),function(e){Df(e,"element",n)};function n(n,r,i){var o,s;if(i&&"pre"===i.tagName&&"code"===n.tagName){var a=(null==n||null==(o=n.data)?void 0:o.meta)||(null==n||null==(s=n.properties)?void 0:s.metastring)||"";n.properties.className?"boolean"==typeof n.properties.className?n.properties.className=[]:Array.isArray(n.properties.className)||(n.properties.className=[n.properties.className]):n.properties.className=[];var l,c,u=function(e){for(var t,n=Ug(e.properties.className);!(t=n()).done;){var r=t.value;if("language-"===r.slice(0,9))return r.slice(9).toLowerCase()}return null}(n);if(!u&&t.defaultLanguage&&n.properties.className.push("language-"+(u=t.defaultLanguage)),n.properties.className.push("code-highlight"),u)try{var h,d;d=null!=(h=u)&&h.includes("diff-")?u.split("-")[1]:u,l=e.highlight(Qg(n),d),i.properties.className=(i.properties.className||[]).concat("language-"+d)}catch(v){if(!t.ignoreMissing||!/Unknown language/.test(v.message))throw v;l=n}else l=n;l.children=(c=1,function e(t){return t.reduce((function(t,n){if("text"===n.type){var r=n.value,i=(r.match(/\n/g)||"").length;if(0===i)n.position={start:{line:c,column:1},end:{line:c,column:1}},t.push(n);else for(var o,s=r.split("\n"),a=Ug(s.entries());!(o=a()).done;){var l=o.value,u=l[0],h=l[1];t.push({type:"text",value:u===s.length-1?h:h+"\n",position:{start:{line:c+u,column:1},end:{line:c+u,column:1}}})}return c+=i,t}if(Object.prototype.hasOwnProperty.call(n,"children")){var d=c;return n.children=e(n.children),t.push(n),n.position={start:{line:d,column:1},end:{line:c,column:1}},t}return t.push(n),t}),[])})(l.children),l.position=l.children.length>0?{start:{line:l.children[0].position.start.line,column:0},end:{line:l.children[l.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var f,p=function(e){var t=/{([\d,-]+)}/,n=e.split(",").map((function(e){return e.trim()})).join();if(t.test(n)){var r=t.exec(n)[1],i=Ig(r);return function(e){return i.includes(e+1)}}return function(){return!1}}(a),m=function(e){var t=zg(/showLineNumbers=(\d+)/i,{lines:1});if(t.test(e)){var n=t.exec(e);return Number(n.groups.lines)}return 1}(a),g=function(e){for(var t=new Array(e),n=0;n0&&0===s.length)return null}const a={};let l;for(l in t)Lg.call(t,l)&&(a[l]="children"===l?s:t[l]);return a}(e)}(l,(function(e){return e.position.start.line<=i+1&&e.position.end.line>=i+1}));o.children=s.children,!a.toLowerCase().includes("showLineNumbers".toLowerCase())&&!t.showLineNumbers||O.some((function(e){return a.toLowerCase().includes(e)}))||(o.properties.line=[(i+m).toString()],o.properties.className.push("line-number")),p(i)&&o.properties.className.push("highlight-line"),("diff"===u||null!=(e=u)&&e.includes("diff-"))&&"-"===Qg(o).substring(0,1)?o.properties.className.push("deleted"):("diff"===u||null!=(n=u)&&n.includes("diff-"))&&"+"===Qg(o).substring(0,1)&&o.properties.className.push("inserted")},y=Ug(g.entries());!(f=y()).done;)b();g.length>0&&""===Qg(g[g.length-1]).trim()&&g.pop(),n.children=g}}}},Hg=(Xg(Fg.L),Xg(Bg.L));const Wg="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",qg="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",Yg=new RegExp("^[^"+qg+"]*["+Wg+"]"),Gg=new RegExp("^[^"+Wg+"]*["+qg+"]");function Vg(e){const t=function(e){const t=String(e||"");return Yg.test(t)?"rtl":Gg.test(t)?"ltr":"neutral"}(e);return"neutral"===t?void 0:t}function Kg(e){const t="element"===e.type&&e.properties&&"string"===typeof e.properties.dir?e.properties.dir.toLowerCase():void 0;return"auto"===t||"ltr"===t||"rtl"===t?t:void 0}const Jg={}.hasOwnProperty;function eO(e,t){const n="string"===typeof t&&function(e){return Boolean(e&&"object"===typeof e&&"type"in e)}(e)&&"element"===e.type&&e.properties&&Jg.call(e.properties,t)&&e.properties[t];return null!==n&&void 0!==n&&!1!==n}const tO=fg("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:function(e,t,n){return eO(t,n.property)},handlers:{"=":function(e,t,n){return Boolean(eO(t,n.property)&&t.properties&&nO(t.properties[n.property],n)===e.value)},"~=":function(e,t,n){const r=t.properties&&t.properties[n.property];return!n.commaSeparated&&r&&"object"===typeof r&&e.value&&r.includes(e.value)||eO(t,n.property)&&nO(r,n)===e.value},"|=":function(e,t,n){const r=nO(t.properties&&t.properties[n.property],n);return Boolean(eO(t,n.property)&&e.value&&(r===e.value||r.slice(0,e.value.length)===e.value&&"-"===r.charAt(e.value.length)))},"^=":function(e,t,n){return Boolean(eO(t,n.property)&&t.properties&&e.value&&nO(t.properties[n.property],n).slice(0,e.value.length)===e.value)},"$=":function(e,t,n){return Boolean(eO(t,n.property)&&t.properties&&e.value&&nO(t.properties[n.property],n).slice(-e.value.length)===e.value)},"*=":function(e,t,n){return Boolean(eO(t,n.property)&&t.properties&&e.value&&nO(t.properties[n.property],n).includes(e.value))}}});function nO(e,t){return"boolean"===typeof e?t.attribute:Array.isArray(e)?(t.commaSeparated?up.A:cp.A)(e):String(e)}function rO(e,t){return function(n,r){let i=oO(n,"tag");const o=oO(null===r||void 0===r?"*":r,"range"),s=[];let a=-1;for(;++ae<=n;if(0===t)return e=>e===n;if(1===t)return n<0?cO.trueFunc:e=>e>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?e=>e>=n&&e%r===i:e=>e<=n&&e%r===i}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,n=0,r=o(),i=s();if(t=aO&&e.charCodeAt(t)<=lO;)r=10*r+(e.charCodeAt(t)-aO),t++;return t===n?null:r}function a(){for(;t0},lang:function(e,t,n,r,i){return""!==i.language&&void 0!==i.language&&iO(i.language,(0,up.q)(e.value)).length>0},"last-child":function(e,t,n,r,i){return yO(i,e),Boolean(i.elementCount&&i.elementIndex===i.elementCount-1)},"last-of-type":function(e,t,n,r,i){return yO(i,e),"number"===typeof i.typeIndex&&"number"===typeof i.typeCount&&i.typeIndex===i.typeCount-1},matches:mO,not:function(e,t,n,r,i){return!mO(e,t,n,r,i)},"nth-child":function(e,t,n,r,i){const o=vO(e);return yO(i,e),"number"===typeof i.elementIndex&&o(i.elementIndex)},"nth-last-child":function(e,t,n,r,i){const o=vO(e);return yO(i,e),Boolean("number"===typeof i.elementCount&&"number"===typeof i.elementIndex&&o(i.elementCount-i.elementIndex-1))},"nth-of-type":function(e,t,n,r,i){const o=vO(e);return yO(i,e),"number"===typeof i.typeIndex&&o(i.typeIndex)},"nth-last-of-type":function(e,t,n,r,i){const o=vO(e);return yO(i,e),"number"===typeof i.typeCount&&"number"===typeof i.typeIndex&&o(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,n,r,i){return yO(i,e),1===i.elementCount},"only-of-type":function(e,t,n,r,i){return yO(i,e),1===i.typeCount},optional:function(e,t){return!OO(e,t)},"read-only":function(e,t,n,r,i){return!gO(e,t,n,r,i)},"read-write":gO,required:OO,root:function(e,t,n,r,i){return Boolean((!r||"root"===r.type)&&i.schema&&("html"===i.schema.space||"svg"===i.schema.space)&&("html"===t.tagName||"svg"===t.tagName))},scope:function(e,t,n,r,i){return i.scopeElements.includes(t)}}});function fO(e,t,n,r,i){const o=e.pseudos;let s=-1;for(;++s"===t.nestingOperator?"directChild":"descendant",e)}else e.found=!0,e.results.includes(n)||e.results.push(n)}null===a.rule.nestingOperator?EO(o,"descendant",a):"~"===a.rule.nestingOperator&&EO(o,"generalSibling",a)}return o}(e,AO(t,e.rootQuery.selectors),n,r,i)),!("children"in n)||e.shallow||e.one&&e.found||function(e,t,n){const r=AO(t.descendant,t.directChild);let i,o=-1;const s={count:0,types:new Map},a={count:0,types:new Map};for(;++o0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:xO}function EO(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function CO(e,t){if("element"===t.type){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}const _O=new(n(5539).u);function PO(e){if("string"!==typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return _O.parse(e)}function RO(e,t,n){return{rootQuery:SO(PO(e)),results:[],scopeElements:t?"root"===t.type?t.children:[t]:[],one:!1,shallow:!1,found:!1,schema:"svg"===n?rp.JW:rp.qy,language:void 0,direction:"ltr",editableOrEditingHost:!1,typeIndex:void 0,elementIndex:void 0,typeCount:void 0,elementCount:void 0}}_O.registerAttrEqualityMods("~","|","^","$","*"),_O.registerSelectorPseudos("any","matches","not","has"),_O.registerNestingOperators(">","+","~");const DO=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{"text"===t.type?e+=t.value:"element"===t.type&&t.children&&Array.isArray(t.children)&&(e+=DO(t.children))})),e},NO=e=>{const{selector:t,rewrite:n}=e||{};return e=>{if(n&&"function"===typeof n)if(t&&"string"===typeof t){const r=function(e,t,n){const r=RO(e,t,n);return wO(r,t||void 0),r.results}(t,e);r&&r.length>0&&Df(e,r,((e,t,r)=>{n(e,t,r)}))}else Df(e,((e,t,r)=>{n(e,t,r)}))}},QO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>1?arguments[1]:void 0;for(;r/,"$2")||""))return;if(n){if(QO(e,r,"pre",n))return;return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}}},MO=e=>{let{value:t=""}=e;const n=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{})}(t.replace(/^/,"$1").replace(/^rehype:/,""));return Object.keys(n).forEach((e=>{"true"===n[e]&&(n[e]=!0),"false"===n[e]&&(n[e]=!1),"string"!==typeof n[e]||/^0/.test(n[e])||isNaN(+n[e])||(n[e]=+n[e])})),n},$O=(e,t,n)=>"string"===n?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:"attr"===n?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},LO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{properties:t="data",codeBlockParames:n=!0}=e;return e=>{Df(e,"element",((e,r,i)=>{if(n&&"pre"===e.tagName&&e&&Array.isArray(e.children)&&i&&Array.isArray(i.children)&&i.children.length>1){const n=e.children[0];if(n&&"code"===n.tagName&&"number"===typeof r){const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;for(;t>-1;){if(t--,!e[t])return;if(e[t]&&e[t].value&&""!==e[t].value.replace(/(\n|\s)/g,"")||"text"!==e[t].type){if(!/^rehype:/.test(e[t].value)||"comment"!==e[t].type)return;return e[t]}}}(i.children,r);if(o){const r=MO(o);Object.keys(r).length>0&&(e.properties={...e.properties,"data-type":"rehyp"},n.properties=$O(n.properties,r,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(e.tagName)&&i&&Array.isArray(i.children)&&"number"===typeof r){const o=QO(i.children,r,"",n);if(o){const n=MO(o);Object.keys(n).length>0&&(e.properties=$O(e.properties,n,t))}}}))}};var IO=function(e){return void 0===e&&(e={}),e=>{Df(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=Nt({},e.properties,{"data-meta":String(e.data.meta)}))}))}};const FO=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,BO=Object.hasOwnProperty;function zO(e){const t=e&&"element"===e.type&&e.tagName.toLowerCase()||"",n=2===t.length&&104===t.charCodeAt(0)?t.charCodeAt(1):0;return n>48&&n<55?n-48:null}const ZO=new class{constructor(){this.occurrences,this.reset()}slug(e,t){const n=this;let r=function(e,t){if("string"!==typeof e)return"";t||(e=e.toLowerCase());return e.replace(FO,"").replace(/ /g,"-")}(e,!0===t);const i=r;for(;BO.call(n.occurrences,r);)n.occurrences[i]++,r=i+"-"+n.occurrences[i];return n.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};const jO=function(e){if(void 0===e||null===e)return XO;if("string"===typeof e)return function(e){return t;function t(t){return XO(t)&&t.tagName===e}}(e);if("object"===typeof e)return function(e){const t=[];let n=-1;for(;++n1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return e=>{Df(e,((e,r,i)=>{if("element"===e.type||"root"===e.type){let r=!1;e.children=e.children.filter((e=>{if("raw"===e.type||"comment"===e.type){let i=(e.value||"").trim();if(i=i.replace(/^/,"$1"),i===t)return r=!0,!1;if(i===n)return r=!1,!1}return!r}))}}))}};var qO={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};var YO=[function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).prefix||"";return t=>{ZO.reset(),Df(t,"element",(t=>{zO(t)&&t.properties&&!eO(t,"id")&&(t.properties.id=e+ZO.slug(Qg(t)))}))}},function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.properties;const n=e.behaviour||e.behavior||"prepend",r=e.content||HO,i=e.group,o=jO(e.test);let s;return"wrap"===n?s=function(e){return e.children=[c(e,bh(!0,{},t),e.children)],[Pf]}:"before"===n||"after"===n?s=function(e,o,s){if("number"!==typeof o||!s)return;const u=c(e,bh(!0,{},t),a(r,e));let h="before"===n?[u,e]:[e,u];if(i){const t=l(i,e);t&&!Array.isArray(t)&&"element"===t.type&&(t.children=h,h=[t])}return s.children.splice(o,1,...h),[Pf,o+h.length]}:(t||(t={ariaHidden:"true",tabIndex:-1}),s=function(e){return e.children["prepend"===n?"unshift":"push"](c(e,bh(!0,{},t),a(r,e))),[Pf]}),e=>{Df(e,"element",((e,t,n)=>{if(zO(e)&&eO(e,"id")&&o(e,t,n))return s(e,t,n)}))};function a(e,t){const n=l(e,t);return Array.isArray(n)?n:[n]}function l(e,t){return"function"===typeof e?e(t):bh(!0,Array.isArray(e)?[]:{},e)}function c(e,t,n){return{type:"element",tagName:"a",properties:Object.assign({},t,{href:"#"+(e.properties||{}).id}),children:n}}},WO];const GO=J.forwardRef(((e,t)=>{var n,r,i,o=[IO,[Hg,{ignoreMissing:!0}],...YO,[NO,{rewrite:(r=null!=(n=e.disableCopy)&&n,i=e.rehypeRewrite,(e,t,n)=>{if("element"===e.type&&n&&"root"===n.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var o=e.children&&e.children[0];o&&o.properties&&"true"===o.properties.ariaHidden&&(o.properties=Nt({class:"anchor"},o.properties),o.children=[qO])}if("element"===e.type&&"pre"===e.tagName&&!r){var s=DO(e.children);e.children.push((void 0===(a=s)&&(a=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":a},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var a;i&&i(e,t,n)})}],[LO,{properties:"attr"}],...e.rehypePlugins||[]];return(0,Mt.jsx)(Ng,Nt({},e,{rehypePlugins:o,ref:t}))}));var VO={name:"bold",keyCommand:"bold",button:{"aria-label":"Add bold text"},icon:(0,Mt.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 384 512",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&n.dispatch(n.state.changeByRange((e=>({changes:[{from:e.from,insert:"**"},{from:e.to,insert:"**"}],range:ya.OF.range(e.from+2,e.to+2)}))))}},KO={name:"code",keyCommand:"code",button:{"aria-label":"Insert code"},icon:(0,Mt.jsxs)("svg",{viewBox:"0 0 48 48",fill:"none",height:"15",width:"15",children:[(0,Mt.jsx)("path",{d:"M16 13 4 25.432 16 37m16-24 12 12.432L32 37",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Mt.jsx)("path",{d:"m28 4-7 40",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round"})]}),execute:e=>{var{state:t,view:n}=e;t&&n&&n.dispatch(n.state.changeByRange((e=>({changes:[{from:e.from,insert:"`"},{from:e.to,insert:"`"}],range:ya.OF.range(e.from+1,e.to+1)}))))}},JO={name:"codeBlock",keyCommand:"codeBlock",button:{"aria-label":"Insert Code Block"},icon:(0,Mt.jsxs)("svg",{viewBox:"0 0 48 48",fill:"none",height:"15",width:"15",children:[(0,Mt.jsx)("path",{d:"M21 6H9a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V21M24 34v8",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Mt.jsx)("path",{d:"m32 6-4 4 4 4m6-8 4 4-4 4M14 42h20",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:"```js\n"+i+"\n```"},selection:ya.OF.range(r.from+3,r.from+5)})}}},eb={name:"italic",keyCommand:"italic",button:{"aria-label":"Add italic text"},icon:(0,Mt.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 320 512",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&n.dispatch(n.state.changeByRange((e=>({changes:[{from:e.from,insert:"*"},{from:e.to,insert:"*"}],range:ya.OF.range(e.from+1,e.to+1)}))))}},tb={name:"header",keyCommand:"header",button:{"aria-label":"Add header text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 448 512",height:"13",width:"13",children:(0,Mt.jsx)("path",{d:"M448 448c0 17.69-14.33 32-32 32h-96c-17.67 0-32-14.31-32-32s14.33-32 32-32h16V272H112v144h16c17.67 0 32 14.31 32 32s-14.33 32-32 32H32c-17.67 0-32-14.31-32-32s14.33-32 32-32h16V96H32C14.33 96 0 81.69 0 64s14.33-32 32-32h96c17.67 0 32 14.31 32 32s-14.33 32-32 32h-16v112h224V96h-16c-17.67 0-32-14.31-32-32s14.33-32 32-32h96c17.67 0 32 14.31 32 32s-14.33 32-32 32h-16v320h16c17.7 0 32 14.3 32 32z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="#",o=r.text.match(/^#+/);if(o&&o[0]){var s=o[0];s.length<6&&(i=s+"#")}i.length>6&&(i="#");var a=r.text.replace(/^#+/,"");n.dispatch({changes:{from:r.from,to:r.to,insert:i+" "+a},selection:{anchor:r.from+i.length+1}})}}},nb={name:"strike",keyCommand:"strike",button:{"aria-label":"Add strike text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Mt.jsx)("path",{d:"M332.2 319.9c17.22 12.17 22.33 26.51 18.61 48.21-3.031 17.59-10.88 29.34-24.72 36.99-35.44 19.75-108.5 11.96-186-19.68-16.34-6.686-35.03 1.156-41.72 17.53s1.188 35.05 17.53 41.71c31.75 12.93 95.69 35.37 157.6 35.37 29.62 0 58.81-5.156 83.72-18.96 30.81-17.09 50.44-45.46 56.72-82.11 3.998-23.27 2.168-42.58-3.488-59.05H332.2zm155.8-80-176.5-.03c-15.85-5.614-31.83-10.34-46.7-14.62-85.47-24.62-110.9-39.05-103.7-81.33 2.5-14.53 10.16-25.96 22.72-34.03 20.47-13.15 64.06-23.84 155.4.343 17.09 4.53 34.59-5.654 39.13-22.74 4.531-17.09-5.656-34.59-22.75-39.12-91.31-24.18-160.7-21.62-206.3 7.654C121.8 73.72 103.6 101.1 98.09 133.1c-8.83 51.4 9.81 84.2 39.11 106.8H24c-13.25 0-24 10.75-24 23.1 0 13.25 10.75 23.1 24 23.1h464c13.25 0 24-10.75 24-23.1 0-12.3-10.7-23.1-24-23.1z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&n.dispatch(n.state.changeByRange((e=>({changes:[{from:e.from,insert:"~~"},{from:e.to,insert:"~~"}],range:ya.OF.range(e.from+2,e.to+2)}))))}},rb={name:"underline",keyCommand:"underline",button:{"aria-label":"Add underline text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 448 512",height:"13",width:"13",children:(0,Mt.jsx)("path",{d:"M416 448H32c-17.69 0-32 14.31-32 32s14.31 32 32 32h384c17.69 0 32-14.31 32-32s-14.3-32-32-32zM48 64.01h16v160c0 88.22 71.78 159.1 160 159.1s160-71.78 160-159.1v-160h16c17.69 0 32-14.32 32-32S417.69.91 400 .91l-96-.005c-17.69 0-32 14.32-32 32s14.31 32 32 32h16v160c0 52.94-43.06 95.1-96 95.1S128 276.1 128 224V64h16c17.69 0 32-14.31 32-32S161.69 0 144 0L48 .005c-17.69 0-32 14.31-32 31.1S30.31 64.01 48 64.01z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&n.dispatch(n.state.changeByRange((e=>({changes:[{from:e.from,insert:""},{from:e.to,insert:""}],range:ya.OF.range(e.from+3,e.to+3)}))))}},ib={name:"olist",keyCommand:"olist",button:{"aria-label":"Add olist text"},icon:(0,Mt.jsx)("svg",{viewBox:"0 0 576 512",height:"14",width:"14",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M55.1 56.04c0-13.26 11.64-24 24-24h32c14.2 0 24 10.74 24 24V176h16c14.2 0 24 10.8 24 24 0 13.3-9.8 24-24 24h-80c-12.36 0-24-10.7-24-24 0-13.2 11.64-24 24-24h16V80.04h-8c-12.36 0-24-10.75-24-24zm63.6 285.16c-6.6-7.4-18.3-6.9-24.05 1.2l-11.12 15.5c-7.7 10.8-22.69 13.3-33.48 5.6-10.79-7.7-13.28-22.7-5.58-33.4l11.12-15.6c23.74-33.3 72.31-35.7 99.21-4.9 21.3 23.5 20.8 60.9-1.1 84.7L118.8 432H152c13.3 0 24 10.7 24 24s-10.7 24-24 24H64c-9.53 0-18.16-5.6-21.98-14.4-3.83-8.7-2.12-18.9 4.34-25.9l72.04-78c5.3-5.8 5.4-14.6.3-20.5zM512 64c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H256c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="1. ",o=r.text.match(/^\1\./);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},ob={name:"ulist",keyCommand:"ulist",button:{"aria-label":"Add ulist text"},icon:(0,Mt.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M88 48c13.3 0 24 10.75 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24V72c0-13.25 10.75-24 24-24h48zm392 16c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zM16 232c0-13.3 10.75-24 24-24h48c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48zm72 136c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48c0-13.3 10.75-24 24-24h48z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- ",o=r.text.match(/^-/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},sb={name:"quote",keyCommand:"quote",button:{"aria-label":"Add quote text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 448 512",height:"15",width:"15",children:(0,Mt.jsx)("path",{d:"M96 96c-53.02 0-96 42.1-96 96s42.98 96 96 96c11.28 0 21.95-2.305 32-5.879V288c0 35.3-28.7 64-64 64-17.67 0-32 14.33-32 32s14.33 32 32 32c70.58 0 128-57.42 128-128v-96c0-53.9-43-96-96-96zm352 96c0-53.02-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96c11.28 0 21.95-2.305 32-5.879V288c0 35.3-28.7 64-64 64-17.67 0-32 14.33-32 32s14.33 32 32 32c70.58 0 128-57.42 128-128v-96z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="> ",o=r.text.match(/^>\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},ab={name:"link",keyCommand:"link",button:{"aria-label":"Add link text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 640 512",height:"16",width:"16",children:(0,Mt.jsx)("path",{d:"M172.5 131.1c55.6-55.59 148-55.59 203.6 0 50 50 57.4 129.7 16.3 187.2l-1.1 1.6c-10.3 14.3-30.3 17.7-44.6 7.4-14.4-10.3-17.8-30.3-7.5-44.6l1.1-1.6c22.9-32.1 19.3-76-8.6-103.9-31.4-31.4-82.5-31.4-114 0L105.5 289.5c-31.51 30.6-31.51 82.5 0 114 27.8 27.9 71.8 31.5 103.8 8.6l1.6-2c14.4-9.4 34.4-6.1 44.6 8.3 10.3 14.4 7 34.4-7.4 44.7l-1.6 1.1c-58.4 41.1-136.3 34.5-186.29-15.4-56.469-56.5-56.469-148.1 0-204.5L172.5 131.1zm295 248.9c-56.5 56.5-148 56.5-204.5 0-50-50-56.5-128.8-15.4-186.3l1.1-1.6c9.4-14.3 29.4-17.7 44.6-7.4 14.4 9.4 17.8 29.4 7.5 44.6l-1.1 1.6c-22.9 31.2-19.3 76 8.6 103.9 31.4 31.4 82.5 31.4 114 0l112.2-112.3c31.5-31.5 31.5-83.4 0-114-27.8-27.87-71.8-31.51-103.8-8.6l-1.6 1.1c-14.4 10.3-34.4 6.1-44.6-7.42-10.3-14.38-7-34.37 7.4-44.64l1.6-1.12C451 6.731 529.8 13.25 579.8 63.24c56.5 56.46 56.5 148.06 0 204.46L467.5 380z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n&&t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:"["+i+"]()"},selection:ya.OF.range(r.from+3+i.length,r.to+3)})}}},lb={name:"todo",keyCommand:"todo",button:{"aria-label":"Add todo List"},icon:(0,Mt.jsx)("svg",{viewBox:"0 0 48 48",fill:"none",height:"15",width:"15",children:(0,Mt.jsx)("path",{d:"m5 10 3 3 6-6M5 24l3 3 6-6M5 38l3 3 6-6m7-11h22M21 38h22M21 10h22",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- [ ] ",o=r.text.match(/^-\s\[\s\]\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},cb={name:"image",keyCommand:"image",button:{"aria-label":"Add image text"},icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"14",width:"14",children:(0,Mt.jsx)("path",{fillRule:"evenodd",d:"M1.75 2.5a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h.94a.76.76 0 0 1 .03-.03l6.077-6.078a1.75 1.75 0 0 1 2.412-.06L14.5 10.31V2.75a.25.25 0 0 0-.25-.25H1.75zm12.5 11H4.81l5.048-5.047a.25.25 0 0 1 .344-.009l4.298 3.889v.917a.25.25 0 0 1-.25.25zm1.75-.25V2.75A1.75 1.75 0 0 0 14.25 1H1.75A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25zM5.5 6a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zM7 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),execute:e=>{var{state:t,view:n}=e;if(t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:"![]("+i+")"},selection:ya.OF.range(r.from+4,r.to+4)})}}},ub={name:"redo",keyCommand:"redo",button:{"aria-label":"redo text"},icon:(0,Mt.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M58.79,439.13A16,16,0,0,1,48,424c0-73.1,14.68-131.56,43.65-173.77,35-51,90.21-78.46,164.35-81.87V88a16,16,0,0,1,27.05-11.57l176,168a16,16,0,0,1,0,23.14l-176,168A16,16,0,0,1,256,424V344.23c-45,1.36-79,8.65-106.07,22.64-29.25,15.12-50.46,37.71-73.32,67a16,16,0,0,1-17.82,5.28Z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&$a(n)}},hb={name:"undo",keyCommand:"undo",button:{"aria-label":"undo text"},icon:(0,Mt.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Mt.jsx)("path",{fill:"currentColor",d:"M448,440a16,16,0,0,1-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335,352.88,301,345.59,256,344.23V424A16,16,0,0,1,229,435.57l-176-168a16,16,0,0,1,0-23.14l176-168A16,16,0,0,1,256,88v80.36c74.14,3.41,129.38,30.91,164.35,81.87C449.32,292.44,464,350.9,464,424a16,16,0,0,1-16,16Z"})}),execute:e=>{var{state:t,view:n}=e;t&&n&&Ma(n)}},db=e=>{var{editorProps:t}=e,n=(0,J.useRef)(0),[r,i]=(0,J.useState)(!1),o=(0,J.useRef)(r),s=e=>{var r;for(var i of e){var s;n.current||(n.current=i.target.clientHeight),null!=(s=t.editor)&&null!=(s=s.current)&&null!=(s=s.view)&&s.dom&&(o.current?t.editor.current.view.dom.style.height=i.target.clientHeight+"px":t.editor.current.view.dom.removeAttribute("style"))}null==(r=a.current)||r.disconnect(),a.current=void 0},a=(0,J.useRef)(new ResizeObserver(s));(0,J.useEffect)((()=>{if(a.current||(a.current=new ResizeObserver(s)),t.containerEditor&&t.containerEditor.current&&t.containerEditor.current.parentElement&&a.current){var e=t.containerEditor.current.parentElement;a.current.observe(e)}return()=>{a.current&&(a.current.disconnect(),a.current=void 0)}}),[t.containerEditor,s,t.editor,r,a]),(0,J.useEffect)((()=>{if(document&&t&&t.container&&t.container.current&&t.editor){var e=t.container.current;document.body.style.overflow=r?"hidden":"initial",e&&r?(e.style.zIndex="999",e.style.position="fixed",e.style.top="0px",e.style.bottom="0px",e.style.left="0px",e.style.right="0px"):e&&(e.style.position="initial",e.style.top="initial",e.style.bottom="initial",e.style.left="initial",e.style.right="initial")}}),[r,t]);return(0,Mt.jsx)("button",{onClick:()=>{o.current=!r,i(!r)},type:"button",className:r?"active":"",children:e.command.icon})},fb={name:"fullscreen",keyCommand:"fullscreen",button:(e,t,n)=>(0,Mt.jsx)(db,{command:e,editorProps:Nt({},t,n)}),icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 448 512",height:"15",width:"15",children:(0,Mt.jsx)("path",{d:"M128 32H32C14.31 32 0 46.31 0 64v96c0 17.69 14.31 32 32 32s32-14.31 32-32V96h64c17.69 0 32-14.31 32-32s-14.3-32-32-32zm288 0h-96c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32V64c0-17.69-14.3-32-32-32zM128 416H64v-64c0-17.69-14.31-32-32-32S0 334.31 0 352v96c0 17.69 14.31 32 32 32h96c17.69 0 32-14.31 32-32s-14.3-32-32-32zm288-96c-17.69 0-32 14.31-32 32v64h-64c-17.69 0-32 14.31-32 32s14.31 32 32 32h96c17.69 0 32-14.31 32-32v-96c0-17.7-14.3-32-32-32z"})})},pb=e=>{var{editorProps:t}=e,{containerEditor:n,preview:r,previewWidth:i="50%",enablePreview:o=!0}=t,[s,a]=(0,J.useState)(e.editorProps.visible);if((0,J.useEffect)((()=>a(e.editorProps.visible)),[e.editorProps.visible]),(0,J.useEffect)((()=>{if(r.current){var e=r.current;r&&(e.style.borderBottomRightRadius="3px"),e&&s?(e.style.width=i,e.style.overflow="auto","100%"!==i&&(e.style.borderLeft="1px solid var(--color-border-muted)"),e.style.padding="20px",n.current&&(n.current.style.width="calc(100% - "+i+")")):e&&(e.style.width="0%",e.style.overflow="hidden",e.style.borderLeft="0px",e.style.padding="0",n.current&&(n.current.style.width="100%"))}}),[s,n,r,i]),o){return(0,Mt.jsx)("button",{onClick:()=>{t.onPreviewMode&&t.onPreviewMode(!s),a(!s)},type:"button",className:s?"active":"",children:e.command.icon})}},mb={name:"preview",keyCommand:"preview",button:(e,t,n)=>(0,Mt.jsx)(pb,{command:e,editorProps:Nt({},t,n)}),icon:(0,Mt.jsx)("svg",{fill:"currentColor",viewBox:"0 0 576 512",height:"16",width:"16",children:(0,Mt.jsx)("path",{d:"M279.6 160.4c2.8-.3 5.6-.4 8.4-.4 53 0 96 42.1 96 96 0 53-43 96-96 96-53.9 0-96-43-96-96 0-2.8.1-5.6.4-8.4 9.3 4.5 20.1 8.4 31.6 8.4 35.3 0 64-28.7 64-64 0-11.5-3.9-22.3-8.4-31.6zm201-47.8c46.8 43.4 78.1 94.5 92.9 131.1 3.3 7.9 3.3 16.7 0 24.6-14.8 35.7-46.1 86.8-92.9 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.58-80.6C48.62 355.1 17.34 304 2.461 268.3a31.967 31.967 0 0 1 0-24.6C17.34 207.1 48.62 156 95.42 112.6 142.5 68.84 207.2 32 288 32c80.8 0 145.5 36.84 192.6 80.6zM288 112c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144z"})})},gb={undo:hb,redo:ub,bold:VO,italic:eb,header:tb,strike:nb,underline:rb,quote:sb,olist:ib,ulist:ob,todo:lb,link:ab,image:cb,code:KO,codeBlock:JO,fullscreen:fb,preview:mb},Ob=()=>Object.keys(gb).filter((e=>!/^(fullscreen|preview)/.test(e))).map((e=>gb[e])),bb=()=>[mb,fb],yb=["prefixCls","className","onClick","toolbars","editor","mode","preview","container","containerEditor","editorProps"];function vb(e){var{prefixCls:t="md-editor",className:n,toolbars:r=[],editor:i,mode:o,preview:s,container:a,containerEditor:l,editorProps:c={}}=e,u=Qt(e,yb);if(!r||0===r.length)return null;return(0,Mt.jsx)("div",Nt({className:t+"-toolbar "+(n||"")+" "+(o?t+"-toolbar-mode":"")},u,{children:[...r].map(((e,t)=>{var n={type:"button"},r="string"===typeof e?gb[e]:e;if(!r)return null;if(n.children=r.icon,n.onClick=()=>{var e;(e=r.execute)&&i&&i&&e(i.current)},r.button&&"object"===typeof r.button){var o=r.button;Object.keys(o).forEach((e=>{n[e]=o[e]}))}else if("function"===typeof r.button)return J.cloneElement(r.button(r,c,{preview:s,container:a,containerEditor:l,editor:i,editorProps:c}),{key:t});return(0,J.createElement)("button",Nt({},n,{key:t}))}))}))}var kb=e=>{var{theme:t,settings:n={},styles:r=[]}=e,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.backgroundImage&&(o.backgroundImage=n.backgroundImage),n.foreground&&(o.color=n.foreground),n.fontSize&&(o.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=o),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=Oa.Lz.theme(i,{dark:"dark"===t}),l=fa.cr.define(r);return[a,(0,fa.y9)(l)]};var xb=kb({theme:"light",settings:{background:"var(--color-canvas-subtle)",foreground:"var(--color-fg-default)",caret:"var(--color-fg-default)",selection:"var(--color-border-default)",selectionMatch:"var(--color-border-muted)",lineHighlight:"var(--color-neutral-muted)",gutterBackground:"var(--color-canvas-subtle)",gutterForeground:"var(--color-fg-muted)",gutterBorder:"var(--color-border-muted)"},styles:[{tag:Cu._A.comment,color:"var(--color-prettylights-syntax-comment)"},{tag:Cu._A.variableName,color:"var(--color-prettylights-syntax-variable)"},{tag:[Cu._A.string,Cu._A.special(Cu._A.brace)],color:"var(--color-prettylights-syntax-entity)"},{tag:Cu._A.number,color:"var(--color-prettylights-syntax-variable)"},{tag:[Cu._A.bool,Cu._A.null],color:"var(--color-prettylights-syntax-entity)"},{tag:Cu._A.keyword,color:"var(--color-prettylights-syntax-keyword)",fontWeight:"bold"},{tag:Cu._A.string,color:"var(--color-prettylights-syntax-string)"},{tag:Cu._A.operator,color:"var(--color-accent-emphasis)"},{tag:Cu._A.deleted,color:"var(--color-prettylights-syntax-markup-deleted-bg)"},{tag:Cu._A.deleted,color:"red"},{tag:Cu._A.className,color:"var(--color-prettylights-syntax-variable)"},{tag:Cu._A.definition(Cu._A.typeName),color:"var(--color-prettylights-syntax-entity)"},{tag:Cu._A.typeName,color:"var(--color-prettylights-syntax-entity)"},{tag:Cu._A.list,color:"var(--color-prettylights-syntax-markup-list)"},{tag:Cu._A.heading,color:"var(--color-prettylights-syntax-markup-heading)",fontWeight:"bold"},{tag:Cu._A.regexp,color:"var(--color-prettylights-syntax-string-regexp)"},{tag:Cu._A.literal,color:"var(--color-prettylights-syntax-markup-italic)"},{tag:Cu._A.link,color:"var(--color-prettylights-syntax-constant-other-reference-link)",textDecoration:"underline"},{tag:Cu._A.angleBracket,color:"var(--color-fg-default)"},{tag:Cu._A.tagName,color:"var(--color-prettylights-syntax-entity-tag)"},{tag:Cu._A.attributeName,color:"var(--color-prettylights-syntax-constant)"}]}),Sb=["prefixCls","className","onChange","toolbars","toolbarsMode","toolbarsFilter","visible","renderPreview","visibleEditor","hideToolbar","toolbarBottom","enableScroll","enablePreview","previewProps","extensions","previewWidth","reExtensions","onPreviewMode"],wb=Oa.Lz.theme({"&.cm-editor, & .cm-scroller":{borderBottomRightRadius:"3px",borderBottomLeftRadius:"3px"}}),Tb=J.forwardRef(Eb);Tb.Markdown=GO;const Ab=Tb;function Eb(e,t){var{prefixCls:n="md-editor",className:r,onChange:i,toolbars:o=Ob(),toolbarsMode:s=bb(),toolbarsFilter:a,visible:l=!0,renderPreview:c,visibleEditor:u=!0,hideToolbar:h=!0,toolbarBottom:d=!1,enableScroll:f=!0,enablePreview:p=!0,previewProps:m={},extensions:g=[],previewWidth:O="50%",reExtensions:b}=e,y=Qt(e,Sb),[v,k]=(0,J.useState)(e.value||""),x=(0,J.useRef)(null),S=(0,J.useRef)(null),w=(0,J.useRef)(null),T=(0,J.useRef)(null),A=(0,J.useRef)("editor");(0,J.useImperativeHandle)(t,(()=>({editor:x,preview:T})),[x]);var E={preview:T,editor:x,container:S,containerEditor:w,editorProps:Nt({},e,{previewWidth:O})},C="number"===typeof y.height?y.height+"px":y.height,_=e.value;(0,J.useEffect)((()=>k(null!=_?_:"")),[_]);var P=(0,J.useCallback)((e=>{if(f){var t=e.target,n=t.scrollTop/t.scrollHeight;if("editor"===A.current&&T.current){var r,i=(null==(r=T.current)?void 0:r.scrollHeight)||0;T.current.scrollTop=i*n}else if(x.current&&x.current.view){var o=x.current.view.scrollDOM,s=x.current.view.scrollDOM.scrollHeight||0;o.scrollTop=s*n}}}),[f]),R=()=>A.current="preview",D=()=>A.current="editor";(0,J.useEffect)((()=>{var e=T.current;return e&&f&&(e.addEventListener("mouseover",R,!1),e.addEventListener("mouseleave",D,!1),e.addEventListener("scroll",P,!1)),()=>{e&&f&&(e.removeEventListener("mouseover",R),e.removeEventListener("mouseleave",R),e.addEventListener("mouseleave",P,!1))}}),[T,f,P]);var N=ba({type:"scroll",events:{scroll:P}}),Q=b||[(0,da.markdown)({base:da.markdownLanguage,codeLanguages:ga}),wb,...g];f&&Q.push(N);var M=n+"-preview",$=[n,"wmde-markdown-var",r].filter(Boolean).join(" ");m.source=v;var L=(0,Mt.jsxs)("div",{className:n+"-content",style:{height:y.height},children:[(0,Mt.jsx)("div",{className:n+"-content-editor",ref:w,children:u&&(0,Mt.jsx)(eh,Nt({theme:xb},y,{className:n+"-inner",extensions:Q,height:C,ref:x,onChange:(e,t)=>{k(e),i&&i(e,t)}}))}),p&&(0,Mt.jsx)("div",{className:M,ref:T,children:c?c(m,!!l):(0,Mt.jsx)(GO,Nt({},m,{"data-visible":!!l}))})]}),I=[n&&n+"-toolbar-warp",n&&d&&n+"-toolbar-bottom"].filter(Boolean).join(" "),F=a?o.filter(a):o,B=a?s.filter(a):s,z=h&&(0,Mt.jsxs)("div",{className:I,children:[(0,Mt.jsx)(vb,Nt({},E,{toolbars:F})),(0,Mt.jsx)(vb,Nt({},E,{toolbars:B,mode:!0}))]}),Z=d?(0,Mt.jsxs)(J.Fragment,{children:[L,z]}):(0,Mt.jsxs)(J.Fragment,{children:[z,L]});return(0,Mt.jsx)("div",{className:$,ref:S,children:Z})}var Cb={background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#0a6bcb3d"},_b=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Cb,n),styles:[{tag:Cu._A.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:Cu._A.atom,color:"#77F"},{tag:Cu._A.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:Cu._A.number,color:"violet"},{tag:Cu._A.definition(Cu._A.variableName),color:"#fffabc"},{tag:Cu._A.variableName,color:"#abcdef"},{tag:Cu._A.function(Cu._A.variableName),color:"#fffabc"},{tag:Cu._A.typeName,color:"#FFDD44"},{tag:Cu._A.tagName,color:"#def"},{tag:Cu._A.string,color:"#2b4"},{tag:Cu._A.meta,color:"#C9F"},{tag:Cu._A.bracket,color:"#8a8a8a"},{tag:Cu._A.attributeName,color:"#DDFF00"},{tag:Cu._A.heading,color:"aquamarine",fontWeight:"bold"},{tag:Cu._A.link,color:"blueviolet",fontWeight:"bold"},...r]})})(),Pb={background:"#282b2e",foreground:"#a9b7c6",caret:"#00FF00",selection:"#4e5254",selectionMatch:"#4e5254",lineHighlight:"#7f85891f"},Rb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Pb,n),styles:[{tag:[Cu._A.keyword,Cu._A.deleted,Cu._A.className],color:"#cc7832"},{tag:[Cu._A.number,Cu._A.literal,Cu._A.derefOperator],color:"#6897bb"},{tag:[Cu._A.link,Cu._A.variableName],color:"#629755"},{tag:[Cu._A.comment,Cu._A.quote],color:"grey"},{tag:[Cu._A.meta,Cu._A.documentMeta],color:"#bbb529"},{tag:[Cu._A.string,Cu._A.propertyName,Cu._A.attributeValue],color:"#6a8759"},{tag:[Cu._A.heading,Cu._A.typeName],color:"#ffc66d"},{tag:[Cu._A.attributeName],color:"#a9b7c6"},{tag:[Cu._A.emphasis],fontStyle:"italic"},...r]})})(),Db={background:"#272C35",foreground:"#9d9b97",caret:"#797977",selection:"#3d4c64",selectionMatch:"#3d4c64",gutterBackground:"#272C35",gutterForeground:"#465063",gutterBorder:"transparent",lineHighlight:"#2e3f5940"},Nb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Db,n),styles:[{tag:[Cu._A.function(Cu._A.variableName),Cu._A.function(Cu._A.propertyName),Cu._A.url,Cu._A.processingInstruction],color:"hsl(207, 82%, 66%)"},{tag:[Cu._A.tagName,Cu._A.heading],color:"#e06c75"},{tag:Cu._A.comment,color:"#54636D"},{tag:[Cu._A.propertyName],color:"hsl(220, 14%, 71%)"},{tag:[Cu._A.attributeName,Cu._A.number],color:"hsl( 29, 54%, 61%)"},{tag:Cu._A.className,color:"hsl( 39, 67%, 69%)"},{tag:Cu._A.keyword,color:"hsl(286, 60%, 67%)"},{tag:[Cu._A.string,Cu._A.regexp,Cu._A.special(Cu._A.propertyName)],color:"#98c379"},...r]})})(),Qb={background:"#FFFFFF",foreground:"#000000",caret:"#FBAC52",selection:"#FFD420",selectionMatch:"#FFD420",gutterBackground:"#f5f5f5",gutterForeground:"#4D4D4C",gutterBorder:"transparent",lineHighlight:"#00000012"},Mb=(e=>{var{theme:t="light",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Qb,n),styles:[{tag:[Cu._A.meta,Cu._A.comment],color:"#804000"},{tag:[Cu._A.keyword,Cu._A.strong],color:"#0000FF"},{tag:[Cu._A.number],color:"#FF0080"},{tag:[Cu._A.string],color:"#FF0080"},{tag:[Cu._A.variableName],color:"#006600"},{tag:[Cu._A.escape],color:"#33CC33"},{tag:[Cu._A.tagName],color:"#1C02FF"},{tag:[Cu._A.heading],color:"#0C07FF"},{tag:[Cu._A.quote],color:"#000000"},{tag:[Cu._A.list],color:"#B90690"},{tag:[Cu._A.documentMeta],color:"#888888"},{tag:[Cu._A.function(Cu._A.variableName)],color:"#0000A2"},{tag:[Cu._A.definition(Cu._A.typeName),Cu._A.typeName],color:"#6D79DE"},...r]})})(),$b={background:"#28211c",foreground:"#9d9b97",caret:"#797977",selection:"#4f382b",selectionMatch:"#4f382b",gutterBackground:"#28211c",gutterForeground:"#666666",lineHighlight:"#ffffff1a"},Lb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},$b,n),styles:[{tag:[Cu._A.atom,Cu._A.number,Cu._A.link,Cu._A.bool],color:"#9b859d"},{tag:Cu._A.comment,color:"#937121"},{tag:[Cu._A.keyword,Cu._A.tagName],color:"#cf6a4c"},{tag:Cu._A.string,color:"#f9ee98"},{tag:Cu._A.bracket,color:"#9d9b97"},{tag:[Cu._A.variableName],color:"#5ea6ea"},{tag:Cu._A.definition(Cu._A.variableName),color:"#cf7d34"},{tag:[Cu._A.function(Cu._A.variableName),Cu._A.className],color:"#cf7d34"},{tag:[Cu._A.propertyName,Cu._A.attributeName],color:"#54be0d"},...r]})})(),Ib={background:"#2B2B2B",foreground:"#f8f8f2",caret:"#FFFFFF",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"rgba(255, 255, 255, 0.1)",gutterForeground:"#999",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},Fb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Ib,n),styles:[{tag:[Cu._A.atom,Cu._A.number],color:"#bd93f9"},{tag:[Cu._A.comment],color:"#61A151"},{tag:[Cu._A.string],color:"#6A8759"},{tag:[Cu._A.variableName,Cu._A.operator],color:"#A9B7C6"},{tag:[Cu._A.meta,Cu._A.className],color:"#A9B7C6"},{tag:[Cu._A.propertyName],color:"#FFC66D"},{tag:[Cu._A.keyword],color:"#CC7832"},{tag:[Cu._A.tagName],color:"#ff79c6"},{tag:[Cu._A.typeName],color:"#ffb86c"},...r]})})(),Bb={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},zb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Bb,n),styles:[{tag:Cu._A.comment,color:"#6272a4"},{tag:Cu._A.string,color:"#f1fa8c"},{tag:Cu._A.atom,color:"#bd93f9"},{tag:Cu._A.meta,color:"#f8f8f2"},{tag:[Cu._A.keyword,Cu._A.operator,Cu._A.tagName],color:"#ff79c6"},{tag:[Cu._A.function(Cu._A.propertyName),Cu._A.propertyName],color:"#66d9ef"},{tag:[Cu._A.definition(Cu._A.variableName),Cu._A.function(Cu._A.variableName),Cu._A.className,Cu._A.attributeName],color:"#50fa7b"},{tag:Cu._A.atom,color:"#bd93f9"},...r]})})(),Zb={background:"#faf8f5",foreground:"#b29762",caret:"#93abdc",selection:"#e3dcce",selectionMatch:"#e3dcce",gutterBackground:"#faf8f5",gutterForeground:"#cdc4b1",gutterBorder:"transparent",lineHighlight:"#ddceb154"},jb=(e=>{var{theme:t="light",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Zb,n),styles:[{tag:[Cu._A.comment,Cu._A.bracket],color:"#b6ad9a"},{tag:[Cu._A.atom,Cu._A.number,Cu._A.keyword,Cu._A.link,Cu._A.attributeName,Cu._A.quote],color:"#063289"},{tag:[Cu._A.emphasis,Cu._A.heading,Cu._A.tagName,Cu._A.propertyName,Cu._A.variableName],color:"#2d2006"},{tag:[Cu._A.typeName,Cu._A.url,Cu._A.string],color:"#896724"},{tag:[Cu._A.operator,Cu._A.string],color:"#1659df"},{tag:[Cu._A.propertyName],color:"#b29762"},{tag:[Cu._A.unit,Cu._A.punctuation],color:"#063289"},...r]})})(),Ub={background:"#2a2734",foreground:"#6c6783",caret:"#ffad5c",selection:"#91ff6c26",selectionMatch:"#91ff6c26",gutterBackground:"#2a2734",gutterForeground:"#545167",lineHighlight:"#36334280"},Xb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Ub,n),styles:[{tag:[Cu._A.comment,Cu._A.bracket],color:"#6c6783"},{tag:[Cu._A.atom,Cu._A.number,Cu._A.keyword,Cu._A.link,Cu._A.attributeName,Cu._A.quote],color:"#ffcc99"},{tag:[Cu._A.emphasis,Cu._A.heading,Cu._A.tagName,Cu._A.propertyName,Cu._A.className,Cu._A.variableName],color:"#eeebff"},{tag:[Cu._A.typeName,Cu._A.url],color:"#7a63ee"},{tag:Cu._A.operator,color:"#ffad5c"},{tag:Cu._A.string,color:"#ffb870"},{tag:[Cu._A.propertyName],color:"#9a86fd"},{tag:[Cu._A.unit,Cu._A.punctuation],color:"#e09142"},...r]})})(),Hb={background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#006fff1c",gutterBorder:"transparent"},Wb=(e=>{var{theme:t="light",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Hb,n),styles:[{tag:[Cu._A.comment],color:"#3F7F5F"},{tag:[Cu._A.documentMeta],color:"#FF1717"},{tag:Cu._A.keyword,color:"#7F0055",fontWeight:"bold"},{tag:Cu._A.atom,color:"#00f"},{tag:Cu._A.number,color:"#164"},{tag:Cu._A.propertyName,color:"#164"},{tag:[Cu._A.variableName,Cu._A.definition(Cu._A.variableName)],color:"#0000C0"},{tag:Cu._A.function(Cu._A.variableName),color:"#0000C0"},{tag:Cu._A.string,color:"#2A00FF"},{tag:Cu._A.operator,color:"black"},{tag:Cu._A.tagName,color:"#170"},{tag:Cu._A.attributeName,color:"#00c"},{tag:Cu._A.link,color:"#219"},...r]})})(),qb={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},Yb=(e=>{var{theme:t="light",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},qb,n),styles:[{tag:[Cu._A.standard(Cu._A.tagName),Cu._A.tagName],color:"#116329"},{tag:[Cu._A.comment,Cu._A.bracket],color:"#6a737d"},{tag:[Cu._A.className,Cu._A.propertyName],color:"#6f42c1"},{tag:[Cu._A.variableName,Cu._A.attributeName,Cu._A.number,Cu._A.operator],color:"#005cc5"},{tag:[Cu._A.keyword,Cu._A.typeName,Cu._A.typeOperator,Cu._A.typeName],color:"#d73a49"},{tag:[Cu._A.string,Cu._A.meta,Cu._A.regexp],color:"#032f62"},{tag:[Cu._A.name,Cu._A.quote],color:"#22863a"},{tag:[Cu._A.heading,Cu._A.strong],color:"#24292e",fontWeight:"bold"},{tag:[Cu._A.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[Cu._A.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[Cu._A.atom,Cu._A.bool,Cu._A.special(Cu._A.variableName)],color:"#e36209"},{tag:[Cu._A.url,Cu._A.escape,Cu._A.regexp,Cu._A.link],color:"#032f62"},{tag:Cu._A.link,textDecoration:"underline"},{tag:Cu._A.strikethrough,textDecoration:"line-through"},{tag:Cu._A.invalid,color:"#cb2431"},...r]})})(),Gb={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},Vb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Gb,n),styles:[{tag:[Cu._A.standard(Cu._A.tagName),Cu._A.tagName],color:"#7ee787"},{tag:[Cu._A.comment,Cu._A.bracket],color:"#8b949e"},{tag:[Cu._A.className,Cu._A.propertyName],color:"#d2a8ff"},{tag:[Cu._A.variableName,Cu._A.attributeName,Cu._A.number,Cu._A.operator],color:"#79c0ff"},{tag:[Cu._A.keyword,Cu._A.typeName,Cu._A.typeOperator,Cu._A.typeName],color:"#ff7b72"},{tag:[Cu._A.string,Cu._A.meta,Cu._A.regexp],color:"#a5d6ff"},{tag:[Cu._A.name,Cu._A.quote],color:"#7ee787"},{tag:[Cu._A.heading,Cu._A.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[Cu._A.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[Cu._A.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[Cu._A.atom,Cu._A.bool,Cu._A.special(Cu._A.variableName)],color:"#ffab70"},{tag:Cu._A.link,textDecoration:"underline"},{tag:Cu._A.strikethrough,textDecoration:"line-through"},{tag:Cu._A.invalid,color:"#f97583"},...r]})})(),Kb={background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#0000003b"},Jb=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},Kb,n),styles:[{tag:[Cu._A.comment,Cu._A.documentMeta],color:"#8292a2"},{tag:[Cu._A.number,Cu._A.bool,Cu._A.null,Cu._A.atom],color:"#ae81ff"},{tag:[Cu._A.attributeValue,Cu._A.className,Cu._A.name],color:"#e6db74"},{tag:[Cu._A.propertyName,Cu._A.attributeName],color:"#a6e22e"},{tag:[Cu._A.variableName],color:"#9effff"},{tag:[Cu._A.squareBracket],color:"#bababa"},{tag:[Cu._A.string,Cu._A.special(Cu._A.brace)],color:"#e6db74"},{tag:[Cu._A.regexp,Cu._A.className,Cu._A.typeName,Cu._A.definition(Cu._A.typeName)],color:"#66d9ef"},{tag:[Cu._A.definition(Cu._A.variableName),Cu._A.definition(Cu._A.propertyName),Cu._A.function(Cu._A.variableName)],color:"#fd971f"},{tag:[Cu._A.keyword,Cu._A.definitionKeyword,Cu._A.modifier,Cu._A.tagName,Cu._A.angleBracket],color:"#f92672"},...r]})})(),ey={background:"#303841",foreground:"#FFFFFF",caret:"#FBAC52",selection:"#4C5964",selectionMatch:"#3A546E",gutterBackground:"#303841",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"};var ty=function(e){var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},ey,n),styles:[{tag:[Cu._A.meta,Cu._A.comment],color:"#A2A9B5"},{tag:[Cu._A.attributeName,Cu._A.keyword],color:"#B78FBA"},{tag:Cu._A.function(Cu._A.variableName),color:"#5AB0B0"},{tag:[Cu._A.string,Cu._A.regexp,Cu._A.attributeValue],color:"#99C592"},{tag:Cu._A.operator,color:"#f47954"},{tag:[Cu._A.tagName,Cu._A.modifier],color:"#E35F63"},{tag:[Cu._A.number,Cu._A.definition(Cu._A.tagName),Cu._A.className,Cu._A.definition(Cu._A.variableName)],color:"#fbac52"},{tag:[Cu._A.atom,Cu._A.bool,Cu._A.special(Cu._A.variableName)],color:"#E35F63"},{tag:Cu._A.variableName,color:"#539ac4"},{tag:[Cu._A.propertyName,Cu._A.typeName],color:"#629ccd"},{tag:Cu._A.propertyName,color:"#36b7b5"},...r]})}(),ny={background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#d5e6ff69"};var ry=function(e){var{theme:t="light",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},ny,n),styles:[{tag:[Cu._A.comment,Cu._A.quote],color:"#707F8D"},{tag:[Cu._A.typeName,Cu._A.typeOperator],color:"#aa0d91"},{tag:[Cu._A.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[Cu._A.string,Cu._A.meta],color:"#D23423"},{tag:[Cu._A.name],color:"#032f62"},{tag:[Cu._A.typeName],color:"#522BB2"},{tag:[Cu._A.variableName],color:"#23575C"},{tag:[Cu._A.definition(Cu._A.variableName)],color:"#327A9E"},{tag:[Cu._A.regexp,Cu._A.link],color:"#0e0eff"},...r]})}(),iy={background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#ffffff0f"},oy=(e=>{var{theme:t="dark",settings:n={},styles:r=[]}=e||{};return kb({theme:t,settings:Nt({},iy,n),styles:[{tag:[Cu._A.comment,Cu._A.quote],color:"#7F8C98"},{tag:[Cu._A.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[Cu._A.string,Cu._A.meta],color:"#FF8170"},{tag:[Cu._A.typeName],color:"#DABAFF"},{tag:[Cu._A.definition(Cu._A.variableName)],color:"#6BDFFF"},{tag:[Cu._A.name],color:"#6BAA9F"},{tag:[Cu._A.variableName],color:"#ACF2E4"},{tag:[Cu._A.regexp,Cu._A.link],color:"#FF8170"},...r]})})();const sy='
\n

\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668

\n
\n\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)\n[![CI](https://github.com/jaywcjlove/wxmp/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/wxmp/actions/workflows/ci.yml)\n\n[![\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668](https://user-images.githubusercontent.com/1680273/188264183-a6b8cb6a-92e1-4a73-afc5-4f0234b26ed3.png)](https://jaywcjlove.github.io/wxmp)\n\n\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0 Markdown \u5728\u7ebf\u7f16\u8f91\u5668\uff0c\u4f7f\u7528 markdown \u8bed\u6cd5\u521b\u5efa\u4e00\u7bc7\u7b80\u4ecb\u7f8e\u89c2\u5927\u65b9\u7684\u5fae\u4fe1\u516c\u4f17\u53f7\u56fe\u6587\u3002\u7531\u4e8e\u53d1\u7248\u672c\u9ebb\u70e6\uff0c\u548c\u4e00\u4e9b\u529f\u80fd\u65e0\u6cd5\u6269\u5c55\u505c\u6ede\u5f00\u53d1\u4e86\uff0c\u672a\u6765\u4e0d\u518d\u5f00\u53d1 Chrome \u7684\u63d2\u4ef6(\u6682\u5b58\u5728 chrome \u5206\u652f)\uff0c\u901a\u8fc7 web \u7248\u672c\u5b9a\u5236\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u3002\n\n[![Markdown \u7f16\u8f91\u5668\u684c\u9762\u5e94\u7528](https://user-images.githubusercontent.com/1680273/188407235-ead43d61-2ef8-416a-926f-396d8b824b33.png)](https://github.com/jaywcjlove/wxmp/releases)\n\n## \u529f\u80fd\u7279\u6027\n\n\u5f00\u53d1\u8ba1\u5212\u548c\u4e00\u4e9b\u529f\u80fd\u4ecb\u7ecd\uff0c\u6709\u9700\u6c42\u53ef\u4ee5\u5728 issue \u4e2d\u63d0\uff0c\u4f7f\u5f97\u5de5\u5177\u53d8\u5f97\u66f4\u52a0\u5b8c\u5584\u3002\u4e0b\u9762\u793a\u4f8b\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n- [x] \u652f\u6301 Markdown \u6240\u6709\u57fa\u7840\u8bed\u6cd5\n- [x] \u652f\u6301\u81ea\u5b9a\u4e49 CSS \u6837\u5f0f\n- [x] \u652f\u6301\u4e3b\u9898\u9009\u62e9 & \u7f16\u8f91\u9884\u89c8\u3002\n- [x] \u652f\u6301\u660e\u6697\u4e24\u79cd\u4e3b\u9898\u9884\u89c8\u3002\n- [ ] \u652f\u6301\u4ee3\u7801\u5757\u4e3b\u9898\u6837\u5f0f\u9009\u62e9\u3002\n- [x] \u652f\u6301\u8272\u76d8\u53d6\u8272\uff0c\u5feb\u901f\u66ff\u6362\u6587\u7ae0\u6574\u4f53\u8272\u8c03\n- [x] \u652f\u6301 URL \u53c2\u6570\u52a0\u8f7d Markdown \u5185\u5bb9\u3002\n- [x] \u652f\u6301 URL \u53c2\u6570\u9009\u62e9\u9884\u89c8\u4e3b\u9898\u3002\n- [x] CI \u81ea\u52a8\u751f\u6210 Electron \u684c\u9762\u5e94\u7528\u3002\n- [ ] ~~\u652f\u6301\u5168\u5c40\u5b57\u53f7\u5927\u5c0f\u9009\u62e9\u3002~~\n\n### \u652f\u6301\u4ee3\u7801\u5757\u6837\u5f0f\n\n\u4e0b\u9762\u662f `jsx` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```jsx\nfunction Demo() {\n return
Hello World!
\n}\n```\n\n\u4e0b\u9762\u662f `css` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```css\nli {\n font-size: 16px;\n margin: 0;\n line-height: 26px;\n color: rgb(30 41 59);\n font-family:-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif;\n}\n```\n\n### \u652f\u6301\u5185\u8054\u4ee3\u7801\n\n> \u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\nInline Code `{code: 0}`\n\n### \u652f\u6301\u8868\u683c\n\n\u8868\u683c\u65e0\u6cd5\u4f7f\u7528\u81ea\u5b9a\u4e49\u6837\u5f0f\uff0c\u6682\u65f6\u6ca1\u627e\u5230\u89e3\u51b3\u9014\u5f84\n\n| Header 1 | Header 2 |\n| --- | --- |\n| Key 1 | Value 1 |\n| Key 2 | Value 2 |\n| Key 3 | Value 3 |\n\n### \u652f\u6301 GFM \u811a\u6ce8\n\n\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Markdown[^1] \u8bed\u6cd5\u7684\u811a\u6ce8[^2]\u3002 \u9875\u9762\u6700\u540e\u6709\u4e00\u4e9b\u989d\u5916\u7684\u6587\u5b57\u63cf\u8ff0\u3002\u6ce8\u610f\u8fd9\u4e0d\u662f\u5b8c\u6574\u7684\u6ce8\u811a[^3]\u7279\u6027\u3002\n\n[^1]: GitHub \u98ce\u683c\u7684 Markdown \u89c4\u8303 https://github.github.com/gfm/\n[^2]: \u811a\u6ce8 https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/\n[^3]: \u5fae\u4fe1\u6587\u7ae0\u4e0d\u652f\u6301\u951a\u70b9\u8df3\u8f6c\u548c\u6253\u5f00\u7b2c\u4e09\u65b9 URL \u8d85\u94fe\u63a5\uff0c\u6240\u4ee5\u4e0d\u652f\u6301\u5b8c\u6574\u7684\u6ce8\u811a\u7279\u6027\u3002\n\n### \u652f\u6301\u6ce8\u91ca\n\n```html\n\n \u6c49 Han\n\n```\n\n\u6c49\u5b57\u6ce8\u97f3\u6548\u679c\uff1a\n\n \u6c49 Han\n \u5b57 zi\n \u62fc pin\n \u97f3 yin\n \u6ce8 zhu\n \u97f3 yin\n\n\n### \u652f\u6301\u81ea\u5b9a\u4e49\u6837\u5f0f\n\x3c!--rehype:style=color: red;--\x3e\n\n\u5728 Markdown \u4e2d HTML \u6ce8\u91ca\u4e5f\u53ef\u4ee5\u7528\u5728 markdown \u4e2d\uff0c\u5229\u7528\u8fd9\u4e00\u7279\u70b9\uff0c\u4e3a\u4e00\u4e9b\u5185\u5bb9\u81ea\u5b9a\u4e00\u6837\u5f0f\u3002\u4f7f\u7528 HTML \u6ce8\u91ca `\x3c!--rehype:xxx--\x3e`\x3c!--rehype:style=color: red;background: #ff000033;--\x3e \u8ba9 Markdown \u652f\u6301\u6837\u5f0f\u81ea\u5b9a\u4e49\u3002\n\n```markdown\n## \u5b9a\u4e49\u6807\u9898\u6837\u5f0f\n\x3c!--rehype:style=display: flex; height: 230px; align-items: center; justify-content: center; font-size: 38px;--\x3e\n\n\u652f\u6301\u5bf9\u67d0\u4e9b\u6587\u5b57\u53d8\u66f4\u6837\u5f0f\uff0c\u5982_\u6587\u5b57\u989c\u8272_\x3c!--rehype:style=color: red;--\x3e\uff0c\u6587\u5b57\u989c\u8272\u5c06\u88ab\u8bbe\u7f6e\u4e3a\u7ea2\u8272(red)\u3002\n```\n\n\u26a0\ufe0f \u6ce8\u610f\uff1a\u8fd9\u4e00\u7279\u6027\u53ef\u80fd\u9002\u7528\u4e8e\u6709\u4e00\u5b9a css \u524d\u7aef\u57fa\u7840\u77e5\u8bc6\u7684\u7528\u6237\uff0c\u4e0d\u8fc7\u5b83\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u4f7f\u7528 `\x3c!--rehype:style=` \u5f00\u59cb\uff0c`--\x3e` \u7ed3\u675f\uff0c\u4e2d\u95f4\u5305\u88f9 css \u6837\u5f0f\uff0c\u5982 `color: red;` \u8bbe\u7f6e\u6587\u5b57\u7ea2\u8272\u3002\n\n\n### \u6807\u8bb0\u5ffd\u7565\u5185\u5bb9\n\n\u6b64\u7279\u6027\u5229\u7528 HTML \u6ce8\u91ca\u5728 markdown \u4e2d\u88ab\u5ffd\u7565\u7684\u7279\u6027\uff0c\u6807\u8bb0\u9700\u8981\u5ffd\u7565\u7684\u5185\u5bb9\uff0c\u6807\u8bb0\u5f00\u59cb `\x3c!--rehype:ignore:start--\x3e`\uff0c\u6807\u8bb0\u7ed3\u675f `\x3c!--rehype:ignore:end--\x3e`\uff0c\u88ab\u6807\u8bb0\u7684\u5185\u5bb9\u5728\u5fae\u4fe1 Markdown \u7f16\u8f91\u5668\u9884\u89c8\u4e2d\u4e0d\u663e\u793a\u3002\u5728\u5176\u5b83\u9884\u89c8\u5de5\u5177\u4e2d\u5c55\u793a\u5185\u5bb9\uff0c\u6bd4\u5982 GitHub \u4e2d\u80fd\u5c55\u793a\u3002\n\n```markdown\n# \u6ce8\u91ca\u5ffd\u7565\n\n\x3c!--rehype:ignore:start--\x3e\u5185\u5bb9\u5728\u5fae\u4fe1 Markdown \u7f16\u8f91\u5668\u9884\u89c8\u4e2d\u4e0d\u663e\u793a\u3002\u5728\u5176\u5b83\u9884\u89c8\u5de5\u5177\u4e2d\u5c55\u793a\u5185\u5bb9\u3002\x3c!--rehype:ignore:end--\x3e\n```\n\n### \u652f\u6301 URL \u53c2\u6570\u52a0\u8f7d Markdown \u5185\u5bb9\n\n```\nhttps://?md=\n```\n\n\u52a0\u8f7d Markdown \u5185\u5bb9\u7684\u793a\u4f8b URL\uff1a\n\n```\nhttps://jaywcjlove.github.io/wxmp/#/?theme=underscore&md=https://raw.githubusercontent.com/jaywcjlove/c-tutorial/master/README.md\n\nMarkdown URL \u5730\u5740: https://raw.githubusercontent.com/jaywcjlove/c-tutorial/master/README.md\n```\n\n## \u4e3b\u9898\u5b9a\u5236\n\n\u5728\u76ee\u5f55 `website/src/themes` \u4e2d\u5b58\u653e\u9ed8\u8ba4\u4e3b\u9898\uff0c\u5728 `website/src/store/context.tsx` \u4e2d\u914d\u7f6e\u4e3b\u9898\uff0c\u4e3b\u9898\u4f7f\u7528 `css` \u5b9a\u4e49\u6837\u5f0f\uff0c\u4e0d\u652f\u6301\u590d\u6742\u7684\u9009\u62e9\u5668\u3002\u63d0\u4f9b\u5728\u7ebf\u4e3b\u9898\u7f16\u8f91\u5668\uff0c\u6b22\u8fce\u4fee\u6539\u5e76 `PR` \u8fdb\u4ed3\u5e93\u4f9b\u5927\u5bb6\u4f7f\u7528\u3002\n\n```css\n/* 1~6 \u6807\u9898\u6837\u5f0f\u5b9a\u4e49 */\nh1 {} h2 {} h3 {} h4 {} h5 {} h6 {}\na { color: red; } /* \u8d85\u94fe\u63a5\u6837\u5f0f\u5b9a\u4e49 */\nstrong {} /* \u52a0\u7c97\u6837\u5f0f\u5b9a\u4e49 */\ndel {} /* \u5220\u9664\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\nem {} /* \u4e0b\u5212\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\nu {} /* \u4e0b\u5212\u7ebf\u6837\u5f0f\u5b9a\u4e49 */\np {} /* \u6bb5\u843d\u6837\u5f0f\u5b9a\u4e49 */\nul {} /* \u65e0\u5e8f\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\nol {} /* \u6709\u5e8f\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\nli {} /* \u5217\u8868\u6761\u76ee\u6837\u5f0f\u5b9a\u4e49 */\nblockquote {} /* \u5757\u7ea7\u5f15\u7528\u6837\u5f0f\u5b9a\u4e49 */\ntable {}\ntd {}\nth {}\npre {} /* \u6837\u5f0f\u5b9a\u4e49 */\n.code-highlight {} /* \u4ee3\u7801\u5757\u6837\u5f0f\u5b9a\u4e49 */\n.code-line {} /* \u4ee3\u7801\u5757\u884c\u6837\u5f0f\u5b9a\u4e49 */\n.code-spans {} /* \u4ee3\u7801\u5757\u884c\u6837\u5f0f\u5b9a\u4e49 */\n\nsup {} /* GFM \u811a\u6ce8\u6837\u5f0f\u5b9a\u4e49 */\n.footnotes-title {} /* GFM \u811a\u6ce8\uff0c\u53c2\u8003\u6807\u9898\u6837\u5f0f\u5b9a\u4e49 */\n.footnotes-list {} /* GFM \u811a\u6ce8\uff0c\u53c2\u8003\u5217\u8868\u6837\u5f0f\u5b9a\u4e49 */\n\n.image-warpper {} /* \u56fe\u7247\u7236\u8282\u70b9\u6837\u5f0f\u5b9a\u4e49 */\n.image {} /* \u56fe\u7247\u6837\u5f0f\u5b9a\u4e49 */\n\n/* \u90e8\u5206\u4ee3\u7801\u9ad8\u4eae\u6837\u5f0f */\n.comment {}\n.property {}\n.function {}\n.keyword {}\n.punctuation {}\n.unit {}\n.tag {}\n.color {}\n.selector {}\n.quote {}\n.number {}\n.attr-name {}\n.attr-value {}\n```\n\n## \u90e8\u7f72\n\n[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp) [![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp)\n\n\u8f7b\u677e\u901a\u8fc7 docker \u90e8\u7f72\u300a\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668\u300b\u7f51\u7ad9\u5e94\u7528\u3002\n\n```bash\ndocker pull wcjiang/wxmp\n# Or\ndocker pull ghcr.io/jaywcjlove/wxmp:latest\n```\n\n```bash\ndocker run --name wxmp --rm -d -p 8113:3000 wcjiang/wxmp:latest\n# Or\ndocker run --name wxmp -itd -p 8113:3000 wcjiang/wxmp:latest\n# Or\ndocker run --name wxmp -itd -p 8113:3000 ghcr.io/jaywcjlove/wxmp:latest\n```\n\n\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u4ee5\u4e0b URL\n\n```\nhttp://localhost:96611/\n```\n\n## \u8d21\u732e\u8005\n\n\u4e00\u5982\u65e2\u5f80\uff0c\u611f\u8c22\u6211\u4eec\u51fa\u8272\u7684\u8d21\u732e\u8005\uff01\n\n\n \n\n\n\u4e0a\u56fe\u8d21\u732e\u8005\u5217\u8868\uff0c\u7531 [action-contributors](https://github.com/jaywcjlove/github-action-contributors)[^4] \u81ea\u52a8\u751f\u6210\u8d21\u732e\u8005\u56fe\u7247\u3002\n\n\n[^4]: Action Contributors https://github.com/jaywcjlove/github-action-contributors\n\n## License\n\n\u6839\u636e MIT \u8bb8\u53ef\u8bc1\u83b7\u5f97\u8bb8\u53ef\u3002\n',ay=sy,ly={default:{label:"\u9ed8\u8ba4\u4e3b\u9898",value:xb},abcdef:{label:"Abcdef Theme",value:_b},androidstudio:{label:"Android Studio Theme",value:Rb},atomone:{label:"Atomone Theme",value:Nb},bbedit:{label:"Bbedit Theme",value:Mb},bespin:{label:"Bespin Theme",value:Lb},darcula:{label:"Darcula Theme",value:Fb},dracula:{label:"Dracula Theme",value:zb},duotoneLight:{label:"Duotone Light Theme",value:jb},duotoneDark:{label:"Duotone Dark Theme",value:Xb},eclipse:{label:"Eclipse Theme",value:Wb},githubLight:{label:"Github Light Theme",value:Yb},githubDark:{label:"Github Dark Theme",value:Vb},okaidia:{label:"Okaidia Theme",value:Jb},sublime:{label:"Sublime Theme",value:ty},xcodeLight:{label:"Xcode Light Theme",value:ry},xcodeDark:{label:"Xcode Dark Theme",value:oy}},cy={default:{label:"\u7fe1\u7fe0\u7eff",value:"a {\n color: #009874;\n text-decoration: none;\n font-size: 14px;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 18px;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em;\n border-bottom: 3px solid #009874;\n margin-top: 0;\n}\n\nh2 {\n display: table;\n text-align: center;\n color: #fff;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 16px;\n font-weight: bold;\n margin: 4em auto 2em;\n padding: 0 0.3em;\n border-radius: 0.3em;\n background: #009874;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 5px solid #009874;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n font-size: 14px;\n line-height: 1.5em;\n}\n\np {\n font-size: 16px;\n line-height: 1.5em;\n padding: 0.5em 0 !important;\n margin-bottom: 0 !important;\n margin-top: 0 !important;\n}\n\nblockquote {\n text-align: left;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n border-left: none;\n padding: 0.5em 1em;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1em 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 14px;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 14px;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: initial;\n color: #333;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.1em 0.3em;\n border-radius: 0.3em;\n font-weight: bold;\n font-size: 1em;\n top: -0.1em;\n position: relative;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 10px;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n",color:"#009874"},simple:{label:"\u7b80\u6d01\u84dd",value:"a {\n color: #0f4c81;\n text-decoration: none;\n font-size: 14px;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 18px;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em;\n border-bottom: 3px solid #0f4c81;\n margin-top: 0;\n}\n\nh2 {\n display: table;\n text-align: center;\n color: #fff;\n line-height: 1.75;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 16px;\n font-weight: bold;\n margin: 4em auto 2em;\n padding: 0 0.3em;\n border-radius: 0.3rem;\n background: #0f4c81;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 5px solid #0f4c81;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n font-size: 14px;\n line-height: 1.5em;\n}\n\np {\n font-size: 16px;\n line-height: 1.5em;\n padding: 0.5em 0 !important;\n margin-bottom: 0 !important;\n margin-top: 0 !important;\n}\n\nblockquote {\n text-align: left;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n border-left: none;\n padding: 0.5em 1em;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1em 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 14px;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 14px;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: initial;\n color: #0f4c81;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.1em 0.3em;\n border-radius: 0.3em;\n font-weight: bold;\n font-size: 14px;\n top: -0.1em;\n position: relative;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 10px;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n",color:"#0f4c81"},underscore:{label:"\u4e0b\u5212\u7ebf\u9ec4",value:"a {\n color: #ffb11b;\n text-decoration: none;\n font-size: 14px;\n}\n\nh1 {\n display: table;\n text-align: center;\n color: #3f3f3f;\n line-height: 1.15;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 18px;\n font-weight: bold;\n margin: 2em auto 1em;\n padding: 0 1em 0.3em 1em;\n margin-top: 0;\n box-shadow: inset 0 -0.9rem 0 0 #ffb11b;\n}\n\nh2 {\n display: table;\n line-height: 1.35;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 16px;\n font-weight: bold;\n padding: 0 0.3em;\n margin: 2em 0 1em 0;\n box-shadow: inset 0 -0.7rem 0 0 #ffb11b;\n}\n\nh3 {\n text-align: left;\n color: #3f3f3f;\n line-height: 1.2;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 2em 8px 0.75em 0;\n padding-left: 8px;\n border-left: 5px solid #ffb11b;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n line-height: 1.5em;\n font-size: 14px;\n}\n\np {\n font-size: 16px;\n line-height: 1.5em;\n padding: 0.5em 0 !important;\n margin-bottom: 0 !important;\n margin-top: 0 !important;\n}\n\nblockquote {\n text-align: left;\n line-height: 1.5em;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n border-left: none;\n padding: 0.5em 1em;\n border-radius: 4px;\n background: rgba(27, 31, 35, 0.05);\n margin: 1em 0;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-style: normal;\n font-variant-ligatures: normal;\n font-variant-caps: normal;\n font-weight: 400;\n letter-spacing: normal;\n orphans: 2;\n text-indent: 0px;\n text-transform: none;\n widows: 2;\n word-spacing: 0px;\n text-decoration-style: initial;\n text-decoration-color: initial;\n text-align: left;\n line-height: 1.5;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n border-radius: 0.3em;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 14px;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n line-height: 1.75;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 14px;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: initial;\n color: #333;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.1em 0.3em;\n border-radius: 0.3em;\n font-weight: bold;\n font-size: 14px;\n top: -0.1em;\n position: relative;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 3em 0 0.6em 0;\n padding-left: 0.2em;\n}\n\n.footnotes-list {\n font-size: 10px;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n",color:"#ffb11b"},base:{label:"\u7b80\u6d01",value:"a {\n color: inherit;\n text-decoration: none;\n}\n\nh1 {\n color: inherit;\n font-size: 18px;\n font-weight: bold;\n}\n\nh2 {\n color: inherit;\n margin: 2.5rem 0 1rem 0;\n font-size: 16px;\n font-weight: bold;\n}\n\nh3 {\n color: inherit;\n margin: 1em 0 1em 0;\n font-weight: bold;\n font-size: 14px;\n}\n\nh4 {\n color: inherit;\n margin: 0.6em 0 0.6em 0;\n font-weight: bold;\n font-size: 12px;\n}\n\np {\n color: initial;\n font-size: 16px;\n line-height: 1.5em;\n}\n\nul {\n padding-left: 1.2em;\n}\n\nol {\n padding-left: 1.2em;\n}\n\nli {\n margin: 0;\n font-size: 14px;\n line-height: 1.5em;\n}\n\nblockquote {\n font-style: normal;\n border-left: none;\n margin: 1em 0;\n line-height: 1.5em;\n}\n\npre {\n display: block;\n overflow-x: auto;\n padding: 1em;\n color: rgb(51, 51, 51);\n background: rgb(248, 248, 248);\n font-size: 14px;\n font-weight: 400;\n letter-spacing: normal;\n word-spacing: 0px;\n border-radius: 5px;\n margin: 0.9rem 0;\n white-space: pre;\n}\n\ntable {\n width: 100% !important;\n border-collapse: collapse;\n line-height: 1.35;\n font-size: 14px;\n}\n\ntd {\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\nth {\n background: rgb(0 0 0 / 5%);\n border: 1px solid #ddd;\n padding: 0.25em 0.5em;\n}\n\n.code-highlight {\n text-align: left;\n font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;\n font-size: 14px;\n margin: 0px;\n white-space: nowrap;\n}\n\n.code-line {\n display: block;\n line-height: 1.3;\n}\n\n.code-spans {\n text-align: left;\n line-height: 1;\n white-space: initial;\n background: rgba(27, 31, 35, 0.05);\n padding: 0.1em 0.3em;\n border-radius: 0.3em;\n font-weight: bold;\n font-size: 1em;\n top: -0.1em;\n position: relative;\n}\n\n.footnotes-title {\n display: table;\n font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',\n 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\n font-size: 14px;\n font-weight: bold;\n margin: 3rem 0 0.6rem 0;\n padding-left: 0.2rem;\n}\n\n.footnotes-list {\n font-size: 10px;\n font-style: italic;\n line-height: 1.2;\n margin: 0.4rem 0;\n}\n\nfigure {\n margin: 0;\n}\n\n.image-warpper {\n text-align: center;\n margin-bottom: 0rem;\n visibility: visible;\n}\n\n.image {\n display: initial;\n max-width: 100%;\n}\n\n.comment {\n color: #6a737d;\n}\n.property {\n color: #6f42c1;\n}\n.function {\n color: #6f42c1;\n}\n.keyword {\n color: #d73a49;\n}\n.punctuation {\n color: #0550ae;\n}\n.unit {\n color: #0550ae;\n}\n.tag {\n color: #22863a;\n}\n.selector {\n color: #22863a;\n}\n.quote {\n color: #22863a;\n}\n.number {\n color: #005cc5;\n}\n.attr-name {\n color: #005cc5;\n}\n.attr-value {\n color: #005cc5;\n}\n",color:""}},uy={underscore:[{select:"a",name:"color",value:"{{color}}"},{select:"h1",name:"box-shadow",value:"inset 0 -0.9rem 0 0 {{color}}"},{select:"h2",name:"box-shadow",value:"inset 0 -0.7rem 0 0 {{color}}"},{select:"h3",name:"border-left",value:"5px solid {{color}}"}],default:[{select:"a",name:"color",value:"{{color}}"},{select:"h1",name:"border-bottom",value:"3px solid {{color}}"},{select:"h2",name:"background",value:"{{color}}"},{select:"h3",name:"border-left",value:"5px solid {{color}}"}],simple:[{select:"a",name:"color",value:"{{color}}"},{select:"h1",name:"border-bottom",value:"3px solid {{color}}"},{select:"h2",name:"background",value:"{{color}}"},{select:"h3",name:"border-left",value:"5px solid {{color}}"},{select:".code-spans",name:"color",value:"{{color}}"}],base:[]},hy=(Object.keys(cy).map((e=>cy[e].color)),J.createContext({preColor:"",setPreColor:()=>{},isLoading:!0,setIsLoading:()=>{},markdown:sy,setMarkdown:()=>{},css:cy.underscore.value,setCss:()=>{},previewTheme:"underscore",setPreviewTheme:()=>{},theme:"default",setTheme:()=>{}}));var dy,fy,py,my,gy,Oy,by;const yy=Jo.div(dy||(dy=V([""]))),vy=Jo.div(fy||(fy=V(["\n position: relative;\n height: 2.8rem;\n"]))),ky=Jo.header(py||(py=V(["\n -webkit-app-region: drag;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n background: var(--color-canvas-default);\n border-bottom: 1px solid var(--color-border-muted);\n padding: 0.5rem 0.6rem 0.5rem 0.8rem;\n position: fixed;\n width: 100%;\n z-index: 9;\n"]))),xy=Jo.article(my||(my=V(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.6rem;\n"]))),Sy=Jo(Ys)(gy||(gy=V(["\n max-width: 3.6rem;\n"]))),wy=Jo.h1(Oy||(Oy=V(["\n font-size: 1rem;\n margin: 0;\n display: flex;\n align-items: center;\n user-select: none;\n sup {\n color: var(--color-fg-subtle);\n margin-left: 0.4rem;\n background-color: var(--color-border-muted);\n border-radius: 0.1rem;\n padding: 0 0.2rem 0 0.1rem;\n font-weight: normal;\n font-size: 0.7rem;\n letter-spacing: -0.1rem;\n }\n"]))),Ty=Jo.section(by||(by=V(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n dark-mode {\n font-size: 1.05rem;\n display: block;\n line-height: 12px;\n margin-left: 0.6rem;\n }\n a svg {\n display: block;\n }\n a {\n text-decoration: none;\n color: var(--color-theme-text);\n padding: 0.1rem 0.3rem;\n transition: all 0.3s;\n font-size: 0.9rem;\n border-radius: 0.2rem;\n &.active {\n background-color: var(--color-accent-fg);\n box-shadow: inset 0 -0.3rem 0 var(--color-accent-fg);\n color: #fff;\n }\n &:hover:not(.active):not(:last-child) {\n background-color: var(--color-accent-fg);\n color: #fff;\n border-radius: 0.2rem;\n }\n }\n"])));function Ay(){const{isLoading:e}=(0,J.useContext)(hy);return(0,Mt.jsxs)(yy,{className:"wmde-markdown-color",children:[(0,Mt.jsx)(vy,{children:(0,Mt.jsxs)(ky,{className:"header",children:[(0,Mt.jsxs)(xy,{className:"logo",children:[(0,Mt.jsx)(Sy,{width:28,height:28}),(0,Mt.jsxs)(wy,{children:["\u5fae\u4fe1\u516c\u4f17\u53f7\u6392\u7248\u7f16\u8f91\u5668",(0,Mt.jsxs)("sup",{children:[" v","2.3.3"," "]})]}),e&&(0,Mt.jsx)(ha,{})]}),(0,Mt.jsxs)(Ty,{children:[(0,Mt.jsx)(Ct,{to:"/",children:"\u9996\u9875"}),(0,Mt.jsx)(Ct,{to:"/editor/theme",children:"\u7f16\u8f91\u4e3b\u9898"}),(0,Mt.jsx)(Ct,{to:"/doc",children:"\u6587\u6863"}),(0,Mt.jsx)("dark-mode",{permanent:!0,dark:"Dark",light:"Light"}),(0,Mt.jsx)("a",{href:"https://github.com/jaywcjlove/wxmp",target:"__blank",children:(0,Mt.jsx)(Js,{width:23,height:23})})]})]})}),(0,Mt.jsx)(dt,{})]})}const Ey=1,Cy=2,_y=3,Py=4,Ry=5,Dy=6,Ny=7,Qy=8,My=9,$y=10,Ly=11,Iy=12,Fy=13,By=14,zy=15,Zy=16,jy=17,Uy=18,Xy=19,Hy=20,Wy=21,qy=22,Yy=23,Gy=24,Vy=25,Ky=0;function Jy(e){return e>=48&&e<=57}function ev(e){return Jy(e)||e>=65&&e<=70||e>=97&&e<=102}function tv(e){return e>=65&&e<=90}function nv(e){return function(e){return tv(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function rv(e){return nv(e)||Jy(e)||45===e}function iv(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function ov(e){return 10===e||13===e||12===e}function sv(e){return ov(e)||32===e||9===e}function av(e,t){return 92===e&&(!ov(t)&&t!==Ky)}function lv(e,t,n){return 45===e?nv(t)||45===t||av(t,n):!!nv(e)||92===e&&av(e,t)}function cv(e,t,n){return 43===e||45===e?Jy(t)?2:46===t&&Jy(n)?3:0:46===e?Jy(t)?2:0:Jy(e)?1:0}function uv(e){return 65279===e||65534===e?1:0}const hv=new Array(128),dv=130,fv=131,pv=132,mv=133;for(let aR=0;aRe.length)return!1;for(let i=t;i=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}const Cv=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"],_v=16384;function Pv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return null===e||e.length0?uv(t.charCodeAt(0)):0,i=Pv(e.lines,n),o=Pv(e.columns,n);let s=e.startLine,a=e.startColumn;for(let l=r;l1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Rv(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Rv(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}}const Nv=16777215,Qv=24,Mv=new Map([[Cy,qy],[Wy,qy],[Xy,Hy],[Yy,Gy]]);class $v{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};e=String(e||"");const n=e.length,r=Pv(this.offsetAndType,e.length+1),i=Pv(this.balance,e.length+1);let o=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:i[o]=n;break;case s:{let e=a&Nv;for(a=i[e],s=a>>Qv,i[o]=e,i[e++]=o;e>Qv:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>Qv,this.tokenEnd=t&Nv):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>Qv,this.tokenEnd=e&Nv):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===Fy||this.tokenType===Vy;)this.next()}skipUntilBalanced(e,t){let n,r,i=e;e:for(;i0?this.offsetAndType[i-1]&Nv:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:i++;break e;default:this.balance[n]===i&&(i=n)}this.skip(i-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t>Qv,r,o,t)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,i)=>{e[i]={idx:i,type:Cv[t],chunk:this.source.substring(n,r),balance:this.balance[i]}})),e}}function Lv(e,t){function n(t){return t=e.length?void(c1&&void 0!==arguments[1]?arguments[1]:this;const n=this.allocateCursor(null,this.head);for(;null!==n.next;){const r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;const n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){const r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(null,this.head),o=t;for(;null!==i.next;)n=i.next,i.next=n.next,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}reduceRight(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(this.tail,null),o=t;for(;null!==i.prev;)n=i.prev,i.prev=n.prev,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}some(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;for(let n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;const n=new Fv;for(let r=this.head;null!==r;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;const n=new Fv;for(let r=this.head;null!==r;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null===e)return;const r=this.allocateCursor(null,e);for(;null!==r.next;){const e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null===e)return;const r=this.allocateCursor(e,null);for(;null!==r.prev;){const e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const e=new Fv;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(Fv.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(Fv.createItem(e))}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(Fv.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(Fv.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(Fv.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(void 0!==t&&null!==t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}}function Bv(e,t){const n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,"".concat(e,": ").concat(t,"\n"))}})}const zv=100,Zv=60,jv=" ";function Uv(e,t){let{source:n,line:r,column:i}=e;function o(e,t){return s.slice(e,t).map(((t,n)=>String(e+n+1).padStart(c)+" |"+t)).join("\n")}const s=n.split(/\r\n?|\n|\f/),a=Math.max(1,r-t)-1,l=Math.min(r+t,s.length+1),c=Math.max(4,String(l).length)+1;let u=0;i+=(jv.length-1)*(s[r-1].substr(0,i-1).match(/\t/g)||[]).length,i>zv&&(u=i-Zv+3,i=Zv-2);for(let h=a;h<=l;h++)h>=0&&h0&&s[h].length>u?"\u2026":"")+s[h].substr(u,zv-2)+(s[h].length>u+zv-1?"\u2026":""));return[o(a,r),new Array(i+c+2).join("-")+"^",o(r,l)].filter(Boolean).join("\n")}function Xv(e,t,n,r,i){return Object.assign(Bv("SyntaxError",e),{source:t,offset:n,line:r,column:i,sourceFragment:e=>Uv({source:t,line:r,column:i},isNaN(e)?0:e),get formattedMessage(){return"Parse error: ".concat(e,"\n")+Uv({source:t,line:r,column:i},2)}})}function Hv(e){const t=this.createList();let n=!1;const r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case Vy:this.next();continue;case Fy:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(void 0===i)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),n=!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}const Wv=()=>{},qv=33,Yv=35,Gv=59,Vv=123,Kv=0;function Jv(e){return function(){return this[e]()}}function ek(e){const t=Object.create(null);for(const n in e){const r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function tk(e){let t="",n="",r=!1,i=Wv,o=!1;const s=new Dv,a=Object.assign(new $v,function(e){const t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:ek(e.atrule),pseudo:ek(e.pseudo),node:ek(e.node)};for(const n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Jv(e.parseContext[n])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Hv,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>e===Vv?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>e===Vv||e===Gv?1:0,consumeUntilExclamationMarkOrSemicolon:e=>e===qv||e===Gv?1:0,consumeUntilSemicolonIncluded:e=>e===Gv?2:0,createList:()=>new Fv,createSingleNodeList:e=>(new Fv).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){const n=this.tokenIndex;try{return e.call(this)}catch(sR){if(o)throw sR;const r=t.call(this,n);return o=!0,i(sR,r),o=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),t!==Fy)return t}while(t!==Kv);return Kv},charCodeAt:e=>e>=0&&et.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>yv(t,e,n),cmpStr:(e,n,r)=>vv(t,e,n,r),consume(e){const t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){const e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(Cy),e},consumeNumber(e){const n=t.substring(this.tokenStart,Tv(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){const t=Cv[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase()));let n="".concat(/[[\](){}]/.test(t)?'"'.concat(t,'"'):t," is expected"),r=this.tokenStart;switch(e){case Ey:this.tokenType===Cy||this.tokenType===Ny?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case Py:this.isDelim(Yv)&&(this.next(),r++,n="Name is expected");break;case Ly:this.tokenType===$y&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){this.tokenType===Ey&&!1!==this.lookupValue(0,e)||this.error('Identifier "'.concat(e,'" is expected')),this.next()},eatDelim(e){this.isDelim(e)||this.error('Delim "'.concat(String.fromCharCode(e),'" is expected')),this.next()},getLocation:(e,t)=>r?s.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){const t=this.getFirstListNode(e),r=this.getLastListNode(e);return s.getLocationRange(null!==t?t.loc.start.offset-s.startOffset:this.tokenStart,null!==r?r.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(e,n){const r="undefined"!==typeof n&&n=0&&sv(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):s.getLocation(this.tokenStart);throw new Xv(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},a.setSource(t,Lv),s.setSource(t,l.offset,l.line,l.column),n=l.filename||"",r=Boolean(l.positions),i="function"===typeof l.onParseError?l.onParseError:Wv,o=!1,a.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),a.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),a.parseValue=!("parseValue"in l)||Boolean(l.parseValue),a.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);const{context:c="default",onComment:u}=l;if(c in a.context===!1)throw new Error("Unknown context `"+c+"`");"function"===typeof u&&a.forEachToken(((e,n,r)=>{if(e===Vy){const e=a.getLocation(n,r),i=vv(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(i,e)}}));const h=a.context[c].call(a,l);return a.eof||a.error(),h}),{SyntaxError:Xv,config:a.config})}var nk=n(7428);const rk=new Set(["Atrule","Selector","Declaration"]);const ik=(e,t)=>{if(e===My&&(e=t),"string"===typeof e){const t=e.charCodeAt(0);return t>127?32768:t<<8}return e},ok=[[Ey,Ey],[Ey,Cy],[Ey,Ny],[Ey,Qy],[Ey,"-"],[Ey,$y],[Ey,Ly],[Ey,Iy],[Ey,zy],[Ey,Wy],[_y,Ey],[_y,Cy],[_y,Ny],[_y,Qy],[_y,"-"],[_y,$y],[_y,Ly],[_y,Iy],[_y,zy],[Py,Ey],[Py,Cy],[Py,Ny],[Py,Qy],[Py,"-"],[Py,$y],[Py,Ly],[Py,Iy],[Py,zy],[Iy,Ey],[Iy,Cy],[Iy,Ny],[Iy,Qy],[Iy,"-"],[Iy,$y],[Iy,Ly],[Iy,Iy],[Iy,zy],["#",Ey],["#",Cy],["#",Ny],["#",Qy],["#","-"],["#",$y],["#",Ly],["#",Iy],["#",zy],["-",Ey],["-",Cy],["-",Ny],["-",Qy],["-","-"],["-",$y],["-",Ly],["-",Iy],["-",zy],[$y,Ey],[$y,Cy],[$y,Ny],[$y,Qy],[$y,$y],[$y,Ly],[$y,Iy],[$y,"%"],[$y,zy],["@",Ey],["@",Cy],["@",Ny],["@",Qy],["@","-"],["@",zy],[".",$y],[".",Ly],[".",Iy],["+",$y],["+",Ly],["+",Iy],["/","*"]],sk=ok.concat([[Ey,Py],[Iy,Py],[Py,Py],[_y,Wy],[_y,Ry],[_y,Zy],[Ly,Ly],[Ly,Iy],[Ly,Cy],[Ly,"-"],[qy,Ey],[qy,Cy],[qy,Ly],[qy,Iy],[qy,Py],[qy,"-"]]);function ak(e){const t=new Set(e.map((e=>{let[t,n]=e;return ik(t)<<16|ik(n)})));return function(e,n,r){const i=ik(n,r),o=r.charCodeAt(0);return(45===o&&n!==Ey&&n!==Cy&&n!==zy||43===o?t.has(e<<16|o<<8):t.has(e<<16|i))&&this.emit(" ",Fy,!0),i}}const lk=ak(ok),ck=ak(sk),uk=92;function hk(e,t){if("function"!==typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function dk(e){Lv(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}function fk(e){const t=new Map;for(let n in e.node){const r=e.node[n];"function"===typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",o=0,s={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(a,e)},tokenBefore:ck,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),e===My&&t.charCodeAt(0)===uk&&this.emit("\n",Fy,!0)},emit(e){r+=e},result:()=>r};n&&("function"===typeof n.decorator&&(s=n.decorator(s)),n.sourceMap&&(s=function(e){const t=new nk.x,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},o={generated:i};let s=1,a=0,l=!1;const c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&rk.has(e.type)){const c=e.loc.start.line,u=e.loc.start.column-1;r.line===c&&r.column===u||(r.line=c,r.column=u,n.line=s,n.column=a,l&&(l=!1,n.line===i.line&&n.column===i.column||t.addMapping(o)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&rk.has(e.type)&&(i.line=s,i.column=a)};const u=e.emit;e.emit=function(e,t,n){for(let r=0;rs.node(e),children:hk,token:(e,t)=>s.token(e,t),tokenize:dk};return s.node(e),s.result()}}const{hasOwnProperty:pk}=Object.prototype,mk=function(){};function gk(e){return"function"===typeof e?e:mk}function Ok(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function bk(e,t){const n=t.structure,r=[];for(const i in n){if(!1===pk.call(n,i))continue;let e=n[i];const t={name:i,type:!1,nullable:!1};Array.isArray(e)||(e=[e]);for(const n of e)null===n?t.nullable=!0:"string"===typeof n?t.type="node":Array.isArray(n)&&(t.type="list");t.type&&r.push(t)}return r.length?{context:t.walkContext,fields:r}:null}function yk(e,t){const n=e.fields.slice(),r=e.context,i="string"===typeof r;return t&&n.reverse(),function(e,o,s,a){let l;i&&(l=o[r],o[r]=e);for(const r of n){const n=e[r.name];if(!r.nullable||n)if("list"===r.type){if(t?n.reduceRight(a,!1):n.reduce(a,!1))return!0}else if(s(n))return!0}i&&(o[r]=l)}}function vk(e){let{StyleSheet:t,Atrule:n,Rule:r,Block:i,DeclarationList:o}=e;return{Atrule:{StyleSheet:t,Atrule:n,Rule:r,Block:i},Rule:{StyleSheet:t,Atrule:n,Rule:r,Block:i},Declaration:{StyleSheet:t,Atrule:n,Rule:r,Block:i,DeclarationList:o}}}function kk(e){const t=function(e){const t={};for(const n in e.node)if(pk.call(e.node,n)){const r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=bk(0,r)}return t}(e),n={},r={},i=Symbol("break-walk"),o=Symbol("skip-node");for(const c in t)pk.call(t,c)&&null!==t[c]&&(n[c]=yk(t[c],!1),r[c]=yk(t[c],!0));const s=vk(n),a=vk(r),l=function(e,l){function c(e,t,n){const r=u.call(p,e,t,n);return r===i||r!==o&&(!(!d.hasOwnProperty(e.type)||!d[e.type](e,p,c,f))||h.call(p,e,t,n)===i)}let u=mk,h=mk,d=n,f=(e,t,n,r)=>e||c(t,n,r);const p={break:i,skip:o,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"===typeof l)u=l;else if(l&&(u=gk(l.enter),h=gk(l.leave),l.reverse&&(d=r),l.visit)){if(s.hasOwnProperty(l.visit))d=l.reverse?a[l.visit]:s[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=Ok(u,l.visit),h=Ok(h,l.visit)}if(u===mk&&h===mk)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=i,l.skip=o,l.find=function(e,t){let n=null;return l(e,(function(e,r,o){if(t.call(this,e,r,o))return n=e,i})),n},l.findLast=function(e,t){let n=null;return l(e,{reverse:!0,enter(e,r,o){if(t.call(this,e,r,o))return n=e,i}}),n},l.findAll=function(e,t){const n=[];return l(e,(function(e,r,i){t.call(this,e,r,i)&&n.push(e)})),n},l}function xk(e){return e}function Sk(e,t,n,r){let i;switch(e.type){case"Group":i=function(e,t,n,r){const i=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",o=e.terms.map((e=>Sk(e,t,n,r))).join(i);return e.explicit||n?(r||","===o[0]?"[":"[ ")+o+(r?"]":" ]"):o}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Sk(e.term,t,n,r)+t(function(e){const{min:t,max:n,comma:r}=e;return 0===t&&0===n?r?"#?":"*":0===t&&1===n?"?":1===t&&0===n?r?"#":"+":1===t&&1===n?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(0!==n?n:"")+"}")}(e),e);case"Type":i="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-\u221e":e.min)+","+(null===e.max?"\u221e":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}function wk(e,t){let n=xk,r=!1,i=!1;return"function"===typeof t?n=t:t&&(r=Boolean(t.forceBraces),i=Boolean(t.compact),"function"===typeof t.decorate&&(n=t.decorate)),Sk(e,n,r,i)}const Tk={offset:0,line:1,column:1};function Ak(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?Ek(n):n:null}function Ek(e,t){let{offset:n,line:r,column:i}=e;const o={offset:n,line:r,column:i};if(t){const e=t.split(/\n|\r\n?|\f/);o.offset+=t.length,o.line+=e.length-1,o.column=1===e.length?o.column+t.length:e.pop().length+1}return o}const Ck=function(e,t){const n=Bv("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},_k=function(e,t,n,r){const i=Bv("SyntaxMatchError",e),{css:o,mismatchOffset:s,mismatchLength:a,start:l,end:c}=function(e,t){const n=e.tokens,r=e.longestMatch,i=r1?(s=Ak(o||t,"end")||Ek(Tk,h),a=Ek(s)):(s=Ak(o,"start")||Ek(Ak(t,"start")||Tk,h.slice(0,l)),a=Ak(o,"end")||Ek(s,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:s,end:a}}(r,n);return i.rawMessage=e,i.syntax=t?wk(t):"",i.css=o,i.mismatchOffset=s,i.mismatchLength=a,i.message=e+"\n syntax: "+i.syntax+"\n value: "+(o||"")+"\n --------"+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,l),i.loc={source:n&&n.loc&&n.loc.source||"",start:l,end:c},i},Pk=new Map,Rk=new Map,Dk=45,Nk=function(e){if(Pk.has(e))return Pk.get(e);const t=e.toLowerCase();let n=Pk.get(t);if(void 0===n){const e=Mk(t,0),r=e?"":$k(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return Pk.set(e,n),n},Qk=function(e){if(Rk.has(e))return Rk.get(e);let t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");const r=Mk(t,n.length);if(!r&&(t=t.toLowerCase(),Rk.has(t))){const n=Rk.get(t);return Rk.set(e,n),n}const i=r?"":$k(t,n.length),o=t.substr(0,n.length+i.length),s=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:i,prefix:o,custom:r});return Rk.set(e,s),s};function Mk(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Dk&&e.charCodeAt(t+1)===Dk}function $k(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Dk&&e.charCodeAt(t+1)!==Dk){const n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}const Lk=["initial","inherit","unset","revert","revert-layer"],Ik=43,Fk=45,Bk=!0;function zk(e,t){return null!==e&&e.type===My&&e.value.charCodeAt(0)===t}function Zk(e,t,n){for(;null!==e&&(e.type===Fy||e.type===Vy);)e=n(++t);return t}function jk(e,t,n,r){if(!e)return 0;const i=e.value.charCodeAt(t);if(i===Ik||i===Fk){if(n)return 0;t++}for(;t6)return 0}return r}function Yk(e,t,n){if(!e)return 0;for(;Wk(n(t),Hk);){if(++e>6)return 0;t++}return t}const Gk=["calc(","-moz-calc(","-webkit-calc("],Vk=new Map([[Cy,qy],[Wy,qy],[Xy,Hy],[Yy,Gy]]);function Kk(e,t){return te.max&&"string"!==typeof e.max)return!0}return!1}function rx(e){return function(t,n,r){return null===t?0:t.type===Cy&&ex(t.value,Gk)?function(e,t){let n=0,r=[],i=0;e:do{switch(e.type){case Gy:case qy:case Hy:if(e.type!==n)break e;if(n=r.pop(),0===r.length){i++;break e}break;case Cy:case Wy:case Xy:case Yy:r.push(n),n=Vk.get(e.type)}i++}while(e=t(i));return i}(t,n):e(t,n,r)}}function ix(e){return function(t){return null===t||t.type!==e?0:1}}function ox(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||t.type!==Iy)return 0;const i=Tv(t.value,0);if(null!==e){const n=t.value.indexOf("\\",i),r=-1!==n&&tx(t.value,n)?t.value.substring(i,n):t.value.substr(i);if(!1===e.has(r.toLowerCase()))return 0}return nx(r,t.value,i)?0:1}}function sx(e){return"function"!==typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===$y&&0===Number(t.value)?1:e(t,n,r)}}const ax={"ident-token":ix(Ey),"function-token":ix(Cy),"at-keyword-token":ix(_y),"hash-token":ix(Py),"string-token":ix(Ry),"bad-string-token":ix(Dy),"url-token":ix(Ny),"bad-url-token":ix(Qy),"delim-token":ix(My),"number-token":ix($y),"percentage-token":ix(Ly),"dimension-token":ix(Iy),"whitespace-token":ix(Fy),"CDO-token":ix(By),"CDC-token":ix(zy),"colon-token":ix(Zy),"semicolon-token":ix(jy),"comma-token":ix(Uy),"[-token":ix(Xy),"]-token":ix(Hy),"(-token":ix(Wy),")-token":ix(qy),"{-token":ix(Yy),"}-token":ix(Gy)},lx={string:ix(Ry),ident:ix(Ey),percentage:rx((function(e,t,n){return null===e||e.type!==Ly||nx(n,e.value,e.value.length-1)?0:1})),zero:sx(),number:rx((function(e,t,n){if(null===e)return 0;const r=Tv(e.value,0);return r===e.value.length||tx(e.value,r)?nx(n,e.value,r)?0:1:0})),integer:rx((function(e,t,n){if(null===e||e.type!==$y)return 0;let r=43===Kk(e.value,0)||45===Kk(e.value,0)?1:0;for(;r/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),Hx={" ":1,"&&":2,"||":3,"|":4};function Wx(e){return e.substringToPos(e.findWsEnd(e.pos))}function qx(e){let t=e.pos;for(;t=128||0===Xx[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Yx(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Gx(e){const t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Vx(e){let t=null,n=null;return e.eat(zx),t=Yx(e),e.charCode()===Nx?(e.pos++,e.charCode()!==jx&&(n=Yx(e))):n=t,e.eat(jx),{min:Number(t),max:n?Number(n):0}}function Kx(e,t){const n=function(e){let t=null,n=!1;switch(e.charCode()){case Rx:e.pos++,t={min:0,max:0};break;case Dx:e.pos++,t={min:1,max:0};break;case Lx:e.pos++,t={min:0,max:1};break;case Ax:e.pos++,n=!0,e.charCode()===zx?t=Vx(e):e.charCode()===Lx?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case zx:t=Vx(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,e.charCode()===Ax&&e.charCodeAt(e.pos-1)===Dx?Kx(e,n):n):t}function Jx(e){const t=e.peek();return""===t?null:{type:"Token",value:t}}function eS(e){let t,n=null;return e.eat(Mx),t=qx(e),e.charCode()===_x&&e.nextCharCode()===Px&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Fx&&(Wx(e),n=function(e){let t=null,n=null,r=1;return e.eat(Fx),e.charCode()===Qx&&(e.peek(),r=-1),-1==r&&e.charCode()===Ux?e.peek():(t=r*Number(Yx(e)),0!==Xx[e.charCode()]&&(t+=qx(e))),Wx(e),e.eat(Nx),Wx(e),e.charCode()===Ux?e.peek():(r=1,e.charCode()===Qx&&(e.peek(),r=-1),n=r*Number(Yx(e)),0!==Xx[e.charCode()]&&(n+=qx(e))),e.eat(Bx),{type:"Range",min:t,max:n}}(e)),e.eat($x),Kx(e,{type:"Type",name:t,opts:n})}function tS(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort(((e,t)=>Hx[e]-Hx[t]));t.length>0;){r=t.shift();let i=0,o=0;for(;i1&&(e.splice(o,i-o,n(e.slice(o,i),r)),i=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,i-o,n(e.slice(o,i),r))}return r}function nS(e){const t=[],n={};let r,i=null,o=e.pos;for(;r=rS(e);)"Spaces"!==r.type&&("Combinator"===r.type?(null!==i&&"Combinator"!==i.type||(e.pos=o,e.error("Unexpected combinator")),n[r.value]=!0):null!==i&&"Combinator"!==i.type&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),i=r,o=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:tS(t,n)||" ",disallowEmpty:!1,explicit:!1}}function rS(e){let t=e.charCode();if(t<128&&1===Xx[t])return function(e){const t=qx(e);return e.charCode()===_x?(e.pos++,{type:"Function",name:t}):Kx(e,{type:"Keyword",name:t})}(e);switch(t){case Bx:break;case Fx:return Kx(e,function(e){let t;return e.eat(Fx),t=nS(e),e.eat(Bx),t.explicit=!0,e.charCode()===Tx&&(e.pos++,t.disallowEmpty=!0),t}(e));case Mx:return e.nextCharCode()===Cx?function(e){let t;return e.eat(Mx),e.eat(Cx),t=qx(e),e.eat(Cx),e.eat($x),Kx(e,{type:"Property",name:t})}(e):eS(e);case Zx:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Zx?2:1))};case Ex:return e.pos++,e.eat(Ex),{type:"Combinator",value:"&&"};case Nx:return e.pos++,{type:"Comma"};case Cx:return Kx(e,{type:"String",value:Gx(e)});case wx:case vx:case kx:case Sx:case xx:return{type:"Spaces",value:Wx(e)};case Ix:return t=e.nextCharCode(),t<128&&1===Xx[t]?(e.pos++,{type:"AtKeyword",name:qx(e)}):Jx(e);case Rx:case Dx:case Lx:case Ax:case Tx:break;case zx:if(t=e.nextCharCode(),t<48||t>57)return Jx(e);break;default:return Jx(e)}}function iS(e){const t=new yx(e),n=nS(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}const oS=function(){};function sS(e){return"function"===typeof e?e:oS}const aS={decorator(e){const t=[];let n=null;return{...e,node(t){const r=n;n=t,e.node.call(this,t),n=r},emit(e,r,i){t.push({type:r,value:e,node:i?null:n})},result:()=>t}}};function lS(e,t){return"string"===typeof e?function(e){const t=[];return Lv(e,((n,r,i)=>t.push({type:n,value:e.slice(r,i),node:null}))),t}(e):t.generate(e,aS)}const cS={type:"Match"},uS={type:"Mismatch"},hS={type:"DisallowEmpty"},dS=40,fS=41;function pS(e,t,n){return t===cS&&n===uS||e===cS&&t===cS&&n===cS?e:("If"===e.type&&e.else===uS&&t===cS&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function mS(e){return e.length>2&&e.charCodeAt(e.length-2)===dS&&e.charCodeAt(e.length-1)===fS}function gS(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&mS(e.name)}function OS(e,t,n){switch(e){case" ":{let e=cS;for(let n=t.length-1;n>=0;n--){e=pS(t[n],e,uS)}return e}case"|":{let e=uS,n=null;for(let r=t.length-1;r>=0;r--){let i=t[r];if(gS(i)&&(null===n&&r>0&&gS(t[r-1])&&(n=Object.create(null),e=pS({type:"Enum",map:n},cS,e)),null!==n)){const e=(mS(i.name)?i.name.slice(0,-1):i.name).toLowerCase();if(e in n===!1){n[e]=i;continue}}n=null,e=pS(i,cS,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=uS;for(let r=t.length-1;r>=0;r--){const i=t[r];let o;o=t.length>1?OS(e,t.filter((function(e){return e!==i})),!1):cS,n=pS(i,o,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?cS:uS;for(let n=t.length-1;n>=0;n--){const i=t[n];let o;o=t.length>1?OS(e,t.filter((function(e){return e!==i})),!0):cS,r=pS(i,o,r)}return r}}}function bS(e){if("function"===typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=OS(e.combinator,e.terms.map(bS),!1);return e.disallowEmpty&&(t=pS(t,hS,uS)),t}case"Multiplier":return function(e){let t=cS,n=bS(e.term);if(0===e.max)n=pS(n,hS,uS),t=pS(n,null,uS),t.then=pS(cS,cS,t),e.comma&&(t.then.else=pS({type:"Comma",syntax:e},t,uS));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==cS&&(t=pS({type:"Comma",syntax:e},t,uS)),t=pS(n,pS(cS,cS,t),uS);if(0===e.min)t=pS(cS,cS,t);else for(let r=0;r=65&&i<=90&&(i|=32),i!==r)return!1}return!0}function DS(e){return null===e||(e.type===Uy||e.type===Cy||e.type===Wy||e.type===Xy||e.type===Yy||function(e){return e.type===My&&"?"!==e.value}(e))}function NS(e){return null===e||(e.type===qy||e.type===Hy||e.type===Gy||e.type===My&&"/"===e.value)}function QS(e,t,n){function r(){do{O++,g=Ob&&(b=O)}function c(){y=y.type===SS?y.prev:{type:wS,syntax:u.syntax,token:y.token,prev:y},u=u.prev}let u=null,h=null,d=null,f=null,p=0,m=null,g=null,O=-1,b=0,y={type:kS,syntax:null,token:null,prev:null};for(r();null===m&&++pd.tokenIndex)&&(d=f,f=!1);else if(null===d){m=AS;break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,y=d.matchStack,O=d.tokenIndex,g=OO){for(;O":"<'"+t.name+"'>"));if(!1!==f&&null!==g&&"Type"===t.type){if("custom-ident"===t.name&&g.type===Ey||"length"===t.name&&"0"===g.value){null===f&&(f=o(t,d)),t=uS;break}}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},y={type:SS,syntax:t.syntax,token:y.token,prev:y},t=r.match;break}case"Keyword":{const e=t.name;if(null!==g){let n=g.value;if(-1!==n.indexOf("\\")&&(n=n.replace(/\\[09].*$/,"")),RS(n,e)){l(),t=cS;break}}t=uS;break}case"AtKeyword":case"Function":if(null!==g&&RS(g.value,t.name)){l(),t=cS;break}t=uS;break;case"Token":if(null!==g&&g.value===t.value){l(),t=cS;break}t=uS;break;case"Comma":null!==g&&g.type===Uy?DS(y.token)?t=uS:(l(),t=NS(g)?uS:cS):t=DS(y.token)||NS(g)?cS:uS;break;case"String":let r="",p=O;for(;p"Type"===e.type&&e.name===t))}function IS(e,t){return BS(this,e,(e=>"Property"===e.type&&e.name===t))}function FS(e){return BS(this,e,(e=>"Keyword"===e.type))}function BS(e,t,n){const r=$S.call(e,t);return null!==r&&r.some(n)}function zS(e){return"node"in e?e.node:zS(e.match[0])}function ZS(e){return"node"in e?e.node:ZS(e.match[e.match.length-1])}function jS(e,t,n,r,i){const o=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===i){const n=zS(s),r=ZS(s);e.syntax.walk(t,(function(e,t,i){if(e===n){const e=new Fv;do{if(e.appendData(t.data),t.data===r)break;t=t.next}while(null!==t);o.push({parent:i,nodes:e})}}))}Array.isArray(s.match)&&s.match.forEach(n)}(n.matched),o}const{hasOwnProperty:US}=Object.prototype;function XS(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function HS(e){return Boolean(e)&&XS(e.offset)&&XS(e.line)&&XS(e.column)}function WS(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let i in n){let o=!0;if(!1!==US.call(n,i)){if("type"===i)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===i){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!==typeof n.loc.source)i+=".source";else if(HS(n.loc.start)){if(HS(n.loc.end))continue;i+=".end"}else i+=".start";o=!1}else if(t.hasOwnProperty(i)){o=!1;for(let e=0;!o&&e");else{if(!Array.isArray(r))throw new Error("Wrong value `"+r+"` in `"+e+"."+o+"` structure definition");t.push("List")}}i[o]=t.join(" | ")}return{docs:i,check:WS(e,r)}}const YS=yS(Lk.join(" | "));function GS(e,t,n){const r={};for(const i in e)e[i].syntax&&(r[i]=n?e[i].syntax:wk(e[i].syntax,{compact:t}));return r}function VS(e,t,n){const r={};for(const[i,o]of Object.entries(e))r[i]={prelude:o.prelude&&(n?o.prelude.syntax:wk(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&GS(o.descriptors,t,n)};return r}function KS(e,t,n){return{matched:e,iterations:n,error:t,...s}}function JS(e,t,n,r){const i=lS(n,e.syntax);let o;return function(e){for(let t=0;t3&&void 0!==arguments[3]?arguments[3]:null,serializable:"string"===typeof e||e&&"string"===typeof e.type,syntax:null,match:null};return"function"===typeof e?i.match=yS(e,r):("string"===typeof e?Object.defineProperty(i,"syntax",{get:()=>(Object.defineProperty(i,"syntax",{value:iS(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:yS(i.syntax,r)}),i.match)})),i}addAtrule_(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),Object.create(null)):null})}addProperty_(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Ck("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){const n=this.checkAtruleName(e);if(n)return n;const r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||JS(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){const n=this.checkAtruleName(e);if(n)return n;const r=this.getAtrule(e),i=Nk(t);return r.descriptors?r.descriptors[i.name]||r.descriptors[i.basename]?void 0:new Ck("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new Ck("Unknown property",e)}matchAtrulePrelude(e,t){const n=this.checkAtrulePrelude(e,t);if(n)return KS(null,n);const r=this.getAtrule(e);return r.prelude?JS(this,r.prelude,t||"",!1):KS(null,null)}matchAtruleDescriptor(e,t,n){const r=this.checkAtruleDescriptorName(e,t);if(r)return KS(null,r);const i=this.getAtrule(e),o=Nk(t);return JS(this,i.descriptors[o.name]||i.descriptors[o.basename],n,!1)}matchDeclaration(e){return"Declaration"!==e.type?KS(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Qk(e).custom)return KS(null,new Error("Lexer matching doesn't applicable for custom properties"));const n=this.checkPropertyName(e);return n?KS(null,n):JS(this,this.getProperty(e),t,!0)}matchType(e,t){const n=this.getType(e);return n?JS(this,n,t,!1):KS(null,new Ck("Unknown type",e))}match(e,t){return"string"===typeof e||e&&e.type?("string"!==typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),JS(this,e,t,!1)):KS(null,new Ck("Bad syntax"))}findValueFragments(e,t,n,r){return jS(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return jS(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){const r=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Nk(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Qk(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,i,o,s){if(o.has(i))return o.get(i);o.set(i,!1),null!==s.syntax&&function(e,t,n){let r=oS,i=oS;if("function"===typeof t?r=t:t&&(r=sS(t.enter),i=sS(t.leave)),r===oS&&i===oS)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}i.call(n,t)}(e)}(s.syntax,(function(s){if("Type"!==s.type&&"Property"!==s.type)return;const a="Type"===s.type?r.types:r.properties,l="Type"===s.type?t:n;hasOwnProperty.call(a,s.name)&&!e(r,s.name,l,a[s.name])||o.set(i,!0)}),this)}let t=new Map,n=new Map;for(const r in this.types)e(this,r,t,this.types[r]);for(const r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter((e=>t.get(e))),n=[...n.keys()].filter((e=>n.get(e))),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:GS(this.types,!t,e),properties:GS(this.properties,!t,e),atrules:VS(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}}function tw(e,t){return"string"===typeof t&&/^\s*\|/.test(t)?"string"===typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function nw(e,t){const n=Object.create(null);for(const[r,i]of Object.entries(e))if(i){n[r]={};for(const e of Object.keys(i))t.includes(e)&&(n[r][e]=i[e])}return n}function rw(e,t){const n={...e};for(const[r,i]of Object.entries(t))switch(r){case"generic":n[r]=Boolean(i);break;case"units":n[r]={...e[r]};for(const[e,t]of Object.entries(i))n[r][e]=Array.isArray(t)?t:[];break;case"atrules":n[r]={...e[r]};for(const[e,t]of Object.entries(i)){const i=n[r][e]||{},o=n[r][e]={prelude:i.prelude||null,descriptors:{...i.descriptors}};if(t){o.prelude=t.prelude?tw(o.prelude,t.prelude):o.prelude||null;for(const[e,n]of Object.entries(t.descriptors||{}))o.descriptors[e]=n?tw(o.descriptors[e],n):null;Object.keys(o.descriptors).length||(o.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(const[e,t]of Object.entries(i))n[r][e]=tw(n[r][e],t);break;case"scope":n[r]={...e[r]};for(const[e,t]of Object.entries(i))n[r][e]={...n[r][e],...t};break;case"parseContext":n[r]={...e[r],...i};break;case"atrule":case"pseudo":n[r]={...e[r],...nw(i,["parse"])};break;case"node":n[r]={...e[r],...nw(i,["name","structure","parse","generate","walkContext"])}}return n}function iw(e){const t=tk(e),n=kk(e),r=fk(e),{fromPlainObject:i,toPlainObject:o}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&e.children instanceof Fv===!1&&(e.children=(new Fv).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof Fv&&(e.children=e.children.toArray())}}),t)}}(n),s={lexer:null,createLexer:e=>new ew(e,s,s.lexer.structure),tokenize:Lv,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:i,toPlainObject:o,fork(t){const n=rw({},e);return iw("function"===typeof t?t(n,Object.assign):rw(n,t))}};return s.lexer=new ew({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}const ow=43,sw=45,aw=110,lw=!0,cw=!1;function uw(e,t){let n=this.tokenStart+e;const r=this.charCodeAt(n);for(r!==ow&&r!==sw||(t&&this.error("Number sign is not allowed"),n++);n0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==ow&&n!==sw&&this.error("Number sign is expected")),hw.call(this,0!==t),t===sw?"-"+this.consume($y):this.consume($y)}const pw="AnPlusB",mw={a:[String,null],b:[String,null]};function gw(){const e=this.tokenStart;let t=null,n=null;if(this.tokenType===$y)hw.call(this,cw),n=this.consume($y);else if(this.tokenType===Ey&&this.cmpChar(this.tokenStart,sw))switch(t="-1",dw.call(this,1,aw),this.tokenEnd-this.tokenStart){case 2:this.next(),n=fw.call(this);break;case 3:dw.call(this,2,sw),this.next(),this.skipSC(),hw.call(this,lw),n="-"+this.consume($y);break;default:dw.call(this,2,sw),uw.call(this,3,lw),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===Ey||this.isDelim(ow)&&this.lookupType(1)===Ey){let r=0;switch(t="1",this.isDelim(ow)&&(r=1,this.next()),dw.call(this,0,aw),this.tokenEnd-this.tokenStart){case 1:this.next(),n=fw.call(this);break;case 2:dw.call(this,1,sw),this.next(),this.skipSC(),hw.call(this,lw),n="-"+this.consume($y);break;default:dw.call(this,1,sw),uw.call(this,2,lw),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===Iy){const r=this.charCodeAt(this.tokenStart),i=r===ow||r===sw;let o=this.tokenStart+i;for(;o0&&void 0!==arguments[0]&&arguments[0];const t=this.tokenStart;let n,r,i=null,o=null;switch(this.eat(_y),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),!1===this.eof&&this.tokenType!==Yy&&this.tokenType!==jy&&(i=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),bw):bw.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case jy:this.next();break;case Yy:o=hasOwnProperty.call(this.atrule,r)&&"function"===typeof this.atrule[r].block?this.atrule[r].block.call(this,e):this.Block(yw.call(this))}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:i,block:o}}function ww(e){this.token(_y,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(jy,";")}const Tw="AtrulePrelude",Aw="atrulePrelude",Ew={children:[[]]};function Cw(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"===typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&this.tokenType!==Yy&&this.tokenType!==jy&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function _w(e){this.children(e)}const Pw=36,Rw=42,Dw=61,Nw=94,Qw=124,Mw=126;function $w(){this.eof&&this.error("Unexpected end of input");const e=this.tokenStart;let t=!1;return this.isDelim(Rw)?(t=!0,this.next()):this.isDelim(Qw)||this.eat(Ey),this.isDelim(Qw)?this.charCodeAt(this.tokenStart+1)!==Dw?(this.next(),this.eat(Ey)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Lw(){const e=this.tokenStart,t=this.charCodeAt(e);return t!==Dw&&t!==Mw&&t!==Nw&&t!==Pw&&t!==Rw&&t!==Qw&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Dw&&(this.isDelim(Dw)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}const Iw="AttributeSelector",Fw={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Bw(){const e=this.tokenStart;let t,n=null,r=null,i=null;return this.eat(Xy),this.skipSC(),t=$w.call(this),this.skipSC(),this.tokenType!==Hy&&(this.tokenType!==Ey&&(n=Lw.call(this),this.skipSC(),r=this.tokenType===Ry?this.String():this.Identifier(),this.skipSC()),this.tokenType===Ey&&(i=this.consume(Ey),this.skipSC())),this.eat(Hy),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:i}}function zw(e){this.token(My,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(Ey,e.flags),this.token(My,"]")}const Zw=38;function jw(e){return this.Raw(e,null,!0)}function Uw(){return this.parseWithFallback(this.Rule,jw)}function Xw(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Hw(){if(this.tokenType===jy)return Xw.call(this,this.tokenIndex);const e=this.parseWithFallback(this.Declaration,Xw);return this.tokenType===jy&&this.next(),e}const Ww="Block",qw="block",Yw={children:[["Atrule","Rule","Declaration"]]};function Gw(e){const t=e?Hw:Uw,n=this.tokenStart;let r=this.createList();this.eat(Yy);e:for(;!this.eof;)switch(this.tokenType){case Gy:break e;case Fy:case Vy:this.next();break;case _y:r.push(this.parseWithFallback(this.Atrule.bind(this,e),jw));break;default:e&&this.isDelim(Zw)?r.push(Uw.call(this)):r.push(t.call(this))}return this.eof||this.eat(Gy),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function Vw(e){this.token(Yy,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(jy,";")})),this.token(Gy,"}")}const Kw="Brackets",Jw={children:[[]]};function eT(e,t){const n=this.tokenStart;let r=null;return this.eat(Xy),r=e.call(this,t),this.eof||this.eat(Hy),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function tT(e){this.token(My,"["),this.children(e),this.token(My,"]")}const nT="CDC",rT=[];function iT(){const e=this.tokenStart;return this.eat(zy),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function oT(){this.token(zy,"--\x3e")}const sT="CDO",aT=[];function lT(){const e=this.tokenStart;return this.eat(By),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function cT(){this.token(By,"\x3c!--")}const uT=46,hT="ClassSelector",dT={name:String};function fT(){return this.eatDelim(uT),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(Ey)}}function pT(e){this.token(My,"."),this.token(Ey,e.name)}const mT=43,gT=47,OT=62,bT=126,yT="Combinator",vT={name:String};function kT(){const e=this.tokenStart;let t;switch(this.tokenType){case Fy:t=" ";break;case My:switch(this.charCodeAt(this.tokenStart)){case OT:case mT:case bT:this.next();break;case gT:this.next(),this.eatIdent("deep"),this.eatDelim(gT);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function xT(e){this.tokenize(e.name)}const ST=42,wT=47,TT="Comment",AT={value:String};function ET(){const e=this.tokenStart;let t=this.tokenEnd;return this.eat(Vy),t-e+2>=2&&this.charCodeAt(t-2)===ST&&this.charCodeAt(t-1)===wT&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function CT(e){this.token(Vy,"/*"+e.value+"*/")}const _T=33,PT=35,RT=36,DT=38,NT=42,QT=43,MT=47;function $T(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function LT(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function IT(){const e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&this.tokenType!==jy&&!1===this.isDelim(_T)&&!1===this.isBalanceEdge(e)&&this.error(),t}const FT="Declaration",BT="declaration",zT={important:[Boolean,String],property:String,value:["Value","Raw"]};function ZT(){const e=this.tokenStart,t=this.tokenIndex,n=UT.call(this),r=Mk(n),i=r?this.parseCustomProperty:this.parseValue,o=r?LT:$T;let s,a=!1;this.skipSC(),this.eat(Zy);const l=this.tokenIndex;if(r||this.skipSC(),s=i?this.parseWithFallback(IT,o):o.call(this,this.tokenIndex),r&&"Value"===s.type&&s.children.isEmpty)for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===Fy){s.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(_T)&&(a=XT.call(this),this.skipSC()),!1===this.eof&&this.tokenType!==jy&&!1===this.isBalanceEdge(t)&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:a,property:n,value:s}}function jT(e){this.token(Ey,e.property),this.token(Zy,":"),this.node(e.value),e.important&&(this.token(My,"!"),this.token(Ey,!0===e.important?"important":e.important))}function UT(){const e=this.tokenStart;if(this.tokenType===My)switch(this.charCodeAt(this.tokenStart)){case NT:case RT:case QT:case PT:case DT:this.next();break;case MT:this.next(),this.isDelim(MT)&&this.next()}return this.tokenType===Py?this.eat(Py):this.eat(Ey),this.substrToCursor(e)}function XT(){this.eat(My),this.skipSC();const e=this.consume(Ey);return"important"===e||e}const HT=38;function WT(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}const qT="DeclarationList",YT={children:[["Declaration","Atrule","Rule"]]};function GT(){const e=this.createList();for(;!this.eof;)switch(this.tokenType){case Fy:case Vy:case jy:this.next();break;case _y:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),WT));break;default:this.isDelim(HT)?e.push(this.parseWithFallback(this.Rule,WT)):e.push(this.parseWithFallback(this.Declaration,WT))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function VT(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(jy,";")}))}const KT="Dimension",JT={value:String,unit:String};function eA(){const e=this.tokenStart,t=this.consumeNumber(Iy);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function tA(e){this.token(Iy,e.value+e.unit)}const nA="Function",rA="function",iA={name:String,children:[[]]};function oA(e,t){const n=this.tokenStart,r=this.consumeFunctionName(),i=r.toLowerCase();let o;return o=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(qy),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:o}}function sA(e){this.token(Cy,e.name+"("),this.children(e),this.token(qy,")")}const aA="XXX",lA="Hash",cA={value:String};function uA(){const e=this.tokenStart;return this.eat(Py),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function hA(e){this.token(Py,"#"+e.value)}const dA="Identifier",fA={name:String};function pA(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(Ey)}}function mA(e){this.token(Ey,e.name)}const gA="IdSelector",OA={name:String};function bA(){const e=this.tokenStart;return this.eat(Py),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function yA(e){this.token(My,"#"+e.name)}const vA="MediaFeature",kA={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function xA(){const e=this.tokenStart;let t,n=null;if(this.eat(Wy),this.skipSC(),t=this.consume(Ey),this.skipSC(),this.tokenType!==qy){switch(this.eat(Zy),this.skipSC(),this.tokenType){case $y:n=this.lookupNonWSType(1)===My?this.Ratio():this.Number();break;case Iy:n=this.Dimension();break;case Ey:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(qy),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function SA(e){this.token(Wy,"("),this.token(Ey,e.name),null!==e.value&&(this.token(Zy,":"),this.node(e.value)),this.token(qy,")")}const wA="MediaQuery",TA={children:[["Identifier","MediaFeature","WhiteSpace"]]};function AA(){const e=this.createList();let t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case Vy:case Fy:this.next();continue;case Ey:t=this.Identifier();break;case Wy:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function EA(e){this.children(e)}const CA="MediaQueryList",_A={children:[["MediaQuery"]]};function PA(){const e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===Uy);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function RA(e){this.children(e,(()=>this.token(Uy,",")))}const DA=38,NA="NestingSelector",QA={};function MA(){const e=this.tokenStart;return this.eatDelim(DA),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function $A(){this.token(My,"&")}const LA="Nth",IA={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function FA(){this.skipSC();const e=this.tokenStart;let t,n=e,r=null;return t=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(e,n),nth:t,selector:r}}function BA(e){this.node(e.nth),null!==e.selector&&(this.token(Ey,"of"),this.node(e.selector))}const zA="Number",ZA={value:String};function jA(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume($y)}}function UA(e){this.token($y,e.value)}const XA="Operator",HA={value:String};function WA(){const e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function qA(e){this.tokenize(e.value)}const YA="Parentheses",GA={children:[[]]};function VA(e,t){const n=this.tokenStart;let r=null;return this.eat(Wy),r=e.call(this,t),this.eof||this.eat(qy),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function KA(e){this.token(Wy,"("),this.children(e),this.token(qy,")")}const JA="Percentage",eE={value:String};function tE(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(Ly)}}function nE(e){this.token(Ly,e.value+"%")}const rE="PseudoClassSelector",iE="function",oE={name:String,children:[["Raw"],null]};function sE(){const e=this.tokenStart;let t,n,r=null;return this.eat(Zy),this.tokenType===Cy?(t=this.consumeFunctionName(),n=t.toLowerCase(),hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),r=this.pseudo[n].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(qy)):t=this.consume(Ey),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:t,children:r}}function aE(e){this.token(Zy,":"),null===e.children?this.token(Ey,e.name):(this.token(Cy,e.name+"("),this.children(e),this.token(qy,")"))}const lE="PseudoElementSelector",cE="function",uE={name:String,children:[["Raw"],null]};function hE(){const e=this.tokenStart;let t,n,r=null;return this.eat(Zy),this.eat(Zy),this.tokenType===Cy?(t=this.consumeFunctionName(),n=t.toLowerCase(),hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),r=this.pseudo[n].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(qy)):t=this.consume(Ey),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:t,children:r}}function dE(e){this.token(Zy,":"),this.token(Zy,":"),null===e.children?this.token(Ey,e.name):(this.token(Cy,e.name+"("),this.children(e),this.token(qy,")"))}const fE=47,pE=46;function mE(){this.skipSC();const e=this.consume($y);for(let t=0;t0&&this.lookupType(-1)===Fy?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const kE="Raw",xE={value:String};function SE(e,t,n){const r=this.getTokenStart(e);let i;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),i=n&&this.tokenStart>r?vE.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(r,i),value:this.substring(r,i)}}function wE(e){this.tokenize(e.value)}function TE(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function AE(){const e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&this.tokenType!==Yy&&this.error(),e}const EE="Rule",CE="rule",_E={prelude:["SelectorList","Raw"],block:["Block"]};function PE(){const e=this.tokenIndex,t=this.tokenStart;let n,r;return n=this.parseRulePrelude?this.parseWithFallback(AE,TE):TE.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function RE(e){this.node(e.prelude),this.node(e.block)}const DE="Selector",NE={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function QE(){const e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function ME(e){this.children(e)}const $E="SelectorList",LE="selector",IE={children:[["Selector","Raw"]]};function FE(){const e=this.createList();for(;!this.eof&&(e.push(this.Selector()),this.tokenType===Uy);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function BE(e){this.children(e,(()=>this.token(Uy,",")))}const zE=92,ZE=34,jE=39;function UE(e){const t=e.length,n=e.charCodeAt(0),r=n===ZE||n===jE?1:0,i=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1;let o="";for(let s=r;s<=i;s++){let n=e.charCodeAt(s);if(n===zE){if(s===i){s!==t-1&&(o=e.substr(s+1));break}if(n=e.charCodeAt(++s),av(zE,n)){const t=s-1,n=Sv(e,t);s=n-1,o+=Ev(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(s+1)&&s++}else o+=e[s]}return o}const XE="String",HE={value:String};function WE(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:UE(this.consume(Ry))}}function qE(e){this.token(Ry,function(e,t){const n=t?"'":'"',r=t?jE:ZE;let i="",o=!1;for(let s=0;s6&&this.error("Too many hex digits",r)}return this.next(),n}function fC(e){let t=0;for(;this.isDelim(hC);)++t>e&&this.error("Too many question marks"),this.next()}function pC(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===cC?"Plus sign":"Hyphen minus")+" is expected")}function mC(){let e=0;switch(this.tokenType){case $y:if(e=dC.call(this,1,!0),this.isDelim(hC)){fC.call(this,6-e);break}if(this.tokenType===Iy||this.tokenType===$y){pC.call(this,uC),dC.call(this,1,!1);break}break;case Iy:e=dC.call(this,1,!0),e>0&&fC.call(this,6-e);break;default:if(this.eatDelim(cC),this.tokenType===Ey){e=dC.call(this,0,!0),e>0&&fC.call(this,6-e);break}if(this.isDelim(hC)){this.next(),fC.call(this,5);break}this.error("Hex digit or question mark is expected")}}const gC="UnicodeRange",OC={value:String};function bC(){const e=this.tokenStart;return this.eatIdent("u"),mC.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function yC(e){this.tokenize(e.value)}const vC=32,kC=92,xC=34,SC=39,wC=40,TC=41;const AC="Url",EC={value:String};function CC(){const e=this.tokenStart;let t;switch(this.tokenType){case Ny:t=function(e){const t=e.length;let n=4,r=e.charCodeAt(t-1)===TC?t-2:t-1,i="";for(;n )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","cos()":"cos( )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","exp()":"exp( )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )","hypot()":"hypot( # )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"|min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","log()":"log( , ? )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )","mod()":"mod( , )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( [|none] )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )",ratio:" [/ ]?","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","reversed-counter-name":"reversed( )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( )","single-animation":"