@malloy-publisher/sdk 0.0.201 → 0.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,234 @@
1
+ "use strict";var Zy=Object.create;var bp=Object.defineProperty;var Jy=Object.getOwnPropertyDescriptor;var ex=Object.getOwnPropertyNames;var tx=Object.getPrototypeOf,nx=Object.prototype.hasOwnProperty;var rx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ex(t))!nx.call(e,o)&&o!==n&&bp(e,o,{get:()=>t[o],enumerable:!(r=Jy(t,o))||r.enumerable});return e};var eu=(e,t,n)=>(n=e!=null?Zy(tx(e)):{},rx(t||!e||!e.__esModule?bp(n,"default",{value:e,enumerable:!0}):n,e));const d=require("react/jsx-runtime"),P=require("@mui/material"),q=require("react"),Rr=require("@tanstack/react-query"),ut=require("./ServerProvider-BSyxB6sf.cjs.js"),_s=require("markdown-to-jsx"),bn=require("@mui/icons-material"),dt=require("@mui/system"),ox=require("@emotion/styled"),ix=require("@emotion/react"),Gi=require("react-dom"),Vm=require("@react-spring/web"),ax=require("react-router-dom");function Wm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const D=Wm(q),sx=Wm(Gi),yp=e=>e,lx=()=>{let e=yp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=yp}}},qm=lx();function kr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function ke(e){if(typeof e!="string")throw new Error(kr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function xp(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tu={exports:{}},nu,Ep;function ux(){if(Ep)return nu;Ep=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return nu=e,nu}var ru,Cp;function cx(){if(Cp)return ru;Cp=1;var e=ux();function t(){}function n(){}return n.resetWarningCache=t,ru=function(){function r(a,s,l,u,c,p){if(p!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ru}var Tp;function dx(){return Tp||(Tp=1,tu.exports=cx()()),tu.exports}var px=dx();const de=Xn(px);function Ym(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ym(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ae(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ym(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[o]=a}return r}var ou={exports:{}},xt={};/**
2
+ * @license React
3
+ * react-is.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var vp;function fx(){if(vp)return xt;vp=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function m(g){if(typeof g=="object"&&g!==null){var y=g.$$typeof;switch(y){case e:switch(g=g.type,g){case n:case o:case r:case l:case u:case h:return g;default:switch(g=g&&g.$$typeof,g){case a:case s:case p:case c:return g;case i:return g;default:return y}}case t:return y}}}return xt.ContextConsumer=i,xt.ContextProvider=a,xt.Element=e,xt.ForwardRef=s,xt.Fragment=n,xt.Lazy=p,xt.Memo=c,xt.Portal=t,xt.Profiler=o,xt.StrictMode=r,xt.Suspense=l,xt.SuspenseList=u,xt.isContextConsumer=function(g){return m(g)===i},xt.isContextProvider=function(g){return m(g)===a},xt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},xt.isForwardRef=function(g){return m(g)===s},xt.isFragment=function(g){return m(g)===n},xt.isLazy=function(g){return m(g)===p},xt.isMemo=function(g){return m(g)===c},xt.isPortal=function(g){return m(g)===t},xt.isProfiler=function(g){return m(g)===o},xt.isStrictMode=function(g){return m(g)===r},xt.isSuspense=function(g){return m(g)===l},xt.isSuspenseList=function(g){return m(g)===u},xt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===l||g===u||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===c||g.$$typeof===a||g.$$typeof===i||g.$$typeof===s||g.$$typeof===f||g.getModuleId!==void 0)},xt.typeOf=m,xt}var Sp;function hx(){return Sp||(Sp=1,ou.exports=fx()),ou.exports}var Km=hx();function lr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gm(e){if(D.isValidElement(e)||Km.isValidElementType(e)||!lr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Gm(e[n])}),t}function tn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return lr(e)&&lr(t)&&Object.keys(t).forEach(o=>{D.isValidElement(t[o])||Km.isValidElementType(t[o])?r[o]=t[o]:lr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&lr(e[o])?r[o]=tn(e[o],t[o],n):n.clone?r[o]=lr(t[o])?Gm(t[o]):t[o]:r[o]=t[o]}),r}function ea(e,t){return t?tn(e,t,{clone:!1}):e}function kp(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(r.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function mx(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function gx(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function bx(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const cl={xs:0,sm:600,md:900,lg:1200,xl:1536},Dp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${cl[e]}px)`},yx={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:cl[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Dr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Dp;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||Dp;return Object.keys(t).reduce((a,s)=>{if(mx(i.keys,s)){const l=gx(r.containerQueries?r:yx,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||cl).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function xx(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function wp(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function dl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Bs(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=dl(e,n)||r,t&&(o=t(o,r,e)),o}function jt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,u=dl(l,r)||{};return Dr(a,s,p=>{let h=Bs(u,o,p);return p===h&&typeof p=="string"&&(h=Bs(u,o,`${t}${p==="default"?"":ke(p)}`,p)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function Ex(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Cx={m:"margin",p:"padding"},Tx={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ip={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vx=Ex(e=>{if(e.length>2)if(Ip[e])e=Ip[e];else return[e];const[t,n]=e.split(""),r=Cx[t],o=Tx[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Hc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Uc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Hc,...Uc];function Ma(e,t,n,r){const o=dl(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function zc(e){return Ma(e,"spacing",8)}function Oa(e,t){return typeof t=="string"||t==null?t:e(t)}function Sx(e,t){return n=>e.reduce((r,o)=>(r[o]=Oa(t,n),r),{})}function kx(e,t,n,r){if(!t.includes(n))return null;const o=vx(n),i=Sx(o,r),a=e[n];return Dr(e,a,i)}function Qm(e,t){const n=zc(e.theme);return Object.keys(e).map(r=>kx(e,t,r,n)).reduce(ea,{})}function Nt(e){return Qm(e,Hc)}Nt.propTypes={};Nt.filterProps=Hc;function Ft(e){return Qm(e,Uc)}Ft.propTypes={};Ft.filterProps=Uc;function pl(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?ea(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function On(e){return typeof e!="number"?e:`${e}px solid`}function Un(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const Dx=Un("border",On),wx=Un("borderTop",On),Ix=Un("borderRight",On),Ax=Un("borderBottom",On),Px=Un("borderLeft",On),Rx=Un("borderColor"),Mx=Un("borderTopColor"),Ox=Un("borderRightColor"),Lx=Un("borderBottomColor"),Nx=Un("borderLeftColor"),Fx=Un("outline",On),_x=Un("outlineColor"),fl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ma(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Oa(t,r)});return Dr(e,e.borderRadius,n)}return null};fl.propTypes={};fl.filterProps=["borderRadius"];pl(Dx,wx,Ix,Ax,Px,Rx,Mx,Ox,Lx,Nx,fl,Fx,_x);const hl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ma(e.theme,"spacing",8),n=r=>({gap:Oa(t,r)});return Dr(e,e.gap,n)}return null};hl.propTypes={};hl.filterProps=["gap"];const ml=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ma(e.theme,"spacing",8),n=r=>({columnGap:Oa(t,r)});return Dr(e,e.columnGap,n)}return null};ml.propTypes={};ml.filterProps=["columnGap"];const gl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ma(e.theme,"spacing",8),n=r=>({rowGap:Oa(t,r)});return Dr(e,e.rowGap,n)}return null};gl.propTypes={};gl.filterProps=["rowGap"];const Bx=jt({prop:"gridColumn"}),jx=jt({prop:"gridRow"}),$x=jt({prop:"gridAutoFlow"}),Hx=jt({prop:"gridAutoColumns"}),Ux=jt({prop:"gridAutoRows"}),zx=jt({prop:"gridTemplateColumns"}),Vx=jt({prop:"gridTemplateRows"}),Wx=jt({prop:"gridTemplateAreas"}),qx=jt({prop:"gridArea"});pl(hl,ml,gl,Bx,jx,$x,Hx,Ux,zx,Vx,Wx,qx);function Qo(e,t){return t==="grey"?t:e}const Yx=jt({prop:"color",themeKey:"palette",transform:Qo}),Kx=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qo}),Gx=jt({prop:"backgroundColor",themeKey:"palette",transform:Qo});pl(Yx,Kx,Gx);function Sn(e){return e<=1&&e!==0?`${e*100}%`:e}const Qx=jt({prop:"width",transform:Sn}),Vc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||cl[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Sn(n)}};return Dr(e,e.maxWidth,t)}return null};Vc.filterProps=["maxWidth"];const Xx=jt({prop:"minWidth",transform:Sn}),Zx=jt({prop:"height",transform:Sn}),Jx=jt({prop:"maxHeight",transform:Sn}),e2=jt({prop:"minHeight",transform:Sn});jt({prop:"size",cssProperty:"width",transform:Sn});jt({prop:"size",cssProperty:"height",transform:Sn});const t2=jt({prop:"boxSizing"});pl(Qx,Vc,Xx,Zx,Jx,e2,t2);const La={border:{themeKey:"borders",transform:On},borderTop:{themeKey:"borders",transform:On},borderRight:{themeKey:"borders",transform:On},borderBottom:{themeKey:"borders",transform:On},borderLeft:{themeKey:"borders",transform:On},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:On},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fl},color:{themeKey:"palette",transform:Qo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qo},backgroundColor:{themeKey:"palette",transform:Qo},p:{style:Ft},pt:{style:Ft},pr:{style:Ft},pb:{style:Ft},pl:{style:Ft},px:{style:Ft},py:{style:Ft},padding:{style:Ft},paddingTop:{style:Ft},paddingRight:{style:Ft},paddingBottom:{style:Ft},paddingLeft:{style:Ft},paddingX:{style:Ft},paddingY:{style:Ft},paddingInline:{style:Ft},paddingInlineStart:{style:Ft},paddingInlineEnd:{style:Ft},paddingBlock:{style:Ft},paddingBlockStart:{style:Ft},paddingBlockEnd:{style:Ft},m:{style:Nt},mt:{style:Nt},mr:{style:Nt},mb:{style:Nt},ml:{style:Nt},mx:{style:Nt},my:{style:Nt},margin:{style:Nt},marginTop:{style:Nt},marginRight:{style:Nt},marginBottom:{style:Nt},marginLeft:{style:Nt},marginX:{style:Nt},marginY:{style:Nt},marginInline:{style:Nt},marginInlineStart:{style:Nt},marginInlineEnd:{style:Nt},marginBlock:{style:Nt},marginBlockStart:{style:Nt},marginBlockEnd:{style:Nt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:hl},rowGap:{style:gl},columnGap:{style:ml},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sn},maxWidth:{style:Vc},minWidth:{transform:Sn},height:{transform:Sn},maxHeight:{transform:Sn},minHeight:{transform:Sn},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function n2(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function r2(e,t){return typeof e=="function"?e(t):e}function o2(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:p}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=dl(o,u)||{};return p?p(a):Dr(a,r,m=>{let g=Bs(h,c,m);return m===g&&typeof m=="string"&&(g=Bs(h,c,`${n}${m==="default"?"":ke(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??La;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=xx(o.breakpoints),p=Object.keys(c);let h=c;return Object.keys(u).forEach(f=>{const m=r2(u[f],o);if(m!=null)if(typeof m=="object")if(a[f])h=ea(h,e(f,m,o,a));else{const g=Dr({theme:o},m,y=>({[f]:y}));n2(g,m)?h[f]=t({sx:m,theme:o,nested:!0}):h=ea(h,g)}else h=ea(h,e(f,m,o,a))}),!i&&o.modularCssLayers?{"@layer sx":kp(o,wp(p,h))}:kp(o,wp(p,h))}return Array.isArray(r)?r.map(s):s(r)}return t}const oi=o2();oi.filterProps=["sx"];const i2=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??La;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function a2(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=i2(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return lr(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}function s2(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Wc(e,t=0,n=1){return s2(e,t,n)}function l2(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Kr(e){if(e.type)return e;if(e.charAt(0)==="#")return Kr(l2(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(kr(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(kr(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const u2=e=>{const t=Kr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Qi=(e,t)=>{try{return u2(e)}catch{return e}};function bl(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Xm(e){e=Kr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(u,c=(u+n/30)%12)=>o-i*Math.max(Math.min(c-3,9-c,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),bl({type:s,values:l})}function Qu(e){e=Kr(e);let t=e.type==="hsl"||e.type==="hsla"?Kr(Xm(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c2(e,t){const n=Qu(e),r=Qu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function js(e,t){return e=Kr(e),t=Wc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,bl(e)}function to(e,t,n){try{return js(e,t)}catch{return e}}function yl(e,t){if(e=Kr(e),t=Wc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return bl(e)}function mt(e,t,n){try{return yl(e,t)}catch{return e}}function xl(e,t){if(e=Kr(e),t=Wc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return bl(e)}function gt(e,t,n){try{return xl(e,t)}catch{return e}}function Xu(e,t=.15){return Qu(e)>.5?yl(e,t):xl(e,t)}function Za(e,t,n){try{return Xu(e,t)}catch{return e}}const ba={black:"#000",white:"#fff"},d2={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Oo={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Lo={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ri={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},No={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Fo={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},_o={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Zm(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ba.white,default:ba.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Jm=Zm();function e0(){return{text:{primary:ba.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ba.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Zu=e0();function Ap(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=xl(e.main,o):t==="dark"&&(e.dark=yl(e.main,i)))}function Pp(e,t,n,r,o){const i=o.light||o,a=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function p2(e="light"){return e==="dark"?{main:No[200],light:No[50],dark:No[400]}:{main:No[700],light:No[400],dark:No[800]}}function f2(e="light"){return e==="dark"?{main:Oo[200],light:Oo[50],dark:Oo[400]}:{main:Oo[500],light:Oo[300],dark:Oo[700]}}function h2(e="light"){return e==="dark"?{main:Lo[500],light:Lo[300],dark:Lo[700]}:{main:Lo[700],light:Lo[400],dark:Lo[800]}}function m2(e="light"){return e==="dark"?{main:Fo[400],light:Fo[300],dark:Fo[700]}:{main:Fo[700],light:Fo[500],dark:Fo[900]}}function g2(e="light"){return e==="dark"?{main:_o[400],light:_o[300],dark:_o[700]}:{main:_o[800],light:_o[500],dark:_o[900]}}function b2(e="light"){return e==="dark"?{main:Ri[400],light:Ri[300],dark:Ri[700]}:{main:"#ed6c02",light:Ri[500],dark:Ri[900]}}function y2(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function qc(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||p2(t),s=e.secondary||f2(t),l=e.error||h2(t),u=e.info||m2(t),c=e.success||g2(t),p=e.warning||b2(t);function h(y){return o?y2(y):c2(y,Zu.text.primary)>=n?Zu.text.primary:Jm.text.primary}const f=({color:y,name:x,mainShade:E=500,lightShade:C=300,darkShade:S=700})=>{if(y={...y},!y.main&&y[E]&&(y.main=y[E]),!y.hasOwnProperty("main"))throw new Error(kr(11,x?` (${x})`:"",E));if(typeof y.main!="string")throw new Error(kr(12,x?` (${x})`:"",JSON.stringify(y.main)));return o?(Pp(o,y,"light",C,r),Pp(o,y,"dark",S,r)):(Ap(y,"light",C,r),Ap(y,"dark",S,r)),y.contrastText||(y.contrastText=h(y.main)),y};let m;return t==="light"?m=Zm():t==="dark"&&(m=e0()),tn({common:{...ba},mode:t,primary:f({color:a,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:l,name:"error"}),warning:f({color:p,name:"warning"}),info:f({color:u,name:"info"}),success:f({color:c,name:"success"}),grey:d2,contrastThreshold:n,getContrastText:h,augmentColor:f,tonalOffset:r,...m},i)}function x2(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var E2={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,scale: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};function C2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var T2=/[A-Z]|^ms/g,v2=/_EMO_([^_]+?)_([^]*?)_EMO_/g,t0=function(t){return t.charCodeAt(1)===45},Rp=function(t){return t!=null&&typeof t!="boolean"},iu=C2(function(e){return t0(e)?e:e.replace(T2,"-$&").toLowerCase()}),Mp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(v2,function(r,o,i){return Wr={name:o,styles:i,next:Wr},o})}return E2[t]!==1&&!t0(t)&&typeof n=="number"&&n!==0?n+"px":n};function $s(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Wr={name:o.name,styles:o.styles,next:Wr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Wr={name:a.name,styles:a.styles,next:Wr},a=a.next;var s=i.styles+";";return s}return S2(e,t,n)}}var l=n;return l}function S2(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=$s(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;Rp(s)&&(r+=iu(i)+":"+Mp(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Rp(a[l])&&(r+=iu(i)+":"+Mp(i,a[l])+";");else{var u=$s(e,t,a);switch(i){case"animation":case"animationName":{r+=iu(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var Op=/label:\s*([^\s;{]+)\s*(;|$)/g,Wr;function k2(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Wr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=$s(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=$s(n,t,e[s]),r){var l=i;o+=l[s]}Op.lastIndex=0;for(var u="",c;(c=Op.exec(o))!==null;)u+="-"+c[1];var p=x2(o)+u;return{name:p,styles:o,next:Wr}}function D2(e,t){return ox(e,t)}function w2(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Lp=[];function fo(e){return Lp[0]=e,k2(Lp)}const qt=typeof window<"u"?D.useLayoutEffect:D.useEffect;function I2(e){return Object.keys(e).length===0}function n0(e=null){const t=D.useContext(ix.ThemeContext);return!t||I2(t)?e:t}const A2=D.createContext(),zn=()=>D.useContext(A2)??!1;function ya(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const u=l;r[i][u]=ya(a[u],s[u],n)}}}else i==="className"&&n&&t.className?r.className=Ae(e?.className,t?.className):i==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[i]===void 0&&(r[i]=e[i])}return r}const P2=D.createContext(void 0);function R2(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ya(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?ya(o,r,t.components.mergeClassNameAndStyle):r}function M2({props:e,name:t}){const n=D.useContext(P2);return R2({props:e,name:t,theme:{components:n}})}let Np=0;function O2(e){const[t,n]=D.useState(e),r=e||t;return D.useEffect(()=>{t==null&&(Np+=1,n(`mui-${Np}`))},[t]),r}const L2={...D},Fp=L2.useId;function Zn(e){if(Fp!==void 0){const t=Fp();return e??t}return O2(e)}const N2=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function F2(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=N2(t),a=Object.keys(i);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,f){const m=a.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:f)-r/100}${n})`}function c(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function p(h){const f=a.indexOf(h);return f===0?s(a[1]):f===a.length-1?l(a[f]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:u,only:c,not:p,unit:n,...o}}const _2={borderRadius:4};function B2(e=8,t=zc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function j2(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Yc(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=F2(n),l=B2(o);let u=tn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{..._2,...i}},a);return u=bx(u),u.applyStyles=j2,u=t.reduce((c,p)=>tn(c,p),u),u.unstable_sxConfig={...La,...a?.unstable_sxConfig},u.unstable_sx=function(p){return oi({sx:p,theme:this})},u}const $2=Yc();function H2(e=$2){return n0(e)}const _p=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},U2=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},z2=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function au(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return U2(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const c=`--${n?`${n}-`:""}${s.join("-")}`,p=z2(s,l);Object.assign(o,{[c]:p}),_p(i,s,`var(${c})`,u),_p(a,s,`var(${c}, ${p})`,u)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function V2(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...u}=e,{vars:c,css:p,varsWithDefaults:h}=au(u,t);let f=h;const m={},{[l]:g,...y}=a;if(Object.entries(y||{}).forEach(([S,k])=>{const{vars:T,css:O,varsWithDefaults:F}=au(k,t);f=tn(f,F),m[S]={css:O,vars:T}}),g){const{css:S,vars:k,varsWithDefaults:T}=au(g,t);f=tn(f,T),m[l]={css:S,vars:k}}function x(S,k){let T=o;if(o==="class"&&(T=".%s"),o==="data"&&(T="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(T=`[${o}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${a[S]?.palette?.mode||S})`]:{":root":k}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(m).forEach(([,{vars:k}])=>{S=tn(S,k)}),S},generateStyleSheets:()=>{const S=[],k=e.defaultColorScheme||"light";function T(B,R){Object.keys(R).length&&S.push(typeof B=="string"?{[B]:{...R}}:B)}T(n(void 0,{...p}),p);const{[k]:O,...F}=m;if(O){const{css:B}=O,R=a[k]?.palette?.mode,N=!r&&R?{colorScheme:R,...B}:{...B};T(n(k,{...N}),N)}return Object.entries(F).forEach(([B,{css:R}])=>{const N=a[B]?.palette?.mode,v=!r&&N?{colorScheme:N,...R}:{...R};T(n(B,{...v}),v)}),i&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function W2(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function q2(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Y2={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _e(e,t,n="Mui"){const r=Y2[t];return r?`${n}-${r}`:`${qm.generate(e)}-${t}`}function K2(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function G2(e){return Math.round(e*1e5)/1e5}const Bp={textTransform:"uppercase"},jp='"Roboto", "Helvetica", "Arial", sans-serif';function Q2(e,t){const{fontFamily:n=jp,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:u,pxToRem:c,...p}=typeof t=="function"?t(e):t,h=r/14,f=c||(y=>`${y/l*h}rem`),m=(y,x,E,C,S)=>({fontFamily:n,fontWeight:y,fontSize:f(x),lineHeight:E,...n===jp?{letterSpacing:`${G2(C/x)}em`}:{},...S,...u}),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,Bp),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,Bp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tn({htmlFontSize:l,pxToRem:f,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...g},p,{clone:!1})}const X2=.2,Z2=.14,J2=.12;function Pt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${X2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Z2})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${J2})`].join(",")}const eE=["none",Pt(0,2,1,-1,0,1,1,0,0,1,3,0),Pt(0,3,1,-2,0,2,2,0,0,1,5,0),Pt(0,3,3,-2,0,3,4,0,0,1,8,0),Pt(0,2,4,-1,0,4,5,0,0,1,10,0),Pt(0,3,5,-1,0,5,8,0,0,1,14,0),Pt(0,3,5,-1,0,6,10,0,0,1,18,0),Pt(0,4,5,-2,0,7,10,1,0,2,16,1),Pt(0,5,5,-3,0,8,10,1,0,3,14,2),Pt(0,5,6,-3,0,9,12,1,0,3,16,2),Pt(0,6,6,-3,0,10,14,1,0,4,18,3),Pt(0,6,7,-4,0,11,15,1,0,4,20,3),Pt(0,7,8,-4,0,12,17,2,0,5,22,4),Pt(0,7,8,-4,0,13,19,2,0,5,24,4),Pt(0,7,9,-4,0,14,21,2,0,5,26,4),Pt(0,8,9,-5,0,15,22,2,0,6,28,5),Pt(0,8,10,-5,0,16,24,2,0,6,30,5),Pt(0,8,11,-5,0,17,26,2,0,6,32,5),Pt(0,9,11,-5,0,18,28,2,0,7,34,6),Pt(0,9,12,-6,0,19,29,2,0,7,36,6),Pt(0,10,13,-6,0,20,31,3,0,8,38,7),Pt(0,10,13,-6,0,21,33,3,0,8,40,7),Pt(0,10,14,-6,0,22,35,3,0,8,42,7),Pt(0,11,14,-7,0,23,36,3,0,9,44,8),Pt(0,11,15,-7,0,24,38,3,0,9,46,8)],tE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},r0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $p(e){return`${Math.round(e)}ms`}function nE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function rE(e){const t={...tE,...e.easing},n={...r0,...e.duration};return{getAutoHeightDuration:nE,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...u}=i;return(Array.isArray(o)?o:[o]).map(c=>`${c} ${typeof a=="string"?a:$p(a)} ${s} ${typeof l=="string"?l:$p(l)}`).join(",")},...e,easing:t,duration:n}}const oE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function iE(e){return lr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function o0(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!iE(s)||a.startsWith("unstable_")?delete r[a]:lr(s)&&(r[a]={...s},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
10
+
11
+ const theme = ${JSON.stringify(t,null,2)};
12
+
13
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
14
+ theme.transitions = createTransitions(theme.transitions || {});
15
+
16
+ export default theme;`}function Hp(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const aE=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function sE(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:js(t,aE(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Hp(n)})`:xl(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Hp(n)})`:yl(t,n)}})}function Ju(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,colorSpace:u,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(kr(20));const p=qc({...i,colorSpace:u}),h=Yc(e);let f=tn(h,{mixins:K2(h.breakpoints,r),palette:p,shadows:eE.slice(),typography:Q2(p,s),transitions:rE(a),zIndex:{...oE}});return f=tn(f,c),f=t.reduce((m,g)=>tn(m,g),f),f.unstable_sxConfig={...La,...c?.unstable_sxConfig},f.unstable_sx=function(g){return oi({sx:g,theme:this})},f.toRuntimeSource=o0,sE(f),f}function ec(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const lE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=ec(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function i0(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function a0(e){return e==="dark"?lE:[]}function uE(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=qc({...t,colorSpace:o});return{palette:a,opacity:{...i0(a.mode),...n},overlays:r||a0(a.mode),...i}}function cE(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const dE=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],pE=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return dE(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function fE(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function he(e,t,n){!e[t]&&n&&(e[t]=n)}function Xi(e){return typeof e!="string"||!e.startsWith("hsl")?e:Xm(e)}function yr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Qi(Xi(e[t])))}function hE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const tr=e=>{try{return e()}catch{}},mE=(e="mui")=>dt.unstable_createGetCssVar(e);function su(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=uE({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Ju({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...i0(i),...n?.opacity},overlays:n?.overlays||a0(i)},s}function gE(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=cE,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...c}=e,p=Object.keys(n)[0],h=r||(n.light&&p!=="light"?"light":p),f=mE(i),{[h]:m,light:g,dark:y,...x}=n,E={...x};let C=m;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(kr(21,h));let S;a&&(S="oklch");const k=su(S,E,C,c,h);g&&!E.light&&su(S,E,g,void 0,"light"),y&&!E.dark&&su(S,E,y,void 0,"dark");let T={defaultColorScheme:h,...k,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:u,getCssVar:f,colorSchemes:E,font:{...W2(k.typography),...k.font},spacing:hE(c.spacing)};Object.keys(T.colorSchemes).forEach(N=>{const v=T.colorSchemes[N].palette,L=A=>{const M=A.split("-"),V=M[1],W=M[2];return f(A,v[V][W])};v.mode==="light"&&(he(v.common,"background","#fff"),he(v.common,"onBackground","#000")),v.mode==="dark"&&(he(v.common,"background","#000"),he(v.common,"onBackground","#fff"));function I(A,M,V){if(S){let W;return A===to&&(W=`transparent ${((1-V)*100).toFixed(0)}%`),A===mt&&(W=`#000 ${(V*100).toFixed(0)}%`),A===gt&&(W=`#fff ${(V*100).toFixed(0)}%`),`color-mix(in ${S}, ${M}, ${W})`}return A(M,V)}if(fE(v,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),v.mode==="light"){he(v.Alert,"errorColor",I(mt,v.error.light,.6)),he(v.Alert,"infoColor",I(mt,v.info.light,.6)),he(v.Alert,"successColor",I(mt,v.success.light,.6)),he(v.Alert,"warningColor",I(mt,v.warning.light,.6)),he(v.Alert,"errorFilledBg",L("palette-error-main")),he(v.Alert,"infoFilledBg",L("palette-info-main")),he(v.Alert,"successFilledBg",L("palette-success-main")),he(v.Alert,"warningFilledBg",L("palette-warning-main")),he(v.Alert,"errorFilledColor",tr(()=>v.getContrastText(v.error.main))),he(v.Alert,"infoFilledColor",tr(()=>v.getContrastText(v.info.main))),he(v.Alert,"successFilledColor",tr(()=>v.getContrastText(v.success.main))),he(v.Alert,"warningFilledColor",tr(()=>v.getContrastText(v.warning.main))),he(v.Alert,"errorStandardBg",I(gt,v.error.light,.9)),he(v.Alert,"infoStandardBg",I(gt,v.info.light,.9)),he(v.Alert,"successStandardBg",I(gt,v.success.light,.9)),he(v.Alert,"warningStandardBg",I(gt,v.warning.light,.9)),he(v.Alert,"errorIconColor",L("palette-error-main")),he(v.Alert,"infoIconColor",L("palette-info-main")),he(v.Alert,"successIconColor",L("palette-success-main")),he(v.Alert,"warningIconColor",L("palette-warning-main")),he(v.AppBar,"defaultBg",L("palette-grey-100")),he(v.Avatar,"defaultBg",L("palette-grey-400")),he(v.Button,"inheritContainedBg",L("palette-grey-300")),he(v.Button,"inheritContainedHoverBg",L("palette-grey-A100")),he(v.Chip,"defaultBorder",L("palette-grey-400")),he(v.Chip,"defaultAvatarColor",L("palette-grey-700")),he(v.Chip,"defaultIconColor",L("palette-grey-700")),he(v.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(v.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(v.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(v.LinearProgress,"primaryBg",I(gt,v.primary.main,.62)),he(v.LinearProgress,"secondaryBg",I(gt,v.secondary.main,.62)),he(v.LinearProgress,"errorBg",I(gt,v.error.main,.62)),he(v.LinearProgress,"infoBg",I(gt,v.info.main,.62)),he(v.LinearProgress,"successBg",I(gt,v.success.main,.62)),he(v.LinearProgress,"warningBg",I(gt,v.warning.main,.62)),he(v.Skeleton,"bg",S?I(to,v.text.primary,.11):`rgba(${L("palette-text-primaryChannel")} / 0.11)`),he(v.Slider,"primaryTrack",I(gt,v.primary.main,.62)),he(v.Slider,"secondaryTrack",I(gt,v.secondary.main,.62)),he(v.Slider,"errorTrack",I(gt,v.error.main,.62)),he(v.Slider,"infoTrack",I(gt,v.info.main,.62)),he(v.Slider,"successTrack",I(gt,v.success.main,.62)),he(v.Slider,"warningTrack",I(gt,v.warning.main,.62));const A=S?I(mt,v.background.default,.6825):Za(v.background.default,.8);he(v.SnackbarContent,"bg",A),he(v.SnackbarContent,"color",tr(()=>S?Zu.text.primary:v.getContrastText(A))),he(v.SpeedDialAction,"fabHoverBg",Za(v.background.paper,.15)),he(v.StepConnector,"border",L("palette-grey-400")),he(v.StepContent,"border",L("palette-grey-400")),he(v.Switch,"defaultColor",L("palette-common-white")),he(v.Switch,"defaultDisabledColor",L("palette-grey-100")),he(v.Switch,"primaryDisabledColor",I(gt,v.primary.main,.62)),he(v.Switch,"secondaryDisabledColor",I(gt,v.secondary.main,.62)),he(v.Switch,"errorDisabledColor",I(gt,v.error.main,.62)),he(v.Switch,"infoDisabledColor",I(gt,v.info.main,.62)),he(v.Switch,"successDisabledColor",I(gt,v.success.main,.62)),he(v.Switch,"warningDisabledColor",I(gt,v.warning.main,.62)),he(v.TableCell,"border",I(gt,I(to,v.divider,1),.88)),he(v.Tooltip,"bg",I(to,v.grey[700],.92))}if(v.mode==="dark"){he(v.Alert,"errorColor",I(gt,v.error.light,.6)),he(v.Alert,"infoColor",I(gt,v.info.light,.6)),he(v.Alert,"successColor",I(gt,v.success.light,.6)),he(v.Alert,"warningColor",I(gt,v.warning.light,.6)),he(v.Alert,"errorFilledBg",L("palette-error-dark")),he(v.Alert,"infoFilledBg",L("palette-info-dark")),he(v.Alert,"successFilledBg",L("palette-success-dark")),he(v.Alert,"warningFilledBg",L("palette-warning-dark")),he(v.Alert,"errorFilledColor",tr(()=>v.getContrastText(v.error.dark))),he(v.Alert,"infoFilledColor",tr(()=>v.getContrastText(v.info.dark))),he(v.Alert,"successFilledColor",tr(()=>v.getContrastText(v.success.dark))),he(v.Alert,"warningFilledColor",tr(()=>v.getContrastText(v.warning.dark))),he(v.Alert,"errorStandardBg",I(mt,v.error.light,.9)),he(v.Alert,"infoStandardBg",I(mt,v.info.light,.9)),he(v.Alert,"successStandardBg",I(mt,v.success.light,.9)),he(v.Alert,"warningStandardBg",I(mt,v.warning.light,.9)),he(v.Alert,"errorIconColor",L("palette-error-main")),he(v.Alert,"infoIconColor",L("palette-info-main")),he(v.Alert,"successIconColor",L("palette-success-main")),he(v.Alert,"warningIconColor",L("palette-warning-main")),he(v.AppBar,"defaultBg",L("palette-grey-900")),he(v.AppBar,"darkBg",L("palette-background-paper")),he(v.AppBar,"darkColor",L("palette-text-primary")),he(v.Avatar,"defaultBg",L("palette-grey-600")),he(v.Button,"inheritContainedBg",L("palette-grey-800")),he(v.Button,"inheritContainedHoverBg",L("palette-grey-700")),he(v.Chip,"defaultBorder",L("palette-grey-700")),he(v.Chip,"defaultAvatarColor",L("palette-grey-300")),he(v.Chip,"defaultIconColor",L("palette-grey-300")),he(v.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(v.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(v.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(v.LinearProgress,"primaryBg",I(mt,v.primary.main,.5)),he(v.LinearProgress,"secondaryBg",I(mt,v.secondary.main,.5)),he(v.LinearProgress,"errorBg",I(mt,v.error.main,.5)),he(v.LinearProgress,"infoBg",I(mt,v.info.main,.5)),he(v.LinearProgress,"successBg",I(mt,v.success.main,.5)),he(v.LinearProgress,"warningBg",I(mt,v.warning.main,.5)),he(v.Skeleton,"bg",S?I(to,v.text.primary,.13):`rgba(${L("palette-text-primaryChannel")} / 0.13)`),he(v.Slider,"primaryTrack",I(mt,v.primary.main,.5)),he(v.Slider,"secondaryTrack",I(mt,v.secondary.main,.5)),he(v.Slider,"errorTrack",I(mt,v.error.main,.5)),he(v.Slider,"infoTrack",I(mt,v.info.main,.5)),he(v.Slider,"successTrack",I(mt,v.success.main,.5)),he(v.Slider,"warningTrack",I(mt,v.warning.main,.5));const A=S?I(gt,v.background.default,.985):Za(v.background.default,.98);he(v.SnackbarContent,"bg",A),he(v.SnackbarContent,"color",tr(()=>S?Jm.text.primary:v.getContrastText(A))),he(v.SpeedDialAction,"fabHoverBg",Za(v.background.paper,.15)),he(v.StepConnector,"border",L("palette-grey-600")),he(v.StepContent,"border",L("palette-grey-600")),he(v.Switch,"defaultColor",L("palette-grey-300")),he(v.Switch,"defaultDisabledColor",L("palette-grey-600")),he(v.Switch,"primaryDisabledColor",I(mt,v.primary.main,.55)),he(v.Switch,"secondaryDisabledColor",I(mt,v.secondary.main,.55)),he(v.Switch,"errorDisabledColor",I(mt,v.error.main,.55)),he(v.Switch,"infoDisabledColor",I(mt,v.info.main,.55)),he(v.Switch,"successDisabledColor",I(mt,v.success.main,.55)),he(v.Switch,"warningDisabledColor",I(mt,v.warning.main,.55)),he(v.TableCell,"border",I(mt,I(to,v.divider,1),.68)),he(v.Tooltip,"bg",I(to,v.grey[700],.92))}yr(v.background,"default"),yr(v.background,"paper"),yr(v.common,"background"),yr(v.common,"onBackground"),yr(v,"divider"),Object.keys(v).forEach(A=>{const M=v[A];A!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&he(v[A],"mainChannel",Qi(Xi(M.main))),M.light&&he(v[A],"lightChannel",Qi(Xi(M.light))),M.dark&&he(v[A],"darkChannel",Qi(Xi(M.dark))),M.contrastText&&he(v[A],"contrastTextChannel",Qi(Xi(M.contrastText))),A==="text"&&(yr(v[A],"primary"),yr(v[A],"secondary")),A==="action"&&(M.active&&yr(v[A],"active"),M.selected&&yr(v[A],"selected")))})}),T=t.reduce((N,v)=>tn(N,v),T);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:pE(T),enableContrastVars:a},{vars:F,generateThemeVars:B,generateStyleSheets:R}=V2(T,O);return T.vars=F,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([N,v])=>{T[N]=v}),T.generateThemeVars=B,T.generateStyleSheets=R,T.generateSpacing=function(){return dt.createSpacing(c.spacing,zc(this))},T.getColorSchemeSelector=q2(l),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=s,T.unstable_sxConfig={...La,...c?.unstable_sxConfig},T.unstable_sx=function(v){return oi({sx:v,theme:this})},T.toRuntimeSource=o0,T}function Up(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:qc({...n===!0?{}:n.palette,mode:t})})}function s0(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],u={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Ju(e,...t);let c=n;"palette"in e||u[s]&&(u[s]!==!0?c=u[s].palette:s==="dark"&&(c={mode:"dark"}));const p=Ju({...e,palette:c},...t);return p.defaultColorScheme=s,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light={...u.light!==!0&&u.light,palette:p.palette},Up(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},Up(p,"light",u.light)),p}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),gE({...a,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const El=s0(),hi="$$material";function Gr(){const e=dt.useTheme(El);return e[hi]||e}function bE(e){return d.jsx(dt.GlobalStyles,{...e,defaultTheme:El,themeId:hi})}function yE(e){const{variants:t,...n}=e,r={variants:t,style:fo(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=fo(o.style))}),r}const xE=Yc();function Yr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function uo(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function EE(e){return e?(t,n)=>n[e]:null}function CE(e,t,n){e.theme=SE(e.theme)?n:e.theme[t]||e.theme}function hs(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>hs(e,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?uo(r.style,n):r.style;else{const{variants:i,...a}=r;o=n?uo(fo(a),n):a}return l0(e,r.variants,[o],n)}return r?.isProcessed?n?uo(fo(r.style),n):r.style:n?uo(fo(r),n):r}function l0(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?uo(fo(a.style(o)),r):a.style(o))):n.push(r?uo(fo(a.style),r):a.style)}return n}function TE(e={}){const{themeId:t,defaultTheme:n=xE,rootShouldForwardProp:r=Yr,slotShouldForwardProp:o=Yr}=e;function i(s){CE(s,t,n)}return(s,l={})=>{w2(s,T=>T.filter(O=>O!==oi));const{name:u,slot:c,skipVariantsResolver:p,skipSx:h,overridesResolver:f=EE(DE(c)),...m}=l,g=u&&u.startsWith("Mui")||c?"components":"custom",y=p!==void 0?p:c&&c!=="Root"&&c!=="root"||!1,x=h||!1;let E=Yr;c==="Root"||c==="root"?E=r:c?E=o:kE(s)&&(E=void 0);const C=D2(s,{shouldForwardProp:E,label:vE(),...m}),S=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(F){return hs(F,T,F.theme.modularCssLayers?g:void 0)};if(lr(T)){const O=yE(T);return function(B){return O.variants?hs(B,O,B.theme.modularCssLayers?g:void 0):B.theme.modularCssLayers?uo(O.style,g):O.style}}return T},k=(...T)=>{const O=[],F=T.map(S),B=[];if(O.push(i),u&&f&&B.push(function(L){const A=L.theme.components?.[u]?.styleOverrides;if(!A)return null;const M={};for(const V in A)M[V]=hs(L,A[V],L.theme.modularCssLayers?"theme":void 0);return f(L,M)}),u&&!y&&B.push(function(L){const A=L.theme?.components?.[u]?.variants;return A?l0(L,A,[],L.theme.modularCssLayers?"theme":void 0):null}),x||B.push(oi),Array.isArray(F[0])){const v=F.shift(),L=new Array(O.length).fill(""),I=new Array(B.length).fill("");let A;A=[...L,...v,...I],A.raw=[...L,...v.raw,...I],O.unshift(A)}const R=[...O,...F,...B],N=C(...R);return s.muiName&&(N.muiName=s.muiName),N};return C.withConfig&&(k.withConfig=C.withConfig),k}}function vE(e,t){return void 0}function SE(e){for(const t in e)return!1;return!0}function kE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function DE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function u0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dn=e=>u0(e)&&e!=="classes",oe=TE({themeId:hi,defaultTheme:El,rootShouldForwardProp:dn});function wE(e){return function(n){return d.jsx(bE,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function IE(){return a2}const Ze=dt.unstable_memoTheme;function Ke(e){return M2(e)}function Me(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=_e(e,o,n)}),r}function AE(e){return _e("MuiSvgIcon",e)}Me("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const PE=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${ke(t)}`,`fontSize${ke(n)}`]};return Ne(o,AE,r)},RE=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ke(n.color)}`],t[`fontSize${ke(n.fontSize)}`]]}})(Ze(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Hs=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:p,viewBox:h="0 0 24 24",...f}=r,m=D.isValidElement(o)&&o.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:h,hasSvgAsChild:m},y={};c||(y.viewBox=h);const x=PE(g);return d.jsxs(RE,{as:s,className:Ae(x.root,i),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...y,...f,...m&&o.props,ownerState:g,children:[m?o.props.children:o,p?d.jsx("title",{children:p}):null]})});Hs.muiName="SvgIcon";function lt(e,t){function n(r,o){return d.jsx(Hs,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Hs.muiName,D.memo(D.forwardRef(n))}function c0(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function ms(e,t){return D.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Ut(e){return e&&e.ownerDocument||document}function wr(e){return Ut(e).defaultView||window}function tc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function kn(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=D.useRef(t!==void 0),[a,s]=D.useState(n),l=i?t:a,u=D.useCallback(c=>{i||s(c)},[]);return[l,u]}function Pe(e){const t=D.useRef(e);return qt(()=>{t.current=e}),D.useRef((...n)=>(0,t.current)(...n)).current}function rt(...e){const t=D.useRef(void 0),n=D.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return D.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function ME(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function d0(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(u=>{ME(u,s[u])&&typeof a[u]=="function"&&(l[u]=(...c)=>{a[u](...c),s[u](...c)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,u=Ae(a?.className,s?.className,l?.className),c=n(l,s);return{...s,...l,...c,...!!u&&{className:u},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),i=Ae(r?.className,e?.className);return{...t,...e,...o,...!!i&&{className:i},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const Kc=lt(d.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Bo=dt.createStack({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ke({props:e,name:"MuiStack"})});class Xo{constructor(t,n){this.workbookData=n,this.workbookStorage=t,this.workbookData?this.isSaved=!0:(this.workbookData={models:[],cells:[],workbookPath:void 0},this.isSaved=!1)}isSaved;workbookStorage;getWorkbookData(){return this.workbookData}getWorkbookPath(){return this.workbookData.workbookPath}async renameWorkbook(t){if(this.workbookData.workbookPath.path!==t)try{await this.workbookStorage.moveWorkbook(this.workbookData.workbookPath,{path:t,workspace:this.workbookData.workbookPath.workspace})}catch{}return this.workbookData.workbookPath.path=t,this.isSaved=!1,await this.saveWorkbook()}getCells(){return this.workbookData.cells}deleteCell(t){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),...this.workbookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.workbookData.cells=[...this.workbookData.cells.slice(0,t),n,...this.workbookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.workbookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.workbookData.models=t,this.isSaved=!1,this}getModels(){return this.workbookData.models}updateWorkbookData(t){return this.workbookData=t,this.isSaved=!1,this}async saveWorkbook(){if(!this.isSaved){if(!this.workbookData.workbookPath)throw new Error("Workbook path is not set");await this.workbookStorage.saveWorkbook(this.workbookData.workbookPath,JSON.stringify(this.workbookData)),this.isSaved=!0}return new Xo(this.workbookStorage,this.workbookData)}toMalloyWorkbook(){return this.workbookData.cells.map(t=>t.isMarkdown?`>>>markdown
17
+ `+t.value:`>>>malloy
18
+ import {${t.sourceName}}" from '${t.modelPath}'"
19
+ `+t.value+`
20
+ `).join(`
21
+ `)}static newWorkbook(t){return new Xo(t,void 0)}static async loadWorkbook(t,n){let r;try{const o=await t.getWorkbook(n);o&&(r=JSON.parse(o))}catch{r={models:[],cells:[],workbookPath:n}}return new Xo(t,r)}}const ho={teal:"#14b3cb",orange:"#e47404",darkBlue:"#1474a4"},OE='"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace',Us=P.styled(P.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),p0=P.styled(P.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),Gc=P.styled(P.CardMedia)({padding:"0"}),LE=P.styled("div")({backgroundColor:"#ffffff",padding:"0 8px 0px 8px",borderRadius:"12px",boxShadow:"none",border:"none",maxWidth:"1200px",margin:"0 auto"});P.styled("div")({marginBottom:"40px",paddingBottom:"24px",borderBottom:"1px solid #f0f0f0"});const NE=P.styled("div")({marginBottom:"48px",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),nc=P.styled("div")({marginBottom:"0",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),gs=P.styled("div")({backgroundColor:"transparent",paddingTop:"12px",paddingBottom:"2px",borderRadius:"8px",border:"none",boxShadow:"none",marginBottom:"0"});P.styled("div")({backgroundColor:"#f8f9fa",padding:"16px",borderRadius:"8px",border:"1px solid #e9ecef",fontFamily:"'Monaco', 'Menlo', 'Ubuntu Mono', monospace",fontSize:"13px",lineHeight:"1.5",overflowX:"auto"});P.styled("div")({backgroundColor:"#f8f9fa",padding:"12px 16px",borderRadius:"8px",border:"1px solid #e9ecef",marginBottom:"16px",display:"flex",justifyContent:"space-between",alignItems:"center"});const FE=P.styled("div")({height:"100%"});P.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const f0=P.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});P.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const h0=P.styled(P.Card)({backgroundColor:"#ffffff",padding:"24px",borderRadius:"8px",border:"1px solid #f0f0f0",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.04)",height:"100%",transition:"box-shadow 0.2s ease-in-out","&:hover":{boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)"}}),m0=P.styled(P.CardContent)({padding:"0","&:last-child":{paddingBottom:"0"}}),g0=P.styled("div")(({theme:e})=>({fontSize:"0.875rem",fontWeight:500,color:e.palette.text.secondary,marginBottom:"16px",paddingBottom:"8px",borderBottom:`1px solid ${e.palette.divider}`}));P.styled("div")({padding:"32px",maxWidth:"1400px",margin:"0 auto",minHeight:"100vh"});const Ja=lt(d.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),b0=lt(d.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),zp=lt(d.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"})),Qc=lt(d.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(null,arguments)}function $e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function rc(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(o,r).trim();(a||!i)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function Cl(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _E=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jE={};function Vp(e,t){return(jE.jsx?BE:_E).test(e)}const $E=/[ \t\n\f\r]/g;function Xc(e){return typeof e=="object"?e.type==="text"?Wp(e.value):!1:Wp(e)}function Wp(e){return e.replace($E,"")===""}let Na=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Na.prototype.normal={};Na.prototype.property={};Na.prototype.space=void 0;function y0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Na(n,r,t)}function xa(e){return e.toLowerCase()}let xn=class{constructor(t,n){this.attribute=n,this.property=t}};xn.prototype.attribute="";xn.prototype.booleanish=!1;xn.prototype.boolean=!1;xn.prototype.commaOrSpaceSeparated=!1;xn.prototype.commaSeparated=!1;xn.prototype.defined=!1;xn.prototype.mustUseProperty=!1;xn.prototype.number=!1;xn.prototype.overloadedBoolean=!1;xn.prototype.property="";xn.prototype.spaceSeparated=!1;xn.prototype.space=void 0;let HE=0;const Qe=Do(),$t=Do(),oc=Do(),we=Do(),vt=Do(),Zo=Do(),En=Do();function Do(){return 2**++HE}const ic=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qe,booleanish:$t,commaOrSpaceSeparated:En,commaSeparated:Zo,number:we,overloadedBoolean:oc,spaceSeparated:vt},Symbol.toStringTag,{value:"Module"})),lu=Object.keys(ic);let Zc=class extends xn{constructor(t,n,r,o){let i=-1;if(super(t,n),qp(this,"space",o),typeof r=="number")for(;++i<lu.length;){const a=lu[i];qp(this,lu[i],(r&ic[a])===ic[a])}}};Zc.prototype.defined=!0;function qp(e,t,n){n&&(e[t]=n)}function mi(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Zc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[xa(r)]=r,n[xa(i.attribute)]=r}return new Na(t,n,e.space)}const x0=mi({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:vt,ariaCurrent:null,ariaDescribedBy:vt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:vt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:vt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vt,ariaLevel:we,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:vt,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:vt,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:$t,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E0(e,t){return t in e?e[t]:t}function C0(e,t){return E0(e,t.toLowerCase())}const UE=mi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zo,acceptCharset:vt,accessKey:vt,action:null,allow:null,allowFullScreen:Qe,allowPaymentRequest:Qe,allowUserMedia:Qe,alt:null,as:null,async:Qe,autoCapitalize:null,autoComplete:vt,autoFocus:Qe,autoPlay:Qe,blocking:vt,capture:null,charSet:null,checked:Qe,cite:null,className:vt,cols:we,colSpan:null,content:null,contentEditable:$t,controls:Qe,controlsList:vt,coords:we|Zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qe,defer:Qe,dir:null,dirName:null,disabled:Qe,download:oc,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qe,formTarget:null,headers:vt,height:we,hidden:oc,high:we,href:null,hrefLang:null,htmlFor:vt,httpEquiv:vt,id:null,imageSizes:null,imageSrcSet:null,inert:Qe,inputMode:null,integrity:null,is:null,isMap:Qe,itemId:null,itemProp:vt,itemRef:vt,itemScope:Qe,itemType:vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qe,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:Qe,muted:Qe,name:null,nonce:null,noModule:Qe,noValidate:Qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qe,optimum:we,pattern:null,ping:vt,placeholder:null,playsInline:Qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qe,referrerPolicy:null,rel:vt,required:Qe,reversed:Qe,rows:we,rowSpan:we,sandbox:vt,scope:null,scoped:Qe,seamless:Qe,selected:Qe,shadowRootClonable:Qe,shadowRootDelegatesFocus:Qe,shadowRootMode:null,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Qe,useMap:null,value:$t,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vt,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qe,declare:Qe,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Qe,noHref:Qe,noShade:Qe,noWrap:Qe,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qe,disableRemotePlayback:Qe,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:C0}),zE=mi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:En,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zo,g2:Zo,glyphName:Zo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:we,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E0}),T0=mi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),v0=mi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:C0}),S0=mi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),VE={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"},WE=/[A-Z]/g,Yp=/-[a-z]/g,qE=/^data[-\w.:]+$/i;function Fa(e,t){const n=xa(t);let r=t,o=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qE.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Yp,KE);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Yp.test(i)){let a=i.replace(WE,YE);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Zc}return new o(r,t)}function YE(e){return"-"+e.toLowerCase()}function KE(e){return e.charAt(1).toUpperCase()}const gi=y0([x0,UE,T0,v0,S0],"html"),Qr=y0([x0,zE,T0,v0,S0],"svg");function ac(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Tl(e){return e.join(" ").trim()}var jo={},uu,Kp;function GE(){if(Kp)return uu;Kp=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
22
+ `,u="/",c="*",p="",h="comment",f="declaration";uu=function(g,y){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];y=y||{};var x=1,E=1;function C(L){var I=L.match(t);I&&(x+=I.length);var A=L.lastIndexOf(l);E=~A?L.length-A:E+L.length}function S(){var L={line:x,column:E};return function(I){return I.position=new k(L),F(),I}}function k(L){this.start=L,this.end={line:x,column:E},this.source=y.source}k.prototype.content=g;function T(L){var I=new Error(y.source+":"+x+":"+E+": "+L);if(I.reason=L,I.filename=y.source,I.line=x,I.column=E,I.source=g,!y.silent)throw I}function O(L){var I=L.exec(g);if(I){var A=I[0];return C(A),g=g.slice(A.length),I}}function F(){O(n)}function B(L){var I;for(L=L||[];I=R();)I!==!1&&L.push(I);return L}function R(){var L=S();if(!(u!=g.charAt(0)||c!=g.charAt(1))){for(var I=2;p!=g.charAt(I)&&(c!=g.charAt(I)||u!=g.charAt(I+1));)++I;if(I+=2,p===g.charAt(I-1))return T("End of comment missing");var A=g.slice(2,I-2);return E+=2,C(A),g=g.slice(I),E+=2,L({type:h,comment:A})}}function N(){var L=S(),I=O(r);if(I){if(R(),!O(o))return T("property missing ':'");var A=O(i),M=L({type:f,property:m(I[0].replace(e,p)),value:A?m(A[0].replace(e,p)):p});return O(a),M}}function v(){var L=[];B(L);for(var I;I=N();)I!==!1&&(L.push(I),B(L));return L}return F(),v()};function m(g){return g?g.replace(s,p):p}return uu}var Gp;function QE(){if(Gp)return jo;Gp=1;var e=jo&&jo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jo,"__esModule",{value:!0}),jo.default=n;var t=e(GE());function n(r,o){var i=null;if(!r||typeof r!="string")return i;var a=(0,t.default)(r),s=typeof o=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,c=l.value;s?o(u,c,l):c&&(i=i||{},i[u]=c)}}),i}return jo}var Mi={},Qp;function XE(){if(Qp)return Mi;Qp=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},a=function(u,c){return c.toUpperCase()},s=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),i(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(o,s):u=u.replace(r,s),u.replace(t,a))};return Mi.camelCase=l,Mi}var Oi,Xp;function ZE(){if(Xp)return Oi;Xp=1;var e=Oi&&Oi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(QE()),n=XE();function r(o,i){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(a[(0,n.camelCase)(s,i)]=l)}),a}return r.default=r,Oi=r,Oi}var JE=ZE();const eC=Xn(JE),vl=k0("end"),fr=k0("start");function k0(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function tC(e){const t=fr(e),n=vl(e);if(t&&n)return{start:t,end:n}}function ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zp(e.position):"start"in e||"end"in e?Zp(e):"line"in e||"column"in e?sc(e):""}function sc(e){return Jp(e&&e.line)+":"+Jp(e&&e.column)}function Zp(e){return sc(e&&e.start)+"-"+sc(e&&e.end)}function Jp(e){return e&&typeof e=="number"?e:1}class nn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=ta(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const Jc={}.hasOwnProperty,nC=new Map,rC=/[A-Z]/g,oC=new Set(["table","tbody","thead","tfoot","tr"]),iC=new Set(["td","th"]),D0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function aC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=hC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fC(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Qr:gi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=w0(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function w0(e,t,n){if(t.type==="element")return sC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cC(e,t,n);if(t.type==="mdxjsEsm")return uC(e,t);if(t.type==="root")return dC(e,t,n);if(t.type==="text")return pC(e,t)}function sC(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Qr,e.schema=o),e.ancestors.push(t);const i=A0(e,t.tagName,!1),a=mC(e,t);let s=td(e,t);return oC.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Xc(l):!0})),I0(e,a,i,t),ed(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function lC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ea(e,t.position)}function uC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ea(e,t.position)}function cC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Qr,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:A0(e,t.name,!0),a=gC(e,t),s=td(e,t);return I0(e,a,i,t),ed(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function dC(e,t,n){const r={};return ed(r,td(e,t)),e.create(t,e.Fragment,r,n)}function pC(e,t){return t.value}function I0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ed(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fC(e,t,n){return r;function r(o,i,a,s){const u=Array.isArray(a.children)?n:t;return s?u(i,a,s):u(i,a)}}function hC(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=fr(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function mC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Jc.call(t.properties,o)){const i=bC(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&iC.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function gC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ea(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Ea(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function td(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:nC;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=o.get(l)||0;a=l+"-"+u,o.set(l,u+1)}}const s=w0(e,i,a);s!==void 0&&n.push(s)}return n}function bC(e,t,n){const r=Fa(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cl(n):Tl(n)),r.property==="style"){let o=typeof n=="object"?n:yC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=xC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?VE[r.property]||r.property:r.attribute,n]}}function yC(e,t){try{return eC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new nn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=D0+"#cannot-parse-style-attribute",o}}function A0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Vp(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Vp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Jc.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ea(e)}function Ea(e,t){const n=new nn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=D0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xC(e){const t={};let n;for(n in e)Jc.call(e,n)&&(t[EC(n)]=e[n]);return t}function EC(e){let t=e.replace(rC,CC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CC(e){return"-"+e.toLowerCase()}const cu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},TC={};function nd(e,t){const n=TC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return P0(e,r,o)}function P0(e,t,n){if(vC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ef(e.children,t,n)}return Array.isArray(e)?ef(e,t,n):""}function ef(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=P0(e[o],t,n);return r.join("")}function vC(e){return!!(e&&typeof e=="object")}const tf=document.createElement("i");function rd(e){const t="&"+e+";";tf.innerHTML=t;const n=tf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Ln(e,t){return e.length>0?(Dn(e,e.length,0,t),e):t}const nf={}.hasOwnProperty;function R0(e){const t={};let n=-1;for(;++n<e.length;)SC(t,e[n]);return t}function SC(e,t){let n;for(n in t){const o=(nf.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){nf.call(o,a)||(o[a]=[]);const s=i[a];kC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function kC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dn(e,0,0,r)}function M0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const an=Xr(/[A-Za-z]/),en=Xr(/[\dA-Za-z]/),DC=Xr(/[#-'*+\--9=?A-Z^-~]/);function zs(e){return e!==null&&(e<32||e===127)}const lc=Xr(/\d/),wC=Xr(/[\dA-Fa-f]/),IC=Xr(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const Sl=Xr(/\p{P}|\p{S}/u),xo=Xr(/\s/);function Xr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function bi(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function ct(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return it(l)?(e.enter(n),s(l)):t(l)}function s(l){return it(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const AC={tokenize:PC};function PC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ct(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ue(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const RC={tokenize:MC},rf={tokenize:OC};function MC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(C){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(C)}return u(C)}function l(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const S=t.events.length;let k=S,T;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){T=t.events[k][1].end;break}x(r);let O=S;for(;O<t.events.length;)t.events[O][1].end={...T},O++;return Dn(t.events,k+1,0,t.events.slice(S)),t.events.length=O,u(C)}return s(C)}function u(C){if(r===n.length){if(!o)return h(C);if(o.currentConstruct&&o.currentConstruct.concrete)return m(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(rf,c,p)(C)}function c(C){return o&&E(),x(r),h(C)}function p(C){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(C)}function h(C){return t.containerState={},e.attempt(rf,f,m)(C)}function f(C){return r++,n.push([t.currentConstruct,t.containerState]),h(C)}function m(C){if(C===null){o&&E(),x(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),g(C)}function g(C){if(C===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return Ue(C)?(e.consume(C),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(C),g)}function y(C,S){const k=t.sliceStream(C);if(S&&k.push(null),C.previous=i,i&&(i.next=C),i=C,o.defineSkip(C.start),o.write(k),t.parser.lazy[C.start.line]){let T=o.events.length;for(;T--;)if(o.events[T][1].start.offset<a&&(!o.events[T][1].end||o.events[T][1].end.offset>a))return;const O=t.events.length;let F=O,B,R;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(B){R=t.events[F][1].end;break}B=!0}for(x(r),T=O;T<t.events.length;)t.events[T][1].end={...R},T++;Dn(t.events,F+1,0,t.events.slice(O)),t.events.length=T}}function x(C){let S=n.length;for(;S-- >C;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=C}function E(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function OC(e,t,n){return ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ii(e){if(e===null||Ct(e)||xo(e))return 1;if(Sl(e))return 2}function kl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const uc={name:"attention",resolveAll:LC,tokenize:NC};function LC(e,t){let n=-1,r,o,i,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},h={...e[n][1].start};of(p,-l),of(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ln(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ln(u,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Ln(u,kl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ln(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Ln(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Dn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function NC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ii(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const u=e.exit("attentionSequence"),c=ii(l),p=!c||c===2&&o||n.includes(l),h=!o||o===2&&c||n.includes(r);return u._open=!!(i===42?p:p&&(o||!h)),u._close=!!(i===42?h:h&&(c||!p)),t(l)}}function of(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const FC={name:"autolink",tokenize:_C};function _C(e,t,n){let r=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return an(f)?(e.consume(f),a):f===64?n(f):u(f)}function a(f){return f===43||f===45||f===46||en(f)?(r=1,s(f)):u(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||en(f))&&r++<32?(e.consume(f),s):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zs(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):DC(f)?(e.consume(f),u):n(f)}function c(f){return en(f)?p(f):n(f)}function p(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||en(f))&&r++<63){const m=f===45?h:p;return e.consume(f),m}return n(f)}}const _a={partial:!0,tokenize:BC};function BC(e,t,n){return r;function r(i){return it(i)?ct(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ue(i)?t(i):n(i)}}const O0={continuation:{tokenize:$C},exit:HC,name:"blockQuote",tokenize:jC};function jC(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return it(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function $C(e,t,n){const r=this;return o;function o(a){return it(a)?ct(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(O0,t,n)(a)}}function HC(e){e.exit("blockQuote")}const L0={name:"characterEscape",tokenize:UC};function UC(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return IC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const N0={name:"characterReference",tokenize:zC};function zC(e,t,n){const r=this;let o=0,i,a;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),l}function l(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=en,c(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=wC,c):(e.enter("characterReferenceValue"),i=7,a=lc,c(p))}function c(p){if(p===59&&o){const h=e.exit("characterReferenceValue");return a===en&&!rd(r.sliceSerialize(h))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&o++<i?(e.consume(p),c):n(p)}}const af={partial:!0,tokenize:WC},sf={concrete:!0,name:"codeFenced",tokenize:VC};function VC(e,t,n){const r=this,o={partial:!0,tokenize:k};let i=0,a=0,s;return l;function l(T){return u(T)}function u(T){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(T)}function c(T){return T===s?(a++,e.consume(T),c):a<3?n(T):(e.exit("codeFencedFenceSequence"),it(T)?ct(e,p,"whitespace")(T):p(T))}function p(T){return T===null||Ue(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(af,g,S)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===null||Ue(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(T)):it(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,f,"whitespace")(T)):T===96&&T===s?n(T):(e.consume(T),h)}function f(T){return T===null||Ue(T)?p(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||Ue(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(T)):T===96&&T===s?n(T):(e.consume(T),m)}function g(T){return e.attempt(o,S,y)(T)}function y(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),x}function x(T){return i>0&&it(T)?ct(e,E,"linePrefix",i+1)(T):E(T)}function E(T){return T===null||Ue(T)?e.check(af,g,S)(T):(e.enter("codeFlowValue"),C(T))}function C(T){return T===null||Ue(T)?(e.exit("codeFlowValue"),E(T)):(e.consume(T),C)}function S(T){return e.exit("codeFenced"),t(T)}function k(T,O,F){let B=0;return R;function R(A){return T.enter("lineEnding"),T.consume(A),T.exit("lineEnding"),N}function N(A){return T.enter("codeFencedFence"),it(A)?ct(T,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===s?(T.enter("codeFencedFenceSequence"),L(A)):F(A)}function L(A){return A===s?(B++,T.consume(A),L):B>=a?(T.exit("codeFencedFenceSequence"),it(A)?ct(T,I,"whitespace")(A):I(A)):F(A)}function I(A){return A===null||Ue(A)?(T.exit("codeFencedFence"),O(A)):F(A)}}}function WC(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const du={name:"codeIndented",tokenize:YC},qC={partial:!0,tokenize:KC};function YC(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),ct(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):Ue(u)?e.attempt(qC,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||Ue(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function KC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):ct(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ue(a)?o(a):n(a)}}const GC={name:"codeText",previous:XC,resolve:QC,tokenize:ZC};function QC(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function XC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ZC(e,t,n){let r=0,o,i;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),s(p)}function s(p){return p===96?(e.consume(p),r++,s):(e.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),l):p===96?(i=e.enter("codeTextSequence"),o=0,c(p)):Ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||Ue(p)?(e.exit("codeTextData"),l(p)):(e.consume(p),u)}function c(p){return p===96?(e.consume(p),o++,c):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",u(p))}}class JC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Li(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Li(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Li(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Li(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Li(this.left,n.reverse())}}}function Li(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function F0(e){const t={};let n=-1,r,o,i,a,s,l,u;const c=new JC(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,eT(c,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=c.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(c.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...c.get(o)[1].start},s=c.slice(o,n),s.unshift(r),c.splice(o,n-o+1,s))}}return Dn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function eT(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let c,p,h=-1,f=n,m=0,g=0;const y=[g];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),p&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(g=h+1,y.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),h=y.length;h--;){const x=s.slice(y[h],y[h+1]),E=i.pop();l.push([E,E+x.length-1]),e.splice(E,2,x)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const tT={resolve:rT,tokenize:oT},nT={partial:!0,tokenize:iT};function rT(e){return F0(e),e}function oT(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):Ue(s)?e.check(nT,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function iT(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ct(e,i,"linePrefix")}function i(a){if(a===null||Ue(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function _0(e,t,n,r,o,i,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return p;function p(x){return x===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(x),e.exit(i),h):x===null||x===32||x===41||zs(x)?n(x):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(x))}function h(x){return x===62?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===62?(e.exit("chunkString"),e.exit(s),h(x)):x===null||x===60||Ue(x)?n(x):(e.consume(x),x===92?m:f)}function m(x){return x===60||x===62||x===92?(e.consume(x),f):f(x)}function g(x){return!c&&(x===null||x===41||Ct(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(x)):c<u&&x===40?(e.consume(x),c++,g):x===41?(e.consume(x),c--,g):x===null||x===32||x===40||zs(x)?n(x):(e.consume(x),x===92?y:g)}function y(x){return x===40||x===41||x===92?(e.consume(x),g):g(x)}}function B0(e,t,n,r,o,i){const a=this;let s=0,l;return u;function u(f){return e.enter(r),e.enter(o),e.consume(f),e.exit(o),e.enter(i),c}function c(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):Ue(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||Ue(f)||s++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!it(f)),f===92?h:p)}function h(f){return f===91||f===92||f===93?(e.consume(f),s++,p):p(f)}}function j0(e,t,n,r,o,i){let a;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===a?(e.exit(i),l(a)):h===null?n(h):Ue(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ct(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===a||h===null||Ue(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?p:c)}function p(h){return h===a||h===92?(e.consume(h),c):c(h)}}function na(e,t){let n;return r;function r(o){return Ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):it(o)?ct(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const aT={name:"definition",tokenize:lT},sT={partial:!0,tokenize:uT};function lT(e,t,n){const r=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return B0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Ct(f)?na(e,u)(f):u(f)}function u(f){return _0(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(sT,p,p)(f)}function p(f){return it(f)?ct(e,h,"whitespace")(f):h(f)}function h(f){return f===null||Ue(f)?(e.exit("definition"),r.parser.defined.push(o),t(f)):n(f)}}function uT(e,t,n){return r;function r(s){return Ct(s)?na(e,o)(s):n(s)}function o(s){return j0(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return it(s)?ct(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ue(s)?t(s):n(s)}}const cT={name:"hardBreakEscape",tokenize:dT};function dT(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ue(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const pT={name:"headingAtx",resolve:fT,tokenize:hT};function fT(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function hT(e,t,n){let r=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Ct(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||Ue(c)?(e.exit("atxHeading"),t(c)):it(c)?ct(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Ct(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const mT=["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"],lf=["pre","script","style","textarea"],gT={concrete:!0,name:"htmlFlow",resolveTo:xT,tokenize:ET},bT={partial:!0,tokenize:TT},yT={partial:!0,tokenize:CT};function xT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ET(e,t,n){const r=this;let o,i,a,s,l;return u;function u(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),p}function p(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),i=!0,g):_===63?(e.consume(_),o=3,r.interrupt?t:w):an(_)?(e.consume(_),a=String.fromCharCode(_),y):n(_)}function h(_){return _===45?(e.consume(_),o=2,f):_===91?(e.consume(_),o=5,s=0,m):an(_)?(e.consume(_),o=4,r.interrupt?t:w):n(_)}function f(_){return _===45?(e.consume(_),r.interrupt?t:w):n(_)}function m(_){const ae="CDATA[";return _===ae.charCodeAt(s++)?(e.consume(_),s===ae.length?r.interrupt?t:v:m):n(_)}function g(_){return an(_)?(e.consume(_),a=String.fromCharCode(_),y):n(_)}function y(_){if(_===null||_===47||_===62||Ct(_)){const ae=_===47,X=a.toLowerCase();return!ae&&!i&&lf.includes(X)?(o=1,r.interrupt?t(_):v(_)):mT.includes(a.toLowerCase())?(o=6,ae?(e.consume(_),x):r.interrupt?t(_):v(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?E(_):C(_))}return _===45||en(_)?(e.consume(_),a+=String.fromCharCode(_),y):n(_)}function x(_){return _===62?(e.consume(_),r.interrupt?t:v):n(_)}function E(_){return it(_)?(e.consume(_),E):R(_)}function C(_){return _===47?(e.consume(_),R):_===58||_===95||an(_)?(e.consume(_),S):it(_)?(e.consume(_),C):R(_)}function S(_){return _===45||_===46||_===58||_===95||en(_)?(e.consume(_),S):k(_)}function k(_){return _===61?(e.consume(_),T):it(_)?(e.consume(_),k):C(_)}function T(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,O):it(_)?(e.consume(_),T):F(_)}function O(_){return _===l?(e.consume(_),l=null,B):_===null||Ue(_)?n(_):(e.consume(_),O)}function F(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Ct(_)?k(_):(e.consume(_),F)}function B(_){return _===47||_===62||it(_)?C(_):n(_)}function R(_){return _===62?(e.consume(_),N):n(_)}function N(_){return _===null||Ue(_)?v(_):it(_)?(e.consume(_),N):n(_)}function v(_){return _===45&&o===2?(e.consume(_),M):_===60&&o===1?(e.consume(_),V):_===62&&o===4?(e.consume(_),G):_===63&&o===3?(e.consume(_),w):_===93&&o===5?(e.consume(_),H):Ue(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(bT,re,L)(_)):_===null||Ue(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),v)}function L(_){return e.check(yT,I,re)(_)}function I(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),A}function A(_){return _===null||Ue(_)?L(_):(e.enter("htmlFlowData"),v(_))}function M(_){return _===45?(e.consume(_),w):v(_)}function V(_){return _===47?(e.consume(_),a="",W):v(_)}function W(_){if(_===62){const ae=a.toLowerCase();return lf.includes(ae)?(e.consume(_),G):v(_)}return an(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),W):v(_)}function H(_){return _===93?(e.consume(_),w):v(_)}function w(_){return _===62?(e.consume(_),G):_===45&&o===2?(e.consume(_),w):v(_)}function G(_){return _===null||Ue(_)?(e.exit("htmlFlowData"),re(_)):(e.consume(_),G)}function re(_){return e.exit("htmlFlow"),t(_)}}function CT(e,t,n){const r=this;return o;function o(a){return Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function TT(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(_a,t,n)}}const vT={name:"htmlText",tokenize:ST};function ST(e,t,n){const r=this;let o,i,a;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),k):w===63?(e.consume(w),C):an(w)?(e.consume(w),F):n(w)}function u(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),i=0,m):an(w)?(e.consume(w),E):n(w)}function c(w){return w===45?(e.consume(w),f):n(w)}function p(w){return w===null?n(w):w===45?(e.consume(w),h):Ue(w)?(a=p,V(w)):(e.consume(w),p)}function h(w){return w===45?(e.consume(w),f):p(w)}function f(w){return w===62?M(w):w===45?h(w):p(w)}function m(w){const G="CDATA[";return w===G.charCodeAt(i++)?(e.consume(w),i===G.length?g:m):n(w)}function g(w){return w===null?n(w):w===93?(e.consume(w),y):Ue(w)?(a=g,V(w)):(e.consume(w),g)}function y(w){return w===93?(e.consume(w),x):g(w)}function x(w){return w===62?M(w):w===93?(e.consume(w),x):g(w)}function E(w){return w===null||w===62?M(w):Ue(w)?(a=E,V(w)):(e.consume(w),E)}function C(w){return w===null?n(w):w===63?(e.consume(w),S):Ue(w)?(a=C,V(w)):(e.consume(w),C)}function S(w){return w===62?M(w):C(w)}function k(w){return an(w)?(e.consume(w),T):n(w)}function T(w){return w===45||en(w)?(e.consume(w),T):O(w)}function O(w){return Ue(w)?(a=O,V(w)):it(w)?(e.consume(w),O):M(w)}function F(w){return w===45||en(w)?(e.consume(w),F):w===47||w===62||Ct(w)?B(w):n(w)}function B(w){return w===47?(e.consume(w),M):w===58||w===95||an(w)?(e.consume(w),R):Ue(w)?(a=B,V(w)):it(w)?(e.consume(w),B):M(w)}function R(w){return w===45||w===46||w===58||w===95||en(w)?(e.consume(w),R):N(w)}function N(w){return w===61?(e.consume(w),v):Ue(w)?(a=N,V(w)):it(w)?(e.consume(w),N):B(w)}function v(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,L):Ue(w)?(a=v,V(w)):it(w)?(e.consume(w),v):(e.consume(w),I)}function L(w){return w===o?(e.consume(w),o=void 0,A):w===null?n(w):Ue(w)?(a=L,V(w)):(e.consume(w),L)}function I(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ct(w)?B(w):(e.consume(w),I)}function A(w){return w===47||w===62||Ct(w)?B(w):n(w)}function M(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function V(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),W}function W(w){return it(w)?ct(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):H(w)}function H(w){return e.enter("htmlTextData"),a(w)}}const od={name:"labelEnd",resolveAll:IT,resolveTo:AT,tokenize:PT},kT={tokenize:RT},DT={tokenize:MT},wT={tokenize:OT};function IT(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Dn(e,0,e.length,n),e}function AT(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Ln(s,e.slice(i+1,i+r+3)),s=Ln(s,[["enter",c,t]]),s=Ln(s,kl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Ln(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Ln(s,e.slice(a+1)),s=Ln(s,[["exit",l,t]]),Dn(e,i,e.length,s),e}function PT(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(h){return i?i._inactive?p(h):(a=r.parser.defined.includes(Qn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(kT,c,a?c:p)(h):h===91?e.attempt(DT,c,a?u:p)(h):a?c(h):p(h)}function u(h){return e.attempt(wT,c,p)(h)}function c(h){return t(h)}function p(h){return i._balanced=!0,n(h)}}function RT(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return Ct(p)?na(e,i)(p):i(p)}function i(p){return p===41?c(p):_0(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Ct(p)?na(e,l)(p):c(p)}function s(p){return n(p)}function l(p){return p===34||p===39||p===40?j0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):c(p)}function u(p){return Ct(p)?na(e,c)(p):c(p)}function c(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function MT(e,t,n){const r=this;return o;function o(s){return B0.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function OT(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const LT={name:"labelStartImage",resolveAll:od.resolveAll,tokenize:NT};function NT(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const FT={name:"labelStartLink",resolveAll:od.resolveAll,tokenize:_T};function _T(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const pu={name:"lineEnding",tokenize:BT};function BT(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ct(e,t,"linePrefix")}}const bs={name:"thematicBreak",tokenize:jT};function jT(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Ue(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),it(u)?ct(e,s,"whitespace")(u):s(u))}}const fn={continuation:{tokenize:zT},exit:WT,name:"list",tokenize:UT},$T={partial:!0,tokenize:qT},HT={partial:!0,tokenize:VT};function UT(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(f){const m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:lc(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(bs,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return lc(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(_a,r.interrupt?n:c,e.attempt($T,h,p))}function c(f){return r.containerState.initialBlankLine=!0,i++,h(f)}function p(f){return it(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function zT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_a,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ct(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!it(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(HT,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ct(e,e.attempt(fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function VT(e,t,n){const r=this;return ct(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function WT(e){e.exit(this.containerState.type)}function qT(e,t,n){const r=this;return ct(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!it(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const uf={name:"setextUnderline",resolveTo:YT,tokenize:KT};function YT(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function KT(e,t,n){const r=this;let o;return i;function i(u){let c=r.events.length,p;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){p=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),it(u)?ct(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ue(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const GT={tokenize:QT};function QT(e){const t=this,n=e.attempt(_a,r,e.attempt(this.parser.constructs.flowInitial,o,ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(tT,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const XT={resolveAll:H0()},ZT=$0("string"),JT=$0("text");function $0(e){return{resolveAll:H0(e==="text"?ev:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(c){return u(c)?i(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const p=o[c];let h=-1;if(p)for(;++h<p.length;){const f=p[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function H0(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function ev(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const u=o[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const tv={42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:O0},nv={91:aT},rv={[-2]:du,[-1]:du,32:du},ov={35:pT,42:bs,45:[uf,bs],60:gT,61:uf,95:bs,96:sf,126:sf},iv={38:N0,92:L0},av={[-5]:pu,[-4]:pu,[-3]:pu,33:LT,38:N0,42:uc,60:[FC,vT],91:FT,92:[cT,L0],93:od,95:uc,96:GC},sv={null:[uc,XT]},lv={null:[42,95]},uv={null:[]},cv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:lv,contentInitial:nv,disable:uv,document:tv,flow:ov,flowInitial:rv,insideSpan:sv,string:iv,text:av},Symbol.toStringTag,{value:"Module"}));function dv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:O(k),check:O(T),consume:E,enter:C,exit:S,interrupt:O(T,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:p};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function p(N){return a=Ln(a,N),y(),a[a.length-1]!==null?[]:(F(t,0),u.events=kl(i,u.events,u),u.events)}function h(N,v){return fv(f(N),v)}function f(N){return pv(a,N)}function m(){const{_bufferIndex:N,_index:v,line:L,column:I,offset:A}=r;return{_bufferIndex:N,_index:v,line:L,column:I,offset:A}}function g(N){o[N.line]=N.column,R()}function y(){let N;for(;r._index<a.length;){const v=a[r._index];if(typeof v=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<v.length;)x(v.charCodeAt(r._bufferIndex));else x(v)}}function x(N){c=c(N)}function E(N){Ue(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,R()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N}function C(N,v){const L=v||{};return L.type=N,L.start=m(),u.events.push(["enter",L,u]),s.push(L),L}function S(N){const v=s.pop();return v.end=m(),u.events.push(["exit",v,u]),v}function k(N,v){F(N,v.from)}function T(N,v){v.restore()}function O(N,v){return L;function L(I,A,M){let V,W,H,w;return Array.isArray(I)?re(I):"tokenize"in I?re([I]):G(I);function G(U){return J;function J(Q){const ne=Q!==null&&U[Q],Z=Q!==null&&U.null,Y=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return re(Y)(Q)}}function re(U){return V=U,W=0,U.length===0?M:_(U[W])}function _(U){return J;function J(Q){return w=B(),H=U,U.partial||(u.currentConstruct=U),U.name&&u.parser.constructs.disable.null.includes(U.name)?X():U.tokenize.call(v?Object.assign(Object.create(u),v):u,l,ae,X)(Q)}}function ae(U){return N(H,w),A}function X(U){return w.restore(),++W<V.length?_(V[W]):M}}}function F(N,v){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&Dn(u.events,v,u.events.length-v,N.resolve(u.events.slice(v),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function B(){const N=m(),v=u.previous,L=u.currentConstruct,I=u.events.length,A=Array.from(s);return{from:I,restore:M};function M(){r=N,u.previous=v,u.currentConstruct=L,u.events.length=I,s=A,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function pv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function fv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
23
+ `;break}case-3:{a=`\r
24
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function hv(e){const r={constructs:R0([cv,...(e||{}).extensions||[]]),content:o(AC),defined:[],document:o(RC),flow:o(GT),lazy:{},string:o(ZT),text:o(JT)};return r;function o(i){return a;function a(s){return dv(r,i,s)}}}function mv(e){for(;!F0(e););return e}const cf=/[\0\t\n\r]/g;function gv(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let u,c,p,h,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(cf.lastIndex=p,u=cf.exec(i),h=u&&u.index!==void 0?u.index:i.length,f=i.charCodeAt(h),!u){t=i.slice(p);break}if(f===10&&p===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),p<h&&(l.push(i.slice(p,h)),e+=h-p),f){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}p=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const bv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yv(e){return e.replace(bv,xv)}function xv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return M0(n.slice(i?2:1),i?16:10)}return rd(n)||e}const U0={}.hasOwnProperty;function Ev(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Cv(n)(mv(hv(n).document().write(gv()(e,t,!0))))}function Cv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Re),autolinkProtocol:B,autolinkEmail:B,atxHeading:i(xe),blockQuote:i(Z),characterEscape:B,characterReference:B,codeFenced:i(Y),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Y,a),codeText:i(le,a),codeTextData:B,data:B,codeFlowValue:B,definition:i(ee),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(te),hardBreakEscape:i(pe),hardBreakTrailing:i(pe),htmlFlow:i(be,a),htmlFlowData:B,htmlText:i(be,a),htmlTextData:B,image:i(se),label:a,link:i(Re),listItem:i(ze),listItemValue:h,listOrdered:i(ve,p),listUnordered:i(ve),paragraph:i(De),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(xe),strong:i(Tt),thematicBreak:i(qe)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:ne,autolinkProtocol:Q,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:U,characterReference:J,codeFenced:l(y),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(x),codeText:l(A),codeTextData:R,data:R,definition:l(),definitionDestinationString:S,definitionLabelString:E,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(v),hardBreakTrailing:l(v),htmlFlow:l(L),htmlFlowData:R,htmlText:l(I),htmlTextData:R,image:l(V),label:H,labelText:W,lineEnding:N,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:w,resourceTitleString:G,resource:re,setextHeading:l(F),setextHeadingLineSequence:O,setextHeadingText:T,strong:l(),thematicBreak:l()}};z0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let Ce={type:"root",children:[]};const Oe={stack:[Ce],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},He=[];let je=-1;for(;++je<ce.length;)if(ce[je][1].type==="listOrdered"||ce[je][1].type==="listUnordered")if(ce[je][0]==="enter")He.push(je);else{const Le=He.pop();je=o(ce,Le,je)}for(je=-1;++je<ce.length;){const Le=t[ce[je][0]];U0.call(Le,ce[je][1].type)&&Le[ce[je][1].type].call(Object.assign({sliceSerialize:ce[je][2].sliceSerialize},Oe),ce[je][1])}if(Oe.tokenStack.length>0){const Le=Oe.tokenStack[Oe.tokenStack.length-1];(Le[1]||df).call(Oe,void 0,Le[0])}for(Ce.position={start:$r(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:$r(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<t.transforms.length;)Ce=t.transforms[je](Ce)||Ce;return Ce}function o(ce,Ce,Oe){let He=Ce-1,je=-1,Le=!1,Je,yt,ht,ue;for(;++He<=Oe;){const ye=ce[He];switch(ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ye[0]==="enter"?je++:je--,ue=void 0;break}case"lineEndingBlank":{ye[0]==="enter"&&(Je&&!ue&&!je&&!ht&&(ht=He),ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ue=void 0}if(!je&&ye[0]==="enter"&&ye[1].type==="listItemPrefix"||je===-1&&ye[0]==="exit"&&(ye[1].type==="listUnordered"||ye[1].type==="listOrdered")){if(Je){let Te=He;for(yt=void 0;Te--;){const Be=ce[Te];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;yt&&(ce[yt][1].type="lineEndingBlank",Le=!0),Be[1].type="lineEnding",yt=Te}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}ht&&(!yt||ht<yt)&&(Je._spread=!0),Je.end=Object.assign({},yt?ce[yt][1].start:ye[1].end),ce.splice(yt||He,0,["exit",Je,ye[2]]),He++,Oe++}if(ye[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},ye[1].start),end:void 0};Je=Te,ce.splice(He,0,["enter",Te,ye[2]]),He++,Oe++,ht=void 0,ue=!0}}}return ce[Ce][1]._spread=Le,Oe}function i(ce,Ce){return Oe;function Oe(He){s.call(this,ce(He),He),Ce&&Ce.call(this,He)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(ce,Ce,Oe){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([Ce,Oe||void 0]),ce.position={start:$r(Ce.start),end:void 0}}function l(ce){return Ce;function Ce(Oe){ce&&ce.call(this,Oe),u.call(this,Oe)}}function u(ce,Ce){const Oe=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==ce.type&&(Ce?Ce.call(this,ce,He[0]):(He[1]||df).call(this,ce,He[0]));else throw new Error("Cannot close `"+ce.type+"` ("+ta({start:ce.start,end:ce.end})+"): it’s not open");Oe.position.end=$r(ce.end)}function c(){return nd(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(ce){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function f(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=ce}function m(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=ce}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce.replace(/(\r?\n|\r)$/g,"")}function E(ce){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Qn(this.sliceSerialize(ce)).toLowerCase()}function C(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ce}function S(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ce}function k(ce){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Oe=this.sliceSerialize(ce).length;Ce.depth=Oe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function O(ce){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ce){const Oe=this.stack[this.stack.length-1].children;let He=Oe[Oe.length-1];(!He||He.type!=="text")&&(He=at(),He.position={start:$r(ce.start),end:void 0},Oe.push(He)),this.stack.push(He)}function R(ce){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(ce),Ce.position.end=$r(ce.end)}function N(ce){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=Ce.children[Ce.children.length-1];Oe.position.end=$r(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(B.call(this,ce),R.call(this,ce))}function v(){this.data.atHardBreak=!0}function L(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function I(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function A(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function M(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Ce,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function V(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Ce,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function W(ce){const Ce=this.sliceSerialize(ce),Oe=this.stack[this.stack.length-2];Oe.label=yv(Ce),Oe.identifier=Qn(Ce).toLowerCase()}function H(){const ce=this.stack[this.stack.length-1],Ce=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const He=ce.children;Oe.children=He}else Oe.alt=Ce}function w(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ce}function G(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ce}function re(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ae(ce){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Qn(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function X(ce){this.data.characterReferenceType=ce.type}function U(ce){const Ce=this.sliceSerialize(ce),Oe=this.data.characterReferenceType;let He;Oe?(He=M0(Ce,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=rd(Ce);const je=this.stack[this.stack.length-1];je.value+=He}function J(ce){const Ce=this.stack.pop();Ce.position.end=$r(ce.end)}function Q(ce){R.call(this,ce);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(ce)}function ne(ce){R.call(this,ce);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(ce)}function Z(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function le(){return{type:"inlineCode",value:""}}function ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function te(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function be(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function ve(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function ze(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function De(){return{type:"paragraph",children:[]}}function Tt(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function qe(){return{type:"thematicBreak"}}}function $r(e){return{line:e.line,column:e.column,offset:e.offset}}function z0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?z0(e,r):Tv(e,r)}}function Tv(e,t){let n;for(n in t)if(U0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function df(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is still open")}function vv(e){const t=this;t.parser=n;function n(r){return Ev(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Sv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function kv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
25
+ `}]}function Dv(e,t){const n=t.value?t.value+`
26
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,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}function wv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Av(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=bi(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Pv(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function V0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function Mv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V0(e,t);const o={src:bi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Ov(e,t){const n={src:bi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Lv(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Nv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V0(e,t);const o={href:bi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Fv(e,t){const n={href:bi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _v(e,t,n){const r=e.all(t),o=n?Bv(n):W0(t),i={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let p;c&&c.type==="element"&&c.tagName==="p"?p=c:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
27
+ `}),c.type==="element"&&c.tagName==="p"&&!o?a.push(...c.children):a.push(c)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
28
+ `});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function Bv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=W0(n[r])}return t}function W0(e){const t=e.spread;return t??e.children.length>1}function jv(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function $v(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Uv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zv(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=fr(t.children[1]),l=vl(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function Vv(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const p=t.children[l],h={},f=a?a[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:i,properties:h,children:[]};p&&(m.children=e.all(p),e.patch(p,m),m=e.applyData(p,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function Wv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const pf=9,ff=32;function qv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(hf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(hf(t.slice(o),o>0,!1)),i.join("")}function hf(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===pf||i===ff;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===pf||i===ff;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Yv(e,t){const n={type:"text",value:qv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Kv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Gv={blockquote:Sv,break:kv,code:Dv,delete:wv,emphasis:Iv,footnoteReference:Av,heading:Pv,html:Rv,imageReference:Mv,image:Ov,inlineCode:Lv,linkReference:Nv,link:Fv,listItem:_v,list:jv,paragraph:$v,root:Hv,strong:Uv,table:zv,tableCell:Wv,tableRow:Vv,text:Yv,thematicBreak:Kv,toml:es,yaml:es,definition:es,footnoteDefinition:es};function es(){}const q0=-1,Dl=0,ra=1,Vs=2,id=3,ad=4,sd=5,ld=6,Y0=7,K0=8,mf=typeof self=="object"?self:globalThis,Qv=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case Dl:case q0:return n(a,o);case ra:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Vs:{const s=n({},o);for(const[l,u]of a)s[r(l)]=r(u);return s}case id:return n(new Date(a),o);case ad:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case sd:{const s=n(new Map,o);for(const[l,u]of a)s.set(r(l),r(u));return s}case ld:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case Y0:{const{name:s,message:l}=a;return n(new mf[s](l),o)}case K0:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new mf[i](a),o)};return r},gf=e=>Qv(new Map,e)(0),$o="",{toString:Xv}={},{keys:Zv}=Object,Ni=e=>{const t=typeof e;if(t!=="object"||!e)return[Dl,t];const n=Xv.call(e).slice(8,-1);switch(n){case"Array":return[ra,$o];case"Object":return[Vs,$o];case"Date":return[id,$o];case"RegExp":return[ad,$o];case"Map":return[sd,$o];case"Set":return[ld,$o];case"DataView":return[ra,n]}return n.includes("Array")?[ra,n]:n.includes("Error")?[Y0,n]:[Vs,n]},ts=([e,t])=>e===Dl&&(t==="function"||t==="symbol"),Jv=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Ni(a);switch(s){case Dl:{let c=a;switch(l){case"bigint":s=K0,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return o([q0],a)}return o([s,c],a)}case ra:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),o([l,[...h]],a)}const c=[],p=o([s,c],a);for(const h of a)c.push(i(h));return p}case Vs:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const c=[],p=o([s,c],a);for(const h of Zv(a))(e||!ts(Ni(a[h])))&&c.push([i(h),i(a[h])]);return p}case id:return o([s,a.toISOString()],a);case ad:{const{source:c,flags:p}=a;return o([s,{source:c,flags:p}],a)}case sd:{const c=[],p=o([s,c],a);for(const[h,f]of a)(e||!(ts(Ni(h))||ts(Ni(f))))&&c.push([i(h),i(f)]);return p}case ld:{const c=[],p=o([s,c],a);for(const h of a)(e||!ts(Ni(h)))&&c.push(i(h));return p}}const{message:u}=a;return o([s,{name:l,message:u}],a)};return i},bf=(e,{json:t,lossy:n}={})=>{const r=[];return Jv(!(t||n),!!t,new Map,r)(e),r},Eo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gf(bf(e,t)):structuredClone(e):(e,t)=>gf(bf(e,t));function eS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function tS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function nS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||eS,r=e.options.footnoteBackLabel||tS,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),p=String(u.identifier).toUpperCase(),h=bi(p.toLowerCase());let f=0;const m=[],g=e.footnoteCounts.get(p);for(;g!==void 0&&++f<=g;){m.length>0&&m.push({type:"text",value:" "});let E=typeof n=="string"?n:n(l,f);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const E=y.children[y.children.length-1];E&&E.type==="text"?E.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,x),s.push(x)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Eo(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
29
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
30
+ `}]}}const wl=(function(e){if(e==null)return aS;if(typeof e=="function")return Il(e);if(typeof e=="object")return Array.isArray(e)?rS(e):oS(e);if(typeof e=="string")return iS(e);throw new Error("Expected function, string, or object as test")});function rS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wl(e[n]);return Il(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function oS(e){const t=e;return Il(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function iS(e){return Il(t);function t(n){return n&&n.type===e}}function Il(e){return t;function t(n,r,o){return!!(sS(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function aS(){return!0}function sS(e){return e!==null&&typeof e=="object"&&"type"in e}const G0=[],lS=!0,Ws=!1,oa="skip";function Q0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=wl(o),a=r?-1:1;s(e,void 0,[])();function s(l,u,c){const p=l&&typeof l=="object"?l:{};if(typeof p.type=="string"){const f=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=G0,m,g,y;if((!t||i(l,u,c[c.length-1]||void 0))&&(f=uS(n(l,c)),f[0]===Ws))return f;if("children"in l&&l.children){const x=l;if(x.children&&f[0]!==oa)for(g=(r?x.children.length:-1)+a,y=c.concat(x);g>-1&&g<x.children.length;){const E=x.children[g];if(m=s(E,g,y)(),m[0]===Ws)return m;g=typeof m[1]=="number"?m[1]:g+a}}return f}}}function uS(e){return Array.isArray(e)?e:typeof e=="number"?[lS,e]:e==null?G0:[e]}function yn(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),Q0(e,i,s,o);function s(l,u){const c=u[u.length-1],p=c?c.children.indexOf(l):void 0;return a(l,p,c)}}const cc={}.hasOwnProperty,cS={};function dS(e,t){const n=t||cS,r=new Map,o=new Map,i=new Map,a={...Gv,...n.handlers},s={all:u,applyData:fS,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:pS,wrap:mS};return yn(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const p=c.type==="definition"?r:o,h=String(c.identifier).toUpperCase();p.has(h)||p.set(h,c)}}),s;function l(c,p){const h=c.type,f=s.handlers[h];if(cc.call(s.handlers,h)&&f)return f(s,c,p);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in c){const{children:g,...y}=c,x=Eo(y);return x.children=s.all(c),x}return Eo(c)}return(s.options.unknownHandler||hS)(s,c,p)}function u(c){const p=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const m=s.one(h[f],c);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=yf(m.value)),!Array.isArray(m)&&m.type==="element")){const g=m.children[0];g&&g.type==="text"&&(g.value=yf(g.value))}Array.isArray(m)?p.push(...m):p.push(m)}}}return p}}function pS(e,t){e.position&&(t.position=tC(e))}function fS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Eo(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function hS(e,t){const n=t.data||{},r="value"in t&&!(cc.call(n,"hProperties")||cc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
31
+ `});++r<e.length;)r&&n.push({type:"text",value:`
32
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
33
+ `}),n}function yf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xf(e,t){const n=dS(e,t),r=n.one(e,void 0),o=nS(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
34
+ `},o),i}function gS(e,t){return e&&"run"in e?async function(n,r){const o=xf(n,{file:r,...t});await e.run(o,r)}:function(n,r){return xf(n,{file:r,...e||t})}}function Ef(e){if(e)throw e}var fu,Cf;function bS(){if(Cf)return fu;Cf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!p)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return fu=function l(){var u,c,p,h,f,m,g=arguments[0],y=1,x=arguments.length,E=!1;for(typeof g=="boolean"&&(E=g,g=arguments[1]||{},y=2),(g==null||typeof g!="object"&&typeof g!="function")&&(g={});y<x;++y)if(u=arguments[y],u!=null)for(c in u)p=s(g,c),h=s(u,c),g!==h&&(E&&h&&(i(h)||(f=o(h)))?(f?(f=!1,m=p&&o(p)?p:[]):m=p&&i(p)?p:{},a(g,{name:c,newValue:l(E,m,h)})):typeof h<"u"&&a(g,{name:c,newValue:h}));return g},fu}var yS=bS();const hu=Xn(yS);function dc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xS(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...u){const c=e[++i];let p=-1;if(l){a(l);return}for(;++p<o.length;)(u[p]===null||u[p]===void 0)&&(u[p]=o[p]);o=u,c?ES(c,s)(...u):a(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function ES(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return o(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const ir={basename:CS,dirname:TS,extname:vS,join:SS,sep:"/"};function CS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function TS(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function vS(e){Ba(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function SS(...e){let t=-1,n;for(;++t<e.length;)Ba(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":kS(n)}function kS(e){Ba(e);const t=e.codePointAt(0)===47;let n=DS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function DS(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wS={cwd:IS};function IS(){return"/"}function pc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function AS(e){if(typeof e=="string")e=new URL(e);else if(!pc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return PS(e)}function PS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const mu=["history","path","basename","stem","extname","dirname"];class X0{constructor(t){let n;t?pc(t)?n={path:t}:typeof t=="string"||RS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mu.length;){const i=mu[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)mu.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ir.basename(this.path):void 0}set basename(t){bu(t,"basename"),gu(t,"basename"),this.path=ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ir.dirname(this.path):void 0}set dirname(t){Tf(this.basename,"dirname"),this.path=ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ir.extname(this.path):void 0}set extname(t){if(gu(t,"extname"),Tf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pc(t)&&(t=AS(t)),bu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ir.basename(this.path,this.extname):void 0}set stem(t){bu(t,"stem"),gu(t,"stem"),this.path=ir.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new nn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function gu(e,t){if(e&&e.includes(ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ir.sep+"`")}function bu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function RS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MS=(function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),OS={}.hasOwnProperty;class ud extends MS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=xS()}copy(){const t=new ud;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(hu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Eu("data",this.frozen),this.namespace[t]=n,this):OS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Eu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ns(t),r=this.parser||this.Parser;return yu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),yu("process",this.parser||this.Parser),xu("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=ns(t),l=r.parse(s);r.run(l,s,function(c,p,h){if(c||!p||!h)return u(c);const f=p,m=r.stringify(f,h);FS(m)?h.value=m:h.result=m,u(c,h)});function u(c,p){c||!p?a(c):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),yu("processSync",this.parser||this.Parser),xu("processSync",this.compiler||this.Compiler),this.process(t,o),Sf("processSync","process",n),r;function o(i,a){n=!0,Ef(i),r=a}}run(t,n,r){vf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=ns(n);o.run(t,l,u);function u(c,p,h){const f=p||t;c?s(c):a?a(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),Sf("runSync","run",r),o;function i(a,s){Ef(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=ns(n),o=this.compiler||this.Compiler;return xu("stringify",o),vf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Eu("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...p]=u;l(c,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(o.settings=hu(!0,o.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const p=u[c];i(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let p=-1,h=-1;for(;++p<r.length;)if(r[p][0]===u){h=p;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[f,...m]=c;const g=r[h][1];dc(g)&&dc(f)&&(f=hu(!0,g,f)),r[h]=[u,f,...m]}}}}const LS=new ud().freeze();function yu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Eu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function vf(e){if(!dc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ns(e){return NS(e)?e:new X0(e)}function NS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FS(e){return typeof e=="string"||_S(e)}function _S(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kf=[],Df={allowDangerousHtml:!0},jS=/^(https?|ircs?|mailto|xmpp)$/i,$S=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function HS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||kf,l=e.remarkPlugins||kf,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Df}:Df,c=e.skipHtml,p=e.unwrapDisallowed,h=e.urlTransform||US,f=LS().use(vv).use(l).use(gS,u).use(s),m=new X0;typeof r=="string"&&(m.value=r);for(const E of $S)Object.hasOwn(e,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+BS+E.id,void 0);const g=f.parse(m);let y=f.runSync(g,m);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:y.type==="root"?y.children:[y]}),yn(y,x),aC(y,{Fragment:d.Fragment,components:i,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function x(E,C,S){if(E.type==="raw"&&S&&typeof C=="number")return c?S.children.splice(C,1):S.children[C]={type:"text",value:E.value},C;if(E.type==="element"){let k;for(k in cu)if(Object.hasOwn(cu,k)&&Object.hasOwn(E.properties,k)){const T=E.properties[k],O=cu[k];(O===null||O.includes(E.tagName))&&(E.properties[k]=h(String(T||""),k,E))}}if(E.type==="element"){let k=t?!t.includes(E.tagName):a?a.includes(E.tagName):!1;if(!k&&n&&typeof C=="number"&&(k=!n(E,C,S)),k&&S&&typeof C=="number")return p&&E.children?S.children.splice(C,1,...E.children):S.children.splice(C,1),C}}}function US(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||jS.test(e.slice(0,t))?e:""}function fc(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function zS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function VS(e,t,n){const o=wl((n||{}).ignore||[]),i=WS(t);let a=-1;for(;++a<i.length;)Q0(e,"text",s);function s(u,c){let p=-1,h;for(;++p<c.length;){const f=c[p],m=h?h.children:void 0;if(o(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(u,c)}function l(u,c){const p=c[c.length-1],h=i[a][0],f=i[a][1];let m=0;const y=p.children.indexOf(u);let x=!1,E=[];h.lastIndex=0;let C=h.exec(u.value);for(;C;){const S=C.index,k={index:C.index,input:C.input,stack:[...c,u]};let T=f(...C,k);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?h.lastIndex=S+1:(m!==S&&E.push({type:"text",value:u.value.slice(m,S)}),Array.isArray(T)?E.push(...T):T&&E.push(T),m=S+C[0].length,x=!0),!h.global)break;C=h.exec(u.value)}return x?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),p.children.splice(y,1,...E)):E=[u],y+E.length}}function WS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([qS(o[0]),YS(o[1])])}return t}function qS(e){return typeof e=="string"?new RegExp(zS(e),"g"):e}function YS(e){return typeof e=="function"?e:function(){return e}}const Cu="phrasing",Tu=["autolink","link","image","label"];function KS(){return{transforms:[t3],enter:{literalAutolink:QS,literalAutolinkEmail:vu,literalAutolinkHttp:vu,literalAutolinkWww:vu},exit:{literalAutolink:e3,literalAutolinkEmail:JS,literalAutolinkHttp:XS,literalAutolinkWww:ZS}}}function GS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:Tu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:Tu},{character:":",before:"[ps]",after:"\\/",inConstruct:Cu,notInConstruct:Tu}]}}function QS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vu(e){this.config.enter.autolinkProtocol.call(this,e)}function XS(e){this.config.exit.autolinkProtocol.call(this,e)}function ZS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function JS(e){this.config.exit.autolinkEmail.call(this,e)}function e3(e){this.exit(e)}function t3(e){VS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,n3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,r3]],{ignore:["link","linkReference"]})}function n3(e,t,n,r,o){let i="";if(!Z0(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!o3(n)))return!1;const a=i3(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function r3(e,t,n,r){return!Z0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function o3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function i3(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 o=fc(e,"(");let i=fc(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function Z0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||xo(n)||Sl(n))&&(!t||n!==47)}J0.peek=h3;function a3(){this.buffer()}function s3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function l3(){this.buffer()}function u3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function c3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function d3(e){this.exit(e)}function p3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function f3(e){this.exit(e)}function h3(){return"["}function J0(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function m3(){return{enter:{gfmFootnoteCallString:a3,gfmFootnoteCall:s3,gfmFootnoteDefinitionLabelString:l3,gfmFootnoteDefinition:u3},exit:{gfmFootnoteCallString:c3,gfmFootnoteCall:d3,gfmFootnoteDefinitionLabelString:p3,gfmFootnoteDefinition:f3}}}function g3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:J0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const u=i.enter("footnoteDefinition"),c=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),c(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
35
+ `:" ")+i.indentLines(i.containerFlow(r,s.current()),t?eg:b3))),u(),l}}function b3(e,t,n){return t===0?e:eg(e,t,n)}function eg(e,t,n){return(n?"":" ")+e}const y3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];tg.peek=v3;function x3(){return{canContainEols:["delete"],enter:{strikethrough:C3},exit:{strikethrough:T3}}}function E3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:y3}],handlers:{delete:tg}}}function C3(e){this.enter({type:"delete",children:[]},e)}function T3(e){this.exit(e)}function tg(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function v3(){return"~"}function S3(e){return e.length}function k3(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||S3,i=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const g=[],y=[];let x=-1;for(e[c].length>u&&(u=e[c].length);++x<e[c].length;){const E=D3(e[c][x]);if(n.alignDelimiters!==!1){const C=o(E);y[x]=C,(l[x]===void 0||C>l[x])&&(l[x]=C)}g.push(E)}a[c]=g,s[c]=y}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<u;)i[p]=wf(r[p]);else{const g=wf(r);for(;++p<u;)i[p]=g}p=-1;const h=[],f=[];for(;++p<u;){const g=i[p];let y="",x="";g===99?(y=":",x=":"):g===108?y=":":g===114&&(x=":");let E=n.alignDelimiters===!1?1:Math.max(1,l[p]-y.length-x.length);const C=y+"-".repeat(E)+x;n.alignDelimiters!==!1&&(E=y.length+E+x.length,E>l[p]&&(l[p]=E),f[p]=E),h[p]=C}a.splice(1,0,h),s.splice(1,0,f),c=-1;const m=[];for(;++c<a.length;){const g=a[c],y=s[c];p=-1;const x=[];for(;++p<u;){const E=g[p]||"";let C="",S="";if(n.alignDelimiters!==!1){const k=l[p]-(y[p]||0),T=i[p];T===114?C=" ".repeat(k):T===99?k%2?(C=" ".repeat(k/2+.5),S=" ".repeat(k/2-.5)):(C=" ".repeat(k/2),S=C):S=" ".repeat(k)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(E),n.alignDelimiters!==!1&&x.push(S),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==u-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
36
+ `)}function D3(e){return e==null?"":String(e)}function wf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const If={}.hasOwnProperty;function Al(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&If.call(o,e)){const l=String(o[e]);a=If.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function w3(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),I3);return o(),a}function I3(e,t,n){return">"+(n?"":" ")+e}function A3(e,t){return Af(e,t.inConstruct,!0)&&!Af(e,t.notInConstruct,!1)}function Af(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Pf(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
37
+ `&&A3(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
38
+ `}function P3(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function R3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function M3(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function O3(e,t,n,r){const o=M3(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(R3(e,n)){const p=n.enter("codeIndented"),h=n.indentLines(i,L3);return p(),h}const s=n.createTracker(r),l=o.repeat(Math.max(P3(i,o)+1,3)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const p=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
39
+ `,encode:["`"],...s.current()})),p()}return c+=s.move(`
40
+ `),i&&(c+=s.move(i+`
41
+ `)),c+=s.move(l),u(),c}function L3(e,t,n){return(n?"":" ")+e}function cd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function N3(e,t,n,r){const o=cd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
42
+ `,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),a(),u}function F3(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ca(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qs(e,t,n){const r=ii(e),o=ii(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ng.peek=_3;function ng(e,t,n,r){const o=F3(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),c=qs(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Ca(u)+l.slice(1));const p=l.charCodeAt(l.length-1),h=qs(r.after.charCodeAt(0),p,o);h.inside&&(l=l.slice(0,-1)+Ca(p));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},s+l+f}function _3(e,t,n){return n.options.emphasis||"*"}function B3(e,t){let n=!1;return yn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ws}),!!((!e.depth||e.depth<3)&&nd(e)&&(t.options.setext||n))}function j3(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(B3(e,n)){const c=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...i.current(),before:`
43
+ `,after:`
44
+ `});return p(),c(),h+`
45
+ `+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
46
+ `))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
47
+ `,...i.current()});return/^[\t ]/.test(u)&&(u=Ca(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}rg.peek=$3;function rg(e){return e.value||""}function $3(){return"<"}og.peek=H3;function og(e,t,n,r){const o=cd(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function H3(){return"!"}ig.peek=U3;function ig(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),o==="full"||!u||u!==p?l+=s.move(p+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function U3(){return"!"}ag.peek=z3;function ag(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return o+r+o}function z3(){return"`"}function sg(e,t){const n=nd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}lg.peek=V3;function lg(e,t,n,r){const o=cd(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(sg(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),s(),n.stack=c,p}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),l()),u+=a.move(")"),s(),u}function V3(e,t,n){return sg(e,n)?"<":"["}ug.peek=W3;function ug(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),o==="full"||!u||u!==p?l+=s.move(p+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function W3(){return"["}function dd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function q3(e){const t=dd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Y3(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function cg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function K3(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?Y3(n):dd(n);const s=e.ordered?a==="."?")":".":q3(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),cg(n)===a&&c){let p=-1;for(;++p<e.children.length;){const h=e.children[p];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),u}function G3(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Q3(e,t,n,r){const o=G3(n);let i=n.bulletCurrent||dd(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(p,h,f){return h?(f?"":" ".repeat(a))+p:(f?i:i+" ".repeat(a-i.length))+p}}function X3(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const Z3=wl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function J3(e,t,n,r){return(e.children.some(function(a){return Z3(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ek(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}dg.peek=tk;function dg(e,t,n,r){const o=ek(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),c=qs(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Ca(u)+l.slice(1));const p=l.charCodeAt(l.length-1),h=qs(r.after.charCodeAt(0),p,o);h.inside&&(l=l.slice(0,-1)+Ca(p));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},s+l+f}function tk(e,t,n){return n.options.strong||"*"}function nk(e,t,n,r){return n.safe(e.value,r)}function rk(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ok(e,t,n){const r=(cg(n)+(n.options.ruleSpaces?" ":"")).repeat(rk(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pg={blockquote:w3,break:Pf,code:O3,definition:N3,emphasis:ng,hardBreak:Pf,heading:j3,html:rg,image:og,imageReference:ig,inlineCode:ag,link:lg,linkReference:ug,list:K3,listItem:Q3,paragraph:X3,root:J3,strong:dg,text:nk,thematicBreak:ok};function ik(){return{enter:{table:ak,tableData:Rf,tableHeader:Rf,tableRow:lk},exit:{codeText:uk,table:sk,tableData:Su,tableHeader:Su,tableRow:Su}}}function ak(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function sk(e){this.exit(e),this.data.inTable=void 0}function lk(e){this.enter({type:"tableRow",children:[]},e)}function Su(e){this.exit(e)}function Rf(e){this.enter({type:"tableCell",children:[]},e)}function uk(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ck));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ck(e,t){return t==="|"?t:e}function dk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
48
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:s}};function a(f,m,g,y){return u(c(f,g,y),f.align)}function s(f,m,g,y){const x=p(f,g,y),E=u([x]);return E.slice(0,E.indexOf(`
49
+ `))}function l(f,m,g,y){const x=g.enter("tableCell"),E=g.enter("phrasing"),C=g.containerPhrasing(f,{...y,before:i,after:i});return E(),x(),C}function u(f,m){return k3(f,{align:m,alignDelimiters:r,padding:n,stringLength:o})}function c(f,m,g){const y=f.children;let x=-1;const E=[],C=m.enter("table");for(;++x<y.length;)E[x]=p(y[x],m,g);return C(),E}function p(f,m,g){const y=f.children;let x=-1;const E=[],C=m.enter("tableRow");for(;++x<y.length;)E[x]=l(y[x],f,m,g);return C(),E}function h(f,m,g){let y=pg.inlineCode(f,m,g);return g.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function pk(){return{exit:{taskListCheckValueChecked:Mf,taskListCheckValueUnchecked:Mf,paragraph:hk}}}function fk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mk}}}function Mf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hk(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function mk(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=pg.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function gk(){return[KS(),m3(),x3(),ik(),pk()]}function bk(e){return{extensions:[GS(),g3(e),E3(),dk(e),fk()]}}const yk={tokenize:Sk,partial:!0},fg={tokenize:kk,partial:!0},hg={tokenize:Dk,partial:!0},mg={tokenize:wk,partial:!0},xk={tokenize:Ik,partial:!0},gg={name:"wwwAutolink",tokenize:Tk,previous:yg},bg={name:"protocolAutolink",tokenize:vk,previous:xg},Mr={name:"emailAutolink",tokenize:Ck,previous:Eg},hr={};function Ek(){return{text:hr}}let no=48;for(;no<123;)hr[no]=Mr,no++,no===58?no=65:no===91&&(no=97);hr[43]=Mr;hr[45]=Mr;hr[46]=Mr;hr[95]=Mr;hr[72]=[Mr,bg];hr[104]=[Mr,bg];hr[87]=[Mr,gg];hr[119]=[Mr,gg];function Ck(e,t,n){const r=this;let o,i;return a;function a(p){return!hc(p)||!Eg.call(r,r.previous)||pd(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return hc(p)?(e.consume(p),s):p===64?(e.consume(p),l):n(p)}function l(p){return p===46?e.check(xk,c,u)(p):p===45||p===95||en(p)?(i=!0,e.consume(p),l):c(p)}function u(p){return e.consume(p),o=!0,l}function c(p){return i&&o&&an(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Tk(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!yg.call(r,r.previous)||pd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yk,e.attempt(fg,e.attempt(hg,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function vk(e,t,n){const r=this;let o="",i=!1;return a;function a(p){return(p===72||p===104)&&xg.call(r,r.previous)&&!pd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(an(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(p),l}return n(p)}function l(p){return p===47?(e.consume(p),i?u:(i=!0,l)):n(p)}function u(p){return p===null||zs(p)||Ct(p)||xo(p)||Sl(p)?n(p):e.attempt(fg,e.attempt(hg,c),n)(p)}function c(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Sk(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function kk(e,t,n){let r,o,i;return a;function a(u){return u===46||u===95?e.check(mg,l,s)(u):u===null||Ct(u)||xo(u)||u!==45&&Sl(u)?l(u):(i=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),a}function l(u){return o||r||!i?n(u):t(u)}}function Dk(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(mg,t,i)(a):a===null||Ct(a)||xo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function wk(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||Ct(s)||xo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||Ct(s)||xo(s)?t(s):r(s)}function i(s){return an(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):an(s)?(e.consume(s),a):n(s)}}function Ik(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return en(i)?n(i):t(i)}}function yg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ct(e)}function xg(e){return!an(e)}function Eg(e){return!(e===47||hc(e))}function hc(e){return e===43||e===45||e===46||e===95||en(e)}function pd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ak={tokenize:_k,partial:!0};function Pk(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Lk,continuation:{tokenize:Nk},exit:Fk}},text:{91:{name:"gfmFootnoteCall",tokenize:Ok},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Rk,resolveTo:Mk}}}}function Rk(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Qn(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Mk(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Ok(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),l}function l(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(i>999||p===93&&!a||p===null||p===91||Ct(p))return n(p);if(p===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Qn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ct(p)||(a=!0),i++,e.consume(p),p===92?c:u}function c(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}}function Lk(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!s||m===null||m===91||Ct(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return i=Qn(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ct(m)||(s=!0),a++,e.consume(m),m===92?p:c}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),ct(e,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return t(m)}}function Nk(e,t,n){return e.check(_a,t,e.attempt(Ak,t,n))}function Fk(e){e.exit("gfmFootnoteDefinition")}function _k(e,t,n){const r=this;return ct(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function Bk(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},p={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",p,s]],f=s.parser.constructs.insideSpan.null;f&&Dn(h,h.length,0,kl(f,a.slice(u+1,l),s)),Dn(h,h.length,0,[["exit",p,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),Dn(a,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const u=this.previous,c=this.events;let p=0;return h;function h(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const g=ii(u);if(m===126)return p>1?l(m):(a.consume(m),p++,f);if(p<2&&!n)return l(m);const y=a.exit("strikethroughSequenceTemporary"),x=ii(m);return y._open=!x||x===2&&!!g,y._close=!g||g===2&&!!x,s(m)}}}class jk{constructor(){this.map=[]}add(t,n,r){$k(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function $k(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function Hk(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Uk(){return{flow:{null:{name:"table",tokenize:zk,resolveAll:Vk}}}}function zk(e,t,n){const r=this;let o=0,i=0,a;return s;function s(R){let N=r.events.length-1;for(;N>-1;){const I=r.events[N][1].type;if(I==="lineEnding"||I==="linePrefix")N--;else break}const v=N>-1?r.events[N][1].type:null,L=v==="tableHead"||v==="tableRow"?T:l;return L===T&&r.parser.lazy[r.now().line]?n(R):L(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(a=!0,i+=1),c(R)}function c(R){return R===null?n(R):Ue(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),f):n(R):it(R)?ct(e,c,"whitespace")(R):(i+=1,a&&(a=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),p(R)))}function p(R){return R===null||R===124||Ct(R)?(e.exit("data"),c(R)):(e.consume(R),R===92?h:p)}function h(R){return R===92||R===124?(e.consume(R),p):p(R)}function f(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,it(R)?ct(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?y(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),g):k(R)}function g(R){return it(R)?ct(e,y,"whitespace")(R):y(R)}function y(R){return R===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),x):R===45?(i+=1,x(R)):R===null||Ue(R)?S(R):k(R)}function x(R){return R===45?(e.enter("tableDelimiterFiller"),E(R)):k(R)}function E(R){return R===45?(e.consume(R),E):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return it(R)?ct(e,S,"whitespace")(R):S(R)}function S(R){return R===124?m(R):R===null||Ue(R)?!a||o!==i?k(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):k(R)}function k(R){return n(R)}function T(R){return e.enter("tableRow"),O(R)}function O(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),O):R===null||Ue(R)?(e.exit("tableRow"),t(R)):it(R)?ct(e,O,"whitespace")(R):(e.enter("data"),F(R))}function F(R){return R===null||R===124||Ct(R)?(e.exit("data"),O(R)):(e.consume(R),R===92?B:F)}function B(R){return R===92||R===124?(e.consume(R),F):F(R)}}function Vk(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,p;const h=new jk;for(;++n<e.length;){const f=e[n],m=f[1];f[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(Of(h,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,p=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",c,t]])),o=m.type==="tableDelimiterRow"?2:c?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],p=rs(h,t,i,o,void 0,p),i=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],p=rs(h,t,i,o,void 0,p)),i=a,a=[i[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],p=rs(h,t,i,o,n,p)):a[1]!==0&&(p=rs(h,t,a,o,n,p)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Of(h,t,l,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Hk(t.events,n))}return e}function rs(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Vo(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Vo(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Vo(t.events,n[2]),c=Vo(t.events,n[3]),p={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(i.end=Object.assign({},Vo(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Of(e,t,n,r,o){const i=[],a=Vo(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Vo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Wk={name:"tasklistCheck",tokenize:Yk};function qk(){return{text:{91:Wk}}}function Yk(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ue(l)?t(l):it(l)?e.check({tokenize:Kk},t,n)(l):n(l)}}function Kk(e,t,n){return ct(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function Gk(e){return R0([Ek(),Pk(),Bk(e),Uk(),qk()])}const Qk={};function Xk(e){const t=this,n=e||Qk,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Gk(n)),i.push(gk()),a.push(bk(n))}const Lf=/[#.]/g;function Zk(e,t){const n=e||"",r={};let o=0,i,a;for(;o<n.length;){Lf.lastIndex=o;const s=Lf.exec(n),l=n.slice(o,s?s.index:n.length);l&&(i?i==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,o+=l.length),s&&(i=s[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Cg(e,t,n){const r=n?nD(n):void 0;function o(i,a,...s){let l;if(i==null){l={type:"root",children:[]};const u=a;s.unshift(u)}else{l=Zk(i,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,Jk(a))s.unshift(a);else for(const[p,h]of Object.entries(a))eD(e,l.properties,p,h)}for(const u of s)mc(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function Jk(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function eD(e,t,n,r){const o=Fa(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?o.spaceSeparated?i=ac(r):o.commaSeparated?i=rc(r):o.commaOrSpaceSeparated?i=ac(rc(r).join(" ")):i=Nf(o,o.property,r):Array.isArray(r)?i=[...r]:i=o.property==="style"?tD(r):String(r);if(Array.isArray(i)){const a=[];for(const s of i)a.push(Nf(o,o.property,s));i=a}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function mc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)mc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?mc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Nf(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||xa(n)===xa(t)))return!0}return n}function tD(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function nD(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const rD=["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"],oD=Cg(gi,"div"),iD=Cg(Qr,"g",rD);function aD(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let s=n[a];if(s===void 0){const l=Ff(t,n[a-1]);s=l===-1?t.length+1:l+1,n[a]=s}if(s>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const s=n[n.length-1],l=Ff(t,s),u=l===-1?t.length+1:l+1;if(s===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function Ff(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
50
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const co={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/"},Tg={}.hasOwnProperty,sD=Object.prototype;function lD(e,t){const n=t||{};return fd({file:n.file||void 0,location:!1,schema:n.space==="svg"?Qr:gi,verbose:n.verbose||!1},e)}function fd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ys(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:vg(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const i=String(e.file),a=aD(i),s=a.toPoint(0),l=a.toPoint(i.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ys(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ys(e,r,n),n}default:return n=uD(e,t),n}}function vg(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=fd(e,t[n]);r.push(o)}return r}function uD(e,t){const n=e.schema;e.schema=t.namespaceURI===co.svg?Qr:gi;let r=-1;const o={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;Tg.call(sD,l)||(o[l]=s.value)}const a=(e.schema.space==="svg"?iD:oD)(t.tagName,o,vg(e,t.childNodes));if(ys(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&qo(l.startTag),c=l&&l.endTag&&qo(l.endTag),p=fd(e,s.content);u&&c&&e.file&&(p.position={start:u.end,end:c.start}),a.content=p}return e.schema=n,a}function ys(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=cD(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function cD(e,t,n){const r=qo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)Tg.call(n.attrs,a)&&(i[Fa(e.schema,a).property]=qo(n.attrs[a]));n.startTag;const s=qo(n.startTag),l=n.endTag?qo(n.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=i,t.data={position:u}}}return r}function qo(e){const t=_f({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_f({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _f(e){return e.line&&e.column?e:void 0}class ja{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ja.prototype.property={};ja.prototype.normal={};ja.prototype.space=null;function Sg(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ja(n,r,t)}function gc(e){return e.toLowerCase()}class Vn{constructor(t,n){this.property=t,this.attribute=n}}Vn.prototype.space=null;Vn.prototype.boolean=!1;Vn.prototype.booleanish=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.number=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.spaceSeparated=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.defined=!1;let dD=0;const Ge=wo(),Ht=wo(),kg=wo(),Ie=wo(),St=wo(),Jo=wo(),Cn=wo();function wo(){return 2**++dD}const bc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ht,commaOrSpaceSeparated:Cn,commaSeparated:Jo,number:Ie,overloadedBoolean:kg,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),ku=Object.keys(bc);class hd extends Vn{constructor(t,n,r,o){let i=-1;if(super(t,n),Bf(this,"space",o),typeof r=="number")for(;++i<ku.length;){const a=ku[i];Bf(this,ku[i],(r&bc[a])===bc[a])}}}hd.prototype.defined=!0;function Bf(e,t,n){n&&(e[t]=n)}const pD={}.hasOwnProperty;function yi(e){const t={},n={};let r;for(r in e.properties)if(pD.call(e.properties,r)){const o=e.properties[r],i=new hd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[gc(r)]=r,n[gc(i.attribute)]=r}return new ja(t,n,e.space)}const Dg=yi({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),wg=yi({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ig(e,t){return t in e?e[t]:t}function Ag(e,t){return Ig(e,t.toLowerCase())}const Pg=yi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ag,properties:{xmlns:null,xmlnsXLink:null}}),Rg=yi({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:St,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:Ie,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:St,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Ht,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null}}),fD=yi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ag,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jo,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:St,autoFocus:Ge,autoPlay:Ge,blocking:St,capture:null,charSet:null,checked:Ge,cite:null,className:St,cols:Ie,colSpan:null,content:null,contentEditable:Ht,controls:Ge,controlsList:St,coords:Ie|Jo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:kg,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:St,height:Ie,hidden:Ge,high:Ie,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:St,itemRef:St,itemScope:Ge,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:Ie,pattern:null,ping:St,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:St,required:Ge,reversed:Ge,rows:Ie,rowSpan:Ie,sandbox:St,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ht,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:Ie,security:null,unselectable:null}}),hD=yi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Ig,properties:{about:Cn,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:St,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jo,g2:Jo,glyphName:Jo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:Cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Cn,rev:Cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Cn,requiredFeatures:Cn,requiredFonts:Cn,requiredFormats:Cn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:Cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Cn,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),mD=/^data[-\w.:]+$/i,jf=/-[a-z]/g,gD=/[A-Z]/g;function bD(e,t){const n=gc(t);let r=t,o=Vn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mD.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(jf,xD);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!jf.test(i)){let a=i.replace(gD,yD);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=hd}return new o(r,t)}function yD(e){return"-"+e.toLowerCase()}function xD(e){return e.charAt(1).toUpperCase()}const ED=Sg([wg,Dg,Pg,Rg,fD],"html"),Mg=Sg([wg,Dg,Pg,Rg,hD],"svg"),CD={},TD={}.hasOwnProperty,Og=Al("type",{handlers:{root:SD,element:AD,text:wD,comment:ID,doctype:DD}});function vD(e,t){const r=(t||CD).space;return Og(e,r==="svg"?Mg:ED)}function SD(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=md(e.children,n,t),xi(e,n),n}function kD(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=md(e.children,n,t),xi(e,n),n}function DD(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return xi(e,t),t}function wD(e){const t={nodeName:"#text",value:e.value,parentNode:null};return xi(e,t),t}function ID(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return xi(e,t),t}function AD(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Mg);const o=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&TD.call(e.properties,i)){const l=PD(r,i,e.properties[i]);l&&o.push(l)}}const a=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:co[a],childNodes:[],parentNode:null};return s.childNodes=md(e.children,s,r),xi(e,s),e.tagName==="template"&&e.content&&(s.content=kD(e.content,r)),s}function PD(e,t,n){const r=bD(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Cl(n):Tl(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=o.name.indexOf(":");i<0?o.prefix="":(o.name=o.name.slice(i+1),o.prefix=r.attribute.slice(0,i)),o.namespace=co[r.space]}return o}function md(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const i=Og(e[r],n);i.parentNode=t,o.push(i)}return o}function xi(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Lg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],RD=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Rt="�";var j;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(j||(j={}));const pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ng(e){return e>=55296&&e<=57343}function MD(e){return e>=56320&&e<=57343}function OD(e,t){return(e-55296)*1024+9216+t}function Fg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _g(e){return e>=64976&&e<=65007||RD.has(e)}var fe;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(fe||(fe={}));const LD=65536;class ND{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=LD,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:i}=this,a=o+n,s=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(MD(n))return this.pos++,this._addGap(),OD(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,j.EOF;return this._err(fe.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,j.EOF;const r=this.html.charCodeAt(n);return r===j.CARRIAGE_RETURN?j.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,j.EOF;let t=this.html.charCodeAt(this.pos);return t===j.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,j.LINE_FEED):t===j.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ng(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===j.LINE_FEED||t===j.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Fg(t)?this._err(fe.controlCharacterInInputStream):_g(t)&&this._err(fe.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var et;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(et||(et={}));function Bg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const FD=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),_D=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function BD(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=_D.get(e))!==null&&t!==void 0?t:e}var Xt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Xt||(Xt={}));const jD=32;var qr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qr||(qr={}));function yc(e){return e>=Xt.ZERO&&e<=Xt.NINE}function $D(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_F||e>=Xt.LOWER_A&&e<=Xt.LOWER_F}function HD(e){return e>=Xt.UPPER_A&&e<=Xt.UPPER_Z||e>=Xt.LOWER_A&&e<=Xt.LOWER_Z||yc(e)}function UD(e){return e===Xt.EQUALS||HD(e)}var Gt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Gt||(Gt={}));var Tr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Tr||(Tr={}));class zD{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Gt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Tr.Strict}startEntity(t){this.decodeMode=t,this.state=Gt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Gt.EntityStart:return t.charCodeAt(n)===Xt.NUM?(this.state=Gt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Gt.NamedEntity,this.stateNamedEntity(t,n));case Gt.NumericStart:return this.stateNumericStart(t,n);case Gt.NumericDecimal:return this.stateNumericDecimal(t,n);case Gt.NumericHex:return this.stateNumericHex(t,n);case Gt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|jD)===Xt.LOWER_X?(this.state=Gt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Gt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+Number.parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yc(o)||$D(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(yc(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Xt.SEMI)this.consumed+=1;else if(this.decodeMode===Tr.Strict)return 0;return this.emitCodePoint(BD(this.result),this.consumed),this.errors&&(t!==Xt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=VD(r,o,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Tr.Attribute&&(i===0||UD(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14,i!==0){if(a===Xt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Tr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&qr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~qr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Gt.NamedEntity:return this.result!==0&&(this.decodeMode!==Tr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Gt.NumericDecimal:return this.emitNumericEntity(0,2);case Gt.NumericHex:return this.emitNumericEntity(0,3);case Gt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Gt.EntityStart:return 0}}}function VD(e,t,n,r){const o=(t&qr.BRANCH_LENGTH)>>7,i=t&qr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const l=r-i;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<r)a=l+1;else if(u>r)s=l-1;else return e[l+o]}return-1}var Ee;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Ee||(Ee={}));var mo;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(mo||(mo={}));var Nn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Nn||(Nn={}));var ie;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ie||(ie={}));var b;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(b||(b={}));const WD=new Map([[ie.A,b.A],[ie.ADDRESS,b.ADDRESS],[ie.ANNOTATION_XML,b.ANNOTATION_XML],[ie.APPLET,b.APPLET],[ie.AREA,b.AREA],[ie.ARTICLE,b.ARTICLE],[ie.ASIDE,b.ASIDE],[ie.B,b.B],[ie.BASE,b.BASE],[ie.BASEFONT,b.BASEFONT],[ie.BGSOUND,b.BGSOUND],[ie.BIG,b.BIG],[ie.BLOCKQUOTE,b.BLOCKQUOTE],[ie.BODY,b.BODY],[ie.BR,b.BR],[ie.BUTTON,b.BUTTON],[ie.CAPTION,b.CAPTION],[ie.CENTER,b.CENTER],[ie.CODE,b.CODE],[ie.COL,b.COL],[ie.COLGROUP,b.COLGROUP],[ie.DD,b.DD],[ie.DESC,b.DESC],[ie.DETAILS,b.DETAILS],[ie.DIALOG,b.DIALOG],[ie.DIR,b.DIR],[ie.DIV,b.DIV],[ie.DL,b.DL],[ie.DT,b.DT],[ie.EM,b.EM],[ie.EMBED,b.EMBED],[ie.FIELDSET,b.FIELDSET],[ie.FIGCAPTION,b.FIGCAPTION],[ie.FIGURE,b.FIGURE],[ie.FONT,b.FONT],[ie.FOOTER,b.FOOTER],[ie.FOREIGN_OBJECT,b.FOREIGN_OBJECT],[ie.FORM,b.FORM],[ie.FRAME,b.FRAME],[ie.FRAMESET,b.FRAMESET],[ie.H1,b.H1],[ie.H2,b.H2],[ie.H3,b.H3],[ie.H4,b.H4],[ie.H5,b.H5],[ie.H6,b.H6],[ie.HEAD,b.HEAD],[ie.HEADER,b.HEADER],[ie.HGROUP,b.HGROUP],[ie.HR,b.HR],[ie.HTML,b.HTML],[ie.I,b.I],[ie.IMG,b.IMG],[ie.IMAGE,b.IMAGE],[ie.INPUT,b.INPUT],[ie.IFRAME,b.IFRAME],[ie.KEYGEN,b.KEYGEN],[ie.LABEL,b.LABEL],[ie.LI,b.LI],[ie.LINK,b.LINK],[ie.LISTING,b.LISTING],[ie.MAIN,b.MAIN],[ie.MALIGNMARK,b.MALIGNMARK],[ie.MARQUEE,b.MARQUEE],[ie.MATH,b.MATH],[ie.MENU,b.MENU],[ie.META,b.META],[ie.MGLYPH,b.MGLYPH],[ie.MI,b.MI],[ie.MO,b.MO],[ie.MN,b.MN],[ie.MS,b.MS],[ie.MTEXT,b.MTEXT],[ie.NAV,b.NAV],[ie.NOBR,b.NOBR],[ie.NOFRAMES,b.NOFRAMES],[ie.NOEMBED,b.NOEMBED],[ie.NOSCRIPT,b.NOSCRIPT],[ie.OBJECT,b.OBJECT],[ie.OL,b.OL],[ie.OPTGROUP,b.OPTGROUP],[ie.OPTION,b.OPTION],[ie.P,b.P],[ie.PARAM,b.PARAM],[ie.PLAINTEXT,b.PLAINTEXT],[ie.PRE,b.PRE],[ie.RB,b.RB],[ie.RP,b.RP],[ie.RT,b.RT],[ie.RTC,b.RTC],[ie.RUBY,b.RUBY],[ie.S,b.S],[ie.SCRIPT,b.SCRIPT],[ie.SEARCH,b.SEARCH],[ie.SECTION,b.SECTION],[ie.SELECT,b.SELECT],[ie.SOURCE,b.SOURCE],[ie.SMALL,b.SMALL],[ie.SPAN,b.SPAN],[ie.STRIKE,b.STRIKE],[ie.STRONG,b.STRONG],[ie.STYLE,b.STYLE],[ie.SUB,b.SUB],[ie.SUMMARY,b.SUMMARY],[ie.SUP,b.SUP],[ie.TABLE,b.TABLE],[ie.TBODY,b.TBODY],[ie.TEMPLATE,b.TEMPLATE],[ie.TEXTAREA,b.TEXTAREA],[ie.TFOOT,b.TFOOT],[ie.TD,b.TD],[ie.TH,b.TH],[ie.THEAD,b.THEAD],[ie.TITLE,b.TITLE],[ie.TR,b.TR],[ie.TRACK,b.TRACK],[ie.TT,b.TT],[ie.U,b.U],[ie.UL,b.UL],[ie.SVG,b.SVG],[ie.VAR,b.VAR],[ie.WBR,b.WBR],[ie.XMP,b.XMP]]);function Ei(e){var t;return(t=WD.get(e))!==null&&t!==void 0?t:b.UNKNOWN}const Se=b,qD={[Ee.HTML]:new Set([Se.ADDRESS,Se.APPLET,Se.AREA,Se.ARTICLE,Se.ASIDE,Se.BASE,Se.BASEFONT,Se.BGSOUND,Se.BLOCKQUOTE,Se.BODY,Se.BR,Se.BUTTON,Se.CAPTION,Se.CENTER,Se.COL,Se.COLGROUP,Se.DD,Se.DETAILS,Se.DIR,Se.DIV,Se.DL,Se.DT,Se.EMBED,Se.FIELDSET,Se.FIGCAPTION,Se.FIGURE,Se.FOOTER,Se.FORM,Se.FRAME,Se.FRAMESET,Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6,Se.HEAD,Se.HEADER,Se.HGROUP,Se.HR,Se.HTML,Se.IFRAME,Se.IMG,Se.INPUT,Se.LI,Se.LINK,Se.LISTING,Se.MAIN,Se.MARQUEE,Se.MENU,Se.META,Se.NAV,Se.NOEMBED,Se.NOFRAMES,Se.NOSCRIPT,Se.OBJECT,Se.OL,Se.P,Se.PARAM,Se.PLAINTEXT,Se.PRE,Se.SCRIPT,Se.SECTION,Se.SELECT,Se.SOURCE,Se.STYLE,Se.SUMMARY,Se.TABLE,Se.TBODY,Se.TD,Se.TEMPLATE,Se.TEXTAREA,Se.TFOOT,Se.TH,Se.THEAD,Se.TITLE,Se.TR,Se.TRACK,Se.UL,Se.WBR,Se.XMP]),[Ee.MATHML]:new Set([Se.MI,Se.MO,Se.MN,Se.MS,Se.MTEXT,Se.ANNOTATION_XML]),[Ee.SVG]:new Set([Se.TITLE,Se.FOREIGN_OBJECT,Se.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},xc=new Set([Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6]);ie.STYLE,ie.SCRIPT,ie.XMP,ie.IFRAME,ie.NOEMBED,ie.NOFRAMES,ie.PLAINTEXT;var z;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(z||(z={}));const Bt={DATA:z.DATA,RCDATA:z.RCDATA,RAWTEXT:z.RAWTEXT,SCRIPT_DATA:z.SCRIPT_DATA,PLAINTEXT:z.PLAINTEXT,CDATA_SECTION:z.CDATA_SECTION};function YD(e){return e>=j.DIGIT_0&&e<=j.DIGIT_9}function Zi(e){return e>=j.LATIN_CAPITAL_A&&e<=j.LATIN_CAPITAL_Z}function KD(e){return e>=j.LATIN_SMALL_A&&e<=j.LATIN_SMALL_Z}function Ur(e){return KD(e)||Zi(e)}function $f(e){return Ur(e)||YD(e)}function os(e){return e+32}function jg(e){return e===j.SPACE||e===j.LINE_FEED||e===j.TABULATION||e===j.FORM_FEED}function Hf(e){return jg(e)||e===j.SOLIDUS||e===j.GREATER_THAN_SIGN}function GD(e){return e===j.NULL?fe.nullCharacterReference:e>1114111?fe.characterReferenceOutsideUnicodeRange:Ng(e)?fe.surrogateCharacterReference:_g(e)?fe.noncharacterCharacterReference:Fg(e)||e===j.CARRIAGE_RETURN?fe.controlCharacterReference:null}class QD{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=z.DATA,this.returnState=z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ND(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new zD(FD,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(fe.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(fe.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=GD(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:et.START_TAG,tagName:"",tagID:b.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:et.END_TAG,tagName:"",tagID:b.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:et.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:et.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Bg(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(fe.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ei(t.tagName),t.type===et.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(fe.endTagWithAttributes),t.selfClosing&&this._err(fe.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case et.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case et.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case et.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:et.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=jg(t)?et.WHITESPACE_CHARACTER:t===j.NULL?et.NULL_CHARACTER:et.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(et.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Tr.Attribute:Tr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case z.DATA:{this._stateData(t);break}case z.RCDATA:{this._stateRcdata(t);break}case z.RAWTEXT:{this._stateRawtext(t);break}case z.SCRIPT_DATA:{this._stateScriptData(t);break}case z.PLAINTEXT:{this._statePlaintext(t);break}case z.TAG_OPEN:{this._stateTagOpen(t);break}case z.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case z.TAG_NAME:{this._stateTagName(t);break}case z.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case z.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case z.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case z.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case z.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case z.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case z.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case z.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case z.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case z.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case z.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case z.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case z.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case z.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case z.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case z.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case z.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case z.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case z.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case z.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case z.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case z.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case z.BOGUS_COMMENT:{this._stateBogusComment(t);break}case z.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case z.COMMENT_START:{this._stateCommentStart(t);break}case z.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case z.COMMENT:{this._stateComment(t);break}case z.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case z.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case z.COMMENT_END:{this._stateCommentEnd(t);break}case z.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case z.DOCTYPE:{this._stateDoctype(t);break}case z.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case z.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case z.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case z.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case z.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case z.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case z.CDATA_SECTION:{this._stateCdataSection(t);break}case z.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case z.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case z.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case z.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=z.TAG_OPEN;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitCodePoint(t);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case j.AMPERSAND:{this._startCharacterReference();break}case j.LESS_THAN_SIGN:{this.state=z.RCDATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case j.LESS_THAN_SIGN:{this.state=z.RAWTEXT_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ur(t))this._createStartTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case j.EXCLAMATION_MARK:{this.state=z.MARKUP_DECLARATION_OPEN;break}case j.SOLIDUS:{this.state=z.END_TAG_OPEN;break}case j.QUESTION_MARK:{this._err(fe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t);break}case j.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=z.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ur(t))this._createEndTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case j.GREATER_THAN_SIGN:{this._err(fe.missingEndTagName),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(fe.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.tagName+=Rt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Zi(t)?os(t):t)}}_stateRcdataLessThanSign(t){t===j.SOLIDUS?this.state=z.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ur(t)?(this.state=z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=z.BEFORE_ATTRIBUTE_NAME,!1;case j.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=z.SELF_CLOSING_START_TAG,!1;case j.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===j.SOLIDUS?this.state=z.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ur(t)?(this.state=z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case j.SOLIDUS:{this.state=z.SCRIPT_DATA_END_TAG_OPEN;break}case j.EXCLAMATION_MARK:{this.state=z.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=z.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ur(t)?(this.state=z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===j.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===j.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case j.HYPHEN_MINUS:{this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===j.SOLIDUS?this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ur(t)?(this._emitChars("<"),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ur(t)?(this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&Hf(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case j.HYPHEN_MINUS:{this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Rt);break}case j.EOF:{this._err(fe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===j.SOLIDUS?(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&Hf(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.SOLIDUS:case j.GREATER_THAN_SIGN:case j.EOF:{this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._err(fe.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:case j.SOLIDUS:case j.GREATER_THAN_SIGN:case j.EOF:{this._leaveAttrName(),this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._leaveAttrName(),this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:{this._err(fe.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.name+=Rt;break}default:this.currentAttr.name+=String.fromCodePoint(Zi(t)?os(t):t)}}_stateAfterAttributeName(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case j.EQUALS_SIGN:{this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{this.state=z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this.state=z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingAttributeValue),this.state=z.DATA,this.emitCurrentTagToken();break}default:this.state=z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case j.QUOTATION_MARK:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Rt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case j.APOSTROPHE:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Rt;break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),this.currentAttr.value+=Rt;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:case j.EQUALS_SIGN:case j.GRAVE_ACCENT:{this._err(fe.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this._leaveAttrValue(),this.state=z.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.missingWhitespaceBetweenAttributes),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case j.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=z.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(fe.eofInTag),this._emitEOFToken();break}default:this._err(fe.unexpectedSolidusInTag),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case j.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Rt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pn.DASH_DASH,!0)?(this._createCommentToken(pn.DASH_DASH.length+1),this.state=z.COMMENT_START):this._consumeSequenceIfMatch(pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pn.DOCTYPE.length+1),this.state=z.DOCTYPE):this._consumeSequenceIfMatch(pn.CDATA_START,!0)?this.inForeignNode?this.state=z.CDATA_SECTION:(this._err(fe.cdataInHtmlContent),this._createCommentToken(pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(fe.incorrectlyOpenedComment),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case j.HYPHEN_MINUS:{this.state=z.COMMENT_START_DASH;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=z.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptClosingOfEmptyComment),this.state=z.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=z.COMMENT_END_DASH;break}case j.LESS_THAN_SIGN:{n.data+="<",this.state=z.COMMENT_LESS_THAN_SIGN;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.data+=Rt;break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case j.EXCLAMATION_MARK:{n.data+="!",this.state=z.COMMENT_LESS_THAN_SIGN_BANG;break}case j.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===j.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=z.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===j.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=z.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==j.GREATER_THAN_SIGN&&t!==j.EOF&&this._err(fe.nestedComment),this.state=z.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case j.EXCLAMATION_MARK:{this.state=z.COMMENT_END_BANG;break}case j.HYPHEN_MINUS:{n.data+="-";break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{n.data+="--!",this.state=z.COMMENT_END_DASH;break}case j.GREATER_THAN_SIGN:{this._err(fe.incorrectlyClosedComment),this.state=z.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(fe.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=z.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case j.EOF:{this._err(fe.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingWhitespaceBeforeDoctypeName),this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Zi(t))this._createDoctypeToken(String.fromCharCode(os(t))),this.state=z.DOCTYPE_NAME;else switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.NULL:{this._err(fe.unexpectedNullCharacter),this._createDoctypeToken(Rt),this.state=z.DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=z.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.AFTER_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.name+=Rt;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Zi(t)?os(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pn.PUBLIC,!1)?this.state=z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pn.SYSTEM,!1)?this.state=z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(fe.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Rt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case j.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.publicId+=Rt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case j.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(fe.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(fe.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Rt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case j.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(fe.unexpectedNullCharacter),n.systemId+=Rt;break}case j.GREATER_THAN_SIGN:{this._err(fe.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:break;case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.EOF:{this._err(fe.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(fe.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case j.NULL:{this._err(fe.unexpectedNullCharacter);break}case j.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case j.RIGHT_SQUARE_BRACKET:{this.state=z.CDATA_SECTION_BRACKET;break}case j.EOF:{this._err(fe.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===j.RIGHT_SQUARE_BRACKET?this.state=z.CDATA_SECTION_END:(this._emitChars("]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case j.GREATER_THAN_SIGN:{this.state=z.DATA;break}case j.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(j.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$f(this.preprocessor.peek(1))?z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$f(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===j.SEMICOLON&&this._err(fe.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $g=new Set([b.DD,b.DT,b.LI,b.OPTGROUP,b.OPTION,b.P,b.RB,b.RP,b.RT,b.RTC]),Uf=new Set([...$g,b.CAPTION,b.COLGROUP,b.TBODY,b.TD,b.TFOOT,b.TH,b.THEAD,b.TR]),Ys=new Set([b.APPLET,b.CAPTION,b.HTML,b.MARQUEE,b.OBJECT,b.TABLE,b.TD,b.TEMPLATE,b.TH]),XD=new Set([...Ys,b.OL,b.UL]),ZD=new Set([...Ys,b.BUTTON]),zf=new Set([b.ANNOTATION_XML,b.MI,b.MN,b.MO,b.MS,b.MTEXT]),Vf=new Set([b.DESC,b.FOREIGN_OBJECT,b.TITLE]),JD=new Set([b.TR,b.TEMPLATE,b.HTML]),ew=new Set([b.TBODY,b.TFOOT,b.THEAD,b.TEMPLATE,b.HTML]),tw=new Set([b.TABLE,b.TEMPLATE,b.HTML]),nw=new Set([b.TD,b.TH]);class rw{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=b.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===b.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ee.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==Ee.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xc,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(nw,Ee.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(tw,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ew,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(JD,Ee.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===b.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===b.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case Ee.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case Ee.SVG:{if(Vf.has(o))return!1;break}case Ee.MATHML:{if(zf.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ys)}hasInListItemScope(t){return this.hasInDynamicScope(t,XD)}hasInButtonScope(t){return this.hasInDynamicScope(t,ZD)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Ee.HTML:{if(xc.has(n))return!0;if(Ys.has(n))return!1;break}case Ee.SVG:{if(Vf.has(n))return!1;break}case Ee.MATHML:{if(zf.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.HTML)switch(this.tagIDs[n]){case t:return!0;case b.TABLE:case b.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Ee.HTML)switch(this.tagIDs[t]){case b.TBODY:case b.THEAD:case b.TFOOT:return!0;case b.TABLE:case b.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Ee.HTML)switch(this.tagIDs[n]){case t:return!0;case b.OPTION:case b.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$g.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Uf.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Uf.has(this.currentTagId);)this.pop()}}const Du=3;var ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ar||(ar={}));const Wf={type:ar.Marker};class ow{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===ar.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const c=this.treeAdapter.getAttrList(u);c.length===o&&r.push({idx:s,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Du)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Du)return;const o=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>o.get(l.name)===l.value)&&(i+=1,i>=Du&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(Wf)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ar.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Wf);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ar.Element&&n.element===t)}}const zr={createDocument(){return{nodeName:"#document",mode:Nn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(i=>i.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};zr.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(zr.isTextNode(n)){n.value+=t;return}}zr.appendChild(e,zr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&zr.isTextNode(r)?r.value+=t:zr.insertBefore(e,zr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Hg="html",iw="about:legacy-compat",aw="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Ug=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],sw=[...Ug,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],lw=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),zg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],uw=[...zg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qf(e,t){return t.some(n=>e.startsWith(n))}function cw(e){return e.name===Hg&&e.publicId===null&&(e.systemId===null||e.systemId===iw)}function dw(e){if(e.name!==Hg)return Nn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aw)return Nn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),lw.has(n))return Nn.QUIRKS;let r=t===null?sw:Ug;if(qf(n,r))return Nn.QUIRKS;if(r=t===null?zg:uw,qf(n,r))return Nn.LIMITED_QUIRKS}return Nn.NO_QUIRKS}const Yf={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},pw="definitionurl",fw="definitionURL",hw=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),mw=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Ee.XMLNS}]]),gw=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),bw=new Set([b.B,b.BIG,b.BLOCKQUOTE,b.BODY,b.BR,b.CENTER,b.CODE,b.DD,b.DIV,b.DL,b.DT,b.EM,b.EMBED,b.H1,b.H2,b.H3,b.H4,b.H5,b.H6,b.HEAD,b.HR,b.I,b.IMG,b.LI,b.LISTING,b.MENU,b.META,b.NOBR,b.OL,b.P,b.PRE,b.RUBY,b.S,b.SMALL,b.SPAN,b.STRONG,b.STRIKE,b.SUB,b.SUP,b.TABLE,b.TT,b.U,b.UL,b.VAR]);function yw(e){const t=e.tagID;return t===b.FONT&&e.attrs.some(({name:r})=>r===mo.COLOR||r===mo.SIZE||r===mo.FACE)||bw.has(t)}function Vg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===pw){e.attrs[t].name=fw;break}}function Wg(e){for(let t=0;t<e.attrs.length;t++){const n=hw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function gd(e){for(let t=0;t<e.attrs.length;t++){const n=mw.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function xw(e){const t=gw.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ei(e.tagName))}function Ew(e,t){return t===Ee.MATHML&&(e===b.MI||e===b.MO||e===b.MN||e===b.MS||e===b.MTEXT)}function Cw(e,t,n){if(t===Ee.MATHML&&e===b.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===mo.ENCODING){const o=n[r].value.toLowerCase();return o===Yf.TEXT_HTML||o===Yf.APPLICATION_XML}}return t===Ee.SVG&&(e===b.FOREIGN_OBJECT||e===b.DESC||e===b.TITLE)}function Tw(e,t,n,r){return(!r||r===Ee.HTML)&&Cw(e,t,n)||(!r||r===Ee.MATHML)&&Ew(e,t)}const vw="hidden",Sw=8,kw=3;var K;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(K||(K={}));const Dw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},qg=new Set([b.TABLE,b.TBODY,b.TFOOT,b.THEAD,b.TR]),Kf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:zr,onParseError:null};class Gf{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=K.INITIAL,this.originalInsertionMode=K.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Kf,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new QD(this.options,this),this.activeFormattingElements=new ow(this.treeAdapter),this.fragmentContextID=r?Ei(this.treeAdapter.getTagName(r)):b.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new rw(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Kf,...n};t??(t=r.treeAdapter.createElement(ie.TEMPLATE,Ee.HTML,[]));const o=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),i=new this(r,o,t);return i.fragmentContextID===b.TEMPLATE&&i.tmplInsertionModeStack.unshift(K.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const i=(o=t.location)!==null&&o!==void 0?o:Dw,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,i;(i=(o=this.treeAdapter).onItemPush)===null||i===void 0||i.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Ee.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Ee.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=K.TEXT}switchToPlaintextParsing(){this.insertionMode=K.TEXT,this.originalInsertionMode=K.IN_BODY,this.tokenizer.state=Bt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===ie.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Ee.HTML))switch(this.fragmentContextID){case b.TITLE:case b.TEXTAREA:{this.tokenizer.state=Bt.RCDATA;break}case b.STYLE:case b.XMP:case b.IFRAME:case b.NOEMBED:case b.NOFRAMES:case b.NOSCRIPT:{this.tokenizer.state=Bt.RAWTEXT;break}case b.SCRIPT:{this.tokenizer.state=Bt.SCRIPT_DATA;break}case b.PLAINTEXT:{this.tokenizer.state=Bt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,Ee.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Ee.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ie.HTML,Ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,b.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),i=r?o.lastIndexOf(r):o.length,a=o[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),i=n.type===et.END_TAG&&o===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===b.SVG&&this.treeAdapter.getTagName(n)===ie.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===b.MGLYPH||t.tagID===b.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Ee.HTML)}_processToken(t){switch(t.type){case et.CHARACTER:{this.onCharacter(t);break}case et.NULL_CHARACTER:{this.onNullCharacter(t);break}case et.COMMENT:{this.onComment(t);break}case et.DOCTYPE:{this.onDoctype(t);break}case et.START_TAG:{this._processStartTag(t);break}case et.END_TAG:{this.onEndTag(t);break}case et.EOF:{this.onEof(t);break}case et.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Tw(t,o,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===ar.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const i=this.activeFormattingElements.entries[o];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=K.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(b.P),this.openElements.popUntilTagNamePopped(b.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case b.TR:{this.insertionMode=K.IN_ROW;return}case b.TBODY:case b.THEAD:case b.TFOOT:{this.insertionMode=K.IN_TABLE_BODY;return}case b.CAPTION:{this.insertionMode=K.IN_CAPTION;return}case b.COLGROUP:{this.insertionMode=K.IN_COLUMN_GROUP;return}case b.TABLE:{this.insertionMode=K.IN_TABLE;return}case b.BODY:{this.insertionMode=K.IN_BODY;return}case b.FRAMESET:{this.insertionMode=K.IN_FRAMESET;return}case b.SELECT:{this._resetInsertionModeForSelect(t);return}case b.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case b.HTML:{this.insertionMode=this.headElement?K.AFTER_HEAD:K.BEFORE_HEAD;return}case b.TD:case b.TH:{if(t>0){this.insertionMode=K.IN_CELL;return}break}case b.HEAD:{if(t>0){this.insertionMode=K.IN_HEAD;return}break}}this.insertionMode=K.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===b.TEMPLATE)break;if(r===b.TABLE){this.insertionMode=K.IN_SELECT_IN_TABLE;return}}this.insertionMode=K.IN_SELECT}_isElementCausesFosterParenting(t){return qg.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case b.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Ee.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case b.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return qD[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nI(this,t);return}switch(this.insertionMode){case K.INITIAL:{Fi(this,t);break}case K.BEFORE_HTML:{ia(this,t);break}case K.BEFORE_HEAD:{aa(this,t);break}case K.IN_HEAD:{sa(this,t);break}case K.IN_HEAD_NO_SCRIPT:{la(this,t);break}case K.AFTER_HEAD:{ua(this,t);break}case K.IN_BODY:case K.IN_CAPTION:case K.IN_CELL:case K.IN_TEMPLATE:{Kg(this,t);break}case K.TEXT:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:{wu(this,t);break}case K.IN_TABLE_TEXT:{e1(this,t);break}case K.IN_COLUMN_GROUP:{Ks(this,t);break}case K.AFTER_BODY:{Gs(this,t);break}case K.AFTER_AFTER_BODY:{xs(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tI(this,t);return}switch(this.insertionMode){case K.INITIAL:{Fi(this,t);break}case K.BEFORE_HTML:{ia(this,t);break}case K.BEFORE_HEAD:{aa(this,t);break}case K.IN_HEAD:{sa(this,t);break}case K.IN_HEAD_NO_SCRIPT:{la(this,t);break}case K.AFTER_HEAD:{ua(this,t);break}case K.TEXT:{this._insertCharacters(t);break}case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:{wu(this,t);break}case K.IN_COLUMN_GROUP:{Ks(this,t);break}case K.AFTER_BODY:{Gs(this,t);break}case K.AFTER_AFTER_BODY:{xs(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ec(this,t);return}switch(this.insertionMode){case K.INITIAL:case K.BEFORE_HTML:case K.BEFORE_HEAD:case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:case K.IN_BODY:case K.IN_TABLE:case K.IN_CAPTION:case K.IN_COLUMN_GROUP:case K.IN_TABLE_BODY:case K.IN_ROW:case K.IN_CELL:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:case K.IN_TEMPLATE:case K.IN_FRAMESET:case K.AFTER_FRAMESET:{Ec(this,t);break}case K.IN_TABLE_TEXT:{_i(this,t);break}case K.AFTER_BODY:{Ow(this,t);break}case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:{Lw(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case K.INITIAL:{Nw(this,t);break}case K.BEFORE_HEAD:case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:{this._err(t,fe.misplacedDoctype);break}case K.IN_TABLE_TEXT:{_i(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,fe.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?rI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case K.INITIAL:{Fi(this,t);break}case K.BEFORE_HTML:{Fw(this,t);break}case K.BEFORE_HEAD:{Bw(this,t);break}case K.IN_HEAD:{Jn(this,t);break}case K.IN_HEAD_NO_SCRIPT:{Hw(this,t);break}case K.AFTER_HEAD:{zw(this,t);break}case K.IN_BODY:{rn(this,t);break}case K.IN_TABLE:{ai(this,t);break}case K.IN_TABLE_TEXT:{_i(this,t);break}case K.IN_CAPTION:{j6(this,t);break}case K.IN_COLUMN_GROUP:{xd(this,t);break}case K.IN_TABLE_BODY:{Ml(this,t);break}case K.IN_ROW:{Ol(this,t);break}case K.IN_CELL:{U6(this,t);break}case K.IN_SELECT:{r1(this,t);break}case K.IN_SELECT_IN_TABLE:{V6(this,t);break}case K.IN_TEMPLATE:{q6(this,t);break}case K.AFTER_BODY:{K6(this,t);break}case K.IN_FRAMESET:{G6(this,t);break}case K.AFTER_FRAMESET:{X6(this,t);break}case K.AFTER_AFTER_BODY:{J6(this,t);break}case K.AFTER_AFTER_FRAMESET:{eI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?oI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case K.INITIAL:{Fi(this,t);break}case K.BEFORE_HTML:{_w(this,t);break}case K.BEFORE_HEAD:{jw(this,t);break}case K.IN_HEAD:{$w(this,t);break}case K.IN_HEAD_NO_SCRIPT:{Uw(this,t);break}case K.AFTER_HEAD:{Vw(this,t);break}case K.IN_BODY:{Rl(this,t);break}case K.TEXT:{A6(this,t);break}case K.IN_TABLE:{Ta(this,t);break}case K.IN_TABLE_TEXT:{_i(this,t);break}case K.IN_CAPTION:{$6(this,t);break}case K.IN_COLUMN_GROUP:{H6(this,t);break}case K.IN_TABLE_BODY:{Cc(this,t);break}case K.IN_ROW:{n1(this,t);break}case K.IN_CELL:{z6(this,t);break}case K.IN_SELECT:{o1(this,t);break}case K.IN_SELECT_IN_TABLE:{W6(this,t);break}case K.IN_TEMPLATE:{Y6(this,t);break}case K.AFTER_BODY:{a1(this,t);break}case K.IN_FRAMESET:{Q6(this,t);break}case K.AFTER_FRAMESET:{Z6(this,t);break}case K.AFTER_AFTER_BODY:{xs(this,t);break}}}onEof(t){switch(this.insertionMode){case K.INITIAL:{Fi(this,t);break}case K.BEFORE_HTML:{ia(this,t);break}case K.BEFORE_HEAD:{aa(this,t);break}case K.IN_HEAD:{sa(this,t);break}case K.IN_HEAD_NO_SCRIPT:{la(this,t);break}case K.AFTER_HEAD:{ua(this,t);break}case K.IN_BODY:case K.IN_TABLE:case K.IN_CAPTION:case K.IN_COLUMN_GROUP:case K.IN_TABLE_BODY:case K.IN_ROW:case K.IN_CELL:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:{Zg(this,t);break}case K.TEXT:{P6(this,t);break}case K.IN_TABLE_TEXT:{_i(this,t);break}case K.IN_TEMPLATE:{i1(this,t);break}case K.AFTER_BODY:case K.IN_FRAMESET:case K.AFTER_FRAMESET:case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:{yd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===j.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:case K.TEXT:case K.IN_COLUMN_GROUP:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:case K.IN_FRAMESET:case K.AFTER_FRAMESET:{this._insertCharacters(t);break}case K.IN_BODY:case K.IN_CAPTION:case K.IN_CELL:case K.IN_TEMPLATE:case K.AFTER_BODY:case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:{Yg(this,t);break}case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:{wu(this,t);break}case K.IN_TABLE_TEXT:{Jg(this,t);break}}}}function ww(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Xg(e,t),n}function Iw(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Aw(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let i=0,a=o;a!==n;i++,a=o){o=e.openElements.getCommonAncestor(a);const s=e.activeFormattingElements.getElementEntry(a),l=s&&i>=kw;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(a)):(a=Pw(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Pw(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Rw(e,t,n){const r=e.treeAdapter.getTagName(t),o=Ei(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);o===b.TEMPLATE&&i===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Mw(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,i=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,o.tagID)}function bd(e,t){for(let n=0;n<Sw;n++){const r=ww(e,t);if(!r)break;const o=Iw(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const i=Aw(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&Rw(e,a,i),Mw(e,o,r)}}function Ec(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ow(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Lw(e,t){e._appendCommentNode(t,e.document)}function yd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function Nw(e,t){e._setDocumentType(t);const n=t.forceQuirks?Nn.QUIRKS:dw(t);cw(t)||e._err(t,fe.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=K.BEFORE_HTML}function Fi(e,t){e._err(t,fe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Nn.QUIRKS),e.insertionMode=K.BEFORE_HTML,e._processToken(t)}function Fw(e,t){t.tagID===b.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=K.BEFORE_HEAD):ia(e,t)}function _w(e,t){const n=t.tagID;(n===b.HTML||n===b.HEAD||n===b.BODY||n===b.BR)&&ia(e,t)}function ia(e,t){e._insertFakeRootElement(),e.insertionMode=K.BEFORE_HEAD,e._processToken(t)}function Bw(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=K.IN_HEAD;break}default:aa(e,t)}}function jw(e,t){const n=t.tagID;n===b.HEAD||n===b.BODY||n===b.HTML||n===b.BR?aa(e,t):e._err(t,fe.endTagWithoutMatchingOpenElement)}function aa(e,t){e._insertFakeElement(ie.HEAD,b.HEAD),e.headElement=e.openElements.current,e.insertionMode=K.IN_HEAD,e._processToken(t)}function Jn(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.BASE:case b.BASEFONT:case b.BGSOUND:case b.LINK:case b.META:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case b.TITLE:{e._switchToTextParsing(t,Bt.RCDATA);break}case b.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Bt.RAWTEXT):(e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_HEAD_NO_SCRIPT);break}case b.NOFRAMES:case b.STYLE:{e._switchToTextParsing(t,Bt.RAWTEXT);break}case b.SCRIPT:{e._switchToTextParsing(t,Bt.SCRIPT_DATA);break}case b.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=K.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(K.IN_TEMPLATE);break}case b.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:sa(e,t)}}function $w(e,t){switch(t.tagID){case b.HEAD:{e.openElements.pop(),e.insertionMode=K.AFTER_HEAD;break}case b.BODY:case b.BR:case b.HTML:{sa(e,t);break}case b.TEMPLATE:{Io(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function Io(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==b.TEMPLATE&&e._err(t,fe.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(b.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,fe.endTagWithoutMatchingOpenElement)}function sa(e,t){e.openElements.pop(),e.insertionMode=K.AFTER_HEAD,e._processToken(t)}function Hw(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.BASEFONT:case b.BGSOUND:case b.HEAD:case b.LINK:case b.META:case b.NOFRAMES:case b.STYLE:{Jn(e,t);break}case b.NOSCRIPT:{e._err(t,fe.nestedNoscriptInHead);break}default:la(e,t)}}function Uw(e,t){switch(t.tagID){case b.NOSCRIPT:{e.openElements.pop(),e.insertionMode=K.IN_HEAD;break}case b.BR:{la(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function la(e,t){const n=t.type===et.EOF?fe.openElementsLeftAfterEof:fe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=K.IN_HEAD,e._processToken(t)}function zw(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=K.IN_BODY;break}case b.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_FRAMESET;break}case b.BASE:case b.BASEFONT:case b.BGSOUND:case b.LINK:case b.META:case b.NOFRAMES:case b.SCRIPT:case b.STYLE:case b.TEMPLATE:case b.TITLE:{e._err(t,fe.abandonedHeadElementChild),e.openElements.push(e.headElement,b.HEAD),Jn(e,t),e.openElements.remove(e.headElement);break}case b.HEAD:{e._err(t,fe.misplacedStartTagForHeadElement);break}default:ua(e,t)}}function Vw(e,t){switch(t.tagID){case b.BODY:case b.HTML:case b.BR:{ua(e,t);break}case b.TEMPLATE:{Io(e,t);break}default:e._err(t,fe.endTagWithoutMatchingOpenElement)}}function ua(e,t){e._insertFakeElement(ie.BODY,b.BODY),e.insertionMode=K.IN_BODY,Pl(e,t)}function Pl(e,t){switch(t.type){case et.CHARACTER:{Kg(e,t);break}case et.WHITESPACE_CHARACTER:{Yg(e,t);break}case et.COMMENT:{Ec(e,t);break}case et.START_TAG:{rn(e,t);break}case et.END_TAG:{Rl(e,t);break}case et.EOF:{Zg(e,t);break}}}function Yg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Kg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Ww(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function qw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Yw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_FRAMESET)}function Kw(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function Gw(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function Qw(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Xw(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),n||(e.formElement=e.openElements.current))}function Zw(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===b.LI&&o===b.LI||(n===b.DD||n===b.DT)&&(o===b.DD||o===b.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==b.ADDRESS&&o!==b.DIV&&o!==b.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function Jw(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=Bt.PLAINTEXT}function e6(e,t){e.openElements.hasInScope(b.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(b.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1}function t6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ie.A);n&&(bd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function n6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function r6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(b.NOBR)&&(bd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function o6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function i6(e,t){e.treeAdapter.getDocumentMode(e.document)!==Nn.QUIRKS&&e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=K.IN_TABLE}function Gg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qg(e){const t=Bg(e,mo.TYPE);return t!=null&&t.toLowerCase()===vw}function a6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),Qg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function s6(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function l6(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function u6(e,t){t.tagName=ie.IMG,t.tagID=b.IMG,Gg(e,t)}function c6(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=K.TEXT}function d6(e,t){e.openElements.hasInButtonScope(b.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function p6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function Qf(e,t){e._switchToTextParsing(t,Bt.RAWTEXT)}function f6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===K.IN_TABLE||e.insertionMode===K.IN_CAPTION||e.insertionMode===K.IN_TABLE_BODY||e.insertionMode===K.IN_ROW||e.insertionMode===K.IN_CELL?K.IN_SELECT_IN_TABLE:K.IN_SELECT}function h6(e,t){e.openElements.currentTagId===b.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function m6(e,t){e.openElements.hasInScope(b.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function g6(e,t){e.openElements.hasInScope(b.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(b.RTC),e._insertElement(t,Ee.HTML)}function b6(e,t){e._reconstructActiveFormattingElements(),Vg(t),gd(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function y6(e,t){e._reconstructActiveFormattingElements(),Wg(t),gd(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function Xf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function rn(e,t){switch(t.tagID){case b.I:case b.S:case b.B:case b.U:case b.EM:case b.TT:case b.BIG:case b.CODE:case b.FONT:case b.SMALL:case b.STRIKE:case b.STRONG:{n6(e,t);break}case b.A:{t6(e,t);break}case b.H1:case b.H2:case b.H3:case b.H4:case b.H5:case b.H6:{Gw(e,t);break}case b.P:case b.DL:case b.OL:case b.UL:case b.DIV:case b.DIR:case b.NAV:case b.MAIN:case b.MENU:case b.ASIDE:case b.CENTER:case b.FIGURE:case b.FOOTER:case b.HEADER:case b.HGROUP:case b.DIALOG:case b.DETAILS:case b.ADDRESS:case b.ARTICLE:case b.SEARCH:case b.SECTION:case b.SUMMARY:case b.FIELDSET:case b.BLOCKQUOTE:case b.FIGCAPTION:{Kw(e,t);break}case b.LI:case b.DD:case b.DT:{Zw(e,t);break}case b.BR:case b.IMG:case b.WBR:case b.AREA:case b.EMBED:case b.KEYGEN:{Gg(e,t);break}case b.HR:{l6(e,t);break}case b.RB:case b.RTC:{m6(e,t);break}case b.RT:case b.RP:{g6(e,t);break}case b.PRE:case b.LISTING:{Qw(e,t);break}case b.XMP:{d6(e,t);break}case b.SVG:{y6(e,t);break}case b.HTML:{Ww(e,t);break}case b.BASE:case b.LINK:case b.META:case b.STYLE:case b.TITLE:case b.SCRIPT:case b.BGSOUND:case b.BASEFONT:case b.TEMPLATE:{Jn(e,t);break}case b.BODY:{qw(e,t);break}case b.FORM:{Xw(e,t);break}case b.NOBR:{r6(e,t);break}case b.MATH:{b6(e,t);break}case b.TABLE:{i6(e,t);break}case b.INPUT:{a6(e,t);break}case b.PARAM:case b.TRACK:case b.SOURCE:{s6(e,t);break}case b.IMAGE:{u6(e,t);break}case b.BUTTON:{e6(e,t);break}case b.APPLET:case b.OBJECT:case b.MARQUEE:{o6(e,t);break}case b.IFRAME:{p6(e,t);break}case b.SELECT:{f6(e,t);break}case b.OPTION:case b.OPTGROUP:{h6(e,t);break}case b.NOEMBED:case b.NOFRAMES:{Qf(e,t);break}case b.FRAMESET:{Yw(e,t);break}case b.TEXTAREA:{c6(e,t);break}case b.NOSCRIPT:{e.options.scriptingEnabled?Qf(e,t):Xf(e,t);break}case b.PLAINTEXT:{Jw(e,t);break}case b.COL:case b.TH:case b.TD:case b.TR:case b.HEAD:case b.FRAME:case b.TBODY:case b.TFOOT:case b.THEAD:case b.CAPTION:case b.COLGROUP:break;default:Xf(e,t)}}function x6(e,t){if(e.openElements.hasInScope(b.BODY)&&(e.insertionMode=K.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function E6(e,t){e.openElements.hasInScope(b.BODY)&&(e.insertionMode=K.AFTER_BODY,a1(e,t))}function C6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function T6(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(b.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(b.FORM):n&&e.openElements.remove(n))}function v6(e){e.openElements.hasInButtonScope(b.P)||e._insertFakeElement(ie.P,b.P),e._closePElement()}function S6(e){e.openElements.hasInListItemScope(b.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(b.LI),e.openElements.popUntilTagNamePopped(b.LI))}function k6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function D6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function w6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function I6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ie.BR,b.BR),e.openElements.pop(),e.framesetOk=!1}function Xg(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const i=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==b.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(i,a))break}}function Rl(e,t){switch(t.tagID){case b.A:case b.B:case b.I:case b.S:case b.U:case b.EM:case b.TT:case b.BIG:case b.CODE:case b.FONT:case b.NOBR:case b.SMALL:case b.STRIKE:case b.STRONG:{bd(e,t);break}case b.P:{v6(e);break}case b.DL:case b.UL:case b.OL:case b.DIR:case b.DIV:case b.NAV:case b.PRE:case b.MAIN:case b.MENU:case b.ASIDE:case b.BUTTON:case b.CENTER:case b.FIGURE:case b.FOOTER:case b.HEADER:case b.HGROUP:case b.DIALOG:case b.ADDRESS:case b.ARTICLE:case b.DETAILS:case b.SEARCH:case b.SECTION:case b.SUMMARY:case b.LISTING:case b.FIELDSET:case b.BLOCKQUOTE:case b.FIGCAPTION:{C6(e,t);break}case b.LI:{S6(e);break}case b.DD:case b.DT:{k6(e,t);break}case b.H1:case b.H2:case b.H3:case b.H4:case b.H5:case b.H6:{D6(e);break}case b.BR:{I6(e);break}case b.BODY:{x6(e,t);break}case b.HTML:{E6(e,t);break}case b.FORM:{T6(e);break}case b.APPLET:case b.OBJECT:case b.MARQUEE:{w6(e,t);break}case b.TEMPLATE:{Io(e,t);break}default:Xg(e,t)}}function Zg(e,t){e.tmplInsertionModeStack.length>0?i1(e,t):yd(e,t)}function A6(e,t){var n;t.tagID===b.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function P6(e,t){e._err(t,fe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function wu(e,t){if(e.openElements.currentTagId!==void 0&&qg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=K.IN_TABLE_TEXT,t.type){case et.CHARACTER:{e1(e,t);break}case et.WHITESPACE_CHARACTER:{Jg(e,t);break}}else $a(e,t)}function R6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_CAPTION}function M6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_COLUMN_GROUP}function O6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ie.COLGROUP,b.COLGROUP),e.insertionMode=K.IN_COLUMN_GROUP,xd(e,t)}function L6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_TABLE_BODY}function N6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ie.TBODY,b.TBODY),e.insertionMode=K.IN_TABLE_BODY,Ml(e,t)}function F6(e,t){e.openElements.hasInTableScope(b.TABLE)&&(e.openElements.popUntilTagNamePopped(b.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function _6(e,t){Qg(t)?e._appendElement(t,Ee.HTML):$a(e,t),t.ackSelfClosing=!0}function B6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ai(e,t){switch(t.tagID){case b.TD:case b.TH:case b.TR:{N6(e,t);break}case b.STYLE:case b.SCRIPT:case b.TEMPLATE:{Jn(e,t);break}case b.COL:{O6(e,t);break}case b.FORM:{B6(e,t);break}case b.TABLE:{F6(e,t);break}case b.TBODY:case b.TFOOT:case b.THEAD:{L6(e,t);break}case b.INPUT:{_6(e,t);break}case b.CAPTION:{R6(e,t);break}case b.COLGROUP:{M6(e,t);break}default:$a(e,t)}}function Ta(e,t){switch(t.tagID){case b.TABLE:{e.openElements.hasInTableScope(b.TABLE)&&(e.openElements.popUntilTagNamePopped(b.TABLE),e._resetInsertionMode());break}case b.TEMPLATE:{Io(e,t);break}case b.BODY:case b.CAPTION:case b.COL:case b.COLGROUP:case b.HTML:case b.TBODY:case b.TD:case b.TFOOT:case b.TH:case b.THEAD:case b.TR:break;default:$a(e,t)}}function $a(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pl(e,t),e.fosterParentingEnabled=n}function Jg(e,t){e.pendingCharacterTokens.push(t)}function e1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function _i(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)$a(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const t1=new Set([b.CAPTION,b.COL,b.COLGROUP,b.TBODY,b.TD,b.TFOOT,b.TH,b.THEAD,b.TR]);function j6(e,t){const n=t.tagID;t1.has(n)?e.openElements.hasInTableScope(b.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(b.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=K.IN_TABLE,ai(e,t)):rn(e,t)}function $6(e,t){const n=t.tagID;switch(n){case b.CAPTION:case b.TABLE:{e.openElements.hasInTableScope(b.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(b.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=K.IN_TABLE,n===b.TABLE&&Ta(e,t));break}case b.BODY:case b.COL:case b.COLGROUP:case b.HTML:case b.TBODY:case b.TD:case b.TFOOT:case b.TH:case b.THEAD:case b.TR:break;default:Rl(e,t)}}function xd(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case b.TEMPLATE:{Jn(e,t);break}default:Ks(e,t)}}function H6(e,t){switch(t.tagID){case b.COLGROUP:{e.openElements.currentTagId===b.COLGROUP&&(e.openElements.pop(),e.insertionMode=K.IN_TABLE);break}case b.TEMPLATE:{Io(e,t);break}case b.COL:break;default:Ks(e,t)}}function Ks(e,t){e.openElements.currentTagId===b.COLGROUP&&(e.openElements.pop(),e.insertionMode=K.IN_TABLE,e._processToken(t))}function Ml(e,t){switch(t.tagID){case b.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_ROW;break}case b.TH:case b.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ie.TR,b.TR),e.insertionMode=K.IN_ROW,Ol(e,t);break}case b.CAPTION:case b.COL:case b.COLGROUP:case b.TBODY:case b.TFOOT:case b.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE,ai(e,t));break}default:ai(e,t)}}function Cc(e,t){const n=t.tagID;switch(t.tagID){case b.TBODY:case b.TFOOT:case b.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE);break}case b.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE,Ta(e,t));break}case b.BODY:case b.CAPTION:case b.COL:case b.COLGROUP:case b.HTML:case b.TD:case b.TH:case b.TR:break;default:Ta(e,t)}}function Ol(e,t){switch(t.tagID){case b.TH:case b.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=K.IN_CELL,e.activeFormattingElements.insertMarker();break}case b.CAPTION:case b.COL:case b.COLGROUP:case b.TBODY:case b.TFOOT:case b.THEAD:case b.TR:{e.openElements.hasInTableScope(b.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,Ml(e,t));break}default:ai(e,t)}}function n1(e,t){switch(t.tagID){case b.TR:{e.openElements.hasInTableScope(b.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY);break}case b.TABLE:{e.openElements.hasInTableScope(b.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,Cc(e,t));break}case b.TBODY:case b.TFOOT:case b.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(b.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,Cc(e,t));break}case b.BODY:case b.CAPTION:case b.COL:case b.COLGROUP:case b.HTML:case b.TD:case b.TH:break;default:Ta(e,t)}}function U6(e,t){const n=t.tagID;t1.has(n)?(e.openElements.hasInTableScope(b.TD)||e.openElements.hasInTableScope(b.TH))&&(e._closeTableCell(),Ol(e,t)):rn(e,t)}function z6(e,t){const n=t.tagID;switch(n){case b.TD:case b.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=K.IN_ROW);break}case b.TABLE:case b.TBODY:case b.TFOOT:case b.THEAD:case b.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),n1(e,t));break}case b.BODY:case b.CAPTION:case b.COL:case b.COLGROUP:case b.HTML:break;default:Rl(e,t)}}function r1(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.OPTION:{e.openElements.currentTagId===b.OPTION&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case b.OPTGROUP:{e.openElements.currentTagId===b.OPTION&&e.openElements.pop(),e.openElements.currentTagId===b.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case b.HR:{e.openElements.currentTagId===b.OPTION&&e.openElements.pop(),e.openElements.currentTagId===b.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case b.INPUT:case b.KEYGEN:case b.TEXTAREA:case b.SELECT:{e.openElements.hasInSelectScope(b.SELECT)&&(e.openElements.popUntilTagNamePopped(b.SELECT),e._resetInsertionMode(),t.tagID!==b.SELECT&&e._processStartTag(t));break}case b.SCRIPT:case b.TEMPLATE:{Jn(e,t);break}}}function o1(e,t){switch(t.tagID){case b.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===b.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===b.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===b.OPTGROUP&&e.openElements.pop();break}case b.OPTION:{e.openElements.currentTagId===b.OPTION&&e.openElements.pop();break}case b.SELECT:{e.openElements.hasInSelectScope(b.SELECT)&&(e.openElements.popUntilTagNamePopped(b.SELECT),e._resetInsertionMode());break}case b.TEMPLATE:{Io(e,t);break}}}function V6(e,t){const n=t.tagID;n===b.CAPTION||n===b.TABLE||n===b.TBODY||n===b.TFOOT||n===b.THEAD||n===b.TR||n===b.TD||n===b.TH?(e.openElements.popUntilTagNamePopped(b.SELECT),e._resetInsertionMode(),e._processStartTag(t)):r1(e,t)}function W6(e,t){const n=t.tagID;n===b.CAPTION||n===b.TABLE||n===b.TBODY||n===b.TFOOT||n===b.THEAD||n===b.TR||n===b.TD||n===b.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(b.SELECT),e._resetInsertionMode(),e.onEndTag(t)):o1(e,t)}function q6(e,t){switch(t.tagID){case b.BASE:case b.BASEFONT:case b.BGSOUND:case b.LINK:case b.META:case b.NOFRAMES:case b.SCRIPT:case b.STYLE:case b.TEMPLATE:case b.TITLE:{Jn(e,t);break}case b.CAPTION:case b.COLGROUP:case b.TBODY:case b.TFOOT:case b.THEAD:{e.tmplInsertionModeStack[0]=K.IN_TABLE,e.insertionMode=K.IN_TABLE,ai(e,t);break}case b.COL:{e.tmplInsertionModeStack[0]=K.IN_COLUMN_GROUP,e.insertionMode=K.IN_COLUMN_GROUP,xd(e,t);break}case b.TR:{e.tmplInsertionModeStack[0]=K.IN_TABLE_BODY,e.insertionMode=K.IN_TABLE_BODY,Ml(e,t);break}case b.TD:case b.TH:{e.tmplInsertionModeStack[0]=K.IN_ROW,e.insertionMode=K.IN_ROW,Ol(e,t);break}default:e.tmplInsertionModeStack[0]=K.IN_BODY,e.insertionMode=K.IN_BODY,rn(e,t)}}function Y6(e,t){t.tagID===b.TEMPLATE&&Io(e,t)}function i1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(b.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yd(e,t)}function K6(e,t){t.tagID===b.HTML?rn(e,t):Gs(e,t)}function a1(e,t){var n;if(t.tagID===b.HTML){if(e.fragmentContext||(e.insertionMode=K.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===b.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Gs(e,t)}function Gs(e,t){e.insertionMode=K.IN_BODY,Pl(e,t)}function G6(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.FRAMESET:{e._insertElement(t,Ee.HTML);break}case b.FRAME:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case b.NOFRAMES:{Jn(e,t);break}}}function Q6(e,t){t.tagID===b.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==b.FRAMESET&&(e.insertionMode=K.AFTER_FRAMESET))}function X6(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.NOFRAMES:{Jn(e,t);break}}}function Z6(e,t){t.tagID===b.HTML&&(e.insertionMode=K.AFTER_AFTER_FRAMESET)}function J6(e,t){t.tagID===b.HTML?rn(e,t):xs(e,t)}function xs(e,t){e.insertionMode=K.IN_BODY,Pl(e,t)}function eI(e,t){switch(t.tagID){case b.HTML:{rn(e,t);break}case b.NOFRAMES:{Jn(e,t);break}}}function tI(e,t){t.chars=Rt,e._insertCharacters(t)}function nI(e,t){e._insertCharacters(t),e.framesetOk=!1}function s1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Ee.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function rI(e,t){if(yw(t))s1(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?Vg(t):r===Ee.SVG&&(xw(t),Wg(t)),gd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function oI(e,t){if(t.tagID===b.P||t.tagID===b.BR){s1(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Ee.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}ie.AREA,ie.BASE,ie.BASEFONT,ie.BGSOUND,ie.BR,ie.COL,ie.EMBED,ie.FRAME,ie.HR,ie.IMG,ie.INPUT,ie.KEYGEN,ie.LINK,ie.META,ie.PARAM,ie.SOURCE,ie.TRACK,ie.WBR;const iI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zf={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function l1(e,t){const n=gI(e),r=Al("type",{handlers:{root:sI,element:lI,text:uI,comment:c1,doctype:cI,raw:pI},unknown:fI}),o={parser:n?new Gf(Zf):Gf.getFragmentParser(void 0,Zf),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),Ci(o,fr());const i=n?o.parser.document:o.parser.getFragment(),a=lD(i,{file:o.options.file});return o.stitches&&yn(a,"comment",function(s,l,u){const c=s;if(c.value.stitch&&u&&l!==void 0){const p=u.children;return p[l]=c.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function u1(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function sI(e,t){u1(e.children,t)}function lI(e,t){hI(e,t),u1(e.children,t),mI(e,t)}function uI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:et.CHARACTER,chars:e.value,location:Ha(e)};Ci(t,fr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function cI(e,t){const n={type:et.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ha(e)};Ci(t,fr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function dI(e,t){t.stitches=!0;const n=bI(e);if("children"in e&&"children"in n){const r=l1({type:"root",children:e.children},t.options);n.children=r.children}c1({type:"comment",value:{stitch:n}},t)}function c1(e,t){const n=e.value,r={type:et.COMMENT,data:n,location:Ha(e)};Ci(t,fr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function pI(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,d1(t,fr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(iI,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function fI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))dI(n,t);else{let r="";throw aI.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Ci(e,t){d1(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Bt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function d1(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function hI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bt.PLAINTEXT)return;Ci(t,fr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:co.html;o===co.html&&n==="svg"&&(o=co.svg);const i=vD({...e,children:[]},{space:o===co.svg?"svg":"html"}),a={type:et.START_TAG,tagName:n,tagID:Ei(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Ha(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function mI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Lg.includes(n)||t.parser.tokenizer.state===Bt.PLAINTEXT)return;Ci(t,vl(e));const r={type:et.END_TAG,tagName:n,tagID:Ei(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ha(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Bt.RCDATA||t.parser.tokenizer.state===Bt.RAWTEXT||t.parser.tokenizer.state===Bt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Bt.DATA)}function gI(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ha(e){const t=fr(e)||{line:void 0,column:void 0,offset:void 0},n=vl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function bI(e){return"children"in e?Eo({...e,children:[]}):Eo(e)}function yI(e){return function(t,n){return l1(t,{...e,file:n})}}const xI=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,EI=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,CI=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{yn(n,"blockquote",(r,o,i)=>{let a="",s="",l=!0,u=r.children.map(c=>{if(l&&c.type==="paragraph"){const p=c.children[0],h=p.type==="text"?p.value:"",f=e?EI:xI,m=h.match(f);if(m&&(l=!1,a=m[1].toLocaleLowerCase(),s=e&&m[2]||a.toLocaleUpperCase(),h.includes(`
51
+ `)&&(c.children[0]={type:"text",value:h.replace(f,"").replace(/^\n+/,"")}),!h.includes(`
52
+ `))){const g=[];c.children.forEach((y,x)=>{x!=0&&(x==1&&y.type==="break"||g.push(y))}),c.children=[...g]}}return c});a&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${a}`,dir:"auto"}},u.unshift({type:"paragraph",children:[TI(a),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function TI(e){let t=vI[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const vI={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function SI(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let o=!1;try{o=!!document.execCommand("copy")}catch{o=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(o)}function p1(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?p1(t.parentElement):null}function kI(e){var t=n=>{var r=p1(n.target);r&&(r.classList.add("active"),SI(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};q.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var o;(o=e.current)==null||o.removeEventListener("click",t,!1)}},[e])}var DI=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],wI=e=>e;const II=q.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:o,style:i,disableCopy:a=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:c,wrapperElement:p={},warpperElement:h={},urlTransform:f}=e,m=$e(e,DI),g=q.useRef(null);q.useImperativeHandle(t,()=>$({},e,{mdp:g}),[g,e]);var y=(n||"")+" "+(r||"");kI(g);var x=[...m.rehypePlugins||[]],E={allowElement:(k,T,O)=>m.allowElement?m.allowElement(k,T,O):/^[A-Za-z0-9]+$/.test(k.tagName)};s||x.push(yI);var C=[CI,...m.remarkPlugins||[],Xk],S=$({},h,p);return d.jsx("div",$({ref:g,onScroll:l,onMouseOver:u},S,{className:y,style:i,children:d.jsx(HS,$({},E,m,{skipHtml:!s,urlTransform:f||wI,rehypePlugins:c?c("rehype",x):x,remarkPlugins:c?c("remark",C):C,children:o||""}))}))});var Es={},Tc={};function AI(e,t){for(var n=t,r=0;r<e.length;r++){var o=r===e.length-1,i=e.charAt(r),a=n[i]||(n[i]={chars:{}});o&&(a.self=e),n=a.chars}}function Jf(e){if(e.length===0)return Es;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];AI(o,t)}return t}function PI(e){if(e.length===0)return Tc;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];t[o]=!0}return t}var is={},eh={type:"String",optional:!0};function RI(e){var t={type:"NoArgument",optional:!1};function n(a){if(t.type&&t.type!==a&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(a,'".'));t.type=a}for(var r=0,o=e;r<o.length;r++){var i=o[r];i==="NoArgument"&&(t.optional=!0),i==="Formula"&&n("Formula"),i==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),i==="String"&&n("String"),i==="Selector"&&n("Selector")}return t}function MI(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],i=e[o];if(i)for(var a=0,s=i;a<s.length;a++){var l=s[a];(t[l]||(t[l]=[])).push(o)}}return t}function th(e){for(var t=MI(e),n={},r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];a&&(n[i]=RI(a))}return n}var si=function(){return si=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},si.apply(this,arguments)},OI={},vc={wildcard:!0};function LI(e){return e?typeof e=="boolean"?vc:e:OI}function NI(e,t){return function(n,r){return t(e(n),e(r))}}function FI(e){return function(t,n){var r=e(t,n);if(!r)throw new Error("Syntax definition cannot be null or undefined.");return r}}function nh(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function Ho(e){return function(t,n){if(!n||!t)return n;if(typeof n!="object"||n===null)throw new Error("Unexpected syntax definition extension type: ".concat(n,"."));for(var r=si({},t),o=0,i=Object.entries(n);o<i.length;o++){var a=i[o],s=a[0],l=a[1];if(s!=="latest"){var u=e[s];r[s]=u(t[s],l)}}return r}}function xr(e,t){return t!==void 0?t:e}function as(e,t){return t?e?e.concat(t):t:e}function rh(e,t){if(!t)return e;if(!e)return t;for(var n=si({},e),r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];if(!s){delete n[a];continue}var l=e[a];if(!l){n[a]=s;continue}n[a]=l.concat(s)}return n}var go=FI(Ho({baseSyntax:xr,modules:as,tag:nh(vc,Ho({wildcard:xr})),ids:xr,classNames:xr,namespace:nh(vc,Ho({wildcard:xr})),combinators:as,attributes:Ho({operators:as,caseSensitivityModifiers:as,unknownCaseSensitivityModifiers:xr}),pseudoClasses:Ho({unknown:xr,definitions:rh}),pseudoElements:Ho({unknown:xr,notation:xr,definitions:NI(function(e){return Array.isArray(e)?{NoArgument:e}:e},rh)})})),f1={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},h1=go(f1,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),Sc=go(h1,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),m1=go(Sc,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid","playing","paused","autofill","modal","fullscreen","picture-in-picture","defined","loading","popover-open"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has","state"]}},pseudoElements:{definitions:{NoArgument:["marker"]}}}),Qs={"css-position-1":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute"]}}},"css-position-2":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute","fixed"]}}},"css-position-3":{latest:!1,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static"]}}},"css-position-4":{latest:!0,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static","initial"]}}},"css-scoping-1":{latest:!0,pseudoClasses:{definitions:{NoArgument:["host","host-context"],Selector:["host","host-context"]}},pseudoElements:{definitions:{Selector:["slotted"]}}},"css-pseudo-4":{latest:!0,pseudoElements:{definitions:{NoArgument:["marker","selection","target-text","search-text","spelling-error","grammar-error","backdrop","file-selector-button","prefix","postfix","placeholder","details-content"],String:["highlight"]}}},"css-shadow-parts-1":{latest:!0,pseudoElements:{definitions:{String:["part"]}}}},g1=si(si({},m1),{modules:Object.entries(Qs).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),_I=go(g1,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),kc={css1:f1,css2:h1,css3:Sc,"selectors-3":Sc,"selectors-4":m1,latest:g1,progressive:_I};function BI(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var o=r[n],i=kc[o];if(i.pseudoClasses&&typeof i.pseudoClasses=="object"){var a=i.pseudoClasses.definitions;if(a)for(var s=0,l=Object.entries(a);s<l.length;s++)for(var u=l[s],c=u[1],p=0,h=c;p<h.length;p++){var f=h[p];e.pseudoClasses[f]||(e.pseudoClasses[f]=[]),e.pseudoClasses[f].includes(o)||e.pseudoClasses[f].push(o)}}if(i.pseudoElements&&typeof i.pseudoElements=="object"){var a=i.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var m=0,g=a;m<g.length;m++){var y=g[m];e.pseudoElements[y]||(e.pseudoElements[y]=[]),e.pseudoElements[y].includes(o)||e.pseudoElements[y].push(o)}else for(var x=0,E=Object.values(a);x<E.length;x++)for(var c=E[x],C=0,S=c;C<S.length;C++){var k=S[C];e.pseudoElements[k]||(e.pseudoElements[k]=[]),e.pseudoElements[k].includes(o)||e.pseudoElements[k].push(o)}}}for(var T=0,O=Object.entries(Qs);T<O.length;T++){var F=O[T],B=F[0],R=F[1];if(R.pseudoClasses&&typeof R.pseudoClasses=="object"){var a=R.pseudoClasses.definitions;if(a)for(var N=0,v=Object.values(a);N<v.length;N++)for(var c=v[N],L=0,I=c;L<I.length;L++){var A=I[L];e.pseudoClasses[A]||(e.pseudoClasses[A]=[]),e.pseudoClasses[A].includes(B)||e.pseudoClasses[A].push(B)}}if(R.pseudoElements&&typeof R.pseudoElements=="object"){var a=R.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var M=0,V=a;M<V.length;M++){var W=V[M];e.pseudoElements[W]||(e.pseudoElements[W]=[]),e.pseudoElements[W].includes(B)||e.pseudoElements[W].push(B)}else for(var H=0,w=Object.values(a);H<w.length;H++)for(var c=w[H],G=0,re=c;G<re.length;G++){var _=re[G];e.pseudoElements[_]||(e.pseudoElements[_]=[]),e.pseudoElements[_].includes(B)||e.pseudoElements[_].push(B)}}}return e}var oh=BI();function Bi(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function ih(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function ji(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var jI={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},$I={'"':!0,"'":!0},Iu={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},HI=6,Au="css-selector-parser parse error: ";function UI(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,o=e.strict,i=o===void 0?!0:o,a=e.modules,s=typeof n=="object"?n:kc[n];if(s.baseSyntax&&(s=go(kc[s.baseSyntax],s)),s.modules&&s.modules.length>0)for(var l=0,u=s.modules;l<u.length;l++){var c=u[l],p=Qs[c];p&&(s=go(p,s))}if(a&&a.length>0)for(var h=0,f=a;h<f.length;h++){var m=f[h],p=Qs[m];p&&(s=go(p,s))}var g=s.tag?[!0,!!LI(s.tag).wildcard]:[!1,!1],y=g[0],x=g[1],E=!!s.ids,C=!!s.classNames,S=!!s.namespace,k=s.namespace&&(s.namespace===!0||s.namespace.wildcard===!0);if(S&&!y)throw new Error("".concat(Au,"Namespaces cannot be enabled while tags are disabled."));var T=!!r,O=s.combinators?Jf(s.combinators):Es,F=s.attributes?[!0,s.attributes.operators?Jf(s.attributes.operators):Es,s.attributes.caseSensitivityModifiers?PI(s.attributes.caseSensitivityModifiers):Tc,s.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,Es,Tc,!1],B=F[0],R=F[1],N=F[2],v=F[3],L=v||Object.keys(N).length>0,I=s.pseudoClasses?[!0,s.pseudoClasses.definitions?th(s.pseudoClasses.definitions):is,s.pseudoClasses.unknown==="accept"]:[!1,is,!1],A=I[0],M=I[1],V=I[2],W=s.pseudoElements?[!0,s.pseudoElements.notation==="singleColon"||s.pseudoElements.notation==="both",!s.pseudoElements.notation||s.pseudoElements.notation==="doubleColon"||s.pseudoElements.notation==="both",s.pseudoElements.definitions?th(Array.isArray(s.pseudoElements.definitions)?{NoArgument:s.pseudoElements.definitions}:s.pseudoElements.definitions):is,s.pseudoElements.unknown==="accept"]:[!1,!1,!1,is,!1],H=W[0],w=W[1],G=W[2],re=W[3],_=W[4],ae="",X=ae.length,U=0,J="",Q=function(ue){return J===ue},ne=function(){return Q("*")||Bi(J)},Z=function(ue){U=ue,J=ae.charAt(U)},Y=function(){U++,J=ae.charAt(U)},le=function(){var ue=J;return U++,J=ae.charAt(U),ue};function ee(ue){var ye=Math.min(X-1,U),Te=new Error("".concat(Au).concat(ue," Pos: ").concat(ye,"."));throw Te.position=ye,Te.name="ParserError",Te}function te(ue,ye){if(!ue)return ee(ye)}var xe=function(){te(U<X,"Unexpected end of input.")},pe=function(){return U>=X},be=function(ue){te(U<X,'Expected "'.concat(ue,'" but end of input reached.')),te(J===ue,'Expected "'.concat(ue,'" but "').concat(J,'" found.')),U++,J=ae.charAt(U)};function se(ue){var ye=Re(ue,U);if(ye)return U+=ye.length,J=ae.charAt(U),ye}function Re(ue,ye){var Te=ae.charAt(ye),Be=ue[Te];if(Be){var We=Re(Be.chars,ye+1);if(We)return We;if(Be.self)return Be.self}}function ve(){for(var ue=le(),ye=1;ji(J)&&ye<HI;)ue+=le(),ye++;return at(),String.fromCharCode(parseInt(ue,16))}function ze(ue){var ye="";for(be(ue);U<X;){if(Q(ue))return Y(),ye;Q("\\")?(Y(),Q(ue)?(ye+=ue,Y()):J===`
53
+ `||J==="\f"?Y():J==="\r"?(Y(),Q(`
54
+ `)&&Y()):ji(J)?ye+=ve():(ye+=J,Y())):(ye+=J,Y())}return ye}function De(){if(!Bi(J))return null;for(var ue="";Q("-");)ue+=J,Y();for(ue==="-"&&!ih(J)&&!Q("\\")&&ee("Identifiers cannot consist of a single hyphen."),i&&ue.length>=2&&ee("Identifiers cannot start with two hyphens with strict mode on."),Iu[J]&&ee("Identifiers cannot start with hyphens followed by digits.");U<X;)if(ih(J))ue+=le();else if(Q("\\"))Y(),xe(),ji(J)?ue+=ve():ue+=le();else break;return ue}function Tt(){for(var ue="";U<X&&!Q(")");)if(Q("\\")){if(Y(),pe()&&!i)return(ue+"\\").trim();xe(),ji(J)?ue+=ve():ue+=le()}else ue+=le();return ue.trim()}function at(){if(J===" "||J===" "||J==="\f"||J===`
55
+ `){Y();return}J==="\r"&&Y(),J===`
56
+ `&&Y()}function qe(){for(;jI[J];)Y()}function ce(ue){ue===void 0&&(ue=!1),qe();for(var ye=[ht(ue)];Q(",");)Y(),qe(),ye.push(ht(ue));return{type:"Selector",rules:ye}}function Ce(){be("["),qe();var ue;if(Q("|")){te(S,"Namespaces are not enabled."),Y();var ye=De();te(ye,"Expected attribute name."),ue={type:"Attribute",name:ye,namespace:{type:"NoNamespace"}}}else if(Q("*")){te(S,"Namespaces are not enabled."),te(k,"Wildcard namespace is not enabled."),Y(),be("|");var Te=De();te(Te,"Expected attribute name."),ue={type:"Attribute",name:Te,namespace:{type:"WildcardNamespace"}}}else{var Be=De();if(te(Be,"Expected attribute name."),ue={type:"Attribute",name:Be},Q("|")){var We=U;if(Y(),Bi(J)){te(S,"Namespaces are not enabled.");var Dt=De();te(Dt,"Expected attribute name."),ue={type:"Attribute",name:Dt,namespace:{type:"NamespaceName",name:Be}}}else Z(We)}}if(te(ue.name,"Expected attribute name."),qe(),pe()&&!i)return ue;if(Q("]"))Y();else{if(ue.operator=se(R),te(ue.operator,"Expected a valid attribute selector operator."),qe(),xe(),$I[J])ue.value={type:"String",value:ze(J)};else if(T&&Q("$")){Y();var Ot=De();te(Ot,"Expected substitute name."),ue.value={type:"Substitution",name:Ot}}else{var Et=De();te(Et,"Expected attribute value."),ue.value={type:"String",value:Et}}if(qe(),pe()&&!i)return ue;if(!Q("]")){var zt=De();if(te(zt,"Expected end of attribute selector."),ue.caseSensitivityModifier=zt,te(L,"Attribute case sensitivity modifiers are not enabled."),te(v||N[ue.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),qe(),pe()&&!i)return ue}be("]")}return ue}function Oe(){for(var ue="";Iu[J];)ue+=le();return te(ue!=="","Formula parse error."),parseInt(ue)}var He=function(){return Q("-")||Q("+")||Iu[J]};function je(){if(Q("e")||Q("o")){var ue=De();if(ue==="even")return qe(),[2,0];if(ue==="odd")return qe(),[2,1]}var ye=null,Te=1;if(Q("-")&&(Y(),Te=-1),He()&&(Q("+")&&Y(),ye=Oe(),!Q("\\")&&!Q("n")))return[0,ye*Te];ye===null&&(ye=1),ye*=Te;var Be;if(Q("\\")?(Y(),ji(J)?Be=ve():Be=le()):Be=le(),te(Be==="n",'Formula parse error: expected "n".'),qe(),Q("+")||Q("-")){var We=Q("+")?1:-1;return Y(),qe(),[ye,We*Oe()]}else return[ye,0]}function Le(ue,ye,Te){var Be;if(Q("(")){if(Y(),qe(),T&&Q("$")){Y();var We=De();te(We,"Expected substitute name."),Be={type:"Substitution",name:We}}else if(Te.type==="String")Be={type:"String",value:Tt()},te(Be.value,"Expected ".concat(ye," argument value."));else if(Te.type==="Selector")Be=ce(!0);else if(Te.type==="Formula"){var Dt=je(),Ot=Dt[0],Et=Dt[1];if(Be={type:"Formula",a:Ot,b:Et},Te.ofSelector&&(qe(),Q("o")||Q("\\"))){var zt=De();te(zt==="of","Formula of selector parse error."),qe(),Be={type:"FormulaOfSelector",a:Ot,b:Et,selector:ht()}}}else return ee("Invalid ".concat(ye," signature."));if(qe(),pe()&&!i)return Be;be(")")}else te(Te.optional,"Argument is required for ".concat(ye,' "').concat(ue,'".'));return Be}function Je(){if(Q("*"))return te(x,"Wildcard tag name is not enabled."),Y(),{type:"WildcardTag"};if(Bi(J)){te(y,"Tag names are not enabled.");var ue=De();return te(ue,"Expected tag name."),{type:"TagName",name:ue}}else return ee("Expected tag name.")}function yt(){if(Q("*")){var ue=U;if(Y(),!Q("|")||(Y(),!ne()))return Z(ue),Je();te(S,"Namespaces are not enabled."),te(k,"Wildcard namespace is not enabled.");var ye=Je();return ye.namespace={type:"WildcardNamespace"},ye}else if(Q("|")){te(S,"Namespaces are not enabled."),Y();var ye=Je();return ye.namespace={type:"NoNamespace"},ye}else if(Bi(J)){var Te=De();if(te(Te,"Expected tag name."),!Q("|"))return te(y,"Tag names are not enabled."),{type:"TagName",name:Te};var ue=U;if(Y(),!ne())return Z(ue),{type:"TagName",name:Te};te(S,"Namespaces are not enabled.");var ye=Je();return ye.namespace={type:"NamespaceName",name:Te},ye}else return ee("Expected tag name.")}function ht(ue){var ye,Te;ue===void 0&&(ue=!1);var Be={type:"Rule",items:[]};if(ue){var We=se(O);We&&(Be.combinator=We,qe())}for(;U<X;)if(ne())te(Be.items.length===0,"Unexpected tag/namespace start."),Be.items.push(yt());else if(Q("|")){var Dt=U;if(Y(),ne())te(Be.items.length===0,"Unexpected tag/namespace start."),Z(Dt),Be.items.push(yt());else{Z(Dt);break}}else if(Q(".")){te(C,"Class names are not enabled."),Y();var Ot=De();te(Ot,"Expected class name."),Be.items.push({type:"ClassName",name:Ot})}else if(Q("#")){te(E,"IDs are not enabled."),Y();var Et=De();te(Et,"Expected ID name."),Be.items.push({type:"Id",name:Et})}else if(Q("["))te(B,"Attributes are not enabled."),Be.items.push(Ce());else if(Q(":")){var zt=!1,In=!1;Y(),Q(":")&&(te(H,"Pseudo elements are not enabled."),te(G,"Pseudo elements double colon notation is not enabled."),zt=!0,Y());var wt=De();if(te(zt||wt,"Expected pseudo-class name."),te(!zt||wt,"Expected pseudo-element name."),te(wt,"Expected pseudo-class name."),!(!zt||_||Object.prototype.hasOwnProperty.call(re,wt))){var Jt=oh.pseudoElements[wt],gr='Unknown pseudo-element "'.concat(wt,'"');Jt&&Jt.length>0&&(gr+=". It is defined in: ".concat(Jt.join(", "))),ee(gr+".")}if(In=H&&(zt||!zt&&w&&Object.prototype.hasOwnProperty.call(re,wt)),In){var An=(ye=re[wt])!==null&&ye!==void 0?ye:_&&eh,eo={type:"PseudoElement",name:wt},Yn=Le(wt,"pseudo-element",An);Yn&&(te(Yn.type!=="Formula"&&Yn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),eo.argument=Yn),Be.items.push(eo)}else{te(A,"Pseudo-classes are not enabled.");var An=(Te=M[wt])!==null&&Te!==void 0?Te:V&&eh;if(!An){var Jt=oh.pseudoClasses[wt],gr='Unknown pseudo-class: "'.concat(wt,'"');Jt&&Jt.length>0&&(gr+=". It is defined in: ".concat(Jt.join(", "))),ee(gr+".")}var Yn=Le(wt,"pseudo-class",An),br={type:"PseudoClass",name:wt};Yn&&(br.argument=Yn),Be.items.push(br)}}else break;if(Be.items.length===0)return pe()?ee("Expected rule but end of input reached."):ee('Expected rule but "'.concat(J,'" found.'));if(qe(),!pe()&&!Q(",")&&!Q(")")){var We=se(O);qe(),Be.nestedRule=ht(),Be.nestedRule.combinator=We}return Be}return function(ue){if(typeof ue!="string")throw new Error("".concat(Au,"Expected string input."));return ae=ue,X=ae.length,U=0,J=ae.charAt(0),ce()}}const zI=UI({syntax:"selectors-4"});function VI(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return zI(e)}const b1="֑-߿יִ-﷽ﹰ-ﻼ",y1="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",WI=new RegExp("^[^"+y1+"]*["+b1+"]"),qI=new RegExp("^[^"+b1+"]*["+y1+"]");function YI(e){const t=String(e||"");return WI.test(t)?"rtl":qI.test(t)?"ltr":"neutral"}function x1(e){return"children"in e?E1(e):"value"in e?e.value:""}function KI(e){return e.type==="text"?e.value:"children"in e?E1(e):""}function E1(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=KI(e.children[t]);return n.join("")}function GI(e,t){const n=e.schema,r=e.language,o=e.direction,i=e.editableOrEditingHost;let a;if(t.type==="element"){const u=t.properties.xmlLang||t.properties.lang,c=t.properties.type||"text",p=ah(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Qr),p==="rtl"?a=p:p==="ltr"||p!=="auto"&&t.tagName==="html"||p!=="auto"&&t.tagName==="input"&&c==="tel"?a="ltr":(p==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=Pu(x1(t)):t.tagName==="input"&&(c==="email"||c==="search"||c==="tel"||c==="text")?a=t.properties.value?Pu(String(t.properties.value)):"ltr":yn(t,l)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return s;function s(){e.schema=n,e.language=r,e.direction=o,e.editableOrEditingHost=i}function l(u){if(u.type==="text")return a=Pu(u.value),a?Ws:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||ah(u)))return oa}}function Pu(e){const t=YI(e);return t==="neutral"?void 0:t}function ah(e){const t=e.type==="element"&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}function QI(e,t,n){const r=Fa(n,e.name),o=t.properties[r.property];let i=XI(o,r);if(!e.value)return i!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),i&&(i=i.toLowerCase())),i!==void 0)switch(e.operator){case"=":return a===i;case"$=":return a===i.slice(-a.length);case"*=":return i.includes(a);case"^=":return a===i.slice(0,a.length);case"|=":return a===i||a===i.slice(0,a.length)&&i.charAt(a.length)==="-";case"~=":return a===i||ac(i).includes(a)}return!1}function XI(e,t){if(e!=null)if(typeof e=="boolean"){if(e)return t.attribute}else if(Array.isArray(e)){if(e.length>0)return(t.commaSeparated?Cl:Tl)(e)}else return String(e)}const ZI=[];function JI(e,t){return(t.properties.className||ZI).includes(e.name)}function eA(e,t){return t.properties.id===e.name}function tA(e,t){return e.name===t.tagName}function nA(e,t){return function(n,r){let o=sh(n,"tag");const i=sh(r??"*","range"),a=[];let s=-1;for(;++s<i.length;){const l=i[s].toLowerCase();if(!t&&l==="*")continue;let u=-1;const c=[];for(;++u<o.length;)if(e(o[u].toLowerCase(),l)){if(!t)return o[u];a.push(o[u])}else c.push(o[u]);o=c}return t?a:void 0}}const rA=nA(function(e,t){const n=e.split("-"),r=t.split("-");let o=0,i=0;if(r[i]!=="*"&&n[o]!==r[i])return!1;for(o++,i++;i<r.length;){if(r[i]==="*"){i++;continue}if(!n[o])return!1;if(n[o]===r[i]){o++,i++;continue}if(n[o].length===1)return!1;o++}return!0},!0);function sh(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const oA={}.hasOwnProperty;function Co(e,t){const n=e.type==="element"&&oA.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const iA=new Set([9,10,12,13,32]),lh=48,aA=57;function sA(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=i(),o=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(o??1),s(),t<e.length?(r=i(),s(),o=a()):r=o=0),o===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*o];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const l=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=lh&&e.charCodeAt(t)<=aA;)u=u*10+(e.charCodeAt(t)-lh),t++;return t===l?null:u}function s(){for(;t<e.length&&iA.has(e.charCodeAt(t));)t++}}var Ru,uh;function lA(){return uh||(uh=1,Ru={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Ru}var uA=lA();const ch=Xn(uA);function cA(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return ch.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?ch.trueFunc:i=>i>=n;const r=Math.abs(t),o=(n%r+r)%r;return t>1?i=>i>=n&&i%r===o:i=>i<=n&&i%r===o}function dh(e){return cA(sA(e))}const dA=dh.default||dh,pA=Al("name",{handlers:{"any-link":fA,blank:hA,checked:mA,dir:gA,disabled:C1,empty:bA,enabled:yA,"first-child":xA,"first-of-type":EA,has:CA,is:T1,lang:vA,"last-child":SA,"last-of-type":kA,not:DA,"nth-child":wA,"nth-last-child":IA,"nth-last-of-type":AA,"nth-of-type":PA,"only-child":RA,"only-of-type":MA,optional:OA,"read-only":LA,"read-write":v1,required:S1,root:NA,scope:FA},invalid:TA,unknown:_A});function fA(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&Co(t,"href")}function mr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function hA(e,t){return!k1(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Xc(r)}}function mA(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&Co(t,"checked")):t.tagName==="option"?Co(t,"selected"):!1}function gA(e,t,n,r,o){return e.argument,e.argument.type,o.direction===e.argument.value}function C1(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&Co(t,"disabled")}function bA(e,t){return!k1(t,n);function n(r){return r.type==="element"||r.type==="text"}}function yA(e,t){return!C1(e,t)}function xA(e,t,n,r,o){return mr(o,e),o.elementIndex===0}function EA(e,t,n,r,o){return mr(o,e),o.typeIndex===0}function Ll(e){let t=e._cachedFn;if(!t){const n=e.argument;if(n.type!=="Formula")throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=dA(n.a+"n+"+n.b),e._cachedFn=t}return t}function CA(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Ed(i,{type:"root",children:t.children}),i.results.length>0}function TA(){}function T1(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return Ed(i,t),i.results[0]===t}function vA(e,t,n,r,o){return e.argument,e.argument.type,o.language!==""&&o.language!==void 0&&rA(o.language,rc(e.argument.value)).length>0}function SA(e,t,n,r,o){return mr(o,e),!!(o.elementCount&&o.elementIndex===o.elementCount-1)}function kA(e,t,n,r,o){return mr(o,e),typeof o.typeIndex=="number"&&typeof o.typeCount=="number"&&o.typeIndex===o.typeCount-1}function DA(e,t,n,r,o){return!T1(e,t,n,r,o)}function wA(e,t,n,r,o){const i=Ll(e);return mr(o,e),typeof o.elementIndex=="number"&&i(o.elementIndex)}function IA(e,t,n,r,o){const i=Ll(e);return mr(o,e),!!(typeof o.elementCount=="number"&&typeof o.elementIndex=="number"&&i(o.elementCount-o.elementIndex-1))}function AA(e,t,n,r,o){const i=Ll(e);return mr(o,e),typeof o.typeCount=="number"&&typeof o.typeIndex=="number"&&i(o.typeCount-1-o.typeIndex)}function PA(e,t,n,r,o){const i=Ll(e);return mr(o,e),typeof o.typeIndex=="number"&&i(o.typeIndex)}function RA(e,t,n,r,o){return mr(o,e),o.elementCount===1}function MA(e,t,n,r,o){return mr(o,e),o.typeCount===1}function OA(e,t){return!S1(e,t)}function LA(e,t,n,r,o){return!v1(e,t,n,r,o)}function v1(e,t,n,r,o){return t.tagName==="input"||t.tagName==="textarea"?!Co(t,"readOnly")&&!Co(t,"disabled"):!!o.editableOrEditingHost}function S1(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&Co(t,"required")}function NA(e,t,n,r,o){return!!((!r||r.type==="root")&&o.schema&&(o.schema.space==="html"||o.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function FA(e,t,n,r,o){return o.scopeElements.includes(t)}function k1(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function _A(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function BA(e,t,n,r,o){for(const i of e.items)if(i.type==="Attribute"){if(!QI(i,t,o.schema))return!1}else if(i.type==="Id"){if(!eA(i,t))return!1}else if(i.type==="ClassName"){if(!JI(i,t))return!1}else if(i.type==="PseudoClass"){if(!pA(i,t,n,r,o))return!1}else{if(i.type==="PseudoElement")throw new Error("Invalid selector: `::"+i.name+"`");if(i.type==="TagName"&&!tA(i,t))return!1}return!0}const jA=[];function Ed(e,t){t&&D1(e,[],t,void 0,void 0,t)}function Mu(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function $A(e,t,n,r){const o=Cs(t.descendant,t.directChild);let i,a=-1;const s={count:0,types:new Map},l={count:0,types:new Map};for(;++a<n.children.length;)ph(s,n.children[a]);for(a=-1;++a<n.children.length;){const u=n.children[a],c=u.type==="element"?u.tagName.toUpperCase():void 0;if(e.elementIndex=l.count,e.typeIndex=c&&l.types.get(c)||0,e.elementCount=s.count,e.typeCount=c?s.types.get(c):0,"children"in u){const p=Cs(o,i),h=D1(e,p,n.children[a],a,n,r);i=Cs(h.generalSibling,h.adjacentSibling)}if(e.one&&e.found)break;ph(l,n.children[a])}}function HA(e,t,n,r,o){const i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(BA(s,n,r,o,e)){const l=s.nestedRule;if(l){const u=l.combinator==="+"?"adjacentSibling":l.combinator==="~"?"generalSibling":l.combinator===">"?"directChild":"descendant";Mu(i,u,l)}else e.found=!0,e.results.includes(n)||e.results.push(n)}s.combinator===void 0?Mu(i,"descendant",s):s.combinator==="~"&&Mu(i,"generalSibling",s)}return i}function Cs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:jA}function ph(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}function D1(e,t,n,r,o,i){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const s=GI(e,n);if(n.type==="element"){let l=e.rootQuery.rules;o&&o!==i&&(l=e.rootQuery.rules.filter(u=>u.combinator===void 0||u.combinator===">"&&o===i)),a=HA(e,Cs(t,l),n,r,o)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&$A(e,a,n,i),s(),a}function UA(e,t,n){const r=zA(e,t);return Ed(r,t||void 0),r.results}function zA(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:VI(e),schema:gi,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const w1=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=w1(n.children))}),t),VA=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const o=UA(t,r);o&&o.length>0&&yn(r,o,(i,a,s)=>{n(i,a,s)});return}yn(r,(o,i,a)=>{n(o,i,a)})}}},WA=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),qA=(e=[],t)=>{let n=t;for(;n>-1;){if(n--,!e[n])return;if(e[n]&&e[n].value&&e[n].value.replace(/(\n|\s)/g,"")!==""||e[n].type!=="text")return!/^rehype:/.test(e[n].value)||e[n].type!=="comment"?void 0:e[n]}},I1=(e=[],t,n,r)=>{let o=t;for(;o<e.length;)if(o++,n){const i=e[o];if(i&&i.value&&i.value.replace(/(\n|\s)/g,"")!==""||e[o]&&e[o].type==="element")return i.tagName===n?i:void 0}else{const i=e[o];if(!i||i.type==="element"||i.type==="text"&&i.value.replace(/(\n|\s)/g,"")!=="")return;if(i.type&&/^(comment|raw)$/ig.test(i.type))return i.value&&!/^rehype:/.test(i.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?I1(e,o,"pre",r)?void 0:(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i):(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i)}},fh=({value:e=""})=>{const t=WA(e.replace(/^<!--(.*?)-->/,"$1").replace(/^rehype:/,""));return Object.keys(t).forEach(n=>{t[n]==="true"&&(t[n]=!0),t[n]==="false"&&(t[n]=!1),typeof t[n]=="string"&&!/^0/.test(t[n])&&!isNaN(+t[n])&&(t[n]=+t[n])}),t},hh=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},YA=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{yn(r,"element",(o,i,a)=>{if(n&&o.tagName==="pre"&&o&&Array.isArray(o.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const s=o.children[0];if(s&&s.tagName==="code"&&typeof i=="number"){const l=qA(a.children,i);if(l){const u=fh(l);Object.keys(u).length>0&&(o.properties={...o.properties,"data-type":"rehyp"},s.properties=hh(s.properties,u,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(o.tagName)&&a&&Array.isArray(a.children)&&typeof i=="number"){const s=I1(a.children,i,"",n);if(s){const l=fh(s);Object.keys(l).length>0&&(o.properties=hh(o.properties,l,t))}}})}};var KA=function(t){return n=>{yn(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=$({},r.properties,{"data-meta":String(r.data.meta)}))})}},GA=function(t){return n=>{yn(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var o=r.properties.dataMeta;typeof o=="string"&&(r.data.meta=o),delete r.properties.dataMeta}})}};const QA=/[\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,XA=Object.hasOwnProperty;class ZA{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let o=JA(t,n===!0);const i=o;for(;XA.call(r.occurrences,o);)r.occurrences[i]++,o=i+"-"+r.occurrences[i];return r.occurrences[o]=0,o}reset(){this.occurrences=Object.create(null)}}function JA(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(QA,"").replace(/ /g,"-"))}function A1(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const e5={},mh=new ZA;function t5(e){const n=(e||e5).prefix||"";return function(r){mh.reset(),yn(r,"element",function(o){A1(o)&&!o.properties.id&&(o.properties.id=n+mh.slug(x1(o)))})}}const P1=(function(e){if(e==null)return o5;if(typeof e=="string")return r5(e);if(typeof e=="object")return n5(e);if(typeof e=="function")return Cd(e);throw new Error("Expected function, string, or array as `test`")});function n5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=P1(e[n]);return Cd(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function r5(e){return Cd(t);function t(n){return n.tagName===e}}function Cd(e){return t;function t(n,r,o){return!!(i5(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function o5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function i5(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const gh={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},a5={};function s5(e){const t=e||a5;let n=t.properties;const r=t.headingProperties,o=t.behavior||"prepend",i=t.content,a=t.group,s=P1(t.test);let l;return o==="after"||o==="before"?l=c:o==="wrap"?l=p:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(h){yn(h,"element",function(f,m,g){if(A1(f)&&f.properties.id&&s(f,m,g))return Object.assign(f.properties,ss(r,f)),l(f,m,g)})};function u(h){const f=bh(i||gh,h);return h.children[o==="prepend"?"unshift":"push"](Ou(h,ss(n,h),f)),[oa]}function c(h,f,m){if(typeof f!="number"||!m)return;const g=bh(i||gh,h),y=Ou(h,ss(n,h),g);let x=o==="before"?[y,h]:[h,y];if(a){const E=R1(a,h);E&&!Array.isArray(E)&&E.type==="element"&&(E.children=x,x=[E])}return m.children.splice(f,1,...x),[oa,f+x.length]}function p(h){let f=h.children,m=[];return typeof i=="function"?(f=[],m=i(h)):i&&(m=Td(i)),h.children=[Ou(h,ss(n,h),Array.isArray(m)?[...f,...m]:[...f,m])],[oa]}}function Td(e){return Eo(e)}function Ou(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function bh(e,t){const n=R1(e,t);return Array.isArray(n)?n:[n]}function R1(e,t){return typeof e=="function"?e(t):Td(e)}function ss(e,t){return typeof e=="function"?e(t):e?Td(e):{}}const l5=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{yn(r,(o,i,a)=>{if(o.type==="element"||o.type==="root"){let s=!1;o.children=o.children.filter(l=>{if(l.type==="raw"||l.type==="comment"){let u=(l.value||"").trim();if(u=u.replace(/^<!--(.*?)-->/,"$1"),u===t)return s=!0,!1;if(u===n)return s=!1,!1}return!s})}})}};var u5={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"}}]};function c5(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},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 d5=(e,t)=>(n,r,o)=>{if(n.type==="element"&&o&&o.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var i=n.children&&n.children[0];i&&i.properties&&i.properties.ariaHidden==="true"&&(i.properties=$({class:"anchor"},i.properties),i.children=[u5])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=w1(n.children);n.children.push(c5(a))}t&&t(n,r===null?void 0:r,o===null?void 0:o)},p5=[t5,s5,l5];const M1=q.forwardRef((e,t)=>{var n,r=[KA,GA,...p5,[VA,{rewrite:d5((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[YA,{properties:"attr"}],...e.rehypePlugins||[]];return d.jsx(II,$({},e,{rehypePlugins:r,ref:t}))});function f5(e,t){return $({},e,t)}var Ti=q.createContext({markdown:""});function O1(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=$({},t,O1(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function L1(e,t,n,r,o){t===void 0&&(t=[]);var i=O1(t||[]),a=[];if(e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),e.metaKey&&a.push("cmd"),e.ctrlKey&&a.push("ctrl"),a.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&a.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&a.push("escape"),!(a.length<1)){var s=!!i[a.join("+")],l=s?i[a.join("+")]:void 0;if(Object.keys(i).forEach(u=>{var c=u.split("+").every(p=>/ctrlcmd/.test(p)?a.includes("ctrl")||a.includes("cmd"):a.includes(p));c&&(l=i[u])}),l&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(l,r,o,a);return}}}var Lu;function yh(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof Lu>"u"){var t=document.createElement("textarea");t.value="1",Lu=!!t.firstChild}return Lu}function ei(e,t){if(e.focus(),document.selection){var n=document.selection.createRange();n.text=t,n.collapse(!1),n.select();return}var r=!1;if(t!==""?r=document.execCommand&&document.execCommand("insertText",!1,t):r=document.execCommand&&document.execCommand("delete",!1),!r){var o=e.selectionStart,i=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),s=document.createTextNode(t);if(yh(e)){var l=e.firstChild;if(!l)e.appendChild(s);else{for(var u=0,c=null,p=null;l&&(c===null||p===null);){var h=l.nodeValue.length;o>=u&&o<=u+h&&a.setStart(c=l,o-u),i>=u&&i<=u+h&&a.setEnd(p=l,i-u),u+=h,l=l.nextSibling}o!==i&&a.deleteContents()}}if(yh(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(s);else{var f=e.value;e.value=f.slice(0,o)+t+f.slice(i)}}e.setSelectionRange(o+t.length,o+t.length);var m=document.createEvent("UIEvent");m.initEvent("input",!0,!1),e.dispatchEvent(m)}}function ln(e){var{text:t,selection:n,prefix:r,suffix:o=r}=e,i=n;if(t&&t.length&&n.start===n.end&&(i=h5(t,n.start)),i.start>=r.length&&i.end<=t.length-o.length){var a=t.slice(i.start-r.length,i.end+o.length);if(a.startsWith(r)&&a.endsWith(o))return{start:i.start-r.length,end:i.end+o.length}}return i}function ca(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
57
+ `)+1,o=t.slice(n.end).indexOf(`
58
+ `)+n.end;return o===n.end-1&&(o=t.length),{start:r,end:o}}function N1(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,o=t-1;o>=0&&n>=0;o--)switch(e.charCodeAt(o)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function F1(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,o=t;o<e.length&&n>=0;o++)switch(e.charCodeAt(o)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function h5(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=s=>s===" "||s.charCodeAt(0)===10,r=0,o=e.length,i=t;i-1>-1;i--)if(n(e[i-1])){r=i;break}for(var a=t;a<e.length;a++)if(n(e[a])){o=a;break}return{start:r,end:o}}function Zt(e){var{api:t,selectedText:n,selection:r,prefix:o,suffix:i=o}=e;n.length>=o.length+i.length&&n.startsWith(o)&&n.endsWith(i)?(t.replaceSelection(n.slice(o.length,i.length?-i.length:void 0)),t.setSelectionRange({start:r.start-o.length,end:r.end-o.length})):(t.replaceSelection(""+o+n+i),t.setSelectionRange({start:r.start+o.length,end:r.end+o.length}))}function vd(e,t){var n=e.split(/\n/),r=0,o=n.map((i,a)=>{if(typeof t=="string")return i.startsWith(t)?(r-=t.length,i.slice(t.length)):(r+=t.length,t+i);if(typeof t=="function"){if(i.startsWith(t(i,a)))return r-=t(i,a).length,i.slice(t(i,a).length);var s=t(i,a);return r+=s.length,t(i,a)+i}throw Error("insertion is expected to be either a string or a function")}).join(`
59
+ `);return{modifiedText:o,insertionLength:r}}var m5={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:d.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:d.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,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},_1={name:"codeBlock",keyCommand:"codeBlock",shortcuts:"ctrlcmd+shift+j",prefix:"```",buttonProps:{"aria-label":"Insert Code Block (ctrl + shift + j)",title:"Insert Code Block (ctrl + shift +j)"},icon:d.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:d.jsx("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),o="\n```\n",i="\n```\n";r.selectedText.length>=o.length+i.length-2&&r.selectedText.startsWith(o)&&r.selectedText.endsWith(i)?(o="```\n",i="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
60
+ `||r.selection.start===0)&&(o="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
61
+ `||r.selection.end===e.text.length)&&(i="\n```"));var a=ln({text:e.text,selection:e.selection,prefix:o,suffix:i}),s=t.setSelectionRange(a);Zt({api:t,selectedText:s.selectedText,selection:e.selection,prefix:o,suffix:i})}},g5={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:d.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:d.jsx("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:(e,t)=>{if(e.selectedText.indexOf(`
62
+ `)===-1){var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else _1.execute(e,t)}},b5={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:d.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:d.jsxs("g",{fill:"none",fillRule:"evenodd",children:[d.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),d.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),d.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ts={keyCommand:"divider"},y5={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:d.jsx("path",{fill:"currentColor",d:"M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"})}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({fullscreen:!r.fullscreen})}};function x5(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var E5=(e,t)=>{var n=$({children:e,icon:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:d.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:()=>{}},t,{keyCommand:"group"});return Array.isArray(n.children)&&(n.children=n.children.map(r=>{var o=$({},(x5(r),r));return o.parent=n,$({},o)})),n},C5={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
63
+
64
+ ---
65
+ `,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:d.jsx("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length&&r.selectedText.startsWith(e.command.prefix)?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},T5={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:d.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:d.jsx("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=ln({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},v5={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:d.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:d.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,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},S5={name:"link",keyCommand:"link",shortcuts:"ctrlcmd+l",prefix:"[",suffix:"](url)",buttonProps:{"aria-label":"Add a link (ctrl + l)",title:"Add a link (ctrl + l)"},icon:d.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:d.jsx("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?(n=ln({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Sd=(e,t,n)=>{var r=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),o=t.setSelectionRange(r),i=N1(o.text,o.selection.start),a=Array(i+1).join(`
66
+ `),s=F1(o.text,o.selection.end),l=Array(s+1).join(`
67
+ `),{modifiedText:u,insertionLength:c}=vd(o.selectedText,n);if(c<0){var p=o.selection.start,h=o.selection.end;o.selection.start>0&&e.text.slice(o.selection.start-1,o.selection.start)===`
68
+ `&&(p-=1),o.selection.end<e.text.length-1&&e.text.slice(o.selection.end,o.selection.end+1)===`
69
+ `&&(h+=1),t.setSelectionRange({start:p,end:h}),t.replaceSelection(""+u),t.setSelectionRange({start:p,end:p+u.length})}else{t.replaceSelection(""+a+u+l);var f=o.selection.start+i,m=f+u.length;t.setSelectionRange({start:f,end:m})}},k5={name:"unordered-list",keyCommand:"list",shortcuts:"ctrl+shift+u",prefix:"- ",buttonProps:{"aria-label":"Add unordered list (ctrl + shift + u)",title:"Add unordered list (ctrl + shift + u)"},icon:d.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:d.jsx("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Sd(e,t,"- ")}},D5={name:"ordered-list",keyCommand:"list",shortcuts:"ctrl+shift+o",prefix:"1. ",buttonProps:{"aria-label":"Add ordered list (ctrl + shift + o)",title:"Add ordered list (ctrl + shift + o)"},icon:d.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:d.jsx("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Sd(e,t,(n,r)=>r+1+". ")}},w5={name:"checked-list",keyCommand:"list",shortcuts:"ctrl+shift+c",prefix:"- [ ] ",buttonProps:{"aria-label":"Add checked list (ctrl + shift + c)",title:"Add checked list (ctrl + shift + c)"},icon:d.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:d.jsx("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:(e,t)=>{Sd(e,t,(n,r)=>"- [ ] ")}},I5={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:d.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[d.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),d.jsx("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"preview"})}},A5={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:d.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[d.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),d.jsx("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"edit"})}},P5={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:d.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[d.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),d.jsx("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"live"})}},R5={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:d.jsx("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),o=N1(r.text,r.selection.start),i=Array(o+1).join(`
70
+ `),a=F1(r.text,r.selection.end),s=Array(a+1).join(`
71
+ `),l=vd(r.selectedText,e.command.prefix);t.replaceSelection(""+i+l.modifiedText+s);var u=r.selection.start+o,c=u+l.modifiedText.length;t.setSelectionRange({start:u,end:c})}},M5={name:"strikethrough",keyCommand:"strikethrough",shortcuts:"ctrl+shift+x",buttonProps:{"aria-label":"Add strikethrough text (ctrl + shift + x)",title:"Add strikethrough text (ctrl + shift + x)"},prefix:"~~",icon:d.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:d.jsx("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},B1={name:"heading1",keyCommand:"heading1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert Heading 1 (ctrl + 1)",title:"Insert Heading 1 (ctrl + 1)"},icon:d.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Heading 1"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},O5=B1;function vi(e){var{state:t,api:n,prefix:r,suffix:o=r}=e,i=ca({text:t.text,selection:t.selection}),a=n.setSelectionRange(i);Zt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:o})}$({},B1,{icon:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:d.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});var L5={name:"heading2",keyCommand:"heading2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert Heading 2 (ctrl + 2)",title:"Insert Heading 2 (ctrl + 2)"},icon:d.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Heading 2"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},N5=L5,F5={name:"heading3",keyCommand:"heading3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 3 (ctrl + 3)",title:"Insert Heading 3 (ctrl + 3)"},icon:d.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Heading 3"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},_5=F5,B5={name:"heading4",keyCommand:"heading4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 4 (ctrl + 4)",title:"Insert Heading 4 (ctrl + 4)"},icon:d.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Heading 4"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},j5=B5,$5={name:"heading5",keyCommand:"heading5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 5 (ctrl + 5)",title:"Insert Heading 5 (ctrl + 5)"},icon:d.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 5"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},H5=$5,U5={name:"heading6",keyCommand:"heading6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 6 (ctrl + 6)",title:"Insert Heading 6 (ctrl + 6)"},icon:d.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 6"}),execute:(e,t)=>{vi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},z5=U5,V5={name:"table",keyCommand:"table",prefix:`
72
+ | Header | Header |
73
+ |--------|--------|
74
+ | Cell | Cell |
75
+ | Cell | Cell |
76
+ | Cell | Cell |
77
+
78
+ `,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:d.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:d.jsx("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"})}),execute:(e,t)=>{var n=ln({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length+e.command.suffix.length&&r.selectedText.startsWith(e.command.prefix)?Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),Zt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},W5={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:d.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:d.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:()=>{window.open("https://www.markdownguide.org/basic-syntax/","_blank","noreferrer")}},q5=()=>[m5,v5,M5,C5,E5([O5,N5,_5,j5,H5,z5],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Ts,S5,R5,g5,_1,b5,T5,V5,Ts,k5,D5,w5,Ts,W5],Y5=()=>[A5,P5,I5,Ts,y5];function Xs(e){var t;return{selection:{start:e.selectionStart,end:e.selectionEnd},text:e.value,selectedText:(t=e.value)==null?void 0:t.slice(e.selectionStart,e.selectionEnd)}}class kd{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return ei(this.textArea,t),Xs(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,Xs(this.textArea)}}class Dd{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new kd(t)}getState(){return this.textArea?Xs(this.textArea):!1}executeCommand(t,n,r,o){t.execute&&t.execute($({command:t},Xs(this.textArea)),this.textApi,n,r,o)}}function vs(e){e.stopPropagation(),e.preventDefault()}function xh(e,t){vs(e);var n=e.target,r=new kd(n),o={start:n.selectionStart,end:n.selectionEnd};if(o=ca({text:n.value,selection:o}),!(t<0&&o.start<=0||t>0&&o.end>=n.value.length)){var i=n.value.slice(o.start,o.end);if(t<0){var a=ca({text:n.value,selection:{start:o.start-1,end:o.start-1}}),s=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:o.end}),ei(n,i+`
79
+ `+s),r.setSelectionRange({start:a.start,end:a.start+i.length})}else{var l=ca({text:n.value,selection:{start:o.end+1,end:o.end+1}}),u=n.value.slice(l.start,l.end);r.setSelectionRange({start:o.start,end:l.end}),ei(n,u+`
80
+ `+i),r.setSelectionRange({start:l.end-i.length,end:l.end})}}}function K5(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,o=r.value.substr(0,r.selectionStart),i=o.split(`
81
+ `),a=i[i.length-1],s=new kd(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){vs(e);var l=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var u=r.value.substring(0,r.selectionStart).split(`
82
+ `),c=r.value.substring(0,r.selectionEnd).split(`
83
+ `),p=[];c.forEach((O,F)=>{O!==u[F]&&p.push(O)});var h=p.join(`
84
+ `),f=r.value.substring(r.selectionStart,r.selectionEnd),m=r.value.substring(0,r.selectionStart).length;s.setSelectionRange({start:r.value.indexOf(h),end:r.selectionEnd});var g=vd(h,e.shiftKey?"":l),y=g.modifiedText;e.shiftKey&&(y=y.split(`
85
+ `).map(O=>O.replace(new RegExp("^"+l),"")).join(`
86
+ `)),s.replaceSelection(y);var x=e.shiftKey?-t:t,E=e.shiftKey?-p.length*t:p.length*t;s.setSelectionRange({start:m+x,end:m+f.length+E})}else return ei(r,l)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(a)||/^\d+.\s/.test(a))&&!e.shiftKey){vs(e);var C=`
87
+ - `;return a.startsWith("*")&&(C=`
88
+ * `),(a.startsWith("- [ ]")||a.startsWith("- [X]")||a.startsWith("- [x]"))&&(C=`
89
+ - [ ] `),/^\d+.\s/.test(a)&&(C=`
90
+ `+(parseInt(a)+1)+". "),ei(r,C)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){vs(e);var S={start:r.selectionStart,end:r.selectionEnd},k=S;S=ca({text:r.value,selection:S});var T=r.value.slice(S.start,S.end);s.setSelectionRange({start:S.end,end:S.end}),ei(r,`
91
+ `+T),s.setSelectionRange({start:k.start,end:k.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?xh(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&xh(e,1)}var G5=["prefixCls","onChange"],Q5=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function X5(e){var{prefixCls:t,onChange:n}=e,r=$e(e,G5),o=q.useContext(Ti),{markdown:i,commands:a,fullscreen:s,preview:l,highlightEnable:u,extraCommands:c,tabSize:p,defaultTabEnable:h,autoFocusEnd:f,textareaWarp:m,dispatch:g}=o;$e(o,Q5);var y=q.useRef(null),x=q.useRef(),E=q.useRef({fullscreen:s,preview:l});q.useEffect(()=>{E.current={fullscreen:s,preview:l,highlightEnable:u}},[s,l,u]),q.useEffect(()=>{if(y.current&&g){var S=new Dd(y.current);x.current=S,g({textarea:y.current,commandOrchestrator:S})}},[]),q.useEffect(()=>{if(f&&y.current&&m){y.current.focus();var S=y.current.value.length;y.current.setSelectionRange(S,S),setTimeout(()=>{m&&(m.scrollTop=m.scrollHeight),y.current&&(y.current.scrollTop=y.current.scrollHeight)},0)}},[m]);var C=S=>{K5(S,p,h),L1(S,[...a||[],...c||[]],x.current,g,E.current)};return q.useEffect(()=>(y.current&&y.current.addEventListener("keydown",C),()=>{y.current&&y.current.removeEventListener("keydown",C)}),[]),d.jsx("textarea",$({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:y,className:t+"-text-input "+(r.className?r.className:""),value:i,onChange:S=>{g&&g({markdown:S.target.value}),n&&n(S)}}))}var Z5=["prefixCls","className","onScroll","renderTextarea"];function J5(e){var t=e||{},{prefixCls:n,className:r,onScroll:o,renderTextarea:i}=t,a=$e(t,Z5),{markdown:s,scrollTop:l,commands:u,extraCommands:c,dispatch:p}=q.useContext(Ti),h=q.useRef(null),f=q.useRef(),m=q.createRef();q.useEffect(()=>{var y={};m.current&&(y.textareaWarp=m.current||void 0,m.current.scrollTop=l||0),p&&p($({},y))},[]),q.useEffect(()=>{if(h.current&&p){var y=new Dd(h.current);f.current=y,p({textarea:h.current,commandOrchestrator:y})}},[]);var g={WebkitTextFillColor:"initial",overflow:"auto"};return d.jsx("div",{ref:m,className:n+"-area "+(r||""),onScroll:o,children:d.jsx("div",{className:n+"-text",children:i?q.cloneElement(i($({},a,{value:s,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:p,onChange:a.onChange,shortcuts:L1,useContext:{commands:u,extraCommands:c,commandOrchestrator:f.current}}),{ref:h}):d.jsx(q.Fragment,{children:d.jsx(X5,$({prefixCls:n},a,{style:g}))})})})}function e4(e){var{prefixCls:t,groupName:n,commands:r,children:o}=e||{},{barPopup:i={}}=q.useContext(Ti);return q.useMemo(()=>d.jsx("div",{className:t+"-toolbar-child "+(n&&i[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?d.jsx(j1,$({commands:r},e,{isChild:!0})):o}),[r,i,n,t])}function Eh(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:o,barPopup:i={},components:a,commandOrchestrator:s,dispatch:l}=q.useContext(Ti),u=q.useRef("");function c(p,h){if(l){var f={barPopup:$({},i)};p.keyCommand==="preview"&&(f.preview=p.value),p.keyCommand==="fullscreen"&&(f.fullscreen=!r),e.commands&&p.keyCommand==="group"?e.commands.forEach(m=>{h===m.groupName?f.barPopup[h]=!0:m.keyCommand&&(f.barPopup[m.groupName]=!1)}):(h||p.parent)&&Object.keys(f.barPopup||{}).forEach(m=>{f.barPopup[m]=!1}),Object.keys(f).length&&l($({},f)),s&&s.executeCommand(p)}}return q.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(u.current||(u.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=u.current))},[r,u,n]),d.jsx("ul",{children:(e.commands||[]).map((p,h)=>{if(p.keyCommand==="divider")return d.jsx("li",$({},p.liProps,{className:t+"-toolbar-divider"}),h);if(!p.keyCommand)return d.jsx(q.Fragment,{},h);var f=r&&p.keyCommand==="fullscreen"||p.keyCommand==="preview"&&o===p.value,m=p.children&&typeof p.children=="function"?p.children({getState:()=>s.getState(),textApi:s?s.textApi:void 0,close:()=>c({},p.groupName),execute:()=>c({execute:p.execute}),dispatch:l}):void 0,g=i&&o&&o==="preview"&&!/(preview|fullscreen)/.test(p.keyCommand),y=a?.toolbar||p.render,x=y&&typeof y=="function"?y(p,!!g,c,h):null;return d.jsxs("li",$({},p.liProps,{className:f?"active":"",children:[x&&q.isValidElement(x)&&x,!x&&!p.buttonProps&&p.icon,!x&&p.buttonProps&&q.createElement("button",$({type:"button",key:h,disabled:g,"data-name":p.name},p.buttonProps,{onClick:E=>{E.stopPropagation(),c(p,p.groupName)}}),p.icon),p.children&&d.jsx(e4,{overflow:n,groupName:p.groupName,prefixCls:t,children:m,commands:Array.isArray(p.children)?p.children:void 0})]}),h)})})}function j1(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:o,extraCommands:i}=q.useContext(Ti);return d.jsxs("div",{className:t+"-toolbar "+r,children:[d.jsx(Eh,$({},e,{commands:e.commands||o||[]})),!n&&d.jsx(Eh,$({},e,{commands:i||[]}))]})}function Ch(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:o,prefixCls:i}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return d.jsx(j1,{prefixCls:i,overflow:o,className:a})}var t4=e=>{var{prefixCls:t,onChange:n}=e||{},r=q.useRef(null),o=q.useRef(),i=q.useRef(e.height);q.useEffect(()=>{i.current!==e.height&&(i.current=e.height)},[e.height]);function a(c){if(o.current){var p,h=c.clientY||((p=c.changedTouches[0])==null?void 0:p.clientY),f=o.current.height+h-o.current.dragY;f>=e.minHeight&&f<=e.maxHeight&&n&&n(o.current.height+(h-o.current.dragY))}}function s(){var c,p;o.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),(c=r.current)==null||c.removeEventListener("touchmove",a),(p=r.current)==null||p.removeEventListener("touchend",s)}function l(c){var p,h,f;c.preventDefault();var m=c.clientY||((p=c.changedTouches[0])==null?void 0:p.clientY);o.current={height:i.current,dragY:m},document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),(h=r.current)==null||h.addEventListener("touchmove",a,{passive:!1}),(f=r.current)==null||f.addEventListener("touchend",s,{passive:!1})}q.useEffect(()=>{if(document){var c,p;(c=r.current)==null||c.addEventListener("touchstart",l,{passive:!1}),(p=r.current)==null||p.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",a)}}},[]);var u=q.useMemo(()=>d.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:d.jsx("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return d.jsx("div",{className:t+"-bar",ref:r,children:u})},n4=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","autoFocusEnd","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function r4(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var o4=q.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:o,value:i,commands:a=q5(),commandsFilter:s,direction:l,extraCommands:u=Y5(),height:c=200,enableScroll:p=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:f=!0,preview:m="live",fullscreen:g=!1,overflow:y=!0,previewOptions:x={},textareaProps:E,maxHeight:C=1200,minHeight:S=100,autoFocus:k,autoFocusEnd:T=!1,tabSize:O=2,defaultTabEnable:F=!1,onChange:B,onStatistics:R,onHeightChange:N,hideToolbar:v,toolbarBottom:L=!1,components:I,renderTextarea:A}=n,M=$e(n,n4),V=a.map(be=>s?s(be,!1):be).filter(Boolean),W=u.map(be=>s?s(be,!0):be).filter(Boolean),[H,w]=q.useReducer(f5,{markdown:i,preview:m,components:I,height:c,minHeight:S,highlightEnable:f,tabSize:O,defaultTabEnable:F,scrollTop:0,scrollTopPreview:0,commands:V,extraCommands:W,fullscreen:g,barPopup:{}}),G=q.useRef(null),re=q.useRef(null),_=q.useRef(p);q.useImperativeHandle(t,()=>$({},H,{container:G.current,dispatch:w})),q.useMemo(()=>_.current=p,[p]),q.useEffect(()=>{var be={};G.current&&(be.container=G.current||void 0),be.markdown=i||"",be.barPopup={},w&&w($({},H,be))},[]);var ae=[o,"wmde-markdown-var",l?r+"-"+l:null,r,H.preview?r+"-show-"+H.preview:null,H.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();q.useMemo(()=>i!==H.markdown&&w({markdown:i||""}),[i,H.markdown]),q.useMemo(()=>m!==H.preview&&w({preview:m}),[m]),q.useMemo(()=>O!==H.tabSize&&w({tabSize:O}),[O]),q.useMemo(()=>f!==H.highlightEnable&&w({highlightEnable:f}),[f]),q.useMemo(()=>k!==H.autoFocus&&w({autoFocus:k}),[k]),q.useMemo(()=>T!==H.autoFocusEnd&&w({autoFocusEnd:T}),[T]),q.useMemo(()=>g!==H.fullscreen&&w({fullscreen:g}),[g]),q.useMemo(()=>c!==H.height&&w({height:c}),[c]),q.useMemo(()=>c!==H.height&&N&&N(H.height,c,H),[c,N,H]),q.useMemo(()=>a!==H.commands&&w({commands:V}),[e.commands]),q.useMemo(()=>u!==H.extraCommands&&w({extraCommands:W}),[e.extraCommands]);var X=q.useRef(),U=q.useRef("preview"),J=q.useRef(!1);q.useMemo(()=>{X.current=H.textareaWarp,H.textareaWarp&&(H.textareaWarp.addEventListener("mouseover",()=>{U.current="text"}),H.textareaWarp.addEventListener("mouseleave",()=>{U.current="preview"}))},[H.textareaWarp]);var Q=(be,se)=>{if(_.current){var Re=X.current,ve=re.current?re.current:void 0;if(J.current||(U.current=se,J.current=!0),Re&&ve){var ze=(Re.scrollHeight-Re.offsetHeight)/(ve.scrollHeight-ve.offsetHeight);be.target===Re&&U.current==="text"&&(ve.scrollTop=Re.scrollTop/ze),be.target===ve&&U.current==="preview"&&(Re.scrollTop=ve.scrollTop*ze);var De=0;U.current==="text"?De=Re.scrollTop||0:U.current==="preview"&&(De=ve.scrollTop||0),w({scrollTop:De})}}},ne=r+"-preview "+(x.className||""),Z=be=>Q(be,"preview"),Y=q.useMemo(()=>d.jsx("div",{ref:re,className:ne,children:d.jsx(M1,$({},x,{onScroll:Z,source:H.markdown||""}))}),[ne,x,H.markdown]),le=I?.preview&&I?.preview(H.markdown||"",H,w);le&&q.isValidElement(le)&&(Y=d.jsx("div",{className:ne,ref:re,onScroll:Z,children:le}));var ee=$({},M.style,{height:H.height||"100%"}),te=()=>w({barPopup:$({},r4(H.barPopup))}),xe=be=>w({height:be}),pe=be=>{if(B&&B(be.target.value,be,H),E&&E.onChange&&E.onChange(be),H.textarea&&H.textarea instanceof HTMLTextAreaElement&&R){var se=new Dd(H.textarea),Re=se.getState()||{};R($({},Re,{lineCount:be.target.value.split(`
92
+ `).length,length:be.target.value.length}))}};return d.jsx(Ti.Provider,{value:$({},H,{dispatch:w}),children:d.jsxs("div",$({ref:G,className:ae},M,{onClick:te,style:ee,children:[d.jsx(Ch,{hideToolbar:v,toolbarBottom:L,prefixCls:r,overflow:y,placement:"top"}),d.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(H.preview||"")&&d.jsx(J5,$({className:r+"-input",prefixCls:r,autoFocus:k},E,{onChange:pe,renderTextarea:I?.textarea||A,onScroll:be=>Q(be,"text")})),/(live|preview)/.test(H.preview||"")&&Y]}),h&&!H.fullscreen&&d.jsx(t4,{prefixCls:r,height:H.height,maxHeight:C,minHeight:S,onChange:xe}),d.jsx(Ch,{hideToolbar:v,toolbarBottom:L,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),$1=o4;$1.Markdown=M1;const Nu={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},i4={...Nu,patterns:[...Nu.patterns,{include:"#docvar"}],repository:{...Nu.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},a4={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},s4="github-light";let Fu;function l4(){return Fu||(Fu=(async()=>{const[{createHighlighterCore:e},{createOnigurumaEngine:t},{default:n},{default:r},{default:o},{default:i}]=await Promise.all([Promise.resolve().then(()=>require("./core-CKNmRclF.cjs.js")),Promise.resolve().then(()=>require("./engine-oniguruma-BkproSVE.cjs.js")),Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs.js")),Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs.js")),Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs.js")),Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs.js"))]);return e({engine:t(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs.js"))),themes:[i],langs:[n,r,o,{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...i4},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...a4}]})})()),Fu}async function Zs(e,t){return(await l4()).codeToHtml(e,{lang:t,theme:s4})}function Wt(e){const{server:t}=ut.useServer(),n={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{return await e.queryFn()}catch(r){if(r&&typeof r=="object"&&"response"in r){const o=r;if(o.response?.data){const i=new Error(o.response.data.message||o.message);throw i.status=o.response.status,i.data=o.response.data,i}}throw r}},retry:!1,throwOnError:!1};return Rr.useQuery(n,ut.globalQueryClient)}function ur(e){const t={...e,mutationFn:async n=>{try{return await e.mutationFn(n)}catch(r){if(r&&typeof r=="object"&&"response"in r){const o=r;if(o.response?.data){const i=new Error(o.response.data.message||o.message);throw i.status=o.response.status,i.data=o.response.data,i}}throw r}},retry:!1,throwOnError:!1};return Rr.useMutation(t,ut.globalQueryClient)}const Mt=e=>{const t=new URL(e),n={};if(t.protocol!=="publisher:")throw new Error(`Failed to parse resource URI: ${e}`);const r=(t.hostname+t.pathname).split("/");for(let o=0;o<r.length;o+=2){const i=r[o];i==="environments"?n.environmentName=decodeURI(r[o+1])||void 0:i==="packages"?n.packageName=decodeURI(r[o+1])||void 0:i==="connections"?n.connectionName=decodeURI(r[o+1])||void 0:i==="models"&&(n.modelPath=decodeURI(r.slice(o+1).join("/"))||void 0)}if(n.versionId=t.searchParams.get("versionId")||void 0,!n.environmentName)throw new Error(`Failed to parse resource URI: ${e}`);return n},Ua=e=>{if(!e.environmentName)throw new Error(`Failed to encode resource URI, missing environment name: ${e}`);let t=`publisher://environments/${e.environmentName}`;return e.packageName&&(t+=`/packages/${e.packageName}`),e.connectionName&&(t+=`/connections/${e.connectionName}`),e.modelPath&&(t+=`/models/${e.modelPath}`),e.packageName&&e.versionId&&(t+=`?versionId=${e.versionId}`),t};function wd({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:o,resourceUri:i}){return q.useEffect(()=>{o&&o(t)},[t,o]),d.jsx(Gc,{children:d.jsxs(dt.Stack,{spacing:2,component:"section",children:[d.jsx(H1,{sourceAndPath:e[t],existingQuery:n,onChange:a=>{r&&r(a)},resourceUri:i}),d.jsx(dt.Box,{height:"5px"})]})})}function Ss(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function u4({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o,resourceUri:i}){const[a,s]=q.useState(n||Ss()),[l,u]=q.useState(void 0);q.useEffect(()=>{n&&s(n)},[n]);const[c,p]=q.useState([]),{MalloyExplorerProvider:h,QueryPanel:f,ResizableCollapsiblePanel:m,ResultPanel:g,SourcePanel:y}=r;q.useEffect(()=>{t&&t(a)},[t,a]);const{environmentName:x,packageName:E,versionId:C}=Mt(i),{apiClients:S}=ut.useServer(),k=ur({mutationFn:()=>{const B=typeof a?.malloyQuery=="string"?a.malloyQuery:new o.ASTQuery({source:e.sourceInfo,query:a?.malloyQuery}).toMalloy();return u({executionState:"running",query:a?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:()=>{k.reset(),u(void 0)},response:{result:{}}}),s({...a,query:B}),S.models.executeQueryModel(x,E,e.modelPath,{query:B,sourceName:void 0,queryName:void 0,versionId:C})},onSuccess:B=>{if(B){const R=JSON.parse(B.data.result);s({...a,malloyResult:R}),u(N=>N?{...N,executionState:"finished",response:{result:R}}:void 0)}},onError:B=>{u(void 0),console.error("Query execution error:",B)}}),[T,O]=q.useState(e.sourceInfo.name);q.useEffect(()=>{T!==e.sourceInfo.name&&(O(e.sourceInfo.name),s(Ss()),u(void 0))},[e,T]);const F=q.useCallback(B=>{s({...a,malloyQuery:B,malloyResult:void 0})},[a]);return T!==e.sourceInfo.name?d.jsx("div",{children:"Loading..."}):d.jsx(f0,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:d.jsx(h,{source:e.sourceInfo,query:a?.malloyQuery,topValues:[],onFocusedNestViewPathChange:p,focusedNestViewPath:c,onQueryChange:F,children:d.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[d.jsx(m,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:d.jsx(y,{onRefresh:()=>s(Ss())})}),d.jsx(m,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:d.jsx(f,{runQuery:()=>{console.log(`running query with: ${a?.malloyQuery}`);try{k.mutate()}catch(B){console.error("Error running query:",B)}}})}),d.jsx(g,{source:e.sourceInfo,draftQuery:a?.malloyQuery,setDraftQuery:B=>s({...a,malloyQuery:B}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function H1(e){const[t,n]=q.useState(null),[r,o]=q.useState(null),[i,a]=q.useState(!0);return q.useEffect(()=>{let s=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{s&&(n(l),o(u),a(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),s&&a(!1)}),()=>{s=!1}},[]),i||!t||!r?d.jsx(FE,{children:d.jsx(f0,{children:d.jsx(dt.Box,{sx:{alignItems:"center",justifyContent:"center",height:"200px",color:"text.secondary"},children:"Loading explorer..."})})}):d.jsx(u4,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function un({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:i=2,textVariant:a="body2"}){const s=d.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:i},children:[d.jsx(P.CircularProgress,{size:t,color:n,thickness:r}),e&&d.jsx(P.Typography,{variant:a,color:"text.secondary",children:e})]});return o?d.jsx(P.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:s}):s}const c4=q.lazy(()=>Promise.resolve().then(()=>Vj));function Si({result:e,maxHeight:t,maxResultSize:n=0}){const r=q.useRef(null),[o,i]=q.useState(t),[a,s]=q.useState(!1);if(!e)return null;if(n>0&&e.length>n&&!a)return d.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,p:4,backgroundColor:"#fafafa",border:"1px solid",borderColor:"#e0e0e0",borderRadius:1},children:[d.jsx(bn.Warning,{sx:{fontSize:48,color:"#757575"}}),d.jsx(P.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),d.jsx(P.Button,{variant:"contained",color:"primary",onClick:()=>s(!0),children:"Proceed"})]});const u=d.jsx(un,{text:"Loading...",centered:!0,size:32}),c=Math.min(t,o);return d.jsx(P.Box,{ref:r,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:e&&d.jsx(q.Suspense,{fallback:u,children:d.jsx(c4,{result:e,height:c,onSizeChange:i})})})}function d4({cell:e,sourceAndPaths:t,resourceUri:n,onQueryChange:r,onSourceChange:o}){const i={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0},a=t.findIndex(s=>s.sourceInfo.name===e.sourceName);return d.jsx(wd,{resourceUri:n,sourceAndPaths:t,selectedSourceIndex:a>=0?a:0,existingQuery:i,onQueryChange:r,onSourceChange:o})}function p4({cell:e,editingMalloy:t,editingMarkdown:n,sourceAndPaths:r,resourceUri:o,onCellChange:i,onClose:a,onEdit:s,onDelete:l,addButtonCallback:u}){const[c,p]=q.useState(e.value),[h,f]=q.useState(!1),[m,g]=q.useState(!1),[y,x]=q.useState(),[E]=q.useState(),[C,S]=q.useState(Ss()),[k,T]=q.useState(!1),[O,F]=q.useState(e.sourceName?r.findIndex(G=>G.sourceInfo.name===e.sourceName):0);q.useEffect(()=>{e.isMarkdown||Zs(e.value,"malloy").then(G=>{x(G)})},[e]),q.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const[B,R]=q.useState(!1),N=()=>{l(),R(!1)},v=r.length===0,L=q.useCallback(()=>{const G=r[O],re=G?.modelPath||e.modelPath||"",_=G?.sourceInfo.name||e.sourceName||"";i({...e,value:e.isMarkdown?c:C.query,result:C.malloyResult?JSON.stringify(C.malloyResult):void 0,queryInfo:C.malloyQuery?JSON.stringify(C.malloyQuery):void 0,sourceName:_,modelPath:re})},[e,c,C,i,O,r]),I=d.jsx(P.Tooltip,{title:"Delete Cell",children:d.jsx(P.IconButton,{size:"small",onClick:()=>R(!0),children:d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),A=d.jsxs(P.Dialog,{open:B,onClose:()=>R(!1),children:[d.jsx(P.DialogTitle,{children:"Confirm Delete"}),d.jsx(P.DialogContent,{children:d.jsx(P.Typography,{children:"Are you sure you want to delete this cell?"})}),d.jsxs(P.DialogActions,{children:[d.jsx(P.Button,{onClick:()=>R(!1),children:"Cancel"}),d.jsx(P.Button,{onClick:N,color:"error",children:"Delete"})]})]}),M=()=>{L(),a()},V=e.isMarkdown?d.jsxs(d.Fragment,{children:[n?d.jsx(P.Tooltip,{title:"Save",children:d.jsx(P.IconButton,{size:"small",onClick:M,children:d.jsx(Ja,{})})}):d.jsx(P.Tooltip,{title:"Edit",children:d.jsx(P.IconButton,{size:"small",onClick:s,children:d.jsx(zp,{})})}),!n&&I]}):d.jsxs(d.Fragment,{children:[!t&&d.jsx(P.Tooltip,{title:h?"Hide Code":"View Code",children:d.jsx(P.IconButton,{size:"small",onClick:()=>{f(!h)},children:d.jsx(b0,{})})}),!t&&e.result&&d.jsx(P.Tooltip,{title:m?"Hide Embedding":"View Embedding",children:d.jsx(P.IconButton,{size:"small",onClick:()=>{g(!m)},children:d.jsx(Qc,{})})}),t&&d.jsx(P.Tooltip,{title:"Save",children:d.jsx(P.IconButton,{size:"small",onClick:M,children:d.jsx(Ja,{})})}),!t&&d.jsx(P.Tooltip,{title:"Edit",children:d.jsx(P.IconButton,{size:"small",onClick:s,children:d.jsx(zp,{})})}),!t&&I]}),W=t||n,H=n?d.jsx(P.Tooltip,{title:"Save",children:d.jsx(P.IconButton,{size:"small",onClick:M,children:d.jsx(Ja,{})})}):t?d.jsx(P.Tooltip,{title:"Save",children:d.jsx(P.IconButton,{size:"small",onClick:M,children:d.jsx(Ja,{})})}):null,w=k&&d.jsx(P.Box,{sx:{position:"absolute",top:"4px",right:"4px",display:"flex",gap:"8px",backgroundColor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:"2px 4px",boxShadow:1,zIndex:10},children:!W&&d.jsxs(d.Fragment,{children:[u(!0),u(!1),V]})||H});return d.jsxs(Us,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>T(!0),onMouseLeave:()=>{T(!1)},children:[w,e.isMarkdown?d.jsx(d.Fragment,{children:n?d.jsx($1,{value:c,preview:"edit",autoFocus:!0,onChange:G=>{p(G),i({...e,value:G})},onBlur:()=>{L(),k||M()}}):d.jsx(P.Box,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:e.value?d.jsx(P.Box,{onClick:s,sx:{cursor:"pointer"},children:d.jsx(_s,{children:e.value})}):d.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[d.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),d.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):d.jsxs(d.Fragment,{children:[d.jsx(P.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:d.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:d.jsx(P.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:E}})})}),d.jsx(P.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:d.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:d.jsx(P.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:y}})})}),t&&(v?d.jsxs(d.Fragment,{children:[d.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),d.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):d.jsx(d4,{sourceAndPaths:r,resourceUri:o,onQueryChange:G=>{S(G)},onSourceChange:G=>{F(G)},cell:e})),!t&&e.result&&d.jsx(Us,{variant:"outlined",sx:{borderRadius:0},children:d.jsx(Si,{result:e.result,maxHeight:800})}),!t&&!e.result&&d.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[d.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),d.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),B&&A]})}const U1=q.createContext(void 0);function f4({children:e,workbookStorage:t}){const n=q.useMemo(()=>({workbookStorage:t}),[t]);return d.jsx(U1.Provider,{value:n,children:e})}function Id(){const e=q.useContext(U1);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const Ir=lt(d.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),h4=lt(d.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}));function cn({error:e,context:t}){const n=e.data?.message||"Unknown Error";return d.jsxs(d.Fragment,{children:[t&&d.jsx(P.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),d.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function m4({initialSelectedModels:e,onModelChange:t,resourceUri:n}){const{environmentName:r,packageName:o,versionId:i}=Mt(n),{apiClients:a}=ut.useServer(),{data:s,isLoading:l,isSuccess:u,isError:c,error:p}=Wt({queryKey:["models",r,o,i],queryFn:()=>a.models.listModels(r,o,i)}),[h,f]=q.useState(e||[]),[m,g]=q.useState(null);q.useEffect(()=>{f(e||[])},[e]);const y=C=>{const S=h.filter(k=>k!==C);f(S),t(S)},x=C=>{const S=[...h,C];f(S),t(S),g(null)};let E=[];return u&&s?.data&&(E=s.data.filter(C=>!h.includes(C.path)).map(C=>C.path)),c?d.jsx(cn,{error:p,context:`${r} > ${o} > Model Picker`}):d.jsxs(d.Fragment,{children:[d.jsxs(P.FormControl,{fullWidth:!0,children:[l&&d.jsx(P.Typography,{children:"Loading..."}),d.jsxs(P.Stack,{direction:"row",spacing:1,children:[h.map(C=>d.jsx(P.Chip,{label:C,onDelete:()=>y(C),deleteIcon:d.jsx(Ir,{}),sx:{marginBottom:"5px"}},C)),d.jsx(P.Button,{size:"small",startIcon:d.jsx(h4,{}),onClick:C=>g(C.currentTarget),disabled:l||c||E.length===0,children:"Add Model"})]})]}),d.jsxs(P.Menu,{anchorEl:m,open:!!m,onClose:()=>g(null),children:[d.jsx(P.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),d.jsx(P.Divider,{}),E.length===0?d.jsx(P.MenuItem,{disabled:!0,children:"No models available"}):E.map(C=>d.jsx(P.MenuItem,{onClick:()=>x(C),children:d.jsx(P.Typography,{variant:"body2",children:C})},C))]})]})}function z1(){const e=ax.useNavigate();return(t,n)=>{if(!n||!n.metaKey&&!n.ctrlKey&&!n.shiftKey&&n.button!==1){e(t);return}const r=new URL(t,window.location.href).href;(n.metaKey||n.ctrlKey||n.button===1||n.shiftKey)&&window.open(r,"_blank")}}function g4({workbookPath:e,resourceUri:t}){const n=z1(),{server:r,getAccessToken:o}=ut.useServer(),{apiClients:i}=ut.useServer(),{workbookStorage:a}=Id(),{environmentName:s,packageName:l}=Mt(t),[u,c]=q.useState(void 0),[p,h]=q.useState(void 0);if(!a)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[f,m]=q.useState(),[g,y]=q.useState(),[x,E]=q.useState(),[C,S]=q.useState([]),[k,T]=q.useState(null),[O,F]=q.useState(null),B=!!k,R=()=>{T(null),F(null)},N=(G,re)=>{f&&(m(f.insertCell(re,{isMarkdown:G,value:""})),G?E(re):y(re),R(),console.log("handleAddCell",G,re))},[v,L]=q.useState(!1),I=()=>{L(!0)},A=async()=>{e&&a&&await a.deleteWorkbook(e).then(()=>{h(void 0),c(void 0)}).catch(G=>{h(`Error deleting workbook: ${G.message}`),c(void 0)}),L(!1),n(`/${s}/${l}`)},M=()=>{L(!1)},V=q.useCallback(async()=>{if(!f){console.log("No workbook data ref");return}try{m(await f.saveWorkbook()),h(void 0),c("Workbook saved")}catch(G){h(`Error saving workbook: ${G.message}`),c(void 0)}},[f]);if(q.useEffect(()=>{if(!f)return;(async()=>{const re=new Map(C.map(({modelPath:X,sourceInfos:U})=>[X,U])),_=[],ae=[];for(const X of f.getModels())re.has(X)?_.push({modelPath:X,sourceInfos:re.get(X)}):(console.log("Fetching model from Publisher",X),ae.push(i.models.getModel(s,l,X,void 0).then(U=>({modelPath:X,sourceInfos:U.data.sourceInfos.map(J=>JSON.parse(J))}))));if(ae.length>0){const X=await Promise.all(ae);S([..._,...X])}else S(_)})()},[o,f,l,s,r]),q.useEffect(()=>{e&&Xo.loadWorkbook(a,e).then(G=>{m(G)})},[e,a]),!f)return d.jsx("div",{children:"Loading..."});const W=G=>{const re=[];for(const _ of G)for(const ae of _.sourceInfos)re.push({modelPath:_.modelPath,sourceInfo:ae});return re},H=(G,re)=>d.jsx(P.Button,{size:"small",startIcon:d.jsx(Kc,{}),onClick:()=>N(G,re),variant:"contained",sx:{backgroundColor:"#fff",color:_=>_.palette.mode==="dark"?_.palette.grey[100]:_.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:_=>_.palette.mode==="dark"?_.palette.grey[500]:_.palette.grey[300],boxShadow:"none"}},children:G?"Markdown":"Explore"}),w=d.jsxs(P.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[H(!1,f.getCells().length),H(!0,f.getCells().length)]});return d.jsxs(Us,{variant:"outlined",children:[d.jsxs(p0,{children:[d.jsx(P.Box,{sx:{mb:2},children:d.jsx(P.Box,{sx:{minHeight:"24px"},children:p?d.jsx(P.Typography,{color:"error",variant:"body2",children:p}):u?d.jsx(P.Typography,{color:"success",variant:"body2",children:u}):d.jsx("span",{children:" "})})}),d.jsxs(Bo,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[d.jsxs(Bo,{direction:"row",spacing:1,alignItems:"center",children:[d.jsx(P.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),d.jsx(P.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${e.workspace} > ${e.path}`})]}),d.jsxs(Bo,{sx:{display:"flex",flexDirection:"row",gap:1},children:[d.jsx(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:d.jsx(b4,{workbookData:f})}),d.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[d.jsx(P.Button,{color:"error",onClick:I,size:"small",children:"Delete"}),d.jsxs(P.Dialog,{open:v,onClose:M,children:[d.jsx(P.DialogTitle,{children:"Delete Workbook"}),d.jsx(P.DialogContent,{children:d.jsxs(P.DialogContentText,{children:['Are you sure you want to delete the workbook "',e.path,'"? This action cannot be undone.']})}),d.jsxs(P.DialogActions,{children:[d.jsx(P.Button,{onClick:M,color:"primary",size:"small",children:"Cancel"}),d.jsx(P.Button,{onClick:A,color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),d.jsx(P.Divider,{}),d.jsxs(Bo,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[d.jsx(P.Box,{sx:{flex:1},children:d.jsx(m4,{initialSelectedModels:f.getModels(),onModelChange:G=>{m(f.setModels(G)),V()},resourceUri:t})}),d.jsx(P.Box,{sx:{flex:1}})]})]}),d.jsx(Gc,{children:d.jsxs(Bo,{children:[f.getCells().length===0&&d.jsxs(d.Fragment,{children:[d.jsx(P.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),d.jsx(P.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),f.getCells().map((G,re)=>d.jsx(q.Fragment,{children:d.jsx(p4,{cell:G,resourceUri:t,addButtonCallback:_=>H(_,re),sourceAndPaths:W(C),editingMarkdown:x===re,editingMalloy:g===re,onDelete:()=>{m(f.deleteCell(re)),V()},onCellChange:_=>{m(f.setCell(re,_))},onEdit:()=>{G.isMarkdown?E(re):y(re)},onClose:()=>{G.isMarkdown?E(void 0):y(void 0),V()}},`${re}-${G.isMarkdown}-${e.workspace}-${e.path}`)},`${re}-${f.getCells().length}`)),w,d.jsxs(P.Menu,{anchorEl:k,open:B,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[d.jsx(P.MenuItem,{onClick:()=>N(!0,O??0),children:"Add Markdown"}),d.jsx(P.MenuItem,{onClick:()=>N(!1,O??0),children:"Add Malloy"})]}),d.jsx(Bo,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function b4({workbookData:e}){const[t,n]=q.useState(!1),r=async()=>{if(!e)return;const o=e.toMalloyWorkbook();try{await navigator.clipboard.writeText(o),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return d.jsx(P.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function V1({onWorkbookClick:e}){const{workbookStorage:t}=Id(),[n,r]=q.useState([]),[o,i]=q.useState(void 0);return q.useEffect(()=>{t&&t.listWorkspaces(!1).then(a=>{const s=[];Promise.all(a.map(async l=>{await t.listWorkbooks(l).then(u=>{s.push(...u)}).catch(u=>{i(`Error listing workbooks: ${u.message}`)})})).then(()=>{r(s),i(void 0)})})},[t]),d.jsxs(d.Fragment,{children:[o&&d.jsx(P.Box,{sx:{mb:2},children:d.jsx(P.Typography,{color:"error",variant:"body2",children:o})}),d.jsx(P.Divider,{}),d.jsx(P.Box,{sx:{maxHeight:"300px",overflow:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(0,0,0,0.2)",borderRadius:"4px"}},children:d.jsxs(P.List,{dense:!0,children:[n.length===0&&d.jsx(P.ListItem,{children:d.jsx(P.ListItemText,{primary:"No workbooks found.",sx:{textAlign:"center"}})}),n.map(a=>d.jsx(P.ListItem,{onClick:s=>e(a,s),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:d.jsx(P.ListItemText,{primary:a.path})},a.path))]})})]})}const Th="Local";class y4{async listWorkspaces(t){return Promise.resolve([{name:Th,description:"Stored locally- only accessible to this browser",writeable:!0}])}async listWorkbooks(t){const n=[];for(let r=0;r<localStorage.length;r++){const o=localStorage.key(r);n.push({path:o,workspace:Th})}return n}async getWorkbook(t){const n=localStorage.getItem(t.path);if(n===null)throw new Error(`Notebook not found at path: ${t}`);return n}async deleteWorkbook(t){if(localStorage.getItem(t.path)===null)throw new Error(`Notebook not found at path: ${t}`);localStorage.removeItem(t.path)}async saveWorkbook(t,n){localStorage.setItem(t.path,n)}async moveWorkbook(t,n){const r=localStorage.getItem(t.path);if(r===null)throw new Error(`Notebook not found at path: ${t.path}`);localStorage.setItem(n.path,r),localStorage.removeItem(t.path)}}function x4({onWorkbookSelect:e}){const{workbookStorage:t}=Id(),[n,r]=q.useState(""),[o,i]=q.useState(""),[a,s]=q.useState([]),[l,u]=q.useState(null),[c,p]=q.useState(!1),[h,f]=q.useState(!1),m=!!l,g=T=>{u(T.currentTarget)},y=()=>{u(null)},x=()=>{f(!1)},E=()=>{p(!1),r(""),i("")};q.useEffect(()=>{t&&(console.log("fetching workspaces"),t.listWorkspaces(!0).then(T=>{s(T),T.length===1&&i(T[0].name)}).catch(T=>{console.error("Error fetching workspaces:",T),s([])}))},[t]);const C=(T,O)=>{f(!1),e(T,O)},S=T=>{p(!1),e({path:n,workspace:o},T),r(""),i("")},k=a.length===0;return d.jsxs(d.Fragment,{children:[d.jsx(P.Button,{"aria-controls":m?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:g,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),d.jsxs(P.Menu,{id:"basic-menu",anchorEl:l,open:m,onClose:y,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[d.jsxs(P.MenuItem,{onClick:()=>{p(!0),y()},sx:{py:1,px:2},disabled:k,children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Add,{fontSize:"small"})}),d.jsxs(P.ListItemText,{children:[d.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),k?d.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"No workspaces available"}):d.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),d.jsxs(P.MenuItem,{onClick:()=>{f(!0),y()},sx:{py:1,px:2},children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Launch,{fontSize:"small"})}),d.jsxs(P.ListItemText,{children:[d.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),d.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),d.jsxs(P.Dialog,{open:c,onClose:E,maxWidth:"sm",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[d.jsx(P.Typography,{fontWeight:600,sx:{fontSize:"1.5rem",mb:.5},children:"Create New Workbook"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),d.jsx(P.DialogContent,{sx:{px:2,pb:2},children:d.jsxs(P.Stack,{spacing:2,sx:{mt:1},children:[a.length>1?d.jsxs(P.FormControl,{fullWidth:!0,size:"small",children:[d.jsx(P.InputLabel,{children:"Workspace"}),d.jsx(P.Select,{value:o,label:"Workspace",onChange:T=>i(T.target.value),children:a.map(T=>d.jsx(P.MenuItem,{value:T.name,children:d.jsxs(P.Box,{children:[d.jsx(P.Typography,{variant:"body2",fontWeight:500,children:T.name}),d.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:T.description})]})},T.name))})]}):a.length===1?d.jsxs(P.Box,{sx:{p:2,border:1,borderColor:"divider",borderRadius:1,backgroundColor:"grey.50"},children:[d.jsxs(P.Typography,{variant:"body2",fontWeight:500,gutterBottom:!0,children:["Workspace: ",a[0].name]}),d.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:a[0].description})]}):null,d.jsx(P.FormControl,{fullWidth:!0,children:d.jsx(P.TextField,{label:"Workbook Name",value:n,onChange:T=>r(T.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),d.jsxs(P.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[d.jsx(P.Button,{onClick:E,variant:"outlined",size:"small",children:"Cancel"}),d.jsx(P.Button,{onClick:T=>S(T),variant:"contained",disabled:!n.trim()||a.length>1&&!o,size:"small",children:"Create Workbook"})]})]})})]}),d.jsxs(P.Dialog,{open:h,onClose:x,maxWidth:"md",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[d.jsx(P.Typography,{fontWeight:600,sx:{mb:.5,fontSize:"1.5rem"},children:"Open Workbook"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),d.jsx(P.DialogContent,{sx:{px:2,pb:2},children:d.jsx(V1,{onWorkbookClick:C})})]})]})}function E4({resourceUri:e}){const{environmentName:t}=Mt(e),{apiClients:n}=ut.useServer(),[r,o]=q.useState(!1),i=90,{data:a,isSuccess:s,isError:l,error:u}=Wt({queryKey:["about",t],queryFn:()=>n.environments.getEnvironment(t,!1)}),c=a?.data?.readme||"",p=c.split(/\s+/),h=p.length>i,f=p.slice(0,i).join(" ");return d.jsxs(d.Fragment,{children:[!s&&!l&&d.jsx(un,{text:"Fetching About..."}),s&&c&&d.jsx(h0,{children:d.jsxs(m0,{children:[d.jsx(g0,{children:"Readme"}),d.jsxs(P.Box,{sx:{mt:1,fontSize:"0.875rem",lineHeight:1.6},children:[d.jsx(_s,{options:{overrides:{h1:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}},h2:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}},h3:{component:"p",props:{style:{fontSize:"inherit",fontWeight:"italic"}}}}},children:r||!h?c:f}),h&&d.jsxs(P.Box,{sx:{mt:1},children:[" ",d.jsx(P.Button,{variant:"text",size:"small",onClick:()=>o(!r),children:r?"Read less":"Read more"})]})]})]})}),l&&d.jsx(cn,{error:u,context:`${t} > About`})]})}function C4({resourceUri:e}){const[t,n]=q.useState(!1),{apiClients:r}=ut.useServer(),o=Rr.useQueryClient(),[i,a]=q.useState(""),{environmentName:s}=Mt(e),l=ur({async mutationFn(c){return r.packages.createPackage(s,{name:c.name,description:c.description,location:c.location})},onSuccess(){n(!1),a("Package created successfully"),o.invalidateQueries({queryKey:["packages",s]})},onError(c){a(c instanceof Error?c.message:"An unknown error occurred")}}),u=c=>{c.preventDefault();const p=new FormData(c.currentTarget),h=p.get("name")?.toString(),f=p.get("description")?.toString(),m=p.get("location")?.toString();l.mutate({name:h,description:f,location:m})};return d.jsxs(d.Fragment,{children:[d.jsx(P.Button,{onClick:()=>n(!0),variant:"contained",color:"primary",startIcon:d.jsx(bn.Add,{}),children:"Add Package"}),d.jsxs(P.Dialog,{open:t,onClose:()=>n(!1),maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:2}},children:[d.jsx(P.DialogTitle,{sx:{fontSize:"1.25rem",fontWeight:600,letterSpacing:"-0.025em",pt:3,pb:1,px:3},children:"Create New Package"}),d.jsxs(P.DialogContent,{sx:{px:3,pb:0},children:[d.jsxs(P.Box,{sx:{mb:3},children:[d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"Create a new Malloy package to start exploring your data."}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"The location can be a GitHub/S3/GCP URL containing a package (zipped or unzipped), or an absolute path to a directory the publisher server has access to."}),d.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Make sure to conform to the"," ",d.jsx(P.Box,{component:"a",href:"https://github.com/malloydata/publisher/blob/main/README.md#architecture-overview",target:"_blank",rel:"noopener noreferrer",sx:{color:"text.primary",textDecoration:"underline"},children:"Malloy Package Format"}),"."]})]}),d.jsx("form",{onSubmit:u,id:"package-form",children:d.jsxs(P.Stack,{spacing:2.5,children:[d.jsx(P.TextField,{autoFocus:!0,required:!0,id:"name",name:"name",label:"Package Name",type:"text",fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}}),d.jsx(P.TextField,{id:"description",name:"description",label:"Description",multiline:!0,rows:3,fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}}),d.jsx(P.TextField,{id:"location",name:"location",label:"Location",type:"text",placeholder:"e.g. s3://my-bucket/my-package.zip",fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}})]})})]}),d.jsxs(P.DialogActions,{sx:{px:3,pt:2,pb:3,gap:1},children:[d.jsx(P.Button,{variant:"outlined",disabled:l.isPending,onClick:()=>n(!1),children:"Cancel"}),d.jsx(P.Button,{type:"submit",form:"package-form",variant:"contained",loading:l.isPending,children:"Save Changes"})]})]}),d.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>a(""),message:i})]})}const T4=lt(d.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),W1=lt(d.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}));function q1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ya(t.components[n].defaultProps,r)}function v4({props:e,name:t,defaultTheme:n,themeId:r}){let o=H2(n);return o=o[r]||o,q1({theme:o,name:t,props:e})}function kt({props:e,name:t}){return v4({props:e,name:t,defaultTheme:El,themeId:hi})}const S4=Me("MuiBox",["root"]),k4=s0(),It=dt.createBox({themeId:hi,defaultTheme:k4,defaultClassName:S4.root,generateClassName:qm.generate}),Y1=de.oneOfType([de.func,de.object]);function vh(e){try{return e.matches(":focus-visible")}catch{}return!1}const Sh={};function K1(e,t){const n=D.useRef(Sh);return n.current===Sh&&(n.current=e(t)),n}class Js{static create(){return new Js}static use(){const t=K1(Js.create).current,[n,r]=D.useState(!1);return t.shouldMount=n,t.setShouldMount=r,D.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=w4(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function D4(){return Js.use()}function w4(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Dc(e,t)}function Ad(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dc(e,t)}function I4(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function A4(e,t){e.classList?e.classList.add(t):I4(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function kh(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function P4(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=kh(e.className,t):e.setAttribute("class",kh(e.className&&e.className.baseVal||"",t))}const Dh={disabled:!1},el=q.createContext(null);var G1=function(t){return t.scrollTop},Ji="unmounted",so="exited",lo="entering",Wo="entered",wc="exiting",Wn=(function(e){Ad(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=so,i.appearStatus=lo):l=Wo:r.unmountOnExit||r.mountOnEnter?l=Ji:l=so,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Ji?{status:so}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==lo&&a!==Wo&&(i=lo):(a===lo||a===Wo)&&(i=wc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===lo){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Gi.findDOMNode(this);a&&G1(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===so&&this.setState({status:Ji})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Gi.findDOMNode(this),s],u=l[0],c=l[1],p=this.getTimeouts(),h=s?p.appear:p.enter;if(!o&&!a||Dh.disabled){this.safeSetState({status:Wo},function(){i.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:lo},function(){i.props.onEntering(u,c),i.onTransitionEnd(h,function(){i.safeSetState({status:Wo},function(){i.props.onEntered(u,c)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Gi.findDOMNode(this);if(!i||Dh.disabled){this.safeSetState({status:so},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:wc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:so},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Gi.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Ji)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=$e(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return q.createElement(el.Provider,{value:null},typeof a=="function"?a(o,s):q.cloneElement(q.Children.only(a),s))},t})(q.Component);Wn.contextType=el;Wn.propTypes={};function Uo(){}Wn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Uo,onEntering:Uo,onEntered:Uo,onExit:Uo,onExiting:Uo,onExited:Uo};Wn.UNMOUNTED=Ji;Wn.EXITED=so;Wn.ENTERING=lo;Wn.ENTERED=Wo;Wn.EXITING=wc;var R4=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return A4(t,r)})},_u=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return P4(t,r)})},Pd=(function(e){Ad(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),c=u[0],p=u[1];r.removeClasses(c,"exit"),r.addClass(c,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),c=u[0],p=u[1],h=p?"appear":"enter";r.addClass(c,h,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),c=u[0],p=u[1],h=p?"appear":"enter";r.removeClasses(c,h),r.addClass(c,h,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",c=u&&l?l+"-":"",p=u?""+c+s:l[s],h=u?p+"-active":l[s+"Active"],f=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:h,doneClassName:f}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&G1(o),s&&(this.appliedClasses[i][a]=s,R4(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,l=a.active,u=a.done;this.appliedClasses[i]={},s&&_u(o,s),l&&_u(o,l),u&&_u(o,u)},n.render=function(){var o=this.props;o.classNames;var i=$e(o,["classNames"]);return q.createElement(Wn,$({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(q.Component);Pd.defaultProps={classNames:""};Pd.propTypes={};function M4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rd(e,t){var n=function(i){return t&&q.isValidElement(i)?t(i):i},r=Object.create(null);return e&&q.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function O4(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var u=r[l][a];s[r[l][a]]=n(u)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function po(e,t,n){return n[t]!=null?n[t]:e.props[t]}function L4(e,t){return Rd(e.children,function(n){return q.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:po(n,"appear",e),enter:po(n,"enter",e),exit:po(n,"exit",e)})})}function N4(e,t,n){var r=Rd(e.children),o=O4(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(q.isValidElement(a)){var s=i in t,l=i in r,u=t[i],c=q.isValidElement(u)&&!u.props.in;l&&(!s||c)?o[i]=q.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:po(a,"exit",e),enter:po(a,"enter",e)}):!l&&s&&!c?o[i]=q.cloneElement(a,{in:!1}):l&&s&&q.isValidElement(u)&&(o[i]=q.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:po(a,"exit",e),enter:po(a,"enter",e)}))}}),o}var F4=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},_4={component:"div",childFactory:function(t){return t}},za=(function(e){Ad(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(M4(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?L4(o,s):N4(o,a,s),firstRender:!1}},n.handleExited=function(o,i){var a=Rd(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=$({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=$e(o,["component","childFactory"]),l=this.state.contextValue,u=F4(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?q.createElement(el.Provider,{value:l},u):q.createElement(el.Provider,{value:l},q.createElement(i,s,u))},t})(q.Component);za.propTypes={};za.defaultProps=_4;const B4=[];function j4(e){D.useEffect(e,B4)}class Md{static create(){return new Md}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Nl(){const e=K1(Md.create).current;return j4(e.disposeEffect),e}function $4(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:u}=e,[c,p]=D.useState(!1),h=Ae(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),f={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=Ae(n.child,c&&n.childLeaving,r&&n.childPulsate);return!s&&!c&&p(!0),D.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,u);return()=>{clearTimeout(g)}}},[l,s,u]),d.jsx("span",{className:h,style:f,children:d.jsx("span",{className:m})})}const Mn=Me("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ic=550,H4=80,U4=dt.keyframes`
93
+ 0% {
94
+ transform: scale(0);
95
+ opacity: 0.1;
96
+ }
97
+
98
+ 100% {
99
+ transform: scale(1);
100
+ opacity: 0.3;
101
+ }
102
+ `,z4=dt.keyframes`
103
+ 0% {
104
+ opacity: 1;
105
+ }
106
+
107
+ 100% {
108
+ opacity: 0;
109
+ }
110
+ `,V4=dt.keyframes`
111
+ 0% {
112
+ transform: scale(1);
113
+ }
114
+
115
+ 50% {
116
+ transform: scale(0.92);
117
+ }
118
+
119
+ 100% {
120
+ transform: scale(1);
121
+ }
122
+ `,W4=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),q4=oe($4,{name:"MuiTouchRipple",slot:"Ripple"})`
123
+ opacity: 0;
124
+ position: absolute;
125
+
126
+ &.${Mn.rippleVisible} {
127
+ opacity: 0.3;
128
+ transform: scale(1);
129
+ animation-name: ${U4};
130
+ animation-duration: ${Ic}ms;
131
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
132
+ }
133
+
134
+ &.${Mn.ripplePulsate} {
135
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
136
+ }
137
+
138
+ & .${Mn.child} {
139
+ opacity: 1;
140
+ display: block;
141
+ width: 100%;
142
+ height: 100%;
143
+ border-radius: 50%;
144
+ background-color: currentColor;
145
+ }
146
+
147
+ & .${Mn.childLeaving} {
148
+ opacity: 0;
149
+ animation-name: ${z4};
150
+ animation-duration: ${Ic}ms;
151
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
152
+ }
153
+
154
+ & .${Mn.childPulsate} {
155
+ position: absolute;
156
+ /* @noflip */
157
+ left: 0px;
158
+ top: 0;
159
+ animation-name: ${V4};
160
+ animation-duration: 2500ms;
161
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
162
+ animation-iteration-count: infinite;
163
+ animation-delay: 200ms;
164
+ }
165
+ `,Y4=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,u]=D.useState([]),c=D.useRef(0),p=D.useRef(null);D.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const h=D.useRef(!1),f=Nl(),m=D.useRef(null),g=D.useRef(null),y=D.useCallback(S=>{const{pulsate:k,rippleX:T,rippleY:O,rippleSize:F,cb:B}=S;u(R=>[...R,d.jsx(q4,{classes:{ripple:Ae(i.ripple,Mn.ripple),rippleVisible:Ae(i.rippleVisible,Mn.rippleVisible),ripplePulsate:Ae(i.ripplePulsate,Mn.ripplePulsate),child:Ae(i.child,Mn.child),childLeaving:Ae(i.childLeaving,Mn.childLeaving),childPulsate:Ae(i.childPulsate,Mn.childPulsate)},timeout:Ic,pulsate:k,rippleX:T,rippleY:O,rippleSize:F},c.current)]),c.current+=1,p.current=B},[i]),x=D.useCallback((S={},k={},T=()=>{})=>{const{pulsate:O=!1,center:F=o||k.pulsate,fakeElement:B=!1}=k;if(S?.type==="mousedown"&&h.current){h.current=!1;return}S?.type==="touchstart"&&(h.current=!0);const R=B?null:g.current,N=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let v,L,I;if(F||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)v=Math.round(N.width/2),L=Math.round(N.height/2);else{const{clientX:A,clientY:M}=S.touches&&S.touches.length>0?S.touches[0]:S;v=Math.round(A-N.left),L=Math.round(M-N.top)}if(F)I=Math.sqrt((2*N.width**2+N.height**2)/3),I%2===0&&(I+=1);else{const A=Math.max(Math.abs((R?R.clientWidth:0)-v),v)*2+2,M=Math.max(Math.abs((R?R.clientHeight:0)-L),L)*2+2;I=Math.sqrt(A**2+M**2)}S?.touches?m.current===null&&(m.current=()=>{y({pulsate:O,rippleX:v,rippleY:L,rippleSize:I,cb:T})},f.start(H4,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:O,rippleX:v,rippleY:L,rippleSize:I,cb:T})},[o,y,f]),E=D.useCallback(()=>{x({},{pulsate:!0})},[x]),C=D.useCallback((S,k)=>{if(f.clear(),S?.type==="touchend"&&m.current){m.current(),m.current=null,f.start(0,()=>{C(S,k)});return}m.current=null,u(T=>T.length>0?T.slice(1):T),p.current=k},[f]);return D.useImperativeHandle(n,()=>({pulsate:E,start:x,stop:C}),[E,x,C]),d.jsx(W4,{className:Ae(Mn.root,i.root,a),ref:g,...s,children:d.jsx(za,{component:null,exit:!0,children:l})})});function K4(e){return _e("MuiButtonBase",e)}const G4=Me("MuiButtonBase",["root","disabled","focusVisible"]),Q4=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Ne({root:["root",t&&"disabled",n&&"focusVisible"]},K4,o);return n&&r&&(a.root+=` ${r}`),a},X4=oe("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${G4.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),To=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:p=!1,focusRipple:h=!1,focusVisibleClassName:f,LinkComponent:m="a",onBlur:g,onClick:y,onContextMenu:x,onDragLeave:E,onFocus:C,onFocusVisible:S,onKeyDown:k,onKeyUp:T,onMouseDown:O,onMouseLeave:F,onMouseUp:B,onTouchEnd:R,onTouchMove:N,onTouchStart:v,tabIndex:L=0,TouchRippleProps:I,touchRippleRef:A,type:M,...V}=r,W=D.useRef(null),H=D4(),w=rt(H.ref,A),[G,re]=D.useState(!1);u&&G&&re(!1),D.useImperativeHandle(o,()=>({focusVisible:()=>{re(!0),W.current.focus()}}),[]);const _=H.shouldMount&&!c&&!u;D.useEffect(()=>{G&&h&&!c&&H.pulsate()},[c,h,G,H]);const ae=Er(H,"start",O,p),X=Er(H,"stop",x,p),U=Er(H,"stop",E,p),J=Er(H,"stop",B,p),Q=Er(H,"stop",De=>{G&&De.preventDefault(),F&&F(De)},p),ne=Er(H,"start",v,p),Z=Er(H,"stop",R,p),Y=Er(H,"stop",N,p),le=Er(H,"stop",De=>{vh(De.target)||re(!1),g&&g(De)},!1),ee=Pe(De=>{W.current||(W.current=De.currentTarget),vh(De.target)&&(re(!0),S&&S(De)),C&&C(De)}),te=()=>{const De=W.current;return l&&l!=="button"&&!(De.tagName==="A"&&De.href)},xe=Pe(De=>{h&&!De.repeat&&G&&De.key===" "&&H.stop(De,()=>{H.start(De)}),De.target===De.currentTarget&&te()&&De.key===" "&&De.preventDefault(),k&&k(De),De.target===De.currentTarget&&te()&&De.key==="Enter"&&!u&&(De.preventDefault(),y&&y(De))}),pe=Pe(De=>{h&&De.key===" "&&G&&!De.defaultPrevented&&H.stop(De,()=>{H.pulsate(De)}),T&&T(De),y&&De.target===De.currentTarget&&te()&&De.key===" "&&!De.defaultPrevented&&y(De)});let be=l;be==="button"&&(V.href||V.to)&&(be=m);const se={};be==="button"?(se.type=M===void 0?"button":M,se.disabled=u):(!V.href&&!V.to&&(se.role="button"),u&&(se["aria-disabled"]=u));const Re=rt(n,W),ve={...r,centerRipple:i,component:l,disabled:u,disableRipple:c,disableTouchRipple:p,focusRipple:h,tabIndex:L,focusVisible:G},ze=Q4(ve);return d.jsxs(X4,{as:be,className:Ae(ze.root,s),ownerState:ve,onBlur:le,onClick:y,onContextMenu:X,onFocus:ee,onKeyDown:xe,onKeyUp:pe,onMouseDown:ae,onMouseLeave:Q,onMouseUp:J,onDragLeave:U,onTouchEnd:Z,onTouchMove:Y,onTouchStart:ne,ref:Re,tabIndex:u?-1:L,type:M,...se,...V,children:[a,_?d.jsx(Y4,{ref:w,center:i,...I}):null]})});function Er(e,t,n,r=!1){return Pe(o=>(n&&n(o),r||e[t](o),!0))}function Z4(e){return typeof e.main=="string"}function J4(e,t=[]){if(!Z4(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function sn(e=[]){return([,t])=>t&&J4(t,e)}function eP(e){return _e("MuiCircularProgress",e)}Me("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Hr=44,Ac=dt.keyframes`
166
+ 0% {
167
+ transform: rotate(0deg);
168
+ }
169
+
170
+ 100% {
171
+ transform: rotate(360deg);
172
+ }
173
+ `,Pc=dt.keyframes`
174
+ 0% {
175
+ stroke-dasharray: 1px, 200px;
176
+ stroke-dashoffset: 0;
177
+ }
178
+
179
+ 50% {
180
+ stroke-dasharray: 100px, 200px;
181
+ stroke-dashoffset: -15px;
182
+ }
183
+
184
+ 100% {
185
+ stroke-dasharray: 1px, 200px;
186
+ stroke-dashoffset: -126px;
187
+ }
188
+ `,tP=typeof Ac!="string"?dt.css`
189
+ animation: ${Ac} 1.4s linear infinite;
190
+ `:null,nP=typeof Pc!="string"?dt.css`
191
+ animation: ${Pc} 1.4s ease-in-out infinite;
192
+ `:null,rP=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${ke(r)}`],svg:["svg"],circle:["circle",`circle${ke(n)}`,o&&"circleDisableShrink"]};return Ne(i,eP,t)},oP=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ke(n.color)}`]]}})(Ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:tP||{animation:`${Ac} 1.4s linear infinite`}},...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),iP=oe("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),aP=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ke(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:nP||{animation:`${Pc} 1.4s ease-in-out infinite`}}]}))),Od=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:u=3.6,value:c=0,variant:p="indeterminate",...h}=r,f={...r,color:i,disableShrink:a,size:s,thickness:u,value:c,variant:p},m=rP(f),g={},y={},x={};if(p==="determinate"){const E=2*Math.PI*((Hr-u)/2);g.strokeDasharray=E.toFixed(3),x["aria-valuenow"]=Math.round(c),g.strokeDashoffset=`${((100-c)/100*E).toFixed(3)}px`,y.transform="rotate(-90deg)"}return d.jsx(oP,{className:Ae(m.root,o),style:{width:s,height:s,...y,...l},ownerState:f,ref:n,role:"progressbar",...x,...h,children:d.jsx(iP,{className:m.svg,ownerState:f,viewBox:`${Hr/2} ${Hr/2} ${Hr} ${Hr}`,children:d.jsx(aP,{className:m.circle,style:g,ownerState:f,cx:Hr,cy:Hr,r:(Hr-u)/2,fill:"none",strokeWidth:u})})})});function sP(e){return _e("MuiButton",e)}const ro=Me("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),lP=D.createContext({}),uP=D.createContext(void 0),cP=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,u={root:["root",a&&"loading",i,`${i}${ke(t)}`,`size${ke(o)}`,`${i}Size${ke(o)}`,`color${ke(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${ke(s)}`],startIcon:["icon","startIcon",`iconSize${ke(o)}`],endIcon:["icon","endIcon",`iconSize${ke(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=Ne(u,sP,l);return{...l,...c}},Q1=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],dP=oe(To,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${ro.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${ro.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ro.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${ro.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(sn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ro.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ro.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${ro.loading}`]:{color:"transparent"}}}]}})),pP=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ke(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Q1]})),fP=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ke(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Q1]})),hP=oe("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),wh=oe("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Lt=D.forwardRef(function(t,n){const r=D.useContext(lP),o=D.useContext(uP),i=ya(r,t),a=Ke({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:c,disabled:p=!1,disableElevation:h=!1,disableFocusRipple:f=!1,endIcon:m,focusVisibleClassName:g,fullWidth:y=!1,id:x,loading:E=null,loadingIndicator:C,loadingPosition:S="center",size:k="medium",startIcon:T,type:O,variant:F="text",...B}=a,R=Zn(x),N=C??d.jsx(Od,{"aria-labelledby":R,color:"inherit",size:16}),v={...a,color:l,component:u,disabled:p,disableElevation:h,disableFocusRipple:f,fullWidth:y,loading:E,loadingIndicator:N,loadingPosition:S,size:k,type:O,variant:F},L=cP(v),I=(T||E&&S==="start")&&d.jsx(pP,{className:L.startIcon,ownerState:v,children:T||d.jsx(wh,{className:L.loadingIconPlaceholder,ownerState:v})}),A=(m||E&&S==="end")&&d.jsx(fP,{className:L.endIcon,ownerState:v,children:m||d.jsx(wh,{className:L.loadingIconPlaceholder,ownerState:v})}),M=o||"",V=typeof E=="boolean"?d.jsx("span",{className:L.loadingWrapper,style:{display:"contents"},children:E&&d.jsx(hP,{className:L.loadingIndicator,ownerState:v,children:N})}):null;return d.jsxs(dP,{ownerState:v,className:Ae(r.className,L.root,c,M),component:u,disabled:p||E,focusRipple:!f,focusVisibleClassName:Ae(L.focusVisible,g),ref:n,type:O,id:E?R:x,...B,classes:L,children:[I,S!=="end"&&V,s,S==="end"&&V,A]})});function X1(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function mP(e){const t=Ut(e);return t.body===e?wr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function da(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ih(e){return parseInt(wr(e).getComputedStyle(e).paddingRight,10)||0}function gP(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Ah(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!gP(a);s&&l&&da(a,o)})}function Bu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function bP(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(mP(r)){const a=X1(wr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Ih(r)+a}px`;const s=Ut(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${Ih(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Ut(r).body;else{const a=r.parentElement,s=wr(r);i=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function yP(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class xP{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&da(t.modalRef,!1);const o=yP(n);Ah(n,t.mount,t.modalRef,o,!0);const i=Bu(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Bu(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=bP(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Bu(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&da(t.modalRef,n),Ah(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&da(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ki(e){return parseInt(D.version,10)>=19?e?.props?.ref||null:e?.ref||null}const EP=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function CP(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function TP(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function vP(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||TP(e))}function SP(e){const t=[],n=[];return Array.from(e.querySelectorAll(EP)).forEach((r,o)=>{const i=CP(r);i===-1||!vP(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function kP(){return!0}function Z1(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=SP,isEnabled:a=kP,open:s}=e,l=D.useRef(!1),u=D.useRef(null),c=D.useRef(null),p=D.useRef(null),h=D.useRef(null),f=D.useRef(!1),m=D.useRef(null),g=rt(ki(t),m),y=D.useRef(null);D.useEffect(()=>{!s||!m.current||(f.current=!n)},[n,s]),D.useEffect(()=>{if(!s||!m.current)return;const C=Ut(m.current);return m.current.contains(C.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[s]),D.useEffect(()=>{if(!s||!m.current)return;const C=Ut(m.current),S=O=>{y.current=O,!(r||!a()||O.key!=="Tab")&&C.activeElement===m.current&&O.shiftKey&&(l.current=!0,c.current&&c.current.focus())},k=()=>{const O=m.current;if(O===null)return;if(!C.hasFocus()||!a()||l.current){l.current=!1;return}if(O.contains(C.activeElement)||r&&C.activeElement!==u.current&&C.activeElement!==c.current)return;if(C.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!f.current)return;let F=[];if((C.activeElement===u.current||C.activeElement===c.current)&&(F=i(m.current)),F.length>0){const B=!!(y.current?.shiftKey&&y.current?.key==="Tab"),R=F[0],N=F[F.length-1];typeof R!="string"&&typeof N!="string"&&(B?N.focus():R.focus())}else O.focus()};C.addEventListener("focusin",k),C.addEventListener("keydown",S,!0);const T=setInterval(()=>{C.activeElement&&C.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(T),C.removeEventListener("focusin",k),C.removeEventListener("keydown",S,!0)}},[n,r,o,a,s,i]);const x=C=>{p.current===null&&(p.current=C.relatedTarget),f.current=!0,h.current=C.target;const S=t.props.onFocus;S&&S(C)},E=C=>{p.current===null&&(p.current=C.relatedTarget),f.current=!0};return d.jsxs(D.Fragment,{children:[d.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),D.cloneElement(t,{ref:g,onFocus:x}),d.jsx("div",{tabIndex:s?0:-1,onFocus:E,ref:c,"data-testid":"sentinelEnd"})]})}function DP(e){return typeof e=="function"?e():e}const J1=D.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,s]=D.useState(null),l=rt(D.isValidElement(r)?ki(r):null,n);if(qt(()=>{i||s(DP(o)||document.body)},[o,i]),qt(()=>{if(a&&!i)return tc(n,a),()=>{tc(n,null)}},[n,a,i]),i){if(D.isValidElement(r)){const u={ref:l};return D.cloneElement(r,u)}return r}return a&&sx.createPortal(r,a)});function li(e){return typeof e=="string"}function eb(e,t,n){return e===void 0||li(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Fn(e,t,n){return typeof e=="function"?e(t,n):e}function on(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Ph(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function tb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const f=Ae(n?.className,i,o?.className,r?.className),m={...n?.style,...o?.style,...r?.style},g={...n,...o,...r};return f.length>0&&(g.className=f),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=on({...o,...r}),s=Ph(r),l=Ph(o),u=t(a),c=Ae(u?.className,n?.className,i,o?.className,r?.className),p={...u?.style,...n?.style,...o?.style,...r?.style},h={...u,...n,...l,...s};return c.length>0&&(h.className=c),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:u.ref}}function st(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:c={[e]:void 0},slotProps:p={[e]:void 0},...h}=i,f=c[e]||r,m=Fn(p[e],o),{props:{component:g,...y},internalRef:x}=tb({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m}),E=rt(x,m?.ref,t.ref),C=e==="root"?g||u:g,S=eb(f,{...e==="root"&&!u&&!c[e]&&a,...e!=="root"&&!c[e]&&a,...y,...C&&!s&&{as:C},...C&&s&&{component:C},ref:E},o);return[f,S]}const nb=e=>e.scrollTop;function ui(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}const wP={entering:{opacity:1},entered:{opacity:1}},vo=D.forwardRef(function(t,n){const r=Gr(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:u,onEnter:c,onEntered:p,onEntering:h,onExit:f,onExited:m,onExiting:g,style:y,timeout:x=o,TransitionComponent:E=Wn,...C}=t,S=D.useRef(null),k=rt(S,ki(s),n),T=I=>A=>{if(I){const M=S.current;A===void 0?I(M):I(M,A)}},O=T(h),F=T((I,A)=>{nb(I);const M=ui({style:y,timeout:x,easing:l},{mode:"enter"});I.style.webkitTransition=r.transitions.create("opacity",M),I.style.transition=r.transitions.create("opacity",M),c&&c(I,A)}),B=T(p),R=T(g),N=T(I=>{const A=ui({style:y,timeout:x,easing:l},{mode:"exit"});I.style.webkitTransition=r.transitions.create("opacity",A),I.style.transition=r.transitions.create("opacity",A),f&&f(I)}),v=T(m),L=I=>{i&&i(S.current,I)};return d.jsx(E,{appear:a,in:u,nodeRef:S,onEnter:F,onEntered:B,onEntering:O,onExit:N,onExited:v,onExiting:R,addEndListener:L,timeout:x,...C,children:(I,{ownerState:A,...M})=>D.cloneElement(s,{style:{opacity:0,visibility:I==="exited"&&!u?"hidden":void 0,...wP[I],...y,...s.props.style},ref:k,...M})})});function IP(e){return _e("MuiBackdrop",e)}Me("MuiBackdrop",["root","invisible"]);const AP=e=>{const{classes:t,invisible:n}=e;return Ne({root:["root",n&&"invisible"]},IP,t)},PP=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),rb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:u={},componentsProps:c={},slotProps:p={},slots:h={},TransitionComponent:f,transitionDuration:m,...g}=r,y={...r,component:a,invisible:s},x=AP(y),E={transition:f,root:u.Root,...h},C={...c,...p},S={component:a,slots:E,slotProps:C},[k,T]=st("root",{elementType:PP,externalForwardedProps:S,className:Ae(x.root,i),ownerState:y}),[O,F]=st("transition",{elementType:vo,externalForwardedProps:S,ownerState:y});return d.jsx(O,{in:l,timeout:m,...g,...F,children:d.jsx(k,{"aria-hidden":!0,...T,classes:x,ref:n,children:o})})});function RP(e){return typeof e=="function"?e():e}function MP(e){return e?e.props.hasOwnProperty("in"):!1}const Rh=()=>{},ls=new xP;function OP(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:u,rootRef:c}=e,p=D.useRef({}),h=D.useRef(null),f=D.useRef(null),m=rt(f,c),[g,y]=D.useState(!u),x=MP(s);let E=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(E=!1);const C=()=>Ut(h.current),S=()=>(p.current.modalRef=f.current,p.current.mount=h.current,p.current),k=()=>{ls.mount(S(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},T=Pe(()=>{const A=RP(t)||C().body;ls.add(S(),A),f.current&&k()}),O=()=>ls.isTopModal(S()),F=Pe(A=>{h.current=A,A&&(u&&O()?k():f.current&&da(f.current,E))}),B=D.useCallback(()=>{ls.remove(S(),E)},[E]);D.useEffect(()=>()=>{B()},[B]),D.useEffect(()=>{u?T():(!x||!o)&&B()},[u,B,x,o,T]);const R=A=>M=>{A.onKeyDown?.(M),!(M.key!=="Escape"||M.which===229||!O())&&(n||(M.stopPropagation(),l&&l(M,"escapeKeyDown")))},N=A=>M=>{A.onClick?.(M),M.target===M.currentTarget&&l&&l(M,"backdropClick")};return{getRootProps:(A={})=>{const M=on(e);delete M.onTransitionEnter,delete M.onTransitionExited;const V={...M,...A};return{role:"presentation",...V,onKeyDown:R(V),ref:m}},getBackdropProps:(A={})=>{const M=A;return{"aria-hidden":!0,...M,onClick:N(M),open:u}},getTransitionProps:()=>{const A=()=>{y(!1),i&&i()},M=()=>{y(!0),a&&a(),o&&B()};return{onEnter:xp(A,s?.props.onEnter??Rh),onExited:xp(M,s?.props.onExited??Rh)}},rootRef:m,portalRef:F,isTopModal:O,exited:g,hasTransition:x}}function LP(e){return _e("MuiModal",e)}Me("MuiModal",["root","hidden","backdrop"]);const NP=e=>{const{open:t,exited:n,classes:r}=e;return Ne({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},LP,r)},FP=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),_P=oe(rb,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),ob=D.forwardRef(function(t,n){const r=Ke({name:"MuiModal",props:t}),{BackdropComponent:o=_P,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:u,container:c,component:p,components:h={},componentsProps:f={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:y=!1,disablePortal:x=!1,disableRestoreFocus:E=!1,disableScrollLock:C=!1,hideBackdrop:S=!1,keepMounted:k=!1,onClose:T,onTransitionEnter:O,onTransitionExited:F,open:B,slotProps:R={},slots:N={},theme:v,...L}=r,I={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:y,disablePortal:x,disableRestoreFocus:E,disableScrollLock:C,hideBackdrop:S,keepMounted:k},{getRootProps:A,getBackdropProps:M,getTransitionProps:V,portalRef:W,isTopModal:H,exited:w,hasTransition:G}=OP({...I,rootRef:n}),re={...I,exited:w},_=NP(re),ae={};if(u.props.tabIndex===void 0&&(ae.tabIndex="-1"),G){const{onEnter:Z,onExited:Y}=V();ae.onEnter=Z,ae.onExited=Y}const X={slots:{root:h.Root,backdrop:h.Backdrop,...N},slotProps:{...f,...R}},[U,J]=st("root",{ref:n,elementType:FP,externalForwardedProps:{...X,...L,component:p},getSlotProps:A,ownerState:re,className:Ae(s,_?.root,!re.open&&re.exited&&_?.hidden)}),[Q,ne]=st("backdrop",{ref:i?.ref,elementType:o,externalForwardedProps:X,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:Z=>M({...Z,onClick:Y=>{Z?.onClick&&Z.onClick(Y)}}),className:Ae(i?.className,_?.backdrop),ownerState:re});return!k&&!B&&(!G||w)?null:d.jsx(J1,{ref:W,container:c,disablePortal:x,children:d.jsxs(U,{...J,children:[!S&&o?d.jsx(Q,{...ne}):null,d.jsx(Z1,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:E,isEnabled:H,open:B,children:D.cloneElement(u,ae)})]})})});function BP(e){return _e("MuiPaper",e)}Me("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const jP=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ne(i,BP,o)},$P=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Ao=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiPaper"}),o=Gr(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:u="elevation",...c}=r,p={...r,component:a,elevation:s,square:l,variant:u},h=jP(p);return d.jsx($P,{as:a,ownerState:p,className:Ae(h.root,i),ref:n,...c,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${js("#fff",ec(s))}, ${js("#fff",ec(s))})`}},...c.style}})});function HP(e){return _e("MuiDialog",e)}const pa=Me("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ib=D.createContext({}),UP=oe(rb,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),zP=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ne(a,HP,t)},VP=oe(ob,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),WP=oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),qP=oe(Ao,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Ze(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${pa.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${pa.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${pa.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),Or=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiDialog"}),o=Gr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:p,className:h,disableEscapeKeyDown:f=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:y="sm",onClick:x,onClose:E,open:C,PaperComponent:S=Ao,PaperProps:k={},scroll:T="paper",slots:O={},slotProps:F={},TransitionComponent:B=vo,transitionDuration:R=i,TransitionProps:N,...v}=r,L={...r,disableEscapeKeyDown:f,fullScreen:m,fullWidth:g,maxWidth:y,scroll:T},I=zP(L),A=D.useRef(),M=ee=>{A.current=ee.target===ee.currentTarget},V=ee=>{x&&x(ee),A.current&&(A.current=null,E&&E(ee,"backdropClick"))},W=Zn(s),H=D.useMemo(()=>({titleId:W}),[W]),w={transition:B,...O},G={transition:N,paper:k,backdrop:c,...F},re={slots:w,slotProps:G},[_,ae]=st("root",{elementType:VP,shouldForwardComponentProp:!0,externalForwardedProps:re,ownerState:L,className:Ae(I.root,h),ref:n}),[X,U]=st("backdrop",{elementType:UP,shouldForwardComponentProp:!0,externalForwardedProps:re,ownerState:L}),[J,Q]=st("paper",{elementType:qP,shouldForwardComponentProp:!0,externalForwardedProps:re,ownerState:L,className:Ae(I.paper,k.className)}),[ne,Z]=st("container",{elementType:WP,externalForwardedProps:re,ownerState:L,className:I.container}),[Y,le]=st("transition",{elementType:vo,externalForwardedProps:re,ownerState:L,additionalProps:{appear:!0,in:C,timeout:R,role:"presentation"}});return d.jsx(_,{closeAfterTransition:!0,slots:{backdrop:X},slotProps:{backdrop:{transitionDuration:R,as:u,...U}},disableEscapeKeyDown:f,onClose:E,open:C,onClick:V,...ae,...v,children:d.jsx(Y,{...le,children:d.jsx(ne,{onMouseDown:M,...Z,children:d.jsx(J,{as:S,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":W,"aria-modal":l,...Q,children:d.jsx(ib.Provider,{value:H,children:p})})})})})});function YP(e){return _e("MuiDialogActions",e)}Me("MuiDialogActions",["root","spacing"]);const KP=e=>{const{classes:t,disableSpacing:n}=e;return Ne({root:["root",!n&&"spacing"]},YP,t)},GP=oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Lr=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=KP(s);return d.jsx(GP,{className:Ae(l.root,o),ownerState:s,ref:n,...a})});function QP(e){return _e("MuiDialogContent",e)}Me("MuiDialogContent",["root","dividers"]);function XP(e){return _e("MuiDialogTitle",e)}const ZP=Me("MuiDialogTitle",["root"]),JP=e=>{const{classes:t,dividers:n}=e;return Ne({root:["root",n&&"dividers"]},QP,t)},eR=oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Ze(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${ZP.root} + &`]:{paddingTop:0}}}]}))),Nr=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=JP(s);return d.jsx(eR,{className:Ae(l.root,o),ownerState:s,ref:n,...a})});function tR(e){return _e("MuiTypography",e)}const Mh=Me("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),nR={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},rR=IE(),oR=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${ke(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ne(s,tR,a)},iR=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ke(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ze(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ke(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Oh={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ft=D.forwardRef(function(t,n){const{color:r,...o}=Ke({props:t,name:"MuiTypography"}),i=!nR[r],a=rR({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:p=!1,paragraph:h=!1,variant:f="body1",variantMapping:m=Oh,...g}=a,y={...a,align:s,color:r,className:l,component:u,gutterBottom:c,noWrap:p,paragraph:h,variant:f,variantMapping:m},x=u||(h?"p":m[f]||Oh[f])||"span",E=oR(y);return d.jsx(iR,{as:x,ref:n,className:Ae(E.root,l),...g,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function aR(e){return _e("MuiDialogContentText",e)}Me("MuiDialogContentText",["root"]);const sR=e=>{const{classes:t}=e,r=Ne({root:["root"]},aR,t);return{...t,...r}},lR=oe(ft,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),Va=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,s=sR(a);return d.jsx(lR,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:Ae(s.root,i),...r,classes:s})}),uR=e=>{const{classes:t}=e;return Ne({root:["root"]},XP,t)},cR=oe(ft,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Zr=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=uR(s),{titleId:u=i}=D.useContext(ib);return d.jsx(cR,{component:"h2",className:Ae(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??u,...a})});function dR(e){return _e("MuiIconButton",e)}const Lh=Me("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),pR=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${ke(r)}`,o&&`edge${ke(o)}`,`size${ke(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ne(s,dR,t)},fR=oe(To,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ke(n.color)}`],n.edge&&t[`edge${ke(n.edge)}`],t[`size${ke(n.size)}`]]}})(Ze(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ze(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Lh.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Lh.loading}`]:{color:"transparent"}}))),hR=oe("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),er=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium",id:p,loading:h=null,loadingIndicator:f,...m}=r,g=Zn(p),y=f??d.jsx(Od,{"aria-labelledby":g,color:"inherit",size:16}),x={...r,edge:o,color:s,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:y,size:c},E=pR(x);return d.jsxs(fR,{id:h?g:p,className:Ae(E.root,a),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...m,ownerState:x,children:[typeof h=="boolean"&&d.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:d.jsx(hR,{className:E.loadingIndicator,ownerState:x,children:h&&y})}),i]})});function us(e){return parseInt(e,10)||0}const mR={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function gR(e){for(const t in e)return!1;return!0}function Nh(e){return gR(e)||e.outerHeightStyle===0&&!e.overflowing}const bR=D.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:u}=D.useRef(s!=null),c=D.useRef(null),p=rt(n,c),h=D.useRef(null),f=D.useRef(null),m=D.useCallback(()=>{const C=c.current,S=f.current;if(!C||!S)return;const T=wr(C).getComputedStyle(C);if(T.width==="0px")return{outerHeightStyle:0,overflowing:!1};S.style.width=T.width,S.value=C.value||t.placeholder||"x",S.value.slice(-1)===`
193
+ `&&(S.value+=" ");const O=T.boxSizing,F=us(T.paddingBottom)+us(T.paddingTop),B=us(T.borderBottomWidth)+us(T.borderTopWidth),R=S.scrollHeight;S.value="x";const N=S.scrollHeight;let v=R;i&&(v=Math.max(Number(i)*N,v)),o&&(v=Math.min(Number(o)*N,v)),v=Math.max(v,N);const L=v+(O==="border-box"?F+B:0),I=Math.abs(v-R)<=1;return{outerHeightStyle:L,overflowing:I}},[o,i,t.placeholder]),g=Pe(()=>{const C=c.current,S=m();if(!C||!S||Nh(S))return!1;const k=S.outerHeightStyle;return h.current!=null&&h.current!==k}),y=D.useCallback(()=>{const C=c.current,S=m();if(!C||!S||Nh(S))return;const k=S.outerHeightStyle;h.current!==k&&(h.current=k,C.style.height=`${k}px`),C.style.overflow=S.overflowing?"hidden":""},[m]),x=D.useRef(-1);qt(()=>{const C=c0(y),S=c?.current;if(!S)return;const k=wr(S);k.addEventListener("resize",C);let T;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(()=>{g()&&(T.unobserve(S),cancelAnimationFrame(x.current),y(),x.current=requestAnimationFrame(()=>{T.observe(S)}))}),T.observe(S)),()=>{C.clear(),cancelAnimationFrame(x.current),k.removeEventListener("resize",C),T&&T.disconnect()}},[m,y,g]),qt(()=>{y()});const E=C=>{u||y();const S=C.target,k=S.value.length,T=S.value.endsWith(`
194
+ `),O=S.selectionStart===k;T&&O&&S.setSelectionRange(k,k),r&&r(C)};return d.jsxs(D.Fragment,{children:[d.jsx("textarea",{value:s,onChange:E,ref:p,rows:i,style:a,...l}),d.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:{...mR.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Di({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const Fl=D.createContext(void 0);function qn(){return D.useContext(Fl)}function Fh(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function tl(e,t=!1){return e&&(Fh(e.value)&&e.value!==""||t&&Fh(e.defaultValue)&&e.defaultValue!=="")}function yR(e){return e.startAdornment}function xR(e){return _e("MuiInputBase",e)}const Tn=Me("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var _h;const _l=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ke(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Bl=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ER=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:p,size:h,startAdornment:f,type:m}=e,g={root:["root",`color${ke(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&h!=="medium"&&`size${ke(h)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",c&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",p&&"readOnly"]};return Ne(g,xR,t)},jl=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:_l})(Ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Tn.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),$l=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Bl})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Tn.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Tn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Bh=wE({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ld=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:u={},componentsProps:c={},defaultValue:p,disabled:h,disableInjectingGlobalStyles:f,endAdornment:m,error:g,fullWidth:y=!1,id:x,inputComponent:E="input",inputProps:C={},inputRef:S,margin:k,maxRows:T,minRows:O,multiline:F=!1,name:B,onBlur:R,onChange:N,onClick:v,onFocus:L,onKeyDown:I,onKeyUp:A,placeholder:M,readOnly:V,renderSuffix:W,rows:H,size:w,slotProps:G={},slots:re={},startAdornment:_,type:ae="text",value:X,...U}=r,J=C.value!=null?C.value:X,{current:Q}=D.useRef(J!=null),ne=D.useRef(),Z=D.useCallback(Le=>{},[]),Y=rt(ne,S,C.ref,Z),[le,ee]=D.useState(!1),te=qn(),xe=Di({props:r,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});xe.focused=te?te.focused:le,D.useEffect(()=>{!te&&h&&le&&(ee(!1),R&&R())},[te,h,le,R]);const pe=te&&te.onFilled,be=te&&te.onEmpty,se=D.useCallback(Le=>{tl(Le)?pe&&pe():be&&be()},[pe,be]);qt(()=>{Q&&se({value:J})},[J,se,Q]);const Re=Le=>{L&&L(Le),C.onFocus&&C.onFocus(Le),te&&te.onFocus?te.onFocus(Le):ee(!0)},ve=Le=>{R&&R(Le),C.onBlur&&C.onBlur(Le),te&&te.onBlur?te.onBlur(Le):ee(!1)},ze=(Le,...Je)=>{if(!Q){const yt=Le.target||ne.current;if(yt==null)throw new Error(kr(1));se({value:yt.value})}C.onChange&&C.onChange(Le,...Je),N&&N(Le,...Je)};D.useEffect(()=>{se(ne.current)},[]);const De=Le=>{ne.current&&Le.currentTarget===Le.target&&ne.current.focus(),v&&v(Le)};let Tt=E,at=C;F&&Tt==="input"&&(H?at={type:void 0,minRows:H,maxRows:H,...at}:at={type:void 0,maxRows:T,minRows:O,...at},Tt=bR);const qe=Le=>{se(Le.animationName==="mui-auto-fill-cancel"?ne.current:{value:"x"})};D.useEffect(()=>{te&&te.setAdornedStart(!!_)},[te,_]);const ce={...r,color:xe.color||"primary",disabled:xe.disabled,endAdornment:m,error:xe.error,focused:xe.focused,formControl:te,fullWidth:y,hiddenLabel:xe.hiddenLabel,multiline:F,size:xe.size,startAdornment:_,type:ae},Ce=ER(ce),Oe=re.root||u.Root||jl,He=G.root||c.root||{},je=re.input||u.Input||$l;return at={...at,...G.input??c.input},d.jsxs(D.Fragment,{children:[!f&&typeof Bh=="function"&&(_h||(_h=d.jsx(Bh,{}))),d.jsxs(Oe,{...He,ref:n,onClick:De,...U,...!li(Oe)&&{ownerState:{...ce,...He.ownerState}},className:Ae(Ce.root,He.className,s,V&&"MuiInputBase-readOnly"),children:[_,d.jsx(Fl.Provider,{value:null,children:d.jsx(je,{"aria-invalid":xe.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:p,disabled:xe.disabled,id:x,onAnimationStart:qe,name:B,placeholder:M,readOnly:V,required:xe.required,rows:H,value:J,onKeyDown:I,onKeyUp:A,type:ae,...at,...!li(je)&&{as:Tt,ownerState:{...ce,...at.ownerState}},ref:Y,className:Ae(Ce.input,at.className,V&&"MuiInputBase-readOnly"),onBlur:ve,onChange:ze,onFocus:Re})}),m,W?W({...xe,startAdornment:_}):null]})]})});function CR(e){return _e("MuiInput",e)}const Vr={...Tn,...Me("MuiInput",["root","underline","input"])},TR=e=>{const{classes:t,disableUnderline:n}=e,o=Ne({root:["root",!n&&"underline"],input:["input"]},CR,t);return{...t,...o}},vR=oe(jl,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[..._l(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Vr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Vr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Vr.disabled}, .${Vr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Vr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(sn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),SR=oe($l,{name:"MuiInput",slot:"Input",overridesResolver:Bl})({}),Nd=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:p={},type:h="text",...f}=r,m=TR(r),y={root:{ownerState:{disableUnderline:o}}},x=c??a?tn(c??a,y):y,E=p.root??i.Root??vR,C=p.input??i.Input??SR;return d.jsx(Ld,{slots:{root:E,input:C},slotProps:x,fullWidth:s,inputComponent:l,multiline:u,ref:n,type:h,...f,classes:m})});Nd.muiName="Input";function kR(e){return _e("MuiFilledInput",e)}const vn={...Tn,...Me("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},DR=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${ke(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},u=Ne(l,kR,t);return{...t,...u}},wR=oe(jl,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[..._l(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${vn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${vn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${vn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${vn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${vn.disabled}, .${vn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${vn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(sn()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),IR=oe($l,{name:"MuiFilledInput",slot:"Input",overridesResolver:Bl})(Ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Fd=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:u="input",multiline:c=!1,slotProps:p,slots:h={},type:f="text",...m}=r,g={...r,disableUnderline:o,fullWidth:s,inputComponent:u,multiline:c,type:f},y=DR(r),x={root:{ownerState:g},input:{ownerState:g}},E=p??a?tn(x,p??a):x,C=h.root??i.Root??wR,S=h.input??i.Input??IR;return d.jsx(Ld,{slots:{root:C,input:S},slotProps:E,fullWidth:s,inputComponent:u,multiline:c,ref:n,type:f,...m,classes:y})});Fd.muiName="Input";var jh;const AR=oe("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:dn})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),PR=oe("legend",{name:"MuiNotchedOutlined",shouldForwardProp:dn})(Ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function RR(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return d.jsx(AR,{"aria-hidden":!0,className:r,ownerState:l,...a,children:d.jsx(PR,{ownerState:l,children:s?d.jsx("span",{children:o}):jh||(jh=d.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}function MR(e){return _e("MuiOutlinedInput",e)}const Rn={...Tn,...Me("MuiOutlinedInput",["root","notchedOutline","input"])},OR=e=>{const{classes:t}=e,r=Ne({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},MR,t);return{...t,...r}},LR=oe(jl,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:_l})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rn.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Rn.focused} .${Rn.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(sn()).map(([n])=>({props:{color:n},style:{[`&.${Rn.focused} .${Rn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rn.error} .${Rn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rn.disabled} .${Rn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),NR=oe(RR,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),FR=oe($l,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Bl})(Ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),_d=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:u,slots:c={},slotProps:p={},type:h="text",...f}=r,m=OR(r),g=qn(),y=Di({props:r,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:g,fullWidth:i,hiddenLabel:y.hiddenLabel,multiline:l,size:y.size,type:h},E=c.root??o.Root??LR,C=c.input??o.Input??FR,[S,k]=st("notchedOutline",{elementType:NR,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:c,slotProps:p},additionalProps:{label:s!=null&&s!==""&&y.required?d.jsxs(D.Fragment,{children:[s," ","*"]}):s}});return d.jsx(Ld,{slots:{root:E,input:C},slotProps:p,renderSuffix:T=>d.jsx(S,{...k,notched:typeof u<"u"?u:!!(T.startAdornment||T.filled||T.focused)}),fullWidth:i,inputComponent:a,multiline:l,ref:n,type:h,...f,classes:{...m,notchedOutline:null}})});_d.muiName="Input";function _R(e){return _e("MuiFormLabel",e)}const fa=Me("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),BR=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${ke(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Ne(l,_R,t)},jR=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{[`&.${fa.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${fa.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${fa.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),$R=oe("span",{name:"MuiFormLabel",slot:"Asterisk"})(Ze(({theme:e})=>({[`&.${fa.error}`]:{color:(e.vars||e).palette.error.main}}))),HR=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:u,filled:c,focused:p,required:h,...f}=r,m=qn(),g=Di({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},x=BR(y);return d.jsxs(jR,{as:s,ownerState:y,className:Ae(x.root,i),ref:n,...f,children:[o,g.required&&d.jsxs($R,{ownerState:y,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]})});function UR(e){return _e("MuiInputLabel",e)}Me("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const zR=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${ke(r)}`,a],asterisk:[s&&"asterisk"]},u=Ne(l,UR,t);return{...t,...u}},VR=oe(HR,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${fa.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ze(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),nl=D.forwardRef(function(t,n){const r=Ke({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...u}=r,c=qn();let p=a;typeof p>"u"&&c&&(p=c.filled||c.focused||c.adornedStart);const h=Di({props:r,muiFormControl:c,states:["size","variant","required","focused"]}),f={...r,disableAnimation:o,formControl:c,shrink:p,size:h.size,variant:h.variant,required:h.required,focused:h.focused},m=zR(f);return d.jsx(VR,{"data-shrink":p,ref:n,className:Ae(m.root,l),...u,ownerState:f,classes:m})});function WR(e){return _e("MuiFormControl",e)}Me("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const qR=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${ke(n)}`,r&&"fullWidth"]};return Ne(o,WR,t)},YR=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ke(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),rl=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:p=!1,hiddenLabel:h=!1,margin:f="none",required:m=!1,size:g="medium",variant:y="outlined",...x}=r,E={...r,color:a,component:s,disabled:l,error:u,fullWidth:p,hiddenLabel:h,margin:f,required:m,size:g,variant:y},C=qR(E),[S,k]=D.useState(()=>{let A=!1;return o&&D.Children.forEach(o,M=>{if(!ms(M,["Input","Select"]))return;const V=ms(M,["Select"])?M.props.input:M;V&&yR(V.props)&&(A=!0)}),A}),[T,O]=D.useState(()=>{let A=!1;return o&&D.Children.forEach(o,M=>{ms(M,["Input","Select"])&&(tl(M.props,!0)||tl(M.props.inputProps,!0))&&(A=!0)}),A}),[F,B]=D.useState(!1);l&&F&&B(!1);const R=c!==void 0&&!l?c:F;let N;D.useRef(!1);const v=D.useCallback(()=>{O(!0)},[]),L=D.useCallback(()=>{O(!1)},[]),I=D.useMemo(()=>({adornedStart:S,setAdornedStart:k,color:a,disabled:l,error:u,filled:T,focused:R,fullWidth:p,hiddenLabel:h,size:g,onBlur:()=>{B(!1)},onFocus:()=>{B(!0)},onEmpty:L,onFilled:v,registerEffect:N,required:m,variant:y}),[S,a,l,u,T,R,p,h,N,L,v,m,g,y]);return d.jsx(Fl.Provider,{value:I,children:d.jsx(YR,{as:s,ownerState:E,className:Ae(C.root,i),ref:n,...x,children:o})})});function KR(e){return _e("MuiFormHelperText",e)}const $h=Me("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Hh;const GR=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,u={root:["root",o&&"disabled",i&&"error",r&&`size${ke(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Ne(u,KR,t)},QR=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ke(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$h.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$h.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),ab=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:u,focused:c,margin:p,required:h,variant:f,...m}=r,g=qn(),y=Di({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),x={...r,component:a,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete x.ownerState;const E=GR(x);return d.jsx(QR,{as:a,className:Ae(E.root,i),ref:n,...m,ownerState:x,children:o===" "?Hh||(Hh=d.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function nt(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Fn(n,r),{props:s,internalRef:l}=tb({...i,externalSlotProps:a}),u=rt(l,a?.ref,e.additionalProps?.ref);return eb(t,{...s,ref:u},r)}const Sr=D.createContext({});function XR(e){return _e("MuiList",e)}Me("MuiList",["root","padding","dense","subheader"]);const ZR=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Ne({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},XR,t)},JR=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),sb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...c}=r,p=D.useMemo(()=>({dense:s}),[s]),h={...r,component:a,dense:s,disablePadding:l},f=ZR(h);return d.jsx(Sr.Provider,{value:p,children:d.jsxs(JR,{as:a,className:Ae(f.root,i),ref:n,ownerState:h,...c,children:[u,o]})})});function ju(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Uh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function lb(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function $i(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!lb(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const eM=D.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:p="selectedMenu",...h}=t,f=D.useRef(null),m=D.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});qt(()=>{o&&f.current.focus()},[o]),D.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,{direction:S})=>{const k=!f.current.style.width;if(C.clientHeight<f.current.clientHeight&&k){const T=`${X1(wr(C))}px`;f.current.style[S==="rtl"?"paddingLeft":"paddingRight"]=T,f.current.style.width=`calc(100% + ${T})`}return f.current}}),[]);const g=C=>{const S=f.current,k=C.key;if(C.ctrlKey||C.metaKey||C.altKey){c&&c(C);return}const O=Ut(S).activeElement;if(k==="ArrowDown")C.preventDefault(),$i(S,O,u,l,ju);else if(k==="ArrowUp")C.preventDefault(),$i(S,O,u,l,Uh);else if(k==="Home")C.preventDefault(),$i(S,null,u,l,ju);else if(k==="End")C.preventDefault(),$i(S,null,u,l,Uh);else if(k.length===1){const F=m.current,B=k.toLowerCase(),R=performance.now();F.keys.length>0&&(R-F.lastTime>500?(F.keys=[],F.repeating=!0,F.previousKeyMatched=!0):F.repeating&&B!==F.keys[0]&&(F.repeating=!1)),F.lastTime=R,F.keys.push(B);const N=O&&!F.repeating&&lb(O,F);F.previousKeyMatched&&(N||$i(S,O,!1,l,ju,F))?C.preventDefault():F.previousKeyMatched=!1}c&&c(C)},y=rt(f,n);let x=-1;D.Children.forEach(a,(C,S)=>{if(!D.isValidElement(C)){x===S&&(x+=1,x>=a.length&&(x=-1));return}C.props.disabled||(p==="selectedMenu"&&C.props.selected||x===-1)&&(x=S),x===S&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(x+=1,x>=a.length&&(x=-1))});const E=D.Children.map(a,(C,S)=>{if(S===x){const k={};return i&&(k.autoFocus=!0),C.props.tabIndex===void 0&&p==="selectedMenu"&&(k.tabIndex=0),D.cloneElement(C,k)}return C});return d.jsx(sb,{role:"menu",ref:y,className:s,onKeyDown:g,tabIndex:o?0:-1,...h,children:E})});function Rc(e){return`scale(${e}, ${e**2})`}const tM={entering:{opacity:1,transform:Rc(1)},entered:{opacity:1,transform:"none"}},$u=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),va=D.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:u,onEntering:c,onExit:p,onExited:h,onExiting:f,style:m,timeout:g="auto",TransitionComponent:y=Wn,...x}=t,E=Nl(),C=D.useRef(),S=Gr(),k=D.useRef(null),T=rt(k,ki(i),n),O=A=>M=>{if(A){const V=k.current;M===void 0?A(V):A(V,M)}},F=O(c),B=O((A,M)=>{nb(A);const{duration:V,delay:W,easing:H}=ui({style:m,timeout:g,easing:a},{mode:"enter"});let w;g==="auto"?(w=S.transitions.getAutoHeightDuration(A.clientHeight),C.current=w):w=V,A.style.transition=[S.transitions.create("opacity",{duration:w,delay:W}),S.transitions.create("transform",{duration:$u?w:w*.666,delay:W,easing:H})].join(","),l&&l(A,M)}),R=O(u),N=O(f),v=O(A=>{const{duration:M,delay:V,easing:W}=ui({style:m,timeout:g,easing:a},{mode:"exit"});let H;g==="auto"?(H=S.transitions.getAutoHeightDuration(A.clientHeight),C.current=H):H=M,A.style.transition=[S.transitions.create("opacity",{duration:H,delay:V}),S.transitions.create("transform",{duration:$u?H:H*.666,delay:$u?V:V||H*.333,easing:W})].join(","),A.style.opacity=0,A.style.transform=Rc(.75),p&&p(A)}),L=O(h),I=A=>{g==="auto"&&E.start(C.current||0,A),r&&r(k.current,A)};return d.jsx(y,{appear:o,in:s,nodeRef:k,onEnter:B,onEntered:R,onEntering:F,onExit:v,onExited:L,onExiting:N,addEndListener:I,timeout:g==="auto"?null:g,...x,children:(A,{ownerState:M,...V})=>D.cloneElement(i,{style:{opacity:0,transform:Rc(.75),visibility:A==="exited"&&!s?"hidden":void 0,...tM[A],...m,...i.props.style},ref:T,...V})})});va&&(va.muiSupportAuto=!0);function nM(e){return _e("MuiPopover",e)}Me("MuiPopover",["root","paper"]);function zh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Vh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Wh(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function cs(e){return typeof e=="function"?e():e}const rM=e=>{const{classes:t}=e;return Ne({root:["root"],paper:["paper"]},nM,t)},oM=oe(ob,{name:"MuiPopover",slot:"Root"})({}),ub=oe(Ao,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),iM=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:c,container:p,elevation:h=8,marginThreshold:f=16,open:m,PaperProps:g={},slots:y={},slotProps:x={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:C,transitionDuration:S="auto",TransitionProps:k={},disableScrollLock:T=!1,...O}=r,F=D.useRef(),B={...r,anchorOrigin:a,anchorReference:l,elevation:h,marginThreshold:f,transformOrigin:E,TransitionComponent:C,transitionDuration:S,TransitionProps:k},R=rM(B),N=D.useCallback(()=>{if(l==="anchorPosition")return s;const Z=cs(i),le=(Z&&Z.nodeType===1?Z:Ut(F.current).body).getBoundingClientRect();return{top:le.top+zh(le,a.vertical),left:le.left+Vh(le,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),v=D.useCallback(Z=>({vertical:zh(Z,E.vertical),horizontal:Vh(Z,E.horizontal)}),[E.horizontal,E.vertical]),L=D.useCallback(Z=>{const Y={width:Z.offsetWidth,height:Z.offsetHeight},le=v(Y);if(l==="none")return{top:null,left:null,transformOrigin:Wh(le)};const ee=N();let te=ee.top-le.vertical,xe=ee.left-le.horizontal;const pe=te+Y.height,be=xe+Y.width,se=wr(cs(i)),Re=se.innerHeight-f,ve=se.innerWidth-f;if(f!==null&&te<f){const ze=te-f;te-=ze,le.vertical+=ze}else if(f!==null&&pe>Re){const ze=pe-Re;te-=ze,le.vertical+=ze}if(f!==null&&xe<f){const ze=xe-f;xe-=ze,le.horizontal+=ze}else if(be>ve){const ze=be-ve;xe-=ze,le.horizontal+=ze}return{top:`${Math.round(te)}px`,left:`${Math.round(xe)}px`,transformOrigin:Wh(le)}},[i,l,N,v,f]),[I,A]=D.useState(m),M=D.useCallback(()=>{const Z=F.current;if(!Z)return;const Y=L(Z);Y.top!==null&&Z.style.setProperty("top",Y.top),Y.left!==null&&(Z.style.left=Y.left),Z.style.transformOrigin=Y.transformOrigin,A(!0)},[L]);D.useEffect(()=>(T&&window.addEventListener("scroll",M),()=>window.removeEventListener("scroll",M)),[i,T,M]);const V=()=>{M()},W=()=>{A(!1)};D.useEffect(()=>{m&&M()}),D.useImperativeHandle(o,()=>m?{updatePosition:()=>{M()}}:null,[m,M]),D.useEffect(()=>{if(!m)return;const Z=c0(()=>{M()}),Y=wr(cs(i));return Y.addEventListener("resize",Z),()=>{Z.clear(),Y.removeEventListener("resize",Z)}},[i,m,M]);let H=S;const w={slots:{transition:C,...y},slotProps:{transition:k,paper:g,...x}},[G,re]=st("transition",{elementType:va,externalForwardedProps:w,ownerState:B,getSlotProps:Z=>({...Z,onEntering:(Y,le)=>{Z.onEntering?.(Y,le),V()},onExited:Y=>{Z.onExited?.(Y),W()}}),additionalProps:{appear:!0,in:m}});S==="auto"&&!G.muiSupportAuto&&(H=void 0);const _=p||(i?Ut(cs(i)).body:void 0),[ae,{slots:X,slotProps:U,...J}]=st("root",{ref:n,elementType:oM,externalForwardedProps:{...w,...O},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:y.backdrop},slotProps:{backdrop:d0(typeof x.backdrop=="function"?x.backdrop(B):x.backdrop,{invisible:!0})},container:_,open:m},ownerState:B,className:Ae(R.root,c)}),[Q,ne]=st("paper",{ref:F,className:R.paper,elementType:ub,externalForwardedProps:w,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:I?void 0:{opacity:0}},ownerState:B});return d.jsx(ae,{...J,...!li(ae)&&{slots:X,slotProps:U,disableScrollLock:T},children:d.jsx(G,{...re,timeout:H,children:d.jsx(Q,{...ne,children:u})})})});function aM(e){return _e("MuiMenu",e)}Me("MuiMenu",["root","paper","list"]);const sM={vertical:"top",horizontal:"right"},lM={vertical:"top",horizontal:"left"},uM=e=>{const{classes:t}=e;return Ne({root:["root"],paper:["paper"],list:["list"]},aM,t)},cM=oe(iM,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),dM=oe(ub,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),pM=oe(eM,{name:"MuiMenu",slot:"List"})({outline:0}),fM=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:c,PaperProps:p={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:m,...g}={},variant:y="selectedMenu",slots:x={},slotProps:E={},...C}=r,S=zn(),k={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:p,transitionDuration:f,TransitionProps:g,variant:y},T=uM(k),O=o&&!s&&c,F=D.useRef(null),B=(H,w)=>{F.current&&F.current.adjustStyleForScrollbar(H,{direction:S?"rtl":"ltr"}),m&&m(H,w)},R=H=>{H.key==="Tab"&&(H.preventDefault(),u&&u(H,"tabKeyDown"))};let N=-1;D.Children.map(i,(H,w)=>{D.isValidElement(H)&&(H.props.disabled||(y==="selectedMenu"&&H.props.selected||N===-1)&&(N=w))});const v={slots:x,slotProps:{list:l,transition:g,paper:p,...E}},L=nt({elementType:x.root,externalSlotProps:E.root,ownerState:k,className:[T.root,a]}),[I,A]=st("paper",{className:T.paper,elementType:dM,externalForwardedProps:v,shouldForwardComponentProp:!0,ownerState:k}),[M,V]=st("list",{className:Ae(T.list,l.className),elementType:pM,shouldForwardComponentProp:!0,externalForwardedProps:v,getSlotProps:H=>({...H,onKeyDown:w=>{R(w),H.onKeyDown?.(w)}}),ownerState:k}),W=typeof v.slotProps.transition=="function"?v.slotProps.transition(k):v.slotProps.transition;return d.jsx(cM,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?sM:lM,slots:{root:x.root,paper:I,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:L,paper:A,backdrop:typeof E.backdrop=="function"?E.backdrop(k):E.backdrop,transition:{...W,onEntering:(...H)=>{B(...H),W?.onEntering?.(...H)}}},open:c,ref:n,transitionDuration:f,ownerState:k,...C,classes:h,children:d.jsx(M,{actions:F,autoFocus:o&&(N===-1||s),autoFocusItem:O,variant:y,...V,children:i})})});function hM(e){return _e("MuiNativeSelect",e)}const Bd=Me("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),mM=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ke(n)}`,i&&"iconOpen",r&&"disabled"]};return Ne(s,hM,t)},cb=oe("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Bd.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),gM=oe(cb,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:dn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Bd.multiple}`]:t.multiple}]}})({}),db=oe("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Bd.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),bM=oe(db,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})({}),yM=D.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...u}=t,c={...t,disabled:o,variant:l,error:i},p=mM(c);return d.jsxs(D.Fragment,{children:[d.jsx(gM,{ownerState:c,className:Ae(p.select,r),disabled:o,ref:s||n,...u}),t.multiple?null:d.jsx(bM,{as:a,ownerState:c,className:p.icon})]})});function pb(e){return _e("MuiSelect",e)}const Hi=Me("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var qh;const xM=oe(cb,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Hi.select}`]:t.select},{[`&.${Hi.select}`]:t[n.variant]},{[`&.${Hi.error}`]:t.error},{[`&.${Hi.multiple}`]:t.multiple}]}})({[`&.${Hi.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),EM=oe(db,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ke(n.variant)}`],n.open&&t.iconOpen]}})({}),CM=oe("input",{shouldForwardProp:e=>u0(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Yh(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function TM(e){return e==null||typeof e=="string"&&!e.trim()}const vM=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ke(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ne(s,pb,t)},SM=D.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:u,defaultValue:c,disabled:p,displayEmpty:h,error:f=!1,IconComponent:m,inputRef:g,labelId:y,MenuProps:x={},multiple:E,name:C,onBlur:S,onChange:k,onClose:T,onFocus:O,onOpen:F,open:B,readOnly:R,renderValue:N,required:v,SelectDisplayProps:L={},tabIndex:I,type:A,value:M,variant:V="standard",...W}=t,[H,w]=kn({controlled:M,default:c,name:"Select"}),[G,re]=kn({controlled:B,default:u,name:"Select"}),_=D.useRef(null),ae=D.useRef(null),[X,U]=D.useState(null),{current:J}=D.useRef(B!=null),[Q,ne]=D.useState(),Z=rt(n,g),Y=D.useCallback(ue=>{ae.current=ue,ue&&U(ue)},[]),le=X?.parentNode;D.useImperativeHandle(Z,()=>({focus:()=>{ae.current.focus()},node:_.current,value:H}),[H]),D.useEffect(()=>{u&&G&&X&&!J&&(ne(a?null:le.clientWidth),ae.current.focus())},[X,a]),D.useEffect(()=>{i&&ae.current.focus()},[i]),D.useEffect(()=>{if(!y)return;const ue=Ut(ae.current).getElementById(y);if(ue){const ye=()=>{getSelection().isCollapsed&&ae.current.focus()};return ue.addEventListener("click",ye),()=>{ue.removeEventListener("click",ye)}}},[y]);const ee=(ue,ye)=>{ue?F&&F(ye):T&&T(ye),J||(ne(a?null:le.clientWidth),re(ue))},te=ue=>{ue.button===0&&(ue.preventDefault(),ae.current.focus(),ee(!0,ue))},xe=ue=>{ee(!1,ue)},pe=D.Children.toArray(s),be=ue=>{const ye=pe.find(Te=>Te.props.value===ue.target.value);ye!==void 0&&(w(ye.props.value),k&&k(ue,ye))},se=ue=>ye=>{let Te;if(ye.currentTarget.hasAttribute("tabindex")){if(E){Te=Array.isArray(H)?H.slice():[];const Be=H.indexOf(ue.props.value);Be===-1?Te.push(ue.props.value):Te.splice(Be,1)}else Te=ue.props.value;if(ue.props.onClick&&ue.props.onClick(ye),H!==Te&&(w(Te),k)){const Be=ye.nativeEvent||ye,We=new Be.constructor(Be.type,Be);Object.defineProperty(We,"target",{writable:!0,value:{value:Te,name:C}}),k(We,ue)}E||ee(!1,ye)}},Re=ue=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(ue.key)&&(ue.preventDefault(),ee(!0,ue))},ve=X!==null&&G,ze=ue=>{!ve&&S&&(Object.defineProperty(ue,"target",{writable:!0,value:{value:H,name:C}}),S(ue))};delete W["aria-invalid"];let De,Tt;const at=[];let qe=!1;(tl({value:H})||h)&&(N?De=N(H):qe=!0);const ce=pe.map(ue=>{if(!D.isValidElement(ue))return null;let ye;if(E){if(!Array.isArray(H))throw new Error(kr(2));ye=H.some(Te=>Yh(Te,ue.props.value)),ye&&qe&&at.push(ue.props.children)}else ye=Yh(H,ue.props.value),ye&&qe&&(Tt=ue.props.children);return D.cloneElement(ue,{"aria-selected":ye?"true":"false",onClick:se(ue),onKeyUp:Te=>{Te.key===" "&&Te.preventDefault(),ue.props.onKeyUp&&ue.props.onKeyUp(Te)},role:"option",selected:ye,value:void 0,"data-value":ue.props.value})});qe&&(E?at.length===0?De=null:De=at.reduce((ue,ye,Te)=>(ue.push(ye),Te<at.length-1&&ue.push(", "),ue),[]):De=Tt);let Ce=Q;!a&&J&&X&&(Ce=le.clientWidth);let Oe;typeof I<"u"?Oe=I:Oe=p?null:0;const He=L.id||(C?`mui-component-select-${C}`:void 0),je={...t,variant:V,value:H,open:ve,error:f},Le=vM(je),Je={...x.PaperProps,...typeof x.slotProps?.paper=="function"?x.slotProps.paper(je):x.slotProps?.paper},yt={...x.MenuListProps,...typeof x.slotProps?.list=="function"?x.slotProps.list(je):x.slotProps?.list},ht=Zn();return d.jsxs(D.Fragment,{children:[d.jsx(xM,{as:"div",ref:Y,tabIndex:Oe,role:"combobox","aria-controls":ve?ht:void 0,"aria-disabled":p?"true":void 0,"aria-expanded":ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[y,He].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":v?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:Re,onMouseDown:p||R?null:te,onBlur:ze,onFocus:O,...L,ownerState:je,className:Ae(L.className,Le.select,l),id:He,children:TM(De)?qh||(qh=d.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):De}),d.jsx(CM,{"aria-invalid":f,value:Array.isArray(H)?H.join(","):H,name:C,ref:_,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:p,className:Le.nativeInput,autoFocus:i,required:v,...W,ownerState:je}),d.jsx(EM,{as:m,className:Le.icon,ownerState:je}),d.jsx(fM,{id:`menu-${C||""}`,anchorEl:le,open:ve,onClose:xe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...x,slotProps:{...x.slotProps,list:{"aria-labelledby":y,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:ht,...yt},paper:{...Je,style:{minWidth:Ce,...Je!=null?Je.style:null}}},children:ce})]})}),fb=lt(d.jsx("path",{d:"M7 10l5 5 5-5z"})),kM=e=>{const{classes:t}=e,r=Ne({root:["root"]},pb,t);return{...t,...r}},jd={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>dn(e)&&e!=="variant"},DM=oe(Nd,jd)(""),wM=oe(_d,jd)(""),IM=oe(Fd,jd)(""),ol=D.forwardRef(function(t,n){const r=Ke({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=fb,id:p,input:h,inputProps:f,label:m,labelId:g,MenuProps:y,multiple:x=!1,native:E=!1,onClose:C,onOpen:S,open:k,renderValue:T,SelectDisplayProps:O,variant:F="outlined",...B}=r,R=E?yM:SM,N=qn(),v=Di({props:r,muiFormControl:N,states:["variant","error"]}),L=v.variant||F,I={...r,variant:L,classes:a},A=kM(I),{root:M,...V}=A,W=h||{standard:d.jsx(DM,{ownerState:I}),outlined:d.jsx(wM,{label:m,ownerState:I}),filled:d.jsx(IM,{ownerState:I})}[L],H=rt(n,ki(W));return d.jsx(D.Fragment,{children:D.cloneElement(W,{inputComponent:R,inputProps:{children:i,error:v.error,IconComponent:c,variant:L,type:void 0,multiple:x,...E?{id:p}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:g,MenuProps:y,onClose:C,onOpen:S,open:k,renderValue:T,SelectDisplayProps:{id:p,...O}},...f,classes:f?tn(V,f.classes):V,...h?h.props.inputProps:{}},...(x&&E||u)&&L==="outlined"?{notched:!0}:{},ref:H,className:Ae(W.props.className,s,A.root),...!h&&{variant:L},...B})})});ol.muiName="Select";function AM(e){return _e("MuiTextField",e)}Me("MuiTextField",["root"]);const PM={standard:Nd,filled:Fd,outlined:_d},RM=e=>{const{classes:t}=e;return Ne({root:["root"]},AM,t)},MM=oe(rl,{name:"MuiTextField",slot:"Root"})({}),tt=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:u,disabled:c=!1,error:p=!1,FormHelperTextProps:h,fullWidth:f=!1,helperText:m,id:g,InputLabelProps:y,inputProps:x,InputProps:E,inputRef:C,label:S,maxRows:k,minRows:T,multiline:O=!1,name:F,onBlur:B,onChange:R,onFocus:N,placeholder:v,required:L=!1,rows:I,select:A=!1,SelectProps:M,slots:V={},slotProps:W={},type:H,value:w,variant:G="outlined",...re}=r,_={...r,autoFocus:i,color:l,disabled:c,error:p,fullWidth:f,multiline:O,required:L,select:A,variant:G},ae=RM(_),X=Zn(g),U=m&&X?`${X}-helper-text`:void 0,J=S&&X?`${X}-label`:void 0,Q=PM[G],ne={slots:V,slotProps:{input:E,inputLabel:y,htmlInput:x,formHelperText:h,select:M,...W}},Z={},Y=ne.slotProps.inputLabel;G==="outlined"&&(Y&&typeof Y.shrink<"u"&&(Z.notched=Y.shrink),Z.label=S),A&&((!M||!M.native)&&(Z.id=void 0),Z["aria-describedby"]=void 0);const[le,ee]=st("root",{elementType:MM,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...re},ownerState:_,className:Ae(ae.root,s),ref:n,additionalProps:{disabled:c,error:p,fullWidth:f,required:L,color:l,variant:G}}),[te,xe]=st("input",{elementType:Q,externalForwardedProps:ne,additionalProps:Z,ownerState:_}),[pe,be]=st("inputLabel",{elementType:nl,externalForwardedProps:ne,ownerState:_}),[se,Re]=st("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:_}),[ve,ze]=st("formHelperText",{elementType:ab,externalForwardedProps:ne,ownerState:_}),[De,Tt]=st("select",{elementType:ol,externalForwardedProps:ne,ownerState:_}),at=d.jsx(te,{"aria-describedby":U,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:f,multiline:O,name:F,rows:I,maxRows:k,minRows:T,type:H,value:w,id:X,inputRef:C,onBlur:B,onChange:R,onFocus:N,placeholder:v,inputProps:Re,slots:{input:V.htmlInput?se:void 0},...xe});return d.jsxs(le,{...ee,children:[S!=null&&S!==""&&d.jsx(pe,{htmlFor:X,id:J,...be,children:S}),A?d.jsx(De,{"aria-describedby":U,id:X,labelId:J,value:w,input:at,...Tt,children:a}):at,m&&d.jsx(ve,{id:U,...ze,children:m})]})}),Kh=Me("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function OM(e){return _e("MuiListItemIcon",e)}const Gh=Me("MuiListItemIcon",["root","alignItemsFlexStart"]),LM=e=>{const{alignItems:t,classes:n}=e;return Ne({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},OM,n)},NM=oe("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Ze(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),hb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=D.useContext(Sr),s={...r,alignItems:a.alignItems},l=LM(s);return d.jsx(NM,{className:Ae(l.root,o),ownerState:s,ref:n,...i})});function FM(e){return _e("MuiListItemText",e)}const Yo=Me("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),_M=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return Ne({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},FM,t)},BM=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Yo.primary}`]:t.primary},{[`& .${Yo.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Mh.root}:where(& .${Yo.primary})`]:{display:"block"},[`.${Mh.root}:where(& .${Yo.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),mb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:u,secondary:c,secondaryTypographyProps:p,slots:h={},slotProps:f={},...m}=r,{dense:g}=D.useContext(Sr);let y=l??o,x=c;const E={...r,disableTypography:a,inset:s,primary:!!y,secondary:!!x,dense:g},C=_M(E),S={slots:h,slotProps:{primary:u,secondary:p,...f}},[k,T]=st("root",{className:Ae(C.root,i),elementType:BM,externalForwardedProps:{...S,...m},ownerState:E,ref:n}),[O,F]=st("primary",{className:C.primary,elementType:ft,externalForwardedProps:S,ownerState:E}),[B,R]=st("secondary",{className:C.secondary,elementType:ft,externalForwardedProps:S,ownerState:E});return y!=null&&y.type!==ft&&!a&&(y=d.jsx(O,{variant:g?"body2":"body1",component:F?.variant?void 0:"span",...F,children:y})),x!=null&&x.type!==ft&&!a&&(x=d.jsx(B,{variant:"body2",color:"textSecondary",...R,children:x})),d.jsxs(k,{...T,children:[y,x]})});function jM(e){return _e("MuiMenuItem",e)}const Ui=Me("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),$M=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},HM=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=Ne({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},jM,a);return{...a,...l}},UM=oe(To,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:$M})(Ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ui.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Ui.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Ui.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Ui.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ui.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Kh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Kh.inset}`]:{marginLeft:52},[`& .${Yo.root}`]:{marginTop:0,marginBottom:0},[`& .${Yo.inset}`]:{paddingLeft:36},[`& .${Gh.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Gh.root} svg`]:{fontSize:"1.25rem"}}}]}))),Qt=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:p,className:h,...f}=r,m=D.useContext(Sr),g=D.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),y=D.useRef(null);qt(()=>{o&&y.current&&y.current.focus()},[o]);const x={...r,dense:g.dense,divider:s,disableGutters:l},E=HM(r),C=rt(y,n);let S;return r.disabled||(S=p!==void 0?p:-1),d.jsx(Sr.Provider,{value:g,children:d.jsx(UM,{ref:C,role:c,tabIndex:S,component:i,focusVisibleClassName:Ae(E.focusVisible,u),className:Ae(E.root,h),...f,ownerState:x,classes:E})})}),vr={postgres:[{label:"Host",name:"host",type:"text",required:!1},{label:"Port",name:"port",type:"number",required:!1},{label:"Database Name",name:"databaseName",type:"text",required:!1},{label:"User Name",name:"userName",type:"text",required:!1},{label:"Password",name:"password",type:"password",required:!1},{label:"Connection String",name:"connectionString",type:"text",required:!1}],bigquery:[{label:"Project ID",name:"defaultProjectId",type:"text",required:!1},{label:"Billing Project ID",name:"billingProjectId",type:"text",required:!1},{label:"Location",name:"location",type:"text",required:!1},{label:"Service Account Key JSON",name:"serviceAccountKeyJson",type:"text",required:!0},{label:"Maximum Bytes Billed",name:"maximumBytesBilled",type:"text",required:!1},{label:"Query Timeout Milliseconds",name:"queryTimeoutMilliseconds",type:"text",required:!1}],snowflake:[{label:"Account",name:"account",type:"text",required:!0},{label:"Username",name:"username",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!1},{label:"Role",name:"role",type:"text",required:!1},{label:"Warehouse",name:"warehouse",type:"text",required:!0},{label:"Database",name:"database",type:"text",required:!1},{label:"Schema",name:"schema",type:"text",required:!1},{label:"Response Timeout Milliseconds",name:"responseTimeoutMilliseconds",type:"text",required:!1},{label:"Private Key",name:"privateKey",type:"password",required:!1},{label:"Private Key Passphrase",name:"privateKeyPass",type:"password",required:!1}],trino:[{label:"Server",name:"server",type:"text",required:!0},{label:"Port",name:"port",type:"number",required:!1},{label:"Catalog",name:"catalog",type:"text",required:!1},{label:"Schema",name:"schema",type:"text",required:!1},{label:"User",name:"user",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!1},{label:"Peaka Key",name:"peakaKey",type:"password",required:!1}],databricks:[{label:"Host",name:"host",type:"text",required:!0},{label:"HTTP Path",name:"path",type:"text",required:!0},{label:"Access Token",name:"token",type:"password",required:!1},{label:"OAuth Client ID",name:"oauthClientId",type:"text",required:!1},{label:"OAuth Client Secret",name:"oauthClientSecret",type:"password",required:!1},{label:"Default Catalog",name:"defaultCatalog",type:"text",required:!1},{label:"Default Schema",name:"defaultSchema",type:"text",required:!1}],mysql:[{label:"Host",name:"host",type:"text",required:!0},{label:"Port",name:"port",type:"number",required:!0},{label:"User",name:"user",type:"text",required:!0},{label:"Password",name:"password",type:"password",required:!0},{label:"Database",name:"database",type:"text",required:!0}],duckdb:[],motherduck:[{label:"Access Token",name:"accessToken",type:"text",required:!0},{label:"Database",name:"database",type:"text",required:!1}],ducklake:[]},ks={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",trino:"trinoConnection",databricks:"databricksConnection",mysql:"mysqlConnection",duckdb:"duckdbConnection",motherduck:"motherduckConnection",ducklake:"ducklakeConnection"},Mc={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",gcs:"gcsConnection",s3:"s3Connection",azure:"azureConnection"},Sa=[{label:"Access Key ID",name:"accessKeyId",type:"text",required:!0},{label:"Secret Access Key",name:"secretAccessKey",type:"password",required:!0},{label:"Region",name:"region",type:"text",required:!1},{label:"Endpoint",name:"endpoint",type:"text",required:!1},{label:"Session Token",name:"sessionToken",type:"password",required:!1}],ka=[{label:"Key ID",name:"keyId",type:"text",required:!0},{label:"Secret",name:"secret",type:"password",required:!0}],zM=[{label:"Auth Type",name:"authType",type:"text",required:!0,selectOptions:[{label:"SAS Token",value:"sas_token"},{label:"Service Principal (SPN)",value:"service_principal"}]},{label:"SAS URL (e.g. https://account.blob.core.windows.net/container/file.parquet?sp=r&st=...)",name:"sasUrl",type:"text",required:!1,visibleWhen:{field:"authType",value:"sas_token"}},{label:"Tenant ID",name:"tenantId",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Client ID",name:"clientId",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Client Secret",name:"clientSecret",type:"password",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"Account Name",name:"accountName",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}},{label:"File URL (e.g. abfss://container/path/file.parquet)",name:"fileUrl",type:"text",required:!1,visibleWhen:{field:"authType",value:"service_principal"}}];function il(e){return e==="postgres"||e==="bigquery"||e==="snowflake"?vr[e]||[]:e==="s3"?Sa:e==="gcs"?ka:e==="azure"?zM:[]}function VM({onSubmit:e,isSubmitting:t}){const[n,r]=q.useState(!1),[o,i]=q.useState("postgres"),[a,s]=q.useState([]),[l,u]=q.useState("postgres"),[c,p]=q.useState("s3"),h=()=>{r(!0)},f=()=>{r(!1),s([]),i("postgres"),u("postgres"),p("s3")},m=async E=>{E.preventDefault();const C=new FormData(E.currentTarget),S=C.get("name")?.toString(),k=C.get("type")?.toString(),T=vr[k];if(!S)throw new Error("Name is required");if(!k)throw new Error("Type is required");let O;if(k==="ducklake"){const F={};if(l==="postgres"){const N=vr.postgres,v={};if(N.forEach(L=>{const I=C.get(`ducklake_pg_${L.name}`)?.toString();I&&(v[L.name]=I)}),Object.keys(v).length===0)throw new Error("DuckLake requires catalog connection");F.postgresConnection=v}const B=C.get("ducklake_bucketUrl")?.toString();if(!B)throw new Error("DuckLake requires a bucket URL");const R={bucketUrl:B};if(c==="s3"){const N={};if(Sa.forEach(v=>{const L=C.get(`ducklake_s3_${v.name}`)?.toString();L&&(N[v.name]=L)}),!N.accessKeyId)throw new Error("S3 Access Key ID is required");if(!N.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(N).length>0&&(R.s3Connection=N)}else if(c==="gcs"){const N={};if(ka.forEach(v=>{const L=C.get(`ducklake_gcs_${v.name}`)?.toString();L&&(N[v.name]=L)}),!N.keyId)throw new Error("GCS Key ID is required");if(!N.secret)throw new Error("GCS Secret is required");Object.keys(N).length>0&&(R.gcsConnection=N)}O={name:S,type:k,ducklakeConnection:{catalog:F,storage:R}}}else if(k==="duckdb"){if(a.length===0)throw new Error("DuckDB connection must have at least one attached database");const F=a.map((B,R)=>{const N=B.dbType,v=C.get(`attachedDb_${R}_name`)?.toString();if(!v)throw new Error(`Attached database at index ${R} must have a name`);const L={name:v,type:N},I=il(N);if(I&&I.length>0){const A={};I.forEach(V=>{const W=C.get(`attachedDb_${R}_${V.name}`)?.toString();W&&(A[V.name]=W)});const M=Mc[N];M&&(L[M]=A)}return L});O={name:S,type:k,duckdbConnection:{attachedDatabases:F}}}else{const F={};if(T.forEach(B=>{const R=C.get(B.name)?.toString();R&&(F[B.name]=R)}),k==="postgres"){if(!!!F.connectionString?.trim()){const R=["host","port","databaseName","userName","password"];for(const N of R)if(!F[N])throw new Error(`${T.find(v=>v.name===N)?.label||N} is required`)}}else if(k==="bigquery"){if(!F.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(k==="snowflake"){if(!F.account)throw new Error("Account is required");if(!F.username)throw new Error("Username is required");if(!F.warehouse)throw new Error("Warehouse is required");if(!F.password&&!F.privateKey)throw new Error("Either password or private key is required")}else if(k==="trino"){if(!F.server)throw new Error("Server is required");if(!F.user)throw new Error("User is required");if(F.server.trim().startsWith("https://")&&!F.password&&!F.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(k==="mysql"){const B=["host","port","database","user","password"];for(const R of B)if(!F[R])throw new Error(`${T.find(N=>N.name===R)?.label||R} is required`)}else if(k==="motherduck"){if(!F.accessToken)throw new Error("Access Token is required")}else if(k==="databricks"){if(!F.host)throw new Error("Host is required");if(!F.path)throw new Error("HTTP Path is required");const B=F.oauthClientId&&F.oauthClientSecret;if(!F.token&&!B)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}O={name:S,type:k,[ks[k]]:F}}await e(O),f()},g=()=>{s([...a,{name:"",dbType:"postgres"}])},y=E=>{s(a.filter((C,S)=>S!==E))},x=(E,C)=>{const S=[...a];S[E]={...S[E],dbType:C},s(S)};return d.jsxs(q.Fragment,{children:[d.jsx(Lt,{variant:"outlined",onClick:h,children:"Add Connection"}),d.jsxs(Or,{open:n,onClose:f,children:[d.jsx(Zr,{children:"Create New Connection"}),d.jsxs(Nr,{children:[d.jsx(Va,{children:"Add a new connection to query your data database using Malloy."}),d.jsxs("form",{onSubmit:m,id:"connection-form",children:[d.jsx(tt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard"}),d.jsx(tt,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:o,select:!0,onChange:E=>i(E.target.value),children:Object.values(ut.ConnectionTypeEnum).map(E=>d.jsx(Qt,{value:E,children:E},E))}),o==="ducklake"?d.jsxs(It,{sx:{mt:2},children:[d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsx(ft,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),d.jsx(tt,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:l,select:!0,onChange:E=>u(E.target.value),children:d.jsx(Qt,{value:"postgres",children:"PostgreSQL"})}),l==="postgres"&&d.jsx(d.Fragment,{children:vr.postgres.map(E=>d.jsx(tt,{margin:"dense",id:`ducklake_pg_${E.name}`,name:`ducklake_pg_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard"},`pg_${E.name}`))})]}),d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsx(ft,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),d.jsxs(tt,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:c,select:!0,onChange:E=>p(E.target.value),children:[d.jsx(Qt,{value:"s3",children:"S3"}),d.jsx(Qt,{value:"gcs",children:"GCS"})]}),d.jsx(tt,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:c==="s3"?"Bucket URL (e.g. s3://my-bucket/path)":"Bucket URL (e.g. gs://my-bucket/path)",type:"text",fullWidth:!0,variant:"standard"}),c==="s3"&&d.jsxs(d.Fragment,{children:[d.jsx(ft,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),Sa.map(E=>d.jsx(tt,{margin:"dense",id:`ducklake_s3_${E.name}`,name:`ducklake_s3_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required,placeholder:E.name==="region"?"us-east-1":void 0},`s3_${E.name}`))]}),c==="gcs"&&d.jsxs(d.Fragment,{children:[d.jsx(ft,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),ka.map(E=>d.jsx(tt,{margin:"dense",id:`ducklake_gcs_${E.name}`,name:`ducklake_gcs_${E.name}`,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required},`gcs_${E.name}`))]})]})]}):o==="duckdb"?d.jsxs(It,{sx:{mt:2},children:[d.jsxs(It,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[d.jsx(ft,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),d.jsx(Lt,{startIcon:d.jsx(Kc,{}),onClick:g,size:"small",variant:"outlined",children:"Add Database"})]}),a.length===0&&d.jsx(ft,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),a.map((E,C)=>{const S=il(E.dbType);return d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsxs(It,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[d.jsxs(ft,{variant:"subtitle2",children:["Database ",C+1]}),d.jsx(er,{onClick:()=>y(C),size:"small",color:"error",children:d.jsx(W1,{fontSize:"small"})})]}),d.jsx(tt,{margin:"dense",required:!0,id:`attachedDb_${C}_name`,name:`attachedDb_${C}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:E.name}),d.jsx(tt,{margin:"dense",id:`attachedDb_${C}_type`,name:`attachedDb_${C}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:E.dbType,select:!0,onChange:k=>x(C,k.target.value),children:Object.values(ut.AttachedDatabaseTypeEnum).map(k=>d.jsx(Qt,{value:k,children:k},k))}),S.filter(k=>k.visibleWhen?(E[k.visibleWhen.field]||S.find(O=>O.name===k.visibleWhen?.field)?.selectOptions?.[0]?.value)===k.visibleWhen.value:!0).map(k=>d.jsx(tt,{margin:"dense",id:`attachedDb_${C}_${k.name}`,name:`attachedDb_${C}_${k.name}`,label:k.label,type:k.selectOptions?void 0:k.type,fullWidth:!0,variant:"standard",required:k.required,select:!!k.selectOptions,defaultValue:k.selectOptions?.[0]?.value,onChange:k.selectOptions?T=>{const O=[...a];O[C]={...O[C],[k.name]:T.target.value},s(O)}:void 0,children:k.selectOptions?.map(T=>d.jsx(Qt,{value:T.value,children:T.label},T.value))},k.name))]},C)})]}):vr[o].map(E=>d.jsx(tt,{margin:"dense",id:E.name,name:E.name,label:E.label,type:E.type,fullWidth:!0,variant:"standard",required:E.required},E.name))]})]}),d.jsxs(Lr,{children:[d.jsx(Lt,{disabled:t,onClick:f,children:"Cancel"}),d.jsx(Lt,{type:"submit",form:"connection-form",loading:t,children:"Create Connection"})]})]})]})}function WM({connection:e,onCloseDialog:t,isMutating:n,onDelete:r}){const[o,i]=q.useState(!1),[a,s]=q.useState(""),l=()=>{i(!0)},u=()=>{i(!1),t()};return d.jsxs(q.Fragment,{children:[d.jsxs(Qt,{"aria-label":`Delete connection ${e?.name??""}`.trim(),onClick:c=>{c.stopPropagation(),l()},sx:{color:"error.main"},children:[d.jsx(hb,{sx:{color:"inherit"},children:d.jsx(bn.Delete,{fontSize:"small"})}),d.jsx(mb,{children:"Delete"})]}),d.jsxs(Or,{onClose:u,"aria-labelledby":"customized-dialog-title",open:o,children:[d.jsx(Zr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Connection"}),d.jsx(er,{"aria-label":"close",onClick:u,sx:c=>({position:"absolute",right:8,top:8,color:c.palette.grey[500]}),children:d.jsx(Ir,{})}),d.jsx(Nr,{dividers:!0,children:d.jsxs(ft,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),d.jsx(Lr,{children:d.jsx(Lt,{loading:n,variant:"contained",autoFocus:!0,onClick:()=>r(),color:"error",children:"Delete"})}),d.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function Qh(e){const t=e.duckdbConnection?.attachedDatabases;return!t||t.length===0?[]:t.map(n=>({name:n.name||"",dbType:n.type||"postgres"}))}function Xh(e){const t=e.ducklakeConnection;return t&&t.storage?.gcsConnection?"gcs":"s3"}function qM({connection:e,onSubmit:t,isSubmitting:n,onCloseDialog:r}){const[o,i]=q.useState(!1),[a,s]=q.useState(e.type),[l,u]=q.useState(()=>Qh(e)),[c,p]=q.useState("postgres"),[h,f]=q.useState(()=>Xh(e)),m=()=>{u(Qh(e)),s(e.type),p("postgres"),f(Xh(e)),i(!0)},g=()=>{i(!1),r?.()},y=async T=>{T.preventDefault();const O=new FormData(T.currentTarget),F=O.get("name")?.toString(),B=O.get("type")?.toString(),R=vr[B];if(!F)throw new Error("Name is required");if(!B)throw new Error("Type is required");let N;if(B==="ducklake"){const v={};if(c==="postgres"){const A=vr.postgres,M={};if(A.forEach(V=>{const W=O.get(`ducklake_pg_${V.name}`)?.toString();W&&(M[V.name]=W)}),Object.keys(M).length===0)throw new Error("DuckLake requires catalog connection");v.postgresConnection=M}const L=O.get("ducklake_bucketUrl")?.toString();if(!L)throw new Error("DuckLake requires a bucket URL");const I={bucketUrl:L};if(h==="s3"){const A={};Sa.forEach(V=>{const W=O.get(`ducklake_s3_${V.name}`)?.toString();W&&(A[V.name]=W)});const M=e.ducklakeConnection?.storage?.s3Connection;if(M&&(!A.accessKeyId&&M.accessKeyId&&(A.accessKeyId=M.accessKeyId),!A.secretAccessKey&&M.secretAccessKey&&(A.secretAccessKey=M.secretAccessKey)),!A.accessKeyId)throw new Error("S3 Access Key ID is required");if(!A.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(A).length>0&&(I.s3Connection=A)}else if(h==="gcs"){const A={};ka.forEach(V=>{const W=O.get(`ducklake_gcs_${V.name}`)?.toString();W&&(A[V.name]=W)});const M=e.ducklakeConnection?.storage?.gcsConnection;if(M&&(!A.keyId&&M.keyId&&(A.keyId=M.keyId),!A.secret&&M.secret&&(A.secret=M.secret)),!A.keyId)throw new Error("GCS Key ID is required");if(!A.secret)throw new Error("GCS Secret is required");Object.keys(A).length>0&&(I.gcsConnection=A)}N={name:F,type:B,ducklakeConnection:{catalog:v,storage:I}}}else if(B==="duckdb"){if(l.length===0)throw new Error("DuckDB connection must have at least one attached database");const v=l.map((L,I)=>{const A=L.dbType,M=O.get(`attachedDb_${I}_name`)?.toString();if(!M)throw new Error(`Attached database at index ${I} must have a name`);const V={name:M,type:A},W=il(A);if(W&&W.length>0){const H={};W.forEach(G=>{const re=O.get(`attachedDb_${I}_${G.name}`)?.toString();re&&(H[G.name]=re)});const w=Mc[A];w&&(V[w]=H)}return V});N={name:F,type:B,duckdbConnection:{attachedDatabases:v}}}else{const v=e[ks[B]]||{},L={};if(R.forEach(I=>{const A=O.get(I.name)?.toString(),M=v[I.name],V=I.type==="password"||I.name==="password"||I.name==="secretAccessKey"||I.name==="secret"||I.name==="accessToken"||I.name==="privateKey";A?L[I.name]=A:V&&M?L[I.name]=M:A!==void 0?L[I.name]=A:M&&(L[I.name]=M)}),B==="postgres"){if(!!!L.connectionString?.trim()){const A=["host","port","databaseName","userName","password"];for(const M of A)if(!L[M])throw new Error(`${R.find(V=>V.name===M)?.label||M} is required`)}}else if(B==="bigquery"){if(!L.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(B==="snowflake"){if(!L.account)throw new Error("Account is required");if(!L.username)throw new Error("Username is required");if(!L.warehouse)throw new Error("Warehouse is required");if(!L.password&&!L.privateKey)throw new Error("Either password or private key is required")}else if(B==="trino"){if(!L.server)throw new Error("Server is required");if(!L.user)throw new Error("User is required");if(L.server.trim().startsWith("https://")&&!L.password&&!L.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(B==="mysql"){const I=["host","port","database","user","password"];for(const A of I)if(!L[A])throw new Error(`${R.find(M=>M.name===A)?.label||A} is required`)}else if(B==="motherduck"){if(!L.accessToken)throw new Error("Access Token is required")}else if(B==="databricks"){if(!L.host)throw new Error("Host is required");if(!L.path)throw new Error("HTTP Path is required");const I=L.oauthClientId&&L.oauthClientSecret;if(!L.token&&!I)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}N={name:F,type:B,[ks[B]]:L}}await t(N),g()},x=()=>{u([...l,{name:"",dbType:"postgres"}])},E=T=>{u(l.filter((O,F)=>F!==T))},C=(T,O)=>{const F=[...l];F[T]={...F[T],dbType:O},u(F)},S=(T,O)=>{const F=e.duckdbConnection?.attachedDatabases;if(!F||!F[T])return"";const B=F[T],R=Mc[B.type||""];return R&&B[R]?B[R][O]??"":""},k=T=>{const O=e.ducklakeConnection;if(!O)return"";if(T.startsWith("pg_")){const F=T.replace("pg_","");return O.catalog?.postgresConnection?.[F]??""}if(T==="bucketUrl")return O.storage?.bucketUrl??"";if(T.startsWith("s3_")){const F=T.replace("s3_","");return O.storage?.s3Connection?.[F]??""}if(T.startsWith("gcs_")){const F=T.replace("gcs_","");return O.storage?.gcsConnection?.[F]??""}return""};return d.jsxs(q.Fragment,{children:[d.jsxs(Qt,{"aria-label":`Edit connection ${e?.name??""}`.trim(),onClick:T=>{T.preventDefault(),T.stopPropagation(),m()},children:[d.jsx(hb,{children:d.jsx(bn.Edit,{fontSize:"small"})}),d.jsx(mb,{children:"Edit"})]}),d.jsxs(Or,{open:o,onClose:g,children:[d.jsx(Zr,{onClick:T=>{T.stopPropagation()},children:"Edit Connection"}),d.jsxs(Nr,{onClick:T=>{T.stopPropagation()},children:[d.jsx(Va,{children:"Edit a connection to query your data database using Malloy."}),d.jsxs("form",{onSubmit:y,id:"connection-form",children:[d.jsx(tt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),d.jsx(tt,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:a,select:!0,onChange:T=>s(T.target.value),children:Object.values(ut.ConnectionTypeEnum).map(T=>d.jsx(Qt,{value:T,children:T},T))}),a==="ducklake"?d.jsxs(It,{sx:{mt:2},children:[d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsx(ft,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),d.jsx(tt,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:c,select:!0,onChange:T=>p(T.target.value),children:d.jsx(Qt,{value:"postgres",children:"PostgreSQL"})}),c==="postgres"&&d.jsx(d.Fragment,{children:vr.postgres.map(T=>d.jsx(tt,{margin:"dense",id:`ducklake_pg_${T.name}`,name:`ducklake_pg_${T.name}`,label:T.label,type:T.type,fullWidth:!0,variant:"standard",defaultValue:k(`pg_${T.name}`)},`pg_${T.name}`))})]}),d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsx(ft,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),d.jsxs(tt,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:h,select:!0,onChange:T=>f(T.target.value),children:[d.jsx(Qt,{value:"s3",children:"S3"}),d.jsx(Qt,{value:"gcs",children:"GCS"})]}),d.jsx(tt,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:h==="s3"?"Bucket URL (e.g. s3://my-bucket/path)":"Bucket URL (e.g. gs://my-bucket/path)",type:"text",fullWidth:!0,variant:"standard",defaultValue:k("bucketUrl")}),h==="s3"&&d.jsxs(d.Fragment,{children:[d.jsx(ft,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),Sa.map(T=>d.jsx(tt,{margin:"dense",id:`ducklake_s3_${T.name}`,name:`ducklake_s3_${T.name}`,label:T.label,type:T.type,fullWidth:!0,variant:"standard",required:T.required&&T.name!=="secretAccessKey",defaultValue:k(`s3_${T.name}`),placeholder:T.name==="region"?"us-east-1":T.name==="secretAccessKey"?"Leave empty to keep existing":void 0},`s3_${T.name}`))]}),h==="gcs"&&d.jsxs(d.Fragment,{children:[d.jsx(ft,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),ka.map(T=>d.jsx(tt,{margin:"dense",id:`ducklake_gcs_${T.name}`,name:`ducklake_gcs_${T.name}`,label:T.label,type:T.type,fullWidth:!0,variant:"standard",required:T.required&&T.name!=="secret",defaultValue:k(`gcs_${T.name}`),placeholder:T.name==="secret"?"Leave empty to keep existing":void 0},`gcs_${T.name}`))]})]})]}):a==="duckdb"?d.jsxs(It,{sx:{mt:2},children:[d.jsxs(It,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[d.jsx(ft,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),d.jsx(Lt,{startIcon:d.jsx(Kc,{}),onClick:x,size:"small",variant:"outlined",children:"Add Database"})]}),l.length===0&&d.jsx(ft,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),l.map((T,O)=>{const F=il(T.dbType);return d.jsxs(It,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[d.jsxs(It,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[d.jsxs(ft,{variant:"subtitle2",children:["Database ",O+1]}),d.jsx(er,{"aria-label":`Remove attached database ${O+1}`,onClick:()=>E(O),size:"small",color:"error",children:d.jsx(W1,{fontSize:"small"})})]}),d.jsx(tt,{margin:"dense",required:!0,id:`attachedDb_${O}_name`,name:`attachedDb_${O}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:T.name}),d.jsx(tt,{margin:"dense",id:`attachedDb_${O}_type`,name:`attachedDb_${O}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:T.dbType,select:!0,onChange:B=>C(O,B.target.value),children:Object.values(ut.AttachedDatabaseTypeEnum).map(B=>d.jsx(Qt,{value:B,children:B},B))}),F.filter(B=>B.visibleWhen?(T[B.visibleWhen.field]||S(O,B.visibleWhen.field)||F.find(N=>N.name===B.visibleWhen?.field)?.selectOptions?.[0]?.value)===B.visibleWhen.value:!0).map(B=>d.jsx(tt,{margin:"dense",id:`attachedDb_${O}_${B.name}`,name:`attachedDb_${O}_${B.name}`,label:B.label,type:B.selectOptions?void 0:B.type,fullWidth:!0,variant:"standard",required:B.required,select:!!B.selectOptions,defaultValue:S(O,B.name)||B.selectOptions?.[0]?.value,onChange:B.selectOptions?R=>{const N=[...l];N[O]={...N[O],[B.name]:R.target.value},u(N)}:void 0,children:B.selectOptions?.map(R=>d.jsx(Qt,{value:R.value,children:R.label},R.value))},B.name))]},O)})]}):vr[a].map(T=>{const O=e?.[ks[a]??""]?.[T.name??""]??"",F=T.type==="password"||T.name==="password"||T.name==="secretAccessKey"||T.name==="secret"||T.name==="accessToken"||T.name==="privateKey";return d.jsx(tt,{margin:"dense",id:T.name,name:T.name,label:T.label,type:T.type,fullWidth:!0,variant:"standard",required:T.required&&!F&&!O,defaultValue:O,placeholder:F&&O?"Leave empty to keep existing":void 0},T.name)})]})]}),d.jsxs(Lr,{onClick:T=>{T.stopPropagation()},children:[d.jsx(Lt,{disabled:n,onClick:g,children:"Cancel"}),d.jsx(Lt,{type:"submit",form:"connection-form",loading:n,children:"Edit Connection"})]})]})]})}function Zh(e,t){return!e||e.type!=="duckdb"?!1:(e.duckdbConnection?.attachedDatabases||[]).some(r=>r.type==="azure"&&r.name===t)}function YM(e){return e.startsWith("gs://")||e.startsWith("s3://")||e.startsWith("https://")||e.startsWith("abfss://")||e.startsWith("az://")}function gb({connectionName:e,resourceUri:t,schema:n,connection:r}){const{apiClients:o}=ut.useServer(),{environmentName:i}=Mt(t),[a,s]=q.useState(null),[l,u]=q.useState(n||null),[c,p]=q.useState(!1),{data:h,isError:f,isLoading:m,error:g}=Wt({queryKey:["schemas",i,e],queryFn:()=>o.connections.listSchemas(i,e)}),y=h?.data||[];return d.jsxs(P.Grid,{container:!0,spacing:1,children:[!n&&d.jsx(P.Grid,{size:{xs:12,md:4},children:d.jsxs(P.Paper,{sx:{p:1,m:0},children:[d.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:0},children:[d.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),d.jsx(P.FormControlLabel,{control:d.jsx(P.Switch,{checked:c,onChange:x=>p(x.target.checked)}),label:"Hidden Schemas"})]}),d.jsx(P.Divider,{sx:{mt:"2px"}}),d.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[m&&d.jsx(un,{text:"Loading schemas..."}),f&&d.jsx(cn,{error:g,context:`${i} > ${e} > Schemas`}),!m&&!f&&y.length===0&&d.jsx(P.Typography,{variant:"body2",children:"No Schemas"}),!m&&!f&&y.length>0&&d.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{const E=x.name;if(x.isHidden&&!c)return null;const S=l===E;return d.jsx(P.ListItemButton,{selected:S,onClick:()=>{u(E),s(null)},children:d.jsx(P.ListItemText,{primary:E})},E)})})]})]})}),d.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&d.jsx(P.Paper,{sx:{p:1,m:0},children:d.jsx(QM,{connectionName:e,schemaName:l,onTableSelect:x=>{s(x)},resourceUri:t,connection:r})})}),d.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&a&&d.jsx(KM,{environmentName:i,connectionName:e,schemaName:l,tableResource:a})})]})}function KM({environmentName:e,connectionName:t,schemaName:n,tableResource:r}){const{apiClients:o}=ut.useServer(),{data:i,isLoading:a,isError:s,error:l}=Wt({queryKey:["connectionTableDetail",e,t,n,r],queryFn:()=>o.connections.getTable(e,t,n,r),enabled:!!n&&!!r}),u={resource:i?.data?.resource??r,columns:i?.data?.columns??[]};return d.jsxs(P.Paper,{sx:{p:1,m:0},children:[s&&d.jsx(cn,{error:l,context:`${e} > ${t} > ${n} > ${r}`}),!s&&d.jsx(GM,{table:u,loading:a})]})}function GM({table:e,loading:t}){return t?d.jsx(un,{text:"Loading columns..."}):d.jsxs(d.Fragment,{children:[d.jsxs(P.Typography,{variant:"overline",fontWeight:"bold",sx:{display:"block",wordBreak:"break-all"},children:[e.resource.includes("://")||/\.(parquet|csv|json|tsv|ndjson)$/i.test(e.resource)?"File":"Table",": ",e.resource]}),d.jsx(P.Divider,{}),d.jsx(P.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:d.jsx(P.TableContainer,{children:d.jsxs(P.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[d.jsx(P.TableHead,{children:d.jsxs(P.TableRow,{children:[d.jsx(P.TableCell,{children:"NAME"}),d.jsx(P.TableCell,{children:"TYPE"})]})}),d.jsx(P.TableBody,{children:e.columns?.sort((n,r)=>n.name.localeCompare(r.name))?.map(n=>d.jsxs(P.TableRow,{children:[d.jsx(P.TableCell,{children:n.name}),d.jsx(P.TableCell,{children:n.type})]},n.name))})]})})})]})}function QM({connectionName:e,schemaName:t,onTableSelect:n,resourceUri:r,connection:o}){const{environmentName:i}=Mt(r),{apiClients:a}=ut.useServer(),[s,l]=q.useState(""),{data:u,isSuccess:c,isError:p,error:h,isLoading:f}=Wt({queryKey:["tablesInSchema",i,e,t],queryFn:()=>a.connections.listTables(i,e,t)}),m=Zh(o,t),g=x=>m?x:x.split(".").pop()||x,y=c&&u?.data?u.data.filter(x=>g(x.resource).toLowerCase().includes(s.toLowerCase())).sort((x,E)=>g(x.resource).localeCompare(g(E.resource))):[];return d.jsxs(d.Fragment,{children:[d.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:YM(t)||Zh(o,t)?`Files in ${t}`:`Tables in ${t}`}),d.jsx(P.Divider,{}),d.jsx(P.Box,{sx:{mt:1,mb:1},children:d.jsx(P.TextField,{size:"small",fullWidth:!0,placeholder:"Search tables...",value:s,onChange:x=>l(x.target.value),variant:"outlined"})}),d.jsx(P.Divider,{}),d.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[f&&d.jsx(un,{text:"Fetching Tables..."}),p&&d.jsx(cn,{error:h,context:`${i} > ${e} > ${t}`}),c&&y.length===0&&d.jsx(P.Typography,{variant:"body2",children:"No Tables"}),c&&u?.data&&u.data.length>0&&d.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{let E=g(x.resource);return!m&&x.resource.includes("://")&&(E=x.resource.split("/").pop()||x.resource),d.jsx(P.ListItemButton,{onClick:()=>n(x.resource),children:d.jsx(P.ListItemText,{primary:E,secondary:x.columns.length>0?`${x.columns.length} columns`:void 0})},x.resource)})})]})]})}const XM={bigquery:"BigQuery",snowflake:"Snowflake",postgres:"PostgreSQL",mysql:"MySQL",trino:"Trino",databricks:"Databricks",duckdb:"DuckDB",ducklake:"DuckLake",s3:"S3",gcs:"GCS",azure:"Azure"};function ZM(e){return e?XM[e]??e:""}function JM({resourceUri:e}){const{apiClients:t,mutable:n}=ut.useServer(),r=Rr.useQueryClient(),{environmentName:o}=Mt(e),[i,a]=q.useState(""),[s,l]=q.useState(null),u=Ua({environmentName:o,connectionName:s}),{data:c,isSuccess:p,isError:h,error:f}=Wt({queryKey:["connections",o],queryFn:()=>t.connections.listConnections(o)}),m=()=>{l(null)},g=ur({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:[...c.data,S]}),onSuccess(){a("Connection added successfully"),r.invalidateQueries({queryKey:["connections",o]})},onError(S){a(S.message)}}),y=ur({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:c.data.map(k=>k.name===S.name?S:k)}),onSuccess(S,k){a(`Connection ${k.name} updated successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(S){a(S.message)}}),x=ur({mutationFn:S=>t.environments.updateEnvironment(o,{name:o,connections:c.data.filter(k=>k.name!==S.name)}),onSuccess(S,k){a(`Connection ${k.name} deleted successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(S){a(S.message)}}),E=p?[...c.data].sort((S,k)=>(S.name??"").localeCompare(k.name??"")):[],C=g.isPending||y.isPending||x.isPending;return d.jsxs(P.Box,{children:[d.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",mb:3},children:[d.jsxs(P.Box,{children:[d.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:"Connections"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Database connections available to packages in this environment"})]}),n&&p&&d.jsx(VM,{onSubmit:S=>g.mutateAsync(S),isSubmitting:g.isPending})]}),!p&&!h&&d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Fetching Connections..."}),h&&d.jsx(cn,{error:f,context:`${o} > Connections`}),p&&E.length===0&&d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"No connections yet."}),p&&E.length>0&&d.jsx(P.Grid,{container:!0,spacing:2,children:E.map(S=>d.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:d.jsx(e8,{connection:S,mutable:n,isMutating:C,onOpenExplorer:()=>l(S.name??null),onEdit:k=>y.mutateAsync(k),onDelete:k=>{S.resource?a("Cannot delete this connection"):x.mutateAsync(k)}})},S.name))}),d.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>a(""),message:i}),d.jsxs(P.Dialog,{open:s!==null,onClose:m,maxWidth:"lg",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{children:["Connection Explorer: ",s,d.jsx(P.IconButton,{"aria-label":"close",onClick:m,sx:{position:"absolute",right:8,top:8},children:d.jsx(P.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),d.jsx(P.DialogContent,{children:s&&d.jsx(gb,{resourceUri:u,connectionName:s,connection:c?.data?.find(S=>S.name===s)})})]})]})}function e8({connection:e,mutable:t,isMutating:n,onOpenExplorer:r,onEdit:o,onDelete:i}){const[a,s]=q.useState(null),l=!!a,u=p=>{p.stopPropagation(),s(p.currentTarget)},c=()=>{s(null)};return d.jsx(P.Card,{variant:"outlined",onClick:r,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:d.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:d.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[d.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"warning.light",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"warning.main"},children:d.jsx(T4,{sx:{fontSize:20}})}),d.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[d.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",noWrap:!0,children:ZM(e.type)})]}),t&&d.jsxs(d.Fragment,{children:[d.jsx(P.IconButton,{size:"small",onClick:u,"aria-label":`Connection actions for ${e.name??""}`.trim(),sx:{flexShrink:0,mt:-.5,mr:-.5},children:d.jsx(bn.MoreVert,{fontSize:"small"})}),d.jsxs(P.Menu,{anchorEl:a,open:l,onClose:c,onClick:p=>p.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[d.jsx(qM,{connection:e,onSubmit:o,isSubmitting:n,onCloseDialog:c}),d.jsx(WM,{connection:e,onCloseDialog:c,isMutating:n,onDelete:()=>i(e)})]})]})]})})})}const t8=lt([d.jsx("path",{d:"M20 2H4c-1 0-2 .9-2 2v3.01c0 .72.43 1.34 1 1.69V20c0 1.1 1.1 2 2 2h14c.9 0 2-.9 2-2V8.7c.57-.35 1-.97 1-1.69V4c0-1.1-1-2-2-2m-1 18H5V9h14zm1-13H4V4h16z"},"0"),d.jsx("path",{d:"M9 12h6v2H9z"},"1")]);function n8({resourceUri:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=ut.useServer(),i=Rr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},{environmentName:c,packageName:p}=Mt(e),h=ur({mutationFn:()=>o.packages.deletePackage(c,p),onSuccess(){u(),i.invalidateQueries({queryKey:["packages"]}),s("Package deleted successfully")},onError(f){s(f instanceof Error?f.message:"An unknown error occurred")}});return d.jsxs(q.Fragment,{children:[d.jsxs(P.MenuItem,{onClick:l,children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Delete,{fontSize:"small"})}),d.jsx(P.ListItemText,{children:"Delete"})]}),d.jsxs(Or,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[d.jsx(Zr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Package"}),d.jsx(er,{"aria-label":"close",onClick:u,sx:f=>({position:"absolute",right:8,top:8,color:f.palette.grey[500]}),children:d.jsx(Ir,{})}),d.jsx(Nr,{dividers:!0,children:d.jsxs(ft,{gutterBottom:!0,children:['Are you sure you want to delete "',p,'"? This action cannot be undone.']})}),d.jsxs(Lr,{children:[d.jsx(Lt,{variant:"outlined",onClick:u,style:{borderColor:ho.teal,color:ho.teal},children:"Cancel"}),d.jsx(Lt,{variant:"contained",autoFocus:!0,onClick:()=>h.mutate(),color:"error",loading:h.isPending,children:"Delete"})]}),d.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function r8({package:e,resourceUri:t,onCloseDialog:n}){const[r,o]=q.useState(!1),{apiClients:i}=ut.useServer(),a=Rr.useQueryClient(),[s,l]=q.useState(""),u=()=>{o(!0)},c=()=>{o(!1),n()},{packageName:p,environmentName:h}=Mt(t),f=ur({async mutationFn(g){return i.packages.updatePackage(h,p,{name:p,description:g.description})},onSuccess(){c(),l("Package updated successfully"),a.invalidateQueries({queryKey:["packages",h]})},onError(g){l(g instanceof Error?g.message:"An unknown error occurred")}}),m=g=>{g.preventDefault();const x=new FormData(g.currentTarget).get("description")?.toString();f.mutate({description:x})};return d.jsxs(q.Fragment,{children:[d.jsxs(P.MenuItem,{onClick:u,children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Edit,{fontSize:"small"})}),d.jsx(P.ListItemText,{children:"Edit"})]}),d.jsxs(Or,{open:r,onClose:c,children:[d.jsx(Zr,{children:"Edit Package"}),d.jsxs(Nr,{children:[d.jsxs(Va,{children:['Update the details for "',e.name,'".']}),d.jsxs("form",{onSubmit:m,id:"package-form",children:[d.jsx(tt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Package Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),d.jsx(tt,{id:"description",name:"description",label:"Description",multiline:!0,fullWidth:!0,rows:4,defaultValue:e.description,variant:"standard"})]})]}),d.jsxs(Lr,{children:[d.jsx(Lt,{disabled:f.isPending,onClick:c,children:"Cancel"}),d.jsx(Lt,{type:"submit",form:"package-form",loading:f.isPending,children:"Save Changes"})]})]}),d.jsx(P.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>l(""),message:s})]})}function bb({onSelectPackage:e,resourceUri:t}){const{apiClients:n}=ut.useServer(),{environmentName:r}=Mt(t),{data:o,isSuccess:i,isError:a,error:s}=Wt({queryKey:["packages",r],queryFn:()=>n.packages.listPackages(r)});if(a)return d.jsx(cn,{error:s,context:`${r} > Packages`});if(!i)return d.jsx(un,{text:"Fetching Packages..."});const l=[...o.data].sort((u,c)=>u.name.localeCompare(c.name));return d.jsx(P.Grid,{container:!0,spacing:2,children:l.map(u=>{const c=Ua({environmentName:r,packageName:u.name});return d.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:d.jsx(o8,{pkg:u,packageResourceUri:c,onSelectPackage:e})},u.name)})})}function o8({pkg:e,packageResourceUri:t,onSelectPackage:n}){const{mutable:r}=ut.useServer(),[o,i]=q.useState(null),a=!!o,s=p=>{n(e.name,p)},l=p=>{p.stopPropagation(),i(p.currentTarget)},u=()=>{i(null)},c=e.description??"";return d.jsx(P.Card,{variant:"outlined",onClick:s,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:d.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:d.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[d.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"grey.100",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.primary"},children:d.jsx(t8,{sx:{fontSize:20}})}),d.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[d.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),d.jsx(P.Tooltip,{title:c,followCursor:!0,enterDelay:1e3,children:d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:c})})]}),r&&d.jsxs(d.Fragment,{children:[d.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Package actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:d.jsx(bn.MoreVert,{fontSize:"small"})}),d.jsxs(P.Menu,{anchorEl:o,open:a,onClose:u,onClick:p=>p.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[d.jsx(r8,{package:e,resourceUri:t,onCloseDialog:u}),d.jsx(n8,{resourceUri:t,onCloseDialog:u})]})]})]})})})}function i8({onSelectPackage:e,resourceUri:t}){const{mutable:n}=ut.useServer(),{environmentName:r}=Mt(t);return q.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]),d.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:4,py:3},children:[d.jsxs(P.Box,{sx:{mb:5},children:[d.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:r}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Manage packages and database connections in this environment. Open a package to explore its models and notebooks."})]}),d.jsxs(P.Box,{sx:{mb:5},children:[d.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[d.jsxs(P.Box,{children:[d.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:"Packages"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published packages available for use in this environment"})]}),n&&d.jsx(C4,{resourceUri:t})]}),d.jsx(bb,{onSelectPackage:e,resourceUri:t})]}),d.jsx(P.Box,{sx:{mb:5},children:d.jsx(JM,{resourceUri:t})}),d.jsx(E4,{resourceUri:t})]})}const a8=e=>{const t=D.useRef({});return D.useEffect(()=>{t.current=e}),t.current};function Jh({array1:e,array2:t,parser:n=r=>r}){return e&&t&&e.length===t.length&&e.every((r,o)=>n(r)===n(t[o]))}function em(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function s8(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:u})=>{let c=a?l.trim():l;n&&(c=c.toLowerCase()),t&&(c=em(c));const p=c?s.filter(h=>{let f=(i||u)(h);return n&&(f=f.toLowerCase()),t&&(f=em(f)),o==="start"?f.startsWith(c):f.includes(c)}):s;return typeof r=="number"?p.slice(0,r):p}}const l8=s8(),tm=5,u8=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),c8=[];function nm(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function d8(e){const{unstable_isActiveElementInListbox:t=u8,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:c=e.multiple?c8:null,disableClearable:p=!1,disableCloseOnSelect:h=!1,disabled:f,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:y=l8,filterSelectedOptions:x=!1,freeSolo:E=!1,getOptionDisabled:C,getOptionKey:S,getOptionLabel:k=ge=>ge.label??ge,groupBy:T,handleHomeEndKeys:O=!e.freeSolo,id:F,includeInputInList:B=!1,inputValue:R,isOptionEqualToValue:N=(ge,me)=>ge===me,multiple:v=!1,onChange:L,onClose:I,onHighlightChange:A,onInputChange:M,onOpen:V,open:W,openOnFocus:H=!1,options:w,readOnly:G=!1,renderValue:re,selectOnFocus:_=!e.freeSolo,value:ae}=e,X=Zn(F);let U=k;U=ge=>{const me=k(ge);return typeof me!="string"?String(me):me};const J=D.useRef(!1),Q=D.useRef(!0),ne=D.useRef(null),Z=D.useRef(null),[Y,le]=D.useState(null),[ee,te]=D.useState(-1),xe=o?0:-1,pe=D.useRef(xe),be=D.useRef(nm(c??ae,v,U)).current,[se,Re]=kn({controlled:ae,default:c,name:u}),[ve,ze]=kn({controlled:R,default:be,name:u,state:"inputValue"}),[De,Tt]=D.useState(!1),at=D.useCallback((ge,me,Fe)=>{if(!(v?se.length<me.length:me!==null)&&!s)return;const Ye=nm(me,v,U,re);ve!==Ye&&(ze(Ye),M&&M(ge,Ye,Fe))},[U,ve,v,M,ze,s,se,re]),[qe,ce]=kn({controlled:W,default:!1,name:u,state:"open"}),[Ce,Oe]=D.useState(!0),He=!v&&se!=null&&ve===U(se),je=qe&&!G,Le=je?y(w.filter(ge=>!(x&&(v?se:[se]).some(me=>me!==null&&N(ge,me)))),{inputValue:He&&Ce?"":ve,getOptionLabel:U}):[],Je=a8({filteredOptions:Le,value:se,inputValue:ve});D.useEffect(()=>{const ge=se!==Je.value;De&&!ge||E&&!ge||at(null,se,"reset")},[se,at,De,Je.value,E]);const yt=qe&&Le.length>0&&!G,ht=Pe(ge=>{if(ge===-1)ne.current.focus();else{const me=re?"data-item-index":"data-tag-index";Y.querySelector(`[${me}="${ge}"]`).focus()}});D.useEffect(()=>{v&&ee>se.length-1&&(te(-1),ht(-1))},[se,v,ee,ht]);function ue(ge,me){if(!Z.current||ge<0||ge>=Le.length)return-1;let Fe=ge;for(;;){const Ve=Z.current.querySelector(`[data-option-index="${Fe}"]`),Ye=m?!1:!Ve||Ve.disabled||Ve.getAttribute("aria-disabled")==="true";if(Ve&&Ve.hasAttribute("tabindex")&&!Ye)return Fe;if(me==="next"?Fe=(Fe+1)%Le.length:Fe=(Fe-1+Le.length)%Le.length,Fe===ge)return-1}}const ye=Pe(({event:ge,index:me,reason:Fe})=>{if(pe.current=me,me===-1?ne.current.removeAttribute("aria-activedescendant"):ne.current.setAttribute("aria-activedescendant",`${X}-option-${me}`),A&&["mouse","keyboard","touch"].includes(Fe)&&A(ge,me===-1?null:Le[me],Fe),!Z.current)return;const Ve=Z.current.querySelector(`[role="option"].${n}-focused`);Ve&&(Ve.classList.remove(`${n}-focused`),Ve.classList.remove(`${n}-focusVisible`));let Ye=Z.current;if(Z.current.getAttribute("role")!=="listbox"&&(Ye=Z.current.parentElement.querySelector('[role="listbox"]')),!Ye)return;if(me===-1){Ye.scrollTop=0;return}const Kt=Z.current.querySelector(`[data-option-index="${me}"]`);if(Kt&&(Kt.classList.add(`${n}-focused`),Fe==="keyboard"&&Kt.classList.add(`${n}-focusVisible`),Ye.scrollHeight>Ye.clientHeight&&Fe!=="mouse"&&Fe!=="touch")){const _t=Kt,Kn=Ye.clientHeight+Ye.scrollTop,Xa=_t.offsetTop+_t.offsetHeight;Xa>Kn?Ye.scrollTop=Xa-Ye.clientHeight:_t.offsetTop-_t.offsetHeight*(T?1.3:0)<Ye.scrollTop&&(Ye.scrollTop=_t.offsetTop-_t.offsetHeight*(T?1.3:0))}}),Te=Pe(({event:ge,diff:me,direction:Fe="next",reason:Ve})=>{if(!je)return;const Kt=ue((()=>{const _t=Le.length-1;if(me==="reset")return xe;if(me==="start")return 0;if(me==="end")return _t;const Kn=pe.current+me;return Kn<0?Kn===-1&&B?-1:g&&pe.current!==-1||Math.abs(me)>1?0:_t:Kn>_t?Kn===_t+1&&B?-1:g||Math.abs(me)>1?_t:0:Kn})(),Fe);if(ye({index:Kt,reason:Ve,event:ge}),r&&me!=="reset")if(Kt===-1)ne.current.value=ve;else{const _t=U(Le[Kt]);ne.current.value=_t,_t.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&ne.current.setSelectionRange(ve.length,_t.length)}}),Be=!Jh({array1:Je.filteredOptions,array2:Le,parser:U}),We=()=>{const ge=(me,Fe)=>{const Ve=me?U(me):"",Ye=Fe?U(Fe):"";return Ve===Ye};if(pe.current!==-1&&!Jh({array1:Je.filteredOptions,array2:Le,parser:U})&&Je.inputValue===ve&&(v?se.length===Je.value.length&&Je.value.every((me,Fe)=>U(se[Fe])===U(me)):ge(Je.value,se))){const me=Je.filteredOptions[pe.current];if(me)return Le.findIndex(Fe=>U(Fe)===U(me))}return-1},Dt=D.useCallback(()=>{if(!je)return;const ge=We();if(ge!==-1){pe.current=ge;return}const me=v?se[0]:se;if(Le.length===0||me==null){Te({diff:"reset"});return}if(Z.current){if(me!=null){const Fe=Le[pe.current];if(v&&Fe&&se.findIndex(Ye=>N(Fe,Ye))!==-1)return;const Ve=Le.findIndex(Ye=>N(Ye,me));Ve===-1?Te({diff:"reset"}):ye({index:Ve});return}if(pe.current>=Le.length-1){ye({index:Le.length-1});return}ye({index:pe.current})}},[Le.length,v?!1:se,x,Te,ye,je,ve,v]),Ot=Pe(ge=>{tc(Z,ge),ge&&Dt()});D.useEffect(()=>{Be&&Dt()},[Dt,Be]);const Et=ge=>{qe||(ce(!0),Oe(!0),V&&V(ge))},zt=(ge,me)=>{qe&&(ce(!1),I&&I(ge,me))},In=(ge,me,Fe,Ve)=>{if(v){if(se.length===me.length&&se.every((Ye,Kt)=>Ye===me[Kt]))return}else if(se===me)return;L&&L(ge,me,Fe,Ve),Re(me)},wt=D.useRef(!1),Jt=(ge,me,Fe="selectOption",Ve="options")=>{let Ye=Fe,Kt=me;if(v){Kt=Array.isArray(se)?se.slice():[];const _t=Kt.findIndex(Kn=>N(me,Kn));_t===-1?Kt.push(me):Ve!=="freeSolo"&&(Kt.splice(_t,1),Ye="removeOption")}at(ge,Kt,Ye),In(ge,Kt,Ye,{option:me}),!h&&(!ge||!ge.ctrlKey&&!ge.metaKey)&&zt(ge,Ye),(a===!0||a==="touch"&&wt.current||a==="mouse"&&!wt.current)&&ne.current.blur()};function gr(ge,me){if(ge===-1)return-1;let Fe=ge;for(;;){if(me==="next"&&Fe===se.length||me==="previous"&&Fe===-1)return-1;const Ve=re?"data-item-index":"data-tag-index",Ye=Y.querySelector(`[${Ve}="${Fe}"]`);if(!Ye||!Ye.hasAttribute("tabindex")||Ye.disabled||Ye.getAttribute("aria-disabled")==="true")Fe+=me==="next"?1:-1;else return Fe}}const An=(ge,me)=>{if(!v)return;ve===""&&zt(ge,"toggleInput");let Fe=ee;ee===-1?ve===""&&me==="previous"&&(Fe=se.length-1):(Fe+=me==="next"?1:-1,Fe<0&&(Fe=0),Fe===se.length&&(Fe=-1)),Fe=gr(Fe,me),te(Fe),ht(Fe)},eo=ge=>{J.current=!0,ze(""),M&&M(ge,"","clear"),In(ge,v?[]:null,"clear")},Yn=ge=>me=>{if(ge.onKeyDown&&ge.onKeyDown(me),!me.defaultMuiPrevented&&(ee!==-1&&!["ArrowLeft","ArrowRight"].includes(me.key)&&(te(-1),ht(-1)),me.which!==229))switch(me.key){case"Home":je&&O&&(me.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:me}));break;case"End":je&&O&&(me.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:me}));break;case"PageUp":me.preventDefault(),Te({diff:-tm,direction:"previous",reason:"keyboard",event:me}),Et(me);break;case"PageDown":me.preventDefault(),Te({diff:tm,direction:"next",reason:"keyboard",event:me}),Et(me);break;case"ArrowDown":me.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:me}),Et(me);break;case"ArrowUp":me.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:me}),Et(me);break;case"ArrowLeft":!v&&re?ht(0):An(me,"previous");break;case"ArrowRight":!v&&re?ht(-1):An(me,"next");break;case"Enter":if(pe.current!==-1&&je){const Fe=Le[pe.current],Ve=C?C(Fe):!1;if(me.preventDefault(),Ve)return;Jt(me,Fe,"selectOption"),r&&ne.current.setSelectionRange(ne.current.value.length,ne.current.value.length)}else E&&ve!==""&&He===!1&&(v&&me.preventDefault(),Jt(me,ve,"createOption","freeSolo"));break;case"Escape":je?(me.preventDefault(),me.stopPropagation(),zt(me,"escape")):l&&(ve!==""||v&&se.length>0||re)&&(me.preventDefault(),me.stopPropagation(),eo(me));break;case"Backspace":if(v&&!G&&ve===""&&se.length>0){const Fe=ee===-1?se.length-1:ee,Ve=se.slice();Ve.splice(Fe,1),In(me,Ve,"removeOption",{option:se[Fe]})}!v&&re&&!G&&(Re(null),ht(-1));break;case"Delete":if(v&&!G&&ve===""&&se.length>0&&ee!==-1){const Fe=ee,Ve=se.slice();Ve.splice(Fe,1),In(me,Ve,"removeOption",{option:se[Fe]})}!v&&re&&!G&&(Re(null),ht(-1));break}},br=ge=>{Tt(!0),H&&!J.current&&Et(ge)},Mo=ge=>{if(t(Z)){ne.current.focus();return}Tt(!1),Q.current=!0,J.current=!1,i&&pe.current!==-1&&je?Jt(ge,Le[pe.current],"blur"):i&&E&&ve!==""?Jt(ge,ve,"blur","freeSolo"):s&&at(ge,se,"blur"),zt(ge,"blur")},wi=ge=>{const me=ge.target.value;ve!==me&&(ze(me),Oe(!1),M&&M(ge,me,"input")),me===""?!p&&!v&&In(ge,null,"clear"):Et(ge)},Gl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));pe.current!==me&&ye({event:ge,index:me,reason:"mouse"})},Ql=ge=>{ye({event:ge,index:Number(ge.currentTarget.getAttribute("data-option-index")),reason:"touch"}),wt.current=!0},Xl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));Jt(ge,Le[me],"selectOption"),wt.current=!1},Zl=ge=>me=>{const Fe=se.slice();Fe.splice(ge,1),In(me,Fe,"removeOption",{option:se[ge]})},Ii=ge=>{In(ge,null,"removeOption",{option:se})},Vt=ge=>{qe?zt(ge,"toggleInput"):Et(ge)},Yt=ge=>{ge.currentTarget.contains(ge.target)&&ge.target.getAttribute("id")!==X&&ge.preventDefault()},_r=ge=>{ge.currentTarget.contains(ge.target)&&(ne.current.focus(),_&&Q.current&&ne.current.selectionEnd-ne.current.selectionStart===0&&ne.current.select(),Q.current=!1)},Jl=ge=>{!f&&(ve===""||!qe)&&Vt(ge)};let Ai=E&&ve.length>0;Ai=Ai||(v?se.length>0:se!==null);let Qa=Le;return T&&(Qa=Le.reduce((ge,me,Fe)=>{const Ve=T(me);return ge.length>0&&ge[ge.length-1].group===Ve?ge[ge.length-1].options.push(me):ge.push({key:Fe,index:Fe,group:Ve,options:[me]}),ge},[])),f&&De&&Mo(),{getRootProps:(ge={})=>({...ge,onKeyDown:Yn(ge),onMouseDown:Yt,onClick:_r}),getInputLabelProps:()=>({id:`${X}-label`,htmlFor:X}),getInputProps:()=>({id:X,value:ve,onBlur:Mo,onFocus:br,onChange:wi,onMouseDown:Jl,"aria-activedescendant":je?"":null,"aria-autocomplete":r?"both":"list","aria-controls":yt?`${X}-listbox`:void 0,"aria-expanded":yt,autoComplete:"off",ref:ne,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:f}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:eo}),getItemProps:({index:ge=0}={})=>({...v&&{key:ge},...re?{"data-item-index":ge}:{"data-tag-index":ge},tabIndex:-1,...!G&&{onDelete:v?Zl(ge):Ii}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Vt}),getTagProps:({index:ge})=>({key:ge,"data-tag-index":ge,tabIndex:-1,...!G&&{onDelete:Zl(ge)}}),getListboxProps:()=>({role:"listbox",id:`${X}-listbox`,"aria-labelledby":`${X}-label`,ref:Ot,onMouseDown:ge=>{ge.preventDefault()}}),getOptionProps:({index:ge,option:me})=>{const Fe=(v?se:[se]).some(Ye=>Ye!=null&&N(me,Ye)),Ve=C?C(me):!1;return{key:S?.(me)??U(me),tabIndex:-1,role:"option",id:`${X}-option-${ge}`,onMouseMove:Gl,onClick:Xl,onTouchStart:Ql,"data-option-index":ge,"aria-disabled":Ve,"aria-selected":Fe}},id:X,inputValue:ve,value:se,dirty:Ai,expanded:je&&Y,popupOpen:je,focused:De||ee!==-1,anchorEl:Y,setAnchorEl:le,focusedItem:ee,focusedTag:ee,groupedOptions:Qa}}var mn="top",jn="bottom",$n="right",gn="left",$d="auto",Wa=[mn,jn,$n,gn],ci="start",Da="end",p8="clippingParents",yb="viewport",zi="popper",f8="reference",rm=Wa.reduce(function(e,t){return e.concat([t+"-"+ci,t+"-"+Da])},[]),xb=[].concat(Wa,[$d]).reduce(function(e,t){return e.concat([t,t+"-"+ci,t+"-"+Da])},[]),h8="beforeRead",m8="read",g8="afterRead",b8="beforeMain",y8="main",x8="afterMain",E8="beforeWrite",C8="write",T8="afterWrite",v8=[h8,m8,g8,b8,y8,x8,E8,C8,T8];function dr(e){return e?(e.nodeName||"").toLowerCase():null}function wn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function So(e){var t=wn(e).Element;return e instanceof t||e instanceof Element}function _n(e){var t=wn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Hd(e){if(typeof ShadowRoot>"u")return!1;var t=wn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function S8(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!_n(i)||!dr(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function k8(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!_n(o)||!dr(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const D8={name:"applyStyles",enabled:!0,phase:"write",fn:S8,effect:k8,requires:["computeStyles"]};function cr(e){return e.split("-")[0]}var bo=Math.max,al=Math.min,di=Math.round;function Oc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Eb(){return!/^((?!chrome|android).)*safari/i.test(Oc())}function pi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&_n(e)&&(o=e.offsetWidth>0&&di(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&di(r.height)/e.offsetHeight||1);var a=So(e)?wn(e):window,s=a.visualViewport,l=!Eb()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,c=(r.top+(l&&s?s.offsetTop:0))/i,p=r.width/o,h=r.height/i;return{width:p,height:h,top:c,right:u+p,bottom:c+h,left:u,x:u,y:c}}function Ud(e){var t=pi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Cb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Hd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ar(e){return wn(e).getComputedStyle(e)}function w8(e){return["table","td","th"].indexOf(dr(e))>=0}function Jr(e){return((So(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hl(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(Hd(e)?e.host:null)||Jr(e)}function om(e){return!_n(e)||Ar(e).position==="fixed"?null:e.offsetParent}function I8(e){var t=/firefox/i.test(Oc()),n=/Trident/i.test(Oc());if(n&&_n(e)){var r=Ar(e);if(r.position==="fixed")return null}var o=Hl(e);for(Hd(o)&&(o=o.host);_n(o)&&["html","body"].indexOf(dr(o))<0;){var i=Ar(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function qa(e){for(var t=wn(e),n=om(e);n&&w8(n)&&Ar(n).position==="static";)n=om(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Ar(n).position==="static")?t:n||I8(e)||t}function zd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ha(e,t,n){return bo(e,al(t,n))}function A8(e,t,n){var r=ha(e,t,n);return r>n?n:r}function Tb(){return{top:0,right:0,bottom:0,left:0}}function vb(e){return Object.assign({},Tb(),e)}function Sb(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var P8=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,vb(typeof t!="number"?t:Sb(t,Wa))};function R8(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=cr(n.placement),l=zd(s),u=[gn,$n].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!a)){var p=P8(o.padding,n),h=Ud(i),f=l==="y"?mn:gn,m=l==="y"?jn:$n,g=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],y=a[l]-n.rects.reference[l],x=qa(i),E=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,C=g/2-y/2,S=p[f],k=E-h[c]-p[m],T=E/2-h[c]/2+C,O=ha(S,T,k),F=l;n.modifiersData[r]=(t={},t[F]=O,t.centerOffset=O-T,t)}}function M8(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Cb(t.elements.popper,o)&&(t.elements.arrow=o))}const O8={name:"arrow",enabled:!0,phase:"main",fn:R8,effect:M8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fi(e){return e.split("-")[1]}var L8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N8(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:di(n*o)/o||0,y:di(r*o)/o||0}}function im(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,p=e.isFixed,h=a.x,f=h===void 0?0:h,m=a.y,g=m===void 0?0:m,y=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=y.x,g=y.y;var x=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),C=gn,S=mn,k=window;if(u){var T=qa(n),O="clientHeight",F="clientWidth";if(T===wn(n)&&(T=Jr(n),Ar(T).position!=="static"&&s==="absolute"&&(O="scrollHeight",F="scrollWidth")),T=T,o===mn||(o===gn||o===$n)&&i===Da){S=jn;var B=p&&T===k&&k.visualViewport?k.visualViewport.height:T[O];g-=B-r.height,g*=l?1:-1}if(o===gn||(o===mn||o===jn)&&i===Da){C=$n;var R=p&&T===k&&k.visualViewport?k.visualViewport.width:T[F];f-=R-r.width,f*=l?1:-1}}var N=Object.assign({position:s},u&&L8),v=c===!0?N8({x:f,y:g},wn(n)):{x:f,y:g};if(f=v.x,g=v.y,l){var L;return Object.assign({},N,(L={},L[S]=E?"0":"",L[C]=x?"0":"",L.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",L))}return Object.assign({},N,(t={},t[S]=E?g+"px":"",t[C]=x?f+"px":"",t.transform="",t))}function F8(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:cr(t.placement),variation:fi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,im(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,im(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _8={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:F8,data:{}};var ds={passive:!0};function B8(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=wn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,ds)}),s&&l.addEventListener("resize",n.update,ds),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,ds)}),s&&l.removeEventListener("resize",n.update,ds)}}const j8={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:B8,data:{}};var $8={left:"right",right:"left",bottom:"top",top:"bottom"};function Ds(e){return e.replace(/left|right|bottom|top/g,function(t){return $8[t]})}var H8={start:"end",end:"start"};function am(e){return e.replace(/start|end/g,function(t){return H8[t]})}function Vd(e){var t=wn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wd(e){return pi(Jr(e)).left+Vd(e).scrollLeft}function U8(e,t){var n=wn(e),r=Jr(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=Eb();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Wd(e),y:l}}function z8(e){var t,n=Jr(e),r=Vd(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=bo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=bo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Wd(e),l=-r.scrollTop;return Ar(o||n).direction==="rtl"&&(s+=bo(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function qd(e){var t=Ar(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function kb(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:_n(e)&&qd(e)?e:kb(Hl(e))}function ma(e,t){var n;t===void 0&&(t=[]);var r=kb(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=wn(r),a=o?[i].concat(i.visualViewport||[],qd(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(ma(Hl(a)))}function Lc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function V8(e,t){var n=pi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function sm(e,t,n){return t===yb?Lc(U8(e,n)):So(t)?V8(t,n):Lc(z8(Jr(e)))}function W8(e){var t=ma(Hl(e)),n=["absolute","fixed"].indexOf(Ar(e).position)>=0,r=n&&_n(e)?qa(e):e;return So(r)?t.filter(function(o){return So(o)&&Cb(o,r)&&dr(o)!=="body"}):[]}function q8(e,t,n,r){var o=t==="clippingParents"?W8(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,u){var c=sm(e,u,r);return l.top=bo(c.top,l.top),l.right=al(c.right,l.right),l.bottom=al(c.bottom,l.bottom),l.left=bo(c.left,l.left),l},sm(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Db(e){var t=e.reference,n=e.element,r=e.placement,o=r?cr(r):null,i=r?fi(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case mn:l={x:a,y:t.y-n.height};break;case jn:l={x:a,y:t.y+t.height};break;case $n:l={x:t.x+t.width,y:s};break;case gn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?zd(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case ci:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Da:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function wa(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?p8:s,u=n.rootBoundary,c=u===void 0?yb:u,p=n.elementContext,h=p===void 0?zi:p,f=n.altBoundary,m=f===void 0?!1:f,g=n.padding,y=g===void 0?0:g,x=vb(typeof y!="number"?y:Sb(y,Wa)),E=h===zi?f8:zi,C=e.rects.popper,S=e.elements[m?E:h],k=q8(So(S)?S:S.contextElement||Jr(e.elements.popper),l,c,a),T=pi(e.elements.reference),O=Db({reference:T,element:C,placement:o}),F=Lc(Object.assign({},C,O)),B=h===zi?F:T,R={top:k.top-B.top+x.top,bottom:B.bottom-k.bottom+x.bottom,left:k.left-B.left+x.left,right:B.right-k.right+x.right},N=e.modifiersData.offset;if(h===zi&&N){var v=N[o];Object.keys(R).forEach(function(L){var I=[$n,jn].indexOf(L)>=0?1:-1,A=[mn,jn].indexOf(L)>=0?"y":"x";R[L]+=v[A]*I})}return R}function Y8(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?xb:l,c=fi(r),p=c?s?rm:rm.filter(function(m){return fi(m)===c}):Wa,h=p.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=p);var f=h.reduce(function(m,g){return m[g]=wa(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[cr(g)],m},{});return Object.keys(f).sort(function(m,g){return f[m]-f[g]})}function K8(e){if(cr(e)===$d)return[];var t=Ds(e);return[am(e),t,am(t)]}function G8(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,p=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,m=f===void 0?!0:f,g=n.allowedAutoPlacements,y=t.options.placement,x=cr(y),E=x===y,C=l||(E||!m?[Ds(y)]:K8(y)),S=[y].concat(C).reduce(function(ae,X){return ae.concat(cr(X)===$d?Y8(t,{placement:X,boundary:c,rootBoundary:p,padding:u,flipVariations:m,allowedAutoPlacements:g}):X)},[]),k=t.rects.reference,T=t.rects.popper,O=new Map,F=!0,B=S[0],R=0;R<S.length;R++){var N=S[R],v=cr(N),L=fi(N)===ci,I=[mn,jn].indexOf(v)>=0,A=I?"width":"height",M=wa(t,{placement:N,boundary:c,rootBoundary:p,altBoundary:h,padding:u}),V=I?L?$n:gn:L?jn:mn;k[A]>T[A]&&(V=Ds(V));var W=Ds(V),H=[];if(i&&H.push(M[v]<=0),s&&H.push(M[V]<=0,M[W]<=0),H.every(function(ae){return ae})){B=N,F=!1;break}O.set(N,H)}if(F)for(var w=m?3:1,G=function(X){var U=S.find(function(J){var Q=O.get(J);if(Q)return Q.slice(0,X).every(function(ne){return ne})});if(U)return B=U,"break"},re=w;re>0;re--){var _=G(re);if(_==="break")break}t.placement!==B&&(t.modifiersData[r]._skip=!0,t.placement=B,t.reset=!0)}}const Q8={name:"flip",enabled:!0,phase:"main",fn:G8,requiresIfExists:["offset"],data:{_skip:!1}};function lm(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function um(e){return[mn,$n,jn,gn].some(function(t){return e[t]>=0})}function X8(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=wa(t,{elementContext:"reference"}),s=wa(t,{altBoundary:!0}),l=lm(a,r),u=lm(s,o,i),c=um(l),p=um(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}const Z8={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:X8};function J8(e,t,n){var r=cr(e),o=[gn,mn].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[gn,$n].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function eO(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=xb.reduce(function(c,p){return c[p]=J8(p,t.rects,i),c},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const tO={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eO};function nO(e){var t=e.state,n=e.name;t.modifiersData[n]=Db({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const rO={name:"popperOffsets",enabled:!0,phase:"read",fn:nO,data:{}};function oO(e){return e==="x"?"y":"x"}function iO(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,p=n.padding,h=n.tether,f=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,y=wa(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:c}),x=cr(t.placement),E=fi(t.placement),C=!E,S=zd(x),k=oO(S),T=t.modifiersData.popperOffsets,O=t.rects.reference,F=t.rects.popper,B=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,R=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,v={x:0,y:0};if(T){if(i){var L,I=S==="y"?mn:gn,A=S==="y"?jn:$n,M=S==="y"?"height":"width",V=T[S],W=V+y[I],H=V-y[A],w=f?-F[M]/2:0,G=E===ci?O[M]:F[M],re=E===ci?-F[M]:-O[M],_=t.elements.arrow,ae=f&&_?Ud(_):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Tb(),U=X[I],J=X[A],Q=ha(0,O[M],ae[M]),ne=C?O[M]/2-w-Q-U-R.mainAxis:G-Q-U-R.mainAxis,Z=C?-O[M]/2+w+Q+J+R.mainAxis:re+Q+J+R.mainAxis,Y=t.elements.arrow&&qa(t.elements.arrow),le=Y?S==="y"?Y.clientTop||0:Y.clientLeft||0:0,ee=(L=N?.[S])!=null?L:0,te=V+ne-ee-le,xe=V+Z-ee,pe=ha(f?al(W,te):W,V,f?bo(H,xe):H);T[S]=pe,v[S]=pe-V}if(s){var be,se=S==="x"?mn:gn,Re=S==="x"?jn:$n,ve=T[k],ze=k==="y"?"height":"width",De=ve+y[se],Tt=ve-y[Re],at=[mn,gn].indexOf(x)!==-1,qe=(be=N?.[k])!=null?be:0,ce=at?De:ve-O[ze]-F[ze]-qe+R.altAxis,Ce=at?ve+O[ze]+F[ze]-qe-R.altAxis:Tt,Oe=f&&at?A8(ce,ve,Ce):ha(f?ce:De,ve,f?Ce:Tt);T[k]=Oe,v[k]=Oe-ve}t.modifiersData[r]=v}}const aO={name:"preventOverflow",enabled:!0,phase:"main",fn:iO,requiresIfExists:["offset"]};function sO(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lO(e){return e===wn(e)||!_n(e)?Vd(e):sO(e)}function uO(e){var t=e.getBoundingClientRect(),n=di(t.width)/e.offsetWidth||1,r=di(t.height)/e.offsetHeight||1;return n!==1||r!==1}function cO(e,t,n){n===void 0&&(n=!1);var r=_n(t),o=_n(t)&&uO(t),i=Jr(t),a=pi(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||qd(i))&&(s=lO(t)),_n(t)?(l=pi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Wd(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function dO(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function pO(e){var t=dO(e);return v8.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function fO(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hO(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cm={placement:"bottom",modifiers:[],strategy:"absolute"};function dm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function mO(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?cm:o;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},cm,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],h=!1,f={state:c,setOptions:function(x){var E=typeof x=="function"?x(c.options):x;g(),c.options=Object.assign({},i,c.options,E),c.scrollParents={reference:So(s)?ma(s):s.contextElement?ma(s.contextElement):[],popper:ma(l)};var C=pO(hO([].concat(r,c.options.modifiers)));return c.orderedModifiers=C.filter(function(S){return S.enabled}),m(),f.update()},forceUpdate:function(){if(!h){var x=c.elements,E=x.reference,C=x.popper;if(dm(E,C)){c.rects={reference:cO(E,qa(C),c.options.strategy==="fixed"),popper:Ud(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(R){return c.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var k=c.orderedModifiers[S],T=k.fn,O=k.options,F=O===void 0?{}:O,B=k.name;typeof T=="function"&&(c=T({state:c,options:F,name:B,instance:f})||c)}}}},update:fO(function(){return new Promise(function(y){f.forceUpdate(),y(c)})}),destroy:function(){g(),h=!0}};if(!dm(s,l))return f;f.setOptions(u).then(function(y){!h&&u.onFirstUpdate&&u.onFirstUpdate(y)});function m(){c.orderedModifiers.forEach(function(y){var x=y.name,E=y.options,C=E===void 0?{}:E,S=y.effect;if(typeof S=="function"){var k=S({state:c,name:x,instance:f,options:C}),T=function(){};p.push(k||T)}})}function g(){p.forEach(function(y){return y()}),p=[]}return f}}var gO=[j8,rO,_8,D8,tO,Q8,aO,O8,Z8],bO=mO({defaultModifiers:gO});function yO(e){return _e("MuiPopper",e)}Me("MuiPopper",["root"]);function xO(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Nc(e){return typeof e=="function"?e():e}function EO(e){return e.nodeType!==void 0}const CO=e=>{const{classes:t}=e;return Ne({root:["root"]},yO,t)},TO={},vO=D.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:u,popperOptions:c,popperRef:p,slotProps:h={},slots:f={},TransitionProps:m,ownerState:g,...y}=t,x=D.useRef(null),E=rt(x,n),C=D.useRef(null),S=rt(C,p),k=D.useRef(S);qt(()=>{k.current=S},[S]),D.useImperativeHandle(p,()=>C.current,[]);const T=xO(u,i),[O,F]=D.useState(T),[B,R]=D.useState(Nc(r));D.useEffect(()=>{C.current&&C.current.forceUpdate()}),D.useEffect(()=>{r&&R(Nc(r))},[r]),qt(()=>{if(!B||!l)return;const A=W=>{F(W.placement)};let M=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{A(W)}}];s!=null&&(M=M.concat(s)),c&&c.modifiers!=null&&(M=M.concat(c.modifiers));const V=bO(B,x.current,{placement:T,...c,modifiers:M});return k.current(V),()=>{V.destroy(),k.current(null)}},[B,a,s,l,c,T]);const N={placement:O};m!==null&&(N.TransitionProps=m);const v=CO(t),L=f.root??"div",I=nt({elementType:L,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:E},ownerState:t,className:v.root});return d.jsx(L,{...I,children:typeof o=="function"?o(N):o})}),SO=D.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:c,placement:p="bottom",popperOptions:h=TO,popperRef:f,style:m,transition:g=!1,slotProps:y={},slots:x={},...E}=t,[C,S]=D.useState(!0),k=()=>{S(!1)},T=()=>{S(!0)};if(!l&&!c&&(!g||C))return null;let O;if(i)O=i;else if(r){const R=Nc(r);O=R&&EO(R)?Ut(R).body:Ut(null).body}const F=!c&&l&&(!g||C)?"none":void 0,B=g?{in:c,onEnter:k,onExited:T}:void 0;return d.jsx(J1,{disablePortal:s,container:O,children:d.jsx(vO,{anchorEl:r,direction:a,disablePortal:s,modifiers:u,ref:n,open:g?!C:c,placement:p,popperOptions:h,popperRef:f,slotProps:y,slots:x,...E,style:{position:"fixed",top:0,left:0,display:F,...m},TransitionProps:B,children:o})})}),kO=oe(SO,{name:"MuiPopper",slot:"Root"})({}),Yd=D.forwardRef(function(t,n){const r=zn(),o=Ke({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:u,disablePortal:c,keepMounted:p,modifiers:h,open:f,placement:m,popperOptions:g,popperRef:y,transition:x,slots:E,slotProps:C,...S}=o,k=E?.root??s?.Root,T={anchorEl:i,container:u,disablePortal:c,keepMounted:p,modifiers:h,open:f,placement:m,popperOptions:g,popperRef:y,transition:x,...S};return d.jsx(kO,{as:a,direction:r?"rtl":"ltr",slots:{root:k},slotProps:C??l,...T,ref:n})});function DO(e){return _e("MuiListSubheader",e)}Me("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const wO=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${ke(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return Ne(a,DO,t)},IO=oe("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${ke(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Ze(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Fc=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1,...c}=r,p={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:u},h=wO(p);return d.jsx(IO,{as:a,className:Ae(h.root,o),ref:n,ownerState:p,...c})});Fc&&(Fc.muiSkipListHighlight=!0);const AO=lt(d.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function PO(e){return _e("MuiChip",e)}const ot=Me("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),RO=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,u={root:["root",l,n&&"disabled",`size${ke(r)}`,`color${ke(o)}`,s&&"clickable",s&&`clickableColor${ke(o)}`,a&&"deletable",a&&`deletableColor${ke(o)}`,`${l}${ke(o)}`],label:["label",`label${ke(r)}`],avatar:["avatar",`avatar${ke(r)}`,`avatarColor${ke(o)}`],icon:["icon",`icon${ke(r)}`,`iconColor${ke(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ke(r)}`,`deleteIconColor${ke(o)}`,`deleteIcon${ke(l)}Color${ke(o)}`]};return Ne(u,PO,t)},MO=oe("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${ot.avatar}`]:t.avatar},{[`& .${ot.avatar}`]:t[`avatar${ke(s)}`]},{[`& .${ot.avatar}`]:t[`avatarColor${ke(r)}`]},{[`& .${ot.icon}`]:t.icon},{[`& .${ot.icon}`]:t[`icon${ke(s)}`]},{[`& .${ot.icon}`]:t[`iconColor${ke(o)}`]},{[`& .${ot.deleteIcon}`]:t.deleteIcon},{[`& .${ot.deleteIcon}`]:t[`deleteIcon${ke(s)}`]},{[`& .${ot.deleteIcon}`]:t[`deleteIconColor${ke(r)}`]},{[`& .${ot.deleteIcon}`]:t[`deleteIcon${ke(l)}Color${ke(r)}`]},t.root,t[`size${ke(s)}`],t[`color${ke(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${ke(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${ke(r)}`],t[l],t[`${l}${ke(r)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${ot.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ot.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${ot.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${ot.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${ot.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${ot.icon}`]:{marginLeft:5,marginRight:-6},[`& .${ot.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${ot.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${ot.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(sn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${ot.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${ot.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${ot.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${ot.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(sn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${ot.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${ot.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(sn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${ot.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${ot.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ot.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${ot.avatar}`]:{marginLeft:4},[`& .${ot.avatarSmall}`]:{marginLeft:2},[`& .${ot.icon}`]:{marginLeft:4},[`& .${ot.iconSmall}`]:{marginLeft:2},[`& .${ot.deleteIcon}`]:{marginRight:5},[`& .${ot.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(sn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${ot.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${ot.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${ot.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),OO=oe("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ke(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function pm(e){return e.key==="Backspace"||e.key==="Delete"}const wb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:u,disabled:c=!1,icon:p,label:h,onClick:f,onDelete:m,onKeyDown:g,onKeyUp:y,size:x="medium",variant:E="filled",tabIndex:C,skipFocusWhenDisabled:S=!1,slots:k={},slotProps:T={},...O}=r,F=D.useRef(null),B=rt(F,n),R=U=>{U.stopPropagation(),m&&m(U)},N=U=>{U.currentTarget===U.target&&pm(U)&&U.preventDefault(),g&&g(U)},v=U=>{U.currentTarget===U.target&&m&&pm(U)&&m(U),y&&y(U)},L=a!==!1&&f?!0:a,I=L||m?To:l||"div",A={...r,component:I,disabled:c,size:x,color:s,iconColor:D.isValidElement(p)&&p.props.color||s,onDelete:!!m,clickable:L,variant:E},M=RO(A),V=I===To?{component:l||"div",focusVisibleClassName:M.focusVisible,...m&&{disableRipple:!0}}:{};let W=null;m&&(W=u&&D.isValidElement(u)?D.cloneElement(u,{className:Ae(u.props.className,M.deleteIcon),onClick:R}):d.jsx(AO,{className:M.deleteIcon,onClick:R}));let H=null;o&&D.isValidElement(o)&&(H=D.cloneElement(o,{className:Ae(M.avatar,o.props.className)}));let w=null;p&&D.isValidElement(p)&&(w=D.cloneElement(p,{className:Ae(M.icon,p.props.className)}));const G={slots:k,slotProps:T},[re,_]=st("root",{elementType:MO,externalForwardedProps:{...G,...O},ownerState:A,shouldForwardComponentProp:!0,ref:B,className:Ae(M.root,i),additionalProps:{disabled:L&&c?!0:void 0,tabIndex:S&&c?-1:C,...V},getSlotProps:U=>({...U,onClick:J=>{U.onClick?.(J),f?.(J)},onKeyDown:J=>{U.onKeyDown?.(J),N(J)},onKeyUp:J=>{U.onKeyUp?.(J),v(J)}})}),[ae,X]=st("label",{elementType:OO,externalForwardedProps:G,ownerState:A,className:M.label});return d.jsxs(re,{as:I,..._,children:[H||w,d.jsx(ae,{...X,children:h}),W]})}),LO=lt(d.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function NO(e){return _e("MuiAutocomplete",e)}const Xe=Me("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var fm,hm;const FO=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e,p={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${ke(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ne(p,NO,t)},_O=oe("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${Xe.tag}`]:t.tag},{[`& .${Xe.tag}`]:t[`tagSize${ke(s)}`]},{[`& .${Xe.inputRoot}`]:t.inputRoot},{[`& .${Xe.input}`]:t.input},{[`& .${Xe.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Xe.focused} .${Xe.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Xe.clearIndicator}`]:{visibility:"visible"}},[`& .${Xe.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Xe.inputRoot}`]:{[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:30},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:56},[`& .${Xe.input}`]:{width:0,minWidth:30}},[`& .${Vr.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Vr.root}.${Tn.sizeSmall}`]:{[`& .${Vr.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Rn.root}`]:{padding:9,[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:39},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:65},[`& .${Xe.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Xe.endAdornment}`]:{right:9}},[`& .${Rn.root}.${Tn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Xe.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${vn.root}`]:{paddingTop:19,paddingLeft:8,[`.${Xe.hasPopupIcon}&, .${Xe.hasClearIcon}&`]:{paddingRight:39},[`.${Xe.hasPopupIcon}.${Xe.hasClearIcon}&`]:{paddingRight:65},[`& .${vn.input}`]:{padding:"7px 4px"},[`& .${Xe.endAdornment}`]:{right:9}},[`& .${vn.root}.${Tn.sizeSmall}`]:{paddingBottom:1,[`& .${vn.input}`]:{padding:"2.5px 4px"}},[`& .${Tn.hiddenLabel}`]:{paddingTop:8},[`& .${vn.root}.${Tn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Xe.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${vn.root}.${Tn.hiddenLabel}.${Tn.sizeSmall}`]:{[`& .${Xe.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Xe.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Xe.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Xe.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Xe.inputRoot}`]:{flexWrap:"wrap"}}}]}),BO=oe("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),jO=oe(er,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),$O=oe(er,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),HO=oe(Yd,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Xe.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),UO=oe(Ao,{name:"MuiAutocomplete",slot:"Paper"})(Ze(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),zO=oe("div",{name:"MuiAutocomplete",slot:"Loading"})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),VO=oe("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),WO=oe("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Ze(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Xe.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Xe.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Xe.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Xe.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Xe.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),qO=oe(Fc,{name:"MuiAutocomplete",slot:"GroupLabel"})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),YO=oe("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Xe.option}`]:{paddingLeft:24}}),_c=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:u,clearIcon:c=fm||(fm=d.jsx(LO,{fontSize:"small"})),clearOnBlur:p=!r.freeSolo,clearOnEscape:h=!1,clearText:f="Clear",closeText:m="Close",componentsProps:g,defaultValue:y=r.multiple?[]:null,disableClearable:x=!1,disableCloseOnSelect:E=!1,disabled:C=!1,disabledItemsFocusable:S=!1,disableListWrap:k=!1,disablePortal:T=!1,filterOptions:O,filterSelectedOptions:F=!1,forcePopupIcon:B="auto",freeSolo:R=!1,fullWidth:N=!1,getLimitTagsText:v=pt=>`+${pt}`,getOptionDisabled:L,getOptionKey:I,getOptionLabel:A,isOptionEqualToValue:M,groupBy:V,handleHomeEndKeys:W=!r.freeSolo,id:H,includeInputInList:w=!1,inputValue:G,limitTags:re=-1,ListboxComponent:_,ListboxProps:ae,loading:X=!1,loadingText:U="Loading…",multiple:J=!1,noOptionsText:Q="No options",onChange:ne,onClose:Z,onHighlightChange:Y,onInputChange:le,onOpen:ee,open:te,openOnFocus:xe=!1,openText:pe="Open",options:be,PaperComponent:se,PopperComponent:Re,popupIcon:ve=hm||(hm=d.jsx(fb,{})),readOnly:ze=!1,renderGroup:De,renderInput:Tt,renderOption:at,renderTags:qe,renderValue:ce,selectOnFocus:Ce=!r.freeSolo,size:Oe="medium",slots:He={},slotProps:je={},value:Le,...Je}=r,{getRootProps:yt,getInputProps:ht,getInputLabelProps:ue,getPopupIndicatorProps:ye,getClearProps:Te,getItemProps:Be,getListboxProps:We,getOptionProps:Dt,value:Ot,dirty:Et,expanded:zt,id:In,popupOpen:wt,focused:Jt,focusedItem:gr,anchorEl:An,setAnchorEl:eo,inputValue:Yn,groupedOptions:br}=d8({...r,componentName:"Autocomplete"}),Mo=!x&&!C&&Et&&!ze,wi=(!R||B===!0)&&B!==!1,{onMouseDown:Gl}=ht(),{ref:Ql,...Xl}=We(),Ii=A||(pt=>pt.label??pt),Vt={...r,disablePortal:T,expanded:zt,focused:Jt,fullWidth:N,getOptionLabel:Ii,hasClearIcon:Mo,hasPopupIcon:wi,inputFocused:gr===-1,popupOpen:wt,size:Oe},Yt=FO(Vt),_r={slots:{paper:se,popper:Re,...He},slotProps:{chip:l,listbox:ae,...g,...je}},[Jl,Ai]=st("listbox",{elementType:WO,externalForwardedProps:_r,ownerState:Vt,className:Yt.listbox,additionalProps:Xl,ref:Ql}),[Qa,ge]=st("paper",{elementType:Ao,externalForwardedProps:_r,ownerState:Vt,className:Yt.paper}),[me,Fe]=st("popper",{elementType:Yd,externalForwardedProps:_r,ownerState:Vt,className:Yt.popper,additionalProps:{disablePortal:T,style:{width:An?An.clientWidth:null},role:"presentation",anchorEl:An,open:wt}});let Ve;const Ye=pt=>({className:Yt.tag,disabled:C,...Be(pt)});if(J?Ot.length>0&&(qe?Ve=qe(Ot,Ye,Vt):ce?Ve=ce(Ot,Ye,Vt):Ve=Ot.map((pt,Br)=>{const{key:jr,...Pi}=Ye({index:Br});return d.jsx(wb,{label:Ii(pt),size:Oe,...Pi,..._r.slotProps.chip},jr)})):ce&&Ot!=null&&(Ve=ce(Ot,Ye,Vt)),re>-1&&Array.isArray(Ve)){const pt=Ve.length-re;!Jt&&pt>0&&(Ve=Ve.splice(0,re),Ve.push(d.jsx("span",{className:Yt.tag,children:v(pt)},Ve.length)))}const _t=De||(pt=>d.jsxs("li",{children:[d.jsx(qO,{className:Yt.groupLabel,ownerState:Vt,component:"div",children:pt.group}),d.jsx(YO,{className:Yt.groupUl,ownerState:Vt,children:pt.children})]},pt.key)),Xa=at||((pt,Br)=>{const{key:jr,...Pi}=pt;return d.jsx("li",{...Pi,children:Ii(Br)},jr)}),hp=(pt,Br)=>{const jr=Dt({option:pt,index:Br});return Xa({...jr,className:Yt.option},pt,{selected:jr["aria-selected"],index:Br,inputValue:Yn},Vt)},mp=_r.slotProps.clearIndicator,gp=_r.slotProps.popupIndicator;return d.jsxs(D.Fragment,{children:[d.jsx(_O,{ref:n,className:Ae(Yt.root,u),ownerState:Vt,...yt(Je),children:Tt({id:In,disabled:C,fullWidth:!0,size:Oe==="small"?"small":void 0,InputLabelProps:ue(),InputProps:{ref:eo,className:Yt.inputRoot,startAdornment:Ve,onMouseDown:pt=>{pt.target===pt.currentTarget&&Gl(pt)},...(Mo||wi)&&{endAdornment:d.jsxs(BO,{className:Yt.endAdornment,ownerState:Vt,children:[Mo?d.jsx(jO,{...Te(),"aria-label":f,title:f,ownerState:Vt,...mp,className:Ae(Yt.clearIndicator,mp?.className),children:c}):null,wi?d.jsx($O,{...ye(),disabled:C,"aria-label":wt?m:pe,title:wt?m:pe,ownerState:Vt,...gp,className:Ae(Yt.popupIndicator,gp?.className),children:ve}):null]})}},inputProps:{className:Yt.input,disabled:C,readOnly:ze,...ht()}})}),An?d.jsx(HO,{as:me,...Fe,children:d.jsxs(UO,{as:Qa,...ge,children:[X&&br.length===0?d.jsx(zO,{className:Yt.loading,ownerState:Vt,children:U}):null,br.length===0&&!R&&!X?d.jsx(VO,{className:Yt.noOptions,ownerState:Vt,role:"presentation",onMouseDown:pt=>{pt.preventDefault()},children:Q}):null,br.length>0?d.jsx(Jl,{as:_,...Ai,children:br.map((pt,Br)=>V?_t({key:pt.key,group:pt.group,children:pt.options.map((jr,Pi)=>hp(jr,pt.index+Pi))}):hp(pt,Br))}):null]})}):null]})});var ws={exports:{}},KO=ws.exports,mm;function GO(){return mm||(mm=1,(function(e,t){(function(n,r){e.exports=r()})(KO,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",u="day",c="week",p="month",h="quarter",f="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var A=["th","st","nd","rd"],M=I%100;return"["+I+(A[(M-20)%10]||A[M]||A[0])+"]"}},C=function(I,A,M){var V=String(I);return!V||V.length>=A?I:""+Array(A+1-V.length).join(M)+I},S={s:C,z:function(I){var A=-I.utcOffset(),M=Math.abs(A),V=Math.floor(M/60),W=M%60;return(A<=0?"+":"-")+C(V,2,"0")+":"+C(W,2,"0")},m:function I(A,M){if(A.date()<M.date())return-I(M,A);var V=12*(M.year()-A.year())+(M.month()-A.month()),W=A.clone().add(V,p),H=M-W<0,w=A.clone().add(V+(H?-1:1),p);return+(-(V+(M-W)/(H?W-w:w-W))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:p,y:f,w:c,d:u,D:m,h:l,m:s,s:a,ms:i,Q:h}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},k="en",T={};T[k]=E;var O="$isDayjsObject",F=function(I){return I instanceof v||!(!I||!I[O])},B=function I(A,M,V){var W;if(!A)return k;if(typeof A=="string"){var H=A.toLowerCase();T[H]&&(W=H),M&&(T[H]=M,W=H);var w=A.split("-");if(!W&&w.length>1)return I(w[0])}else{var G=A.name;T[G]=A,W=G}return!V&&W&&(k=W),W||!V&&k},R=function(I,A){if(F(I))return I.clone();var M=typeof A=="object"?A:{};return M.date=I,M.args=arguments,new v(M)},N=S;N.l=B,N.i=F,N.w=function(I,A){return R(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var v=(function(){function I(M){this.$L=B(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[O]=!0}var A=I.prototype;return A.parse=function(M){this.$d=(function(V){var W=V.date,H=V.utc;if(W===null)return new Date(NaN);if(N.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var w=W.match(y);if(w){var G=w[2]-1||0,re=(w[7]||"0").substring(0,3);return H?new Date(Date.UTC(w[1],G,w[3]||1,w[4]||0,w[5]||0,w[6]||0,re)):new Date(w[1],G,w[3]||1,w[4]||0,w[5]||0,w[6]||0,re)}}return new Date(W)})(M),this.init()},A.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},A.$utils=function(){return N},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(M,V){var W=R(M);return this.startOf(V)<=W&&W<=this.endOf(V)},A.isAfter=function(M,V){return R(M)<this.startOf(V)},A.isBefore=function(M,V){return this.endOf(V)<R(M)},A.$g=function(M,V,W){return N.u(M)?this[V]:this.set(W,M)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(M,V){var W=this,H=!!N.u(V)||V,w=N.p(M),G=function(ne,Z){var Y=N.w(W.$u?Date.UTC(W.$y,Z,ne):new Date(W.$y,Z,ne),W);return H?Y:Y.endOf(u)},re=function(ne,Z){return N.w(W.toDate()[ne].apply(W.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(Z)),W)},_=this.$W,ae=this.$M,X=this.$D,U="set"+(this.$u?"UTC":"");switch(w){case f:return H?G(1,0):G(31,11);case p:return H?G(1,ae):G(0,ae+1);case c:var J=this.$locale().weekStart||0,Q=(_<J?_+7:_)-J;return G(H?X-Q:X+(6-Q),ae);case u:case m:return re(U+"Hours",0);case l:return re(U+"Minutes",1);case s:return re(U+"Seconds",2);case a:return re(U+"Milliseconds",3);default:return this.clone()}},A.endOf=function(M){return this.startOf(M,!1)},A.$set=function(M,V){var W,H=N.p(M),w="set"+(this.$u?"UTC":""),G=(W={},W[u]=w+"Date",W[m]=w+"Date",W[p]=w+"Month",W[f]=w+"FullYear",W[l]=w+"Hours",W[s]=w+"Minutes",W[a]=w+"Seconds",W[i]=w+"Milliseconds",W)[H],re=H===u?this.$D+(V-this.$W):V;if(H===p||H===f){var _=this.clone().set(m,1);_.$d[G](re),_.init(),this.$d=_.set(m,Math.min(this.$D,_.daysInMonth())).$d}else G&&this.$d[G](re);return this.init(),this},A.set=function(M,V){return this.clone().$set(M,V)},A.get=function(M){return this[N.p(M)]()},A.add=function(M,V){var W,H=this;M=Number(M);var w=N.p(V),G=function(ae){var X=R(H);return N.w(X.date(X.date()+Math.round(ae*M)),H)};if(w===p)return this.set(p,this.$M+M);if(w===f)return this.set(f,this.$y+M);if(w===u)return G(1);if(w===c)return G(7);var re=(W={},W[s]=r,W[l]=o,W[a]=n,W)[w]||1,_=this.$d.getTime()+M*re;return N.w(_,this)},A.subtract=function(M,V){return this.add(-1*M,V)},A.format=function(M){var V=this,W=this.$locale();if(!this.isValid())return W.invalidDate||g;var H=M||"YYYY-MM-DDTHH:mm:ssZ",w=N.z(this),G=this.$H,re=this.$m,_=this.$M,ae=W.weekdays,X=W.months,U=W.meridiem,J=function(Z,Y,le,ee){return Z&&(Z[Y]||Z(V,H))||le[Y].slice(0,ee)},Q=function(Z){return N.s(G%12||12,Z,"0")},ne=U||function(Z,Y,le){var ee=Z<12?"AM":"PM";return le?ee.toLowerCase():ee};return H.replace(x,(function(Z,Y){return Y||(function(le){switch(le){case"YY":return String(V.$y).slice(-2);case"YYYY":return N.s(V.$y,4,"0");case"M":return _+1;case"MM":return N.s(_+1,2,"0");case"MMM":return J(W.monthsShort,_,X,3);case"MMMM":return J(X,_);case"D":return V.$D;case"DD":return N.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return J(W.weekdaysMin,V.$W,ae,2);case"ddd":return J(W.weekdaysShort,V.$W,ae,3);case"dddd":return ae[V.$W];case"H":return String(G);case"HH":return N.s(G,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ne(G,re,!0);case"A":return ne(G,re,!1);case"m":return String(re);case"mm":return N.s(re,2,"0");case"s":return String(V.$s);case"ss":return N.s(V.$s,2,"0");case"SSS":return N.s(V.$ms,3,"0");case"Z":return w}return null})(Z)||w.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(M,V,W){var H,w=this,G=N.p(V),re=R(M),_=(re.utcOffset()-this.utcOffset())*r,ae=this-re,X=function(){return N.m(w,re)};switch(G){case f:H=X()/12;break;case p:H=X();break;case h:H=X()/3;break;case c:H=(ae-_)/6048e5;break;case u:H=(ae-_)/864e5;break;case l:H=ae/o;break;case s:H=ae/r;break;case a:H=ae/n;break;default:H=ae}return W?H:N.a(H)},A.daysInMonth=function(){return this.endOf(p).$D},A.$locale=function(){return T[this.$L]},A.locale=function(M,V){if(!M)return this.$L;var W=this.clone(),H=B(M,V,!0);return H&&(W.$L=H),W},A.clone=function(){return N.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),L=v.prototype;return R.prototype=L,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",u],["$M",p],["$y",f],["$D",m]].forEach((function(I){L[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),R.extend=function(I,A){return I.$i||(I(A,v,R),I.$i=!0),R},R.locale=B,R.isDayjs=F,R.unix=function(I){return R(1e3*I)},R.en=T[k],R.Ls=T,R.p={},R}))})(ws)),ws.exports}var QO=GO();const bt=Xn(QO);var Is={exports:{}},XO=Is.exports,gm;function ZO(){return gm||(gm=1,(function(e,t){(function(n,r){e.exports=r()})(XO,(function(){var n="week",r="year";return function(o,i,a){var s=i.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=a(this).startOf(r).add(1,r).date(u),p=a(this).endOf(n);if(c.isBefore(p))return 1}var h=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?a(this).startOf("week").week():Math.ceil(f)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(Is)),Is.exports}var JO=ZO();const eL=Xn(JO);var As={exports:{}},tL=As.exports,bm;function nL(){return bm||(bm=1,(function(e,t){(function(n,r){e.exports=r()})(tL,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},c=function(y){return function(x){this[y]=+x}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(x){if(!x||x==="Z")return 0;var E=x.match(/([+-]|\d\d)/g),C=60*E[1]+(+E[2]||0);return C===0?0:E[0]==="+"?-C:C})(y)}],h=function(y){var x=l[y];return x&&(x.indexOf?x:x.s.concat(x.f))},f=function(y,x){var E,C=l.meridiem;if(C){for(var S=1;S<=24;S+=1)if(y.indexOf(C(S,0,x))>-1){E=S>12;break}}else E=y===(x?"pm":"PM");return E},m={A:[s,function(y){this.afternoon=f(y,!1)}],a:[s,function(y){this.afternoon=f(y,!0)}],Q:[o,function(y){this.month=3*(y-1)+1}],S:[o,function(y){this.milliseconds=100*+y}],SS:[i,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[i,c("day")],Do:[s,function(y){var x=l.ordinal,E=y.match(/\d+/);if(this.day=E[0],x)for(var C=1;C<=31;C+=1)x(C).replace(/\[|\]/g,"")===y&&(this.day=C)}],w:[a,c("week")],ww:[i,c("week")],M:[a,c("month")],MM:[i,c("month")],MMM:[s,function(y){var x=h("months"),E=(h("monthsShort")||x.map((function(C){return C.slice(0,3)}))).indexOf(y)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[s,function(y){var x=h("months").indexOf(y)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(y){this.year=u(y)}],YYYY:[/\d{4}/,c("year")],Z:p,ZZ:p};function g(y){var x,E;x=y,E=l&&l.formats;for(var C=(y=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,N,v){var L=v&&v.toUpperCase();return N||E[v]||n[v]||E[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(I,A,M){return A||M.slice(1)}))}))).match(r),S=C.length,k=0;k<S;k+=1){var T=C[k],O=m[T],F=O&&O[0],B=O&&O[1];C[k]=B?{regex:F,parser:B}:T.replace(/^\[|\]$/g,"")}return function(R){for(var N={},v=0,L=0;v<S;v+=1){var I=C[v];if(typeof I=="string")L+=I.length;else{var A=I.regex,M=I.parser,V=R.slice(L),W=A.exec(V)[0];M.call(N,W),R=R.replace(W,"")}}return(function(H){var w=H.afternoon;if(w!==void 0){var G=H.hours;w?G<12&&(H.hours+=12):G===12&&(H.hours=0),delete H.afternoon}})(N),N}}return function(y,x,E){E.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var C=x.prototype,S=C.parse;C.parse=function(k){var T=k.date,O=k.utc,F=k.args;this.$u=O;var B=F[1];if(typeof B=="string"){var R=F[2]===!0,N=F[3]===!0,v=R||N,L=F[2];N&&(L=F[2]),l=this.$locale(),!R&&L&&(l=E.Ls[L]),this.$d=(function(V,W,H,w){try{if(["x","X"].indexOf(W)>-1)return new Date((W==="X"?1e3:1)*V);var G=g(W)(V),re=G.year,_=G.month,ae=G.day,X=G.hours,U=G.minutes,J=G.seconds,Q=G.milliseconds,ne=G.zone,Z=G.week,Y=new Date,le=ae||(re||_?1:Y.getDate()),ee=re||Y.getFullYear(),te=0;re&&!_||(te=_>0?_-1:Y.getMonth());var xe,pe=X||0,be=U||0,se=J||0,Re=Q||0;return ne?new Date(Date.UTC(ee,te,le,pe,be,se,Re+60*ne.offset*1e3)):H?new Date(Date.UTC(ee,te,le,pe,be,se,Re)):(xe=new Date(ee,te,le,pe,be,se,Re),Z&&(xe=w(xe).week(Z).toDate()),xe)}catch{return new Date("")}})(T,B,O,E),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),v&&T!=this.format(B)&&(this.$d=new Date("")),l={}}else if(B instanceof Array)for(var I=B.length,A=1;A<=I;A+=1){F[1]=B[A-1];var M=E.apply(this,F);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}A===I&&(this.$d=new Date(""))}else S.call(this,k)}}}))})(As)),As.exports}var rL=nL();const oL=Xn(rL);var Ps={exports:{}},iL=Ps.exports,ym;function aL(){return ym||(ym=1,(function(e,t){(function(n,r){e.exports=r()})(iL,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var a=o.prototype,s=a.format;i.en.formats=n,a.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,c=(function(p,h){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,m,g){var y=g&&g.toUpperCase();return m||h[g]||n[g]||h[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(x,E,C){return E||C.slice(1)}))}))})(l,u===void 0?{}:u);return s.call(this,c)}}}))})(Ps)),Ps.exports}var sL=aL();const lL=Xn(sL);var Rs={exports:{}},uL=Rs.exports,xm;function cL(){return xm||(xm=1,(function(e,t){(function(n,r){e.exports=r()})(uL,(function(){return function(n,r,o){r.prototype.isBetween=function(i,a,s,l){var u=o(i),c=o(a),p=(l=l||"()")[0]==="(",h=l[1]===")";return(p?this.isAfter(u,s):!this.isBefore(u,s))&&(h?this.isBefore(c,s):!this.isAfter(c,s))||(p?this.isBefore(u,s):!this.isAfter(u,s))&&(h?this.isAfter(c,s):!this.isBefore(c,s))}}}))})(Rs)),Rs.exports}var dL=cL();const pL=Xn(dL);var Ms={exports:{}},fL=Ms.exports,Em;function hL(){return Em||(Em=1,(function(e,t){(function(n,r){e.exports=r()})(fL,(function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(p){switch(p){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),p==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),p==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return p}}));return i.bind(this)(c)}}}))})(Ms)),Ms.exports}var mL=hL();const gL=Xn(mL);bt.extend(lL);bt.extend(eL);bt.extend(pL);bt.extend(gL);const bL={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},yL={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Hu=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
195
+ `),Cm=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
196
+ `),xL=(e,t)=>t?(...n)=>e(...n).locale(t):e;class Bc{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=bL,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof bt.utc<"u",this.hasTimezonePlugin=()=>typeof bt.tz<"u",this.isSame=(r,o,i)=>{const a=this.setTimezone(o,this.getTimezone(r));return r.format(i)===a.format(i)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return bt.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=bt.tz.guess();return o!=="UTC"?bt.tz(r,o):bt(r)}return bt(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(Hu);return bt.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(Hu);if(!this.hasTimezonePlugin())throw new Error(Cm);const i=r!==void 0&&!r.endsWith("Z");return bt(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=bt.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(i=r.en),i.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const i=r.tz(this.cleanTimezone(o),!0);if(i.$offset===(r.$offset??0))return r;r.$offset=i.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let i;return o==="UTC"?i=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(r):i=this.createTZDate(r,o),this.locale===void 0?i:i.locale(this.locale)},this.getInvalidDate=()=>bt(new Date("Invalid date")),this.getTimezone=r=>{if(this.hasTimezonePlugin()){const o=r.$x?.$timezone;if(o)return o}return this.hasUTCPlugin()&&r.isUTC()?"UTC":"system"},this.setTimezone=(r,o)=>{if(this.getTimezone(r)===o)return r;if(o==="UTC"){if(!this.hasUTCPlugin())throw new Error(Hu);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(Cm)}return bt.tz(r,this.cleanTimezone(o))},this.toJsDate=r=>r.toDate(),this.parse=(r,o)=>r===""?null:this.dayjs(r,o,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=r=>{const o=this.getLocaleFormats(),i=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,s,l)=>{const u=l&&l.toUpperCase();return s||o[l]||i(o[u])})},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>this.dayjs(r).format(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:r.toDate().getTime()===o.toDate().getTime(),this.isSameYear=(r,o)=>this.isSame(r,o,"YYYY"),this.isSameMonth=(r,o)=>this.isSame(r,o,"YYYY-MM"),this.isSameDay=(r,o)=>this.isSame(r,o,"YYYY-MM-DD"),this.isSameHour=(r,o)=>r.isSame(o,"hour"),this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()>o.utc():r.isAfter(o,"year"),this.isAfterDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()>o.utc():r.isAfter(o,"day"),this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()<o.utc():r.isBefore(o,"year"),this.isBeforeDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()<o.utc():r.isBefore(o,"day"),this.isWithinRange=(r,[o,i])=>r>=o&&r<=i,this.startOfYear=r=>this.adjustOffset(r.startOf("year")),this.startOfMonth=r=>this.adjustOffset(r.startOf("month")),this.startOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).startOf("week")),this.startOfDay=r=>this.adjustOffset(r.startOf("day")),this.endOfYear=r=>this.adjustOffset(r.endOf("year")),this.endOfMonth=r=>this.adjustOffset(r.endOf("month")),this.endOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).endOf("week")),this.endOfDay=r=>this.adjustOffset(r.endOf("day")),this.addYears=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"year"):r.add(o,"year")),this.addMonths=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"month"):r.add(o,"month")),this.addWeeks=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"week"):r.add(o,"week")),this.addDays=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"day"):r.add(o,"day")),this.addHours=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"hour"):r.add(o,"hour")),this.addMinutes=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"minute"):r.add(o,"minute")),this.addSeconds=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"second"):r.add(o,"second")),this.getYear=r=>r.year(),this.getMonth=r=>r.month(),this.getDate=r=>r.date(),this.getHours=r=>r.hour(),this.getMinutes=r=>r.minute(),this.getSeconds=r=>r.second(),this.getMilliseconds=r=>r.millisecond(),this.setYear=(r,o)=>this.adjustOffset(r.set("year",o)),this.setMonth=(r,o)=>this.adjustOffset(r.set("month",o)),this.setDate=(r,o)=>this.adjustOffset(r.set("date",o)),this.setHours=(r,o)=>this.adjustOffset(r.set("hour",o)),this.setMinutes=(r,o)=>this.adjustOffset(r.set("minute",o)),this.setSeconds=(r,o)=>this.adjustOffset(r.set("second",o)),this.setMilliseconds=(r,o)=>this.adjustOffset(r.set("millisecond",o)),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r));let a=0,s=o;const l=[];for(;s<i;){const u=Math.floor(a/7);l[u]=l[u]||[],l[u].push(s),s=this.addDays(s,1),a+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.dayjs=xL(bt,t),this.locale=t,this.formats=$({},yL,n),bt.extend(oL)}getDayOfWeek(t){return t.day()+1}}function EL(e,t,n,r,o){const[i,a]=D.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return qt(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const CL={...D},Ib=CL.useSyncExternalStore;function TL(e,t,n,r,o){const i=D.useCallback(()=>t,[t]),a=D.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:c}=r(e);return()=>c}return i},[i,e,r,o,n]),[s,l]=D.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const c=n(e);return[()=>c.matches,p=>(c.addEventListener("change",p),()=>{c.removeEventListener("change",p)})]},[i,n,e]);return Ib(l,s,a)}function Ab(e={}){const{themeId:t}=e;return function(r,o={}){let i=n0();i&&t&&(i=i[t]||i);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=a?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:c=!1}=q1({name:"MuiUseMediaQuery",props:o,theme:i});let p=typeof r=="function"?r(i):r;return p=p.replace(/^@media( ?)/m,""),p.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
197
+ `)),(Ib!==void 0?TL:EL)(p,s,l,u,c)}}Ab();const Pb=Ab({themeId:hi}),vL={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Vi=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),SL=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},sl=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},ga=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=sl(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,o)&&(u=o,c=null),a.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&a.isAfter(u,r)&&(u=null),c&&a.isBefore(c,o)&&(c=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(c){if(!i(c))return c;c=a.addDays(c,-1)}}return null},kL=(e,t)=>t==null||!e.isValid(t)?null:t,Hn=(e,t,n)=>t==null||!e.isValid(t)?n:t,DL=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Kd=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},Rb=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),wL=["year","month","day"],Tm=e=>wL.includes(e),Gd=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Vi(n,["year"])?o.year:Vi(n,["month"])?o.month:Vi(n,["day"])?o.dayOfMonth:Vi(n,["month","year"])?`${o.month} ${o.year}`:Vi(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},IL=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},AL=["hours","minutes","seconds"],PL=e=>AL.includes(e),vm=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),RL=(e,t)=>(n,r)=>e?t.isAfter(n,r):vm(n,t)>vm(r,t),sr={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},ML=e=>Math.max(...e.map(t=>sr[t.type]??1)),Wi=(e,t,n)=>{if(t===sr.year)return e.startOfYear(n);if(t===sr.month)return e.startOfMonth(n);if(t===sr.day)return e.startOfDay(n);let r=n;return t<sr.minutes&&(r=e.setMinutes(r,0)),t<sr.seconds&&(r=e.setSeconds(r,0)),t<sr.milliseconds&&(r=e.setMilliseconds(r,0)),r},OL=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Wi(t,n,Rb(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=Wi(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=Wi(t,n,e.maxDate));const a=RL(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=Wi(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:sl(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=Wi(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:sl(t,i,e.maxTime))),i},Mb=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
198
+ `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},LL=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Ul=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},Ob=(e,t,n,r)=>{switch(n){case"month":return Kd(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Ul(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},Sm="s",NL=["0","1","2","3","4","5","6","7","8","9"],FL=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),Sm)==="0"?NL:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),Sm))},ko=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},Qd=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),km=(e,t)=>{const n=ko(e,t);return n!==" "&&!Number.isNaN(Number(n))},Lb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},Nb=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Lb(i,o.maxLength)),Qd(i,r)},_L=(e,t,n,r,o,i,a,s)=>{const l=LL(r),u=r==="Home",c=r==="End",p=n.value===""||u||c,h=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=E=>Nb(e,E,m,i,n),y=n.type==="minutes"&&s?.minutesStep?s.minutesStep:1;let x;if(p){if(n.type==="year"&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);l>0||u?x=m.minimum:x=m.maximum}else x=parseInt(ko(n.value,i),10)+l*y;return x%y!==0&&((l<0||u)&&(x+=y-(y+x)%y),(l>0||c)&&(x-=x%y)),x>m.maximum?g(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x<m.minimum?g(m.maximum-(m.minimum-x-1)%(m.maximum-m.minimum+1)):g(x)},f=()=>{const m=Ob(e,t,n.type,n.format);if(m.length===0)return n.value;if(p)return l>0||u?m[0]:m[m.length-1];const x=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[x]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?h():f()},Xd=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(ko(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},Dm=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),BL=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,Fb=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return e.lib==="dayjs"&&r==="YY"?!0:e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},jL=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<t.length;l+=1){const u=t[l];r&&u.type==="weekDay"||(o.push(u.format),i.push(Xd(u,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)},$L=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),HL=(e,t,n)=>{const o=e.map(i=>{const a=Xd(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},UL=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=Kd(e,r).reduce((l,u)=>{const c=e.getDaysInMonth(u);return c>l.maxDaysInMonth?{maxDaysInMonth:c,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:BL(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const c=Ul(e,l).map(Number);return{minimum:Math.min(...c),maximum:Math.max(...c)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=e.getHours(i);return ko(e.formatByString(e.endOfDay(r),l),t)!==u.toString()?{minimum:1,maximum:Number(ko(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},zL=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=Ul(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},wm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Im=(e,t,n,r,o)=>[...n].sort((i,a)=>wm[i.type]-wm[a.type]).reduce((i,a)=>!o||a.modified?zL(e,a,t,i):i,r),VL=()=>navigator.userAgent.toLowerCase().includes("android"),WL=(e,t)=>{const n={};if(!t)return e.forEach((l,u)=>{const c=u===0?null:u-1,p=u===e.length-1?null:u+1;n[u]={leftIndex:c,rightIndex:p}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,u)=>u>=i&&l.endSeparator?.includes(" ")&&l.endSeparator!==" / "),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,u)=>{const c=o[u],p=c===0?null:r[c-1],h=c===e.length-1?null:r[c+1];n[u]={leftIndex:p,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},jc=(e,t)=>{if(e==null)return null;if(e==="all")return"all";if(typeof e=="string"){const n=t.findIndex(r=>r.type===e);return n===-1?null:n}return e},qL=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},YL=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},KL=["value","referenceDate"],pr={emptyValue:null,getTodayValue:Rb,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=$e(e,KL);return t!=null&&r.utils.isValid(t)?t:n??OL(r)},cleanValue:kL,areValuesEqual:DL,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},GL={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:$L,getV6InputValueFromSections:HL,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},QL=["localeText"],$c=D.createContext(null),ll=function(t){const{localeText:n}=t,r=$e(t,QL),{utils:o,localeText:i}=D.useContext($c)??{utils:void 0,localeText:void 0},a=kt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:c,adapterLocale:p,localeText:h}=a,f=D.useMemo(()=>$({},h,i,n),[h,i,n]),m=D.useMemo(()=>{if(!l)return o||null;const x=new l({locale:p,formats:u,instance:c});if(!x.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
199
+ `));return x},[l,p,u,c,o]),g=D.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),y=D.useMemo(()=>({utils:m,defaultDates:g,localeText:f}),[g,m,f]);return d.jsx($c.Provider,{value:y,children:s})},XL=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:$({},e)}}}}),_b=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Bb={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},ZL=Bb;XL(Bb);const Po=()=>{const e=D.useContext($c);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
200
+ `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
201
+ `));const t=D.useMemo(()=>$({},ZL,e.localeText),[e.localeText]);return D.useMemo(()=>$({},e,{localeText:t}),[e,t])},At=()=>Po().utils,Ya=()=>Po().defaultDates,zl=e=>{const t=At(),n=D.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function JL(e){return _e("MuiPickersToolbar",e)}Me("MuiPickersToolbar",["root","content"]);const eN=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],tN=e=>{const{classes:t}=e;return Ne({root:["root"],content:["content"]},JL,t)},nN=oe("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),rN=oe("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),oN=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,u=$e(r,eN),c=r,p=tN(c);return s?null:d.jsxs(nN,$({ref:n,className:Ae(p.root,i),ownerState:c},u,{children:[d.jsx(ft,{color:"text.secondary",variant:"overline",id:l,children:a}),d.jsx(rN,{className:p.content,ownerState:c,children:o})]}))}),Fr=()=>Po().localeText;function iN(e){return _e("MuiDatePickerToolbar",e)}Me("MuiDatePickerToolbar",["root","title"]);const aN=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],sN=e=>{const{classes:t}=e;return Ne({root:["root"],title:["title"]},iN,t)},lN=oe(oN,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),uN=oe(ft,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),cN=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:u}=r,c=$e(r,aN),p=At(),h=Fr(),f=sN(r),m=D.useMemo(()=>{if(!o)return s;const y=Gd(p,{format:a,views:l},!0);return p.formatByString(o,y)},[o,a,s,p,l]),g=r;return d.jsx(lN,$({ref:n,toolbarTitle:h.datePickerToolbarTitle,isLandscape:i,className:Ae(f.root,u)},c,{children:d.jsx(uN,{variant:"h4",align:i?"left":"center",ownerState:g,className:f.title,children:m})}))});function jb(e,t){const n=At(),r=Ya(),o=kt({props:e,name:t}),i=D.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:$({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return $({},o,{localeText:i},SL({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Hn(n,o.minDate,r.minDate),maxDate:Hn(n,o.maxDate,r.maxDate),slots:$({toolbar:cN},o.slots)})}const Ka=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=Hn(r.utils,e.minDate,r.defaultDates.minDate),p=Hn(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(p&&r.utils.isAfterDay(t,p)):return"maxDate";default:return null}};Ka.valueManager=pr;const $b=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],dN=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],pN=["minDateTime","maxDateTime"],fN=[...$b,...dN,...pN],Hb=e=>fN.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function Ub(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Po(),s=D.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);D.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const c=Pe(p=>n({adapter:a,value:p,timezone:o,props:t}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:c}}function hN(e){return _e("MuiInputAdornment",e)}const Am=Me("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Pm;const mN=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ke(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},gN=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${ke(o)}`,a,r&&"hiddenLabel",i&&`size${ke(i)}`]};return Ne(s,hN,t)},bN=oe("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:mN})(Ze(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Am.positionStart}&:not(.${Am.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),zb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:c,...p}=r,h=qn()||{};let f=c;c&&h.variant,h&&!f&&(f=h.variant);const m={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:f},g=gN(m);return d.jsx(Fl.Provider,{value:null,children:d.jsx(bN,{as:a,ownerState:m,className:Ae(g.root,i),ref:n,...p,children:typeof o=="string"&&!l?d.jsx(ft,{color:"textSecondary",children:o}):d.jsxs(D.Fragment,{children:[u==="start"?Pm||(Pm=d.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function yN(e){return _e("MuiPickersPopper",e)}Me("MuiPickersPopper",["root","paper"]);function xN(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const EN=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},hn=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?hn(t.shadowRoot):t:null},CN="@media (pointer: fine)",TN="@media (prefers-reduced-motion: reduce)",ti=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Rm=ti&&ti[1]?parseInt(ti[1],10):null,Mm=ti&&ti[2]?parseInt(ti[2],10):null,vN=Rm&&Rm<10||Mm&&Mm<13||!1,Vb=()=>Pb(TN,{defaultMatches:!1})||vN,SN=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],kN=e=>{const{classes:t}=e;return Ne({root:["root"],paper:["paper"]},yN,t)},DN=oe(Yd,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),wN=oe(Ao,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function IN(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function AN(e,t){const n=D.useRef(!1),r=D.useRef(!1),o=D.useRef(null),i=D.useRef(!1);D.useEffect(()=>{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Pe(l=>{if(!i.current)return;const u=r.current;r.current=!1;const c=Ut(o.current);if(!o.current||"clientX"in l&&IN(l,c))return;if(n.current){n.current=!1;return}let p;l.composedPath?p=l.composedPath().indexOf(o.current)>-1:p=!c.documentElement.contains(l.target)||o.current.contains(l.target),!p&&!u&&t(l)}),s=()=>{r.current=!0};return D.useEffect(()=>{if(e){const l=Ut(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",u)}}},[e,a]),D.useEffect(()=>{if(e){const l=Ut(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const PN=D.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:u}=e,c=$e(e,SN),p=$({},o,{placement:r}),h=nt({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:p});return d.jsx(n,$({},c,h,{onClick:f=>{l(f),h.onClick?.(f)},onTouchStart:f=>{u(f),h.onTouchStart?.(f)},ownerState:p,children:i}))});function RN(e){const t=kt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:u,placement:c,slots:p,slotProps:h,reduceAnimations:f}=t;D.useEffect(()=>{function A(M){l&&M.key==="Escape"&&s()}return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[s,l]);const m=D.useRef(null);D.useEffect(()=>{u==="tooltip"||i&&!i()||(l?m.current=hn(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,u,i]);const[g,y,x]=AN(l,a??s),E=D.useRef(null),C=rt(E,o),S=rt(C,g),k=t,T=kN(k),O=Vb(),F=f??O,B=A=>{A.key==="Escape"&&(A.stopPropagation(),s())},R=p?.desktopTransition??F?vo:va,N=p?.desktopTrapFocus??Z1,v=p?.desktopPaper??wN,L=p?.popper??DN,I=nt({elementType:L,externalSlotProps:h?.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:c,onKeyDown:B},className:T.root,ownerState:t});return d.jsx(L,$({},I,{children:({TransitionProps:A,placement:M})=>d.jsx(N,$({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},h?.desktopTrapFocus,{children:d.jsx(R,$({},A,h?.desktopTransition,{children:d.jsx(PN,{PaperComponent:v,ownerState:k,popperPlacement:M,ref:S,onPaperClick:y,onPaperTouchStart:x,paperClasses:T.paper,paperSlotProps:h?.desktopPaper,children:r})}))}))}))}const MN=({open:e,onOpen:t,onClose:n})=>{const r=D.useRef(typeof e=="boolean").current,[o,i]=D.useState(!1);D.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=D.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Zd=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const a=At(),s=D.useRef(n),l=t??s.current??i.emptyValue,u=D.useMemo(()=>i.getTimezone(a,l),[a,i,l]),c=Pe(m=>u==null?m:i.setTimezone(a,u,m));let p;e?p=e:u?p=u:r?p=a.getTimezone(r):p="default";const h=D.useMemo(()=>i.setTimezone(a,p,l),[i,a,p,l]),f=Pe((m,...g)=>{const y=c(m);o?.(y,...g)});return{value:h,handleValueChange:f,timezone:p}},Jd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=kn({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=Pe((c,...p)=>{l(c),i?.(c,...p)});return Zd({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:a})},ON=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},LN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},NN=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},FN=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:c,referenceDate:p}=e,{current:h}=D.useRef(l),{current:f}=D.useRef(s!==void 0),[m,g]=D.useState(c),y=At(),x=Po(),{isOpen:E,setIsOpen:C}=MN(e),{timezone:S,value:k,handleValueChange:T}=Zd({timezone:c,value:s,defaultValue:h,referenceDate:p,onChange:a,valueManager:t}),[O,F]=D.useState(()=>{let ne;return k!==void 0?ne=k:h!==void 0?ne=h:ne=t.emptyValue,{draft:ne,lastPublishedValue:ne,lastCommittedValue:ne,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),B=t.getTimezone(y,O.draft);m!==c&&(g(c),c&&B&&c!==B&&F(ne=>$({},ne,{draft:t.setTimezone(y,c,ne.draft)})));const{getValidationErrorForNewValue:R}=Ub({props:e,validator:o,timezone:S,value:O.draft,onError:e.onError}),N=Pe(ne=>{const Z={action:ne,dateState:O,hasChanged:pe=>!t.areValuesEqual(y,ne.value,pe),isControlled:f,closeOnSelect:u},Y=ON(Z),le=LN(Z),ee=NN(Z);F(pe=>$({},pe,{draft:ne.value,lastPublishedValue:Y?ne.value:pe.lastPublishedValue,lastCommittedValue:le?ne.value:pe.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let te=null;const xe=()=>(te||(te={validationError:ne.name==="setValueFromField"?ne.context.validationError:R(ne.value)},ne.name==="setValueFromShortcut"&&(te.shortcut=ne.shortcut)),te);Y&&T(ne.value,xe()),le&&i&&i(ne.value,xe()),ee&&C(!1)});if(O.lastControlledValue!==s){const ne=t.areValuesEqual(y,O.draft,k);F(Z=>$({},Z,{lastControlledValue:s},ne?{}:{lastCommittedValue:k,lastPublishedValue:k,draft:k,hasBeenModifiedSinceMount:!0}))}const v=Pe(()=>{N({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),L=Pe(()=>{N({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),I=Pe(()=>{N({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),A=Pe(()=>{N({value:O.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),M=Pe(()=>{N({value:t.getTodayValue(y,S,n),name:"setValueFromAction",pickerAction:"today"})}),V=Pe(ne=>{ne.preventDefault(),C(!0)}),W=Pe(ne=>{ne?.preventDefault(),C(!1)}),H=Pe((ne,Z="partial")=>N({name:"setValueFromView",value:ne,selectionState:Z})),w=Pe((ne,Z,Y)=>N({name:"setValueFromShortcut",value:ne,changeImportance:Z,shortcut:Y})),G=Pe((ne,Z)=>N({name:"setValueFromField",value:ne,context:Z})),re={onClear:v,onAccept:L,onDismiss:I,onCancel:A,onSetToday:M,onOpen:V,onClose:W},_={value:O.draft,onChange:G},ae=D.useMemo(()=>t.cleanValue(y,O.draft),[y,t,O.draft]),X={value:ae,onChange:H,onClose:W,open:E},J=$({},re,{value:ae,onChange:H,onSelectShortcut:w,isValid:ne=>{const Z=o({adapter:x,value:ne,timezone:S,props:e});return!t.hasError(Z)}}),Q=D.useMemo(()=>({onOpen:V,onClose:W,open:E}),[E,W,V]);return{open:E,fieldProps:_,viewProps:X,layoutProps:J,actions:re,contextValue:Q}};function Wb({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=D.useRef(n),u=D.useRef(o),c=D.useRef(o.includes(n)?n:o[0]),[p,h]=kn({name:"useViews",state:"view",controlled:r,default:c.current}),f=D.useRef(i?p:null),[m,g]=kn({name:"useViews",state:"focusedView",controlled:a,default:f.current});D.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(O=>!o.includes(O)))&&(h(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,h,p,o]);const y=o.indexOf(p),x=o[y-1]??null,E=o[y+1]??null,C=Pe((O,F)=>{g(F?O:B=>O===B?null:B),s?.(O,F)}),S=Pe(O=>{C(O,!0),O!==p&&(h(O),t&&t(O))}),k=Pe(()=>{E&&S(E)}),T=Pe((O,F,B)=>{const R=F==="finish",N=B?o.indexOf(B)<o.length-1:!!E;if(e(O,R&&N?"partial":F,B),B&&B!==p){const L=o[o.indexOf(B)+1];L&&S(L)}else R&&k()});return{view:p,setView:S,focusedView:m,setFocusedView:C,nextView:E,previousView:x,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:T}}const _N=["className","sx"],BN=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:p,onViewChange:h,viewRenderers:f,timezone:m}=e,g=$e(e,_N),{view:y,setView:x,defaultView:E,focusedView:C,setFocusedView:S,setValueAndGoToNextView:k}=Wb({view:u,views:c,openTo:p,onChange:a,onViewChange:h,autoFocus:r}),{hasUIView:T,viewModeLookup:O}=D.useMemo(()=>c.reduce((I,A)=>{let M;return f[A]!=null?M="UI":M="field",I.viewModeLookup[A]=M,M==="UI"&&(I.hasUIView=!0),I},{hasUIView:!1,viewModeLookup:{}}),[f,c]),F=D.useMemo(()=>c.reduce((I,A)=>f[A]!=null&&PL(A)?I+1:I,0),[f,c]),B=O[y],R=Pe(()=>B==="UI"),[N,v]=D.useState(B==="UI"?y:null);return N!==y&&O[y]==="UI"&&v(y),qt(()=>{B==="field"&&s&&(l(),setTimeout(()=>{i?.current?.setSelectedSections(y),i?.current?.focusField(y)}))},[y]),qt(()=>{if(!s)return;let I=y;B==="field"&&N!=null&&(I=N),I!==E&&O[I]==="UI"&&O[E]==="UI"&&(I=E),I!==y&&x(I),S(I,!0)},[s]),{hasUIView:T,shouldRestoreFocus:R,layoutProps:{views:c,view:N,onViewChange:x},renderCurrentView:()=>{if(N==null)return null;const I=f[N];if(I==null)return null;const A=$({},g,n,t,{views:c,timezone:m,onChange:k,view:N,onViewChange:x,focusedView:C,onFocusedViewChange:S,showViewSwitcher:F>1,timeViewsCount:F});return o?o(f,N,A):I(A)}}};function Om(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const jN=(e,t)=>{const[n,r]=D.useState(Om);return qt(()=>{const i=()=>{r(Om())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),xN(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},$N=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=jN(n.views,o),a=zn();return{layoutProps:$({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function HN(e){const{props:t,pickerValueResponse:n}=e;return D.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const qb=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const u=FN({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),c=BN({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),p=$N({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),h=HN({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:p.layoutProps,contextValue:u.contextValue,ownerState:h}};function Yb(e){return _e("MuiPickersLayout",e)}const oo=Me("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),UN=["onAccept","onClear","onCancel","onSetToday","actions"];function zN(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=$e(e,UN),s=Fr();if(i==null||i.length===0)return null;const l=i?.map(u=>{switch(u){case"clear":return d.jsx(Lt,{onClick:n,children:s.clearButtonLabel},u);case"cancel":return d.jsx(Lt,{onClick:r,children:s.cancelButtonLabel},u);case"accept":return d.jsx(Lt,{onClick:t,children:s.okButtonLabel},u);case"today":return d.jsx(Lt,{onClick:o,children:s.todayButtonLabel},u);default:return null}});return d.jsx(Lr,$({},a,{children:l}))}function VN(e){return _e("MuiListItem",e)}Me("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const WN=Me("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function qN(e){return _e("MuiListItemSecondaryAction",e)}Me("MuiListItemSecondaryAction",["root","disableGutters"]);const YN=e=>{const{disableGutters:t,classes:n}=e;return Ne({root:["root",t&&"disableGutters"]},qN,n)},KN=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Kb=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=D.useContext(Sr),s={...r,disableGutters:a.disableGutters},l=YN(s);return d.jsx(KN,{className:Ae(l.root,o),ownerState:s,ref:n,...i})});Kb.muiName="ListItemSecondaryAction";const GN=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},QN=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Ne({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},VN,n)},XN=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:GN})(Ze(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${WN.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),ZN=oe("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),JN=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:u={},ContainerComponent:c="li",ContainerProps:{className:p,...h}={},dense:f=!1,disableGutters:m=!1,disablePadding:g=!1,divider:y=!1,secondaryAction:x,slotProps:E={},slots:C={},...S}=r,k=D.useContext(Sr),T=D.useMemo(()=>({dense:f||k.dense||!1,alignItems:o,disableGutters:m}),[o,k.dense,f,m]),O=D.useRef(null),F=D.Children.toArray(i),B=F.length&&ms(F[F.length-1],["ListItemSecondaryAction"]),R={...r,alignItems:o,dense:T.dense,disableGutters:m,disablePadding:g,divider:y,hasSecondaryAction:B},N=QN(R),v=rt(O,n),L=C.root||l.Root||XN,I=E.root||u.root||{},A={className:Ae(N.root,I.className,a),...S};let M=s||"li";return B?(M=!A.component&&!s?"div":M,c==="li"&&(M==="li"?M="div":A.component==="li"&&(A.component="div")),d.jsx(Sr.Provider,{value:T,children:d.jsxs(ZN,{as:c,className:Ae(N.container,p),ref:v,ownerState:R,...h,children:[d.jsx(L,{...I,...!li(L)&&{as:M,ownerState:{...R,...I.ownerState}},...A,children:F}),F.pop()]})})):d.jsx(Sr.Provider,{value:T,children:d.jsxs(L,{...I,as:M,ref:v,...!li(L)&&{ownerState:{...R,...I.ownerState}},...A,children:[F,x&&d.jsx(Kb,{children:x})]})})}),Ia=36,Vl=2,Wl=320,eF=280,ep=336,tF=["items","changeImportance","isLandscape","onChange","isValid"],nF=["getValue"];function rF(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=$e(e,tF);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,u=$e(s,nF);const c=l({isValid:o});return $({},u,{label:u.label,onClick:()=>{r(c,n,u)},disabled:!o(c)})});return d.jsx(sb,$({dense:!0,sx:[{maxHeight:ep,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>d.jsx(JN,{children:d.jsx(wb,$({},s))},s.id??s.label))}))}function oF(e){return e.view!==null}const iF=e=>{const{classes:t,isLandscape:n}=e;return Ne({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Yb,t)},aF=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:p,isValid:h,isLandscape:f,disabled:m,readOnly:g,children:y,slots:x,slotProps:E}=e,C=iF(e),S=x?.actionBar??zN,k=nt({elementType:S,externalSlotProps:E?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:C.actionBar,ownerState:$({},e,{wrapperVariant:t})}),T=d.jsx(S,$({},k)),O=x?.toolbar,F=nt({elementType:O,externalSlotProps:E?.toolbar,additionalProps:{isLandscape:f,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:m,readOnly:g},className:C.toolbar,ownerState:$({},e,{wrapperVariant:t})}),B=oF(F)&&O?d.jsx(O,$({},F)):null,R=y,N=x?.tabs,v=a&&N?d.jsx(N,$({view:a,onViewChange:l,className:C.tabs},E?.tabs)):null,L=x?.shortcuts??rF,I=nt({elementType:L,externalSlotProps:E?.shortcuts,additionalProps:{isValid:h,isLandscape:f,onChange:p},className:C.shortcuts,ownerState:{isValid:h,isLandscape:f,onChange:p,wrapperVariant:t}}),A=a&&L?d.jsx(L,$({},I)):null;return{toolbar:B,content:R,tabs:v,actionBar:T,shortcuts:A}},sF=e=>{const{isLandscape:t,classes:n}=e;return Ne({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},Yb,n)},lF=oe("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${oo.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${oo.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${oo.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${oo.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${oo.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${oo.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${oo.shortcuts}`]:{gridColumn:3}}}]}),uF=oe("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Gb=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=aF(r),{sx:u,className:c,isLandscape:p,wrapperVariant:h}=r,f=sF(r);return d.jsxs(lF,{ref:n,sx:u,className:Ae(f.root,c),ownerState:r,children:[p?l:o,p?o:l,d.jsx(uF,{className:f.contentWrapper,children:h==="desktop"?d.jsxs(D.Fragment,{children:[i,a]}):d.jsxs(D.Fragment,{children:[a,i]})}),s]})}),cF=D.createContext(null);function Qb(e){const{contextValue:t,localeText:n,children:r}=e;return d.jsx(cF.Provider,{value:t,children:d.jsx(ll,{localeText:n,children:r})})}const dF=["props","getOpenDialogAriaText"],pF=["ownerState"],fF=["ownerState"],hF=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=$e(e,dF);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:p,onSelectedSectionsChange:h,timezone:f,name:m,label:g,inputRef:y,readOnly:x,disabled:E,autoFocus:C,localeText:S,reduceAnimations:k}=t,T=D.useRef(null),O=D.useRef(null),F=Zn(),B=i?.toolbar?.hidden??!1,{open:R,actions:N,hasUIView:v,layoutProps:L,renderCurrentView:I,shouldRestoreFocus:A,fieldProps:M,contextValue:V,ownerState:W}=qb($({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),H=o.inputAdornment??zb,w=nt({elementType:H,externalSlotProps:i?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),G=$e(w,pF),re=o.openPickerButton??er,_=nt({elementType:re,externalSlotProps:i?.openPickerButton,additionalProps:{disabled:E||x,onClick:R?N.onClose:N.onOpen,"aria-label":n(M.value),edge:G.position},ownerState:t}),ae=$e(_,fF),X=o.openPickerIcon,U=nt({elementType:X,externalSlotProps:i?.openPickerIcon,ownerState:W}),J=o.field,Q=nt({elementType:J,externalSlotProps:i?.field,additionalProps:$({},M,B&&{id:F},{readOnly:x,disabled:E,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:p,onSelectedSectionsChange:h,timezone:f,label:g,name:m,autoFocus:C&&!t.open,focused:R?!0:void 0},y?{inputRef:y}:{}),ownerState:t});v&&(Q.InputProps=$({},Q.InputProps,{ref:T},!t.disableOpenPicker&&{[`${G.position}Adornment`]:d.jsx(H,$({},G,{children:d.jsx(re,$({},ae,{children:d.jsx(X,$({},U))}))}))}));const ne=$({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},Q.slots),Z=o.layout??Gb;let Y=F;B&&(g?Y=`${F}-label`:Y=void 0);const le=$({},i,{toolbar:$({},i?.toolbar,{titleId:F}),popper:$({"aria-labelledby":Y},i?.popper)}),ee=rt(O,Q.unstableFieldRef);return{renderPicker:()=>d.jsxs(Qb,{contextValue:V,localeText:S,children:[d.jsx(J,$({},Q,{slots:ne,slotProps:le,unstableFieldRef:ee})),d.jsx(RN,$({role:"dialog",placement:"bottom-start",anchorEl:T.current},N,{open:R,slots:o,slotProps:le,shouldRestoreFocus:A,reduceAnimations:k,children:d.jsx(Z,$({},L,le?.layout,{slots:o,slotProps:le,children:I()}))}))]})}},mF=lt(d.jsx("path",{d:"M7 10l5 5 5-5z"})),gF=lt(d.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),bF=lt(d.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),yF=lt(d.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}));lt(d.jsxs(D.Fragment,{children:[d.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),d.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));lt(d.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}));lt(d.jsxs(D.Fragment,{children:[d.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),d.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));const xF=lt(d.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),EF=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},CF=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},TF=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},vF=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Mb(e,a),u=Fb(e,l.contentType,l.type,a),c=n?u:l.contentType==="digit",p=t!=null&&e.isValid(t);let h=p?e.formatByString(t,a):"",f=null;if(c)if(u)f=h===""?e.formatByString(i,a).length:h.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);f=l.maxLength,p&&(h=Qd(Lb(ko(h,o),f),o))}return $({},l,{format:a,maxLength:f,value:h,placeholder:TF(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},SF=e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((f,m)=>m.length-f.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),c=new RegExp(`^(${s.join("|")})`),p=f=>r.find(m=>m.start<=f&&m.end>=f);let h=0;for(;h<n.length;){const f=p(h),m=f!=null,g=l.exec(n.slice(h))?.[1];if(!m&&g!=null&&u.test(g)){let y=g;for(;y.length>0;){const x=c.exec(y)[1];y=y.slice(x.length),i.push(vF($({},e,{now:o,token:x,startSeparator:a}))),a=""}h+=g.length}else{const y=n[h];m&&f?.start===h||f?.end===h||(i.length===0?a+=y:i[i.length-1].endSeparator+=y),h+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},kF=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),Lm=e=>{let t=EF(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=CF($({},e,{expandedFormat:t})),r=SF($({},e,{expandedFormat:t,escapedParts:n}));return kF($({},e,{sections:r}))},DF=e=>{const t=At(),n=Fr(),r=Po(),o=zn(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:p,referenceDate:h,onChange:f,format:m,formatDensity:g="dense",selectedSections:y,onSelectedSectionsChange:x,shouldRespectLeadingZeros:E=!1,timezone:C,enableAccessibleFieldDOMStructure:S=!1}}=e,{timezone:k,value:T,handleValueChange:O}=Zd({timezone:C,value:c,defaultValue:p,referenceDate:h,onChange:f,valueManager:i}),F=D.useMemo(()=>FL(t),[t]),B=D.useMemo(()=>UL(t,F,k),[t,F,k]),R=D.useCallback((X,U=null)=>a.getSectionsFromValue(t,X,U,J=>Lm({utils:t,localeText:n,localizedDigits:F,format:m,date:J,formatDensity:g,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:S,isRtl:o})),[a,m,n,F,o,E,t,g,S]),[N,v]=D.useState(()=>{const X=R(T),U={sections:X,value:T,referenceValue:i.emptyValue,tempValueStrAndroid:null},J=ML(X),Q=i.getInitialReferenceValue({referenceDate:h,value:T,utils:t,props:u,granularity:J,timezone:k});return $({},U,{referenceValue:Q})}),[L,I]=kn({controlled:y,default:null,name:"useField",state:"selectedSections"}),A=X=>{I(X),x?.(X)},M=D.useMemo(()=>jc(L,N.sections),[L,N.sections]),V=M==="all"?0:M,W=({value:X,referenceValue:U,sections:J})=>{if(v(ne=>$({},ne,{sections:J,value:X,referenceValue:U,tempValueStrAndroid:null})),i.areValuesEqual(t,N.value,X))return;const Q={validationError:l({adapter:r,value:X,timezone:k,props:u})};O(X,Q)},H=(X,U)=>{const J=[...N.sections];return J[X]=$({},J[X],{value:U,modified:!0}),J},w=()=>{W({value:i.emptyValue,referenceValue:N.referenceValue,sections:R(i.emptyValue)})},G=()=>{if(V==null)return;const X=N.sections[V],U=a.getActiveDateManager(t,N,X),Q=U.getSections(N.sections).filter(le=>le.value!=="").length===(X.value===""?0:1),ne=H(V,""),Z=Q?null:t.getInvalidDate(),Y=U.getNewValuesFromNewActiveDate(Z);W($({},Y,{sections:ne}))},re=X=>{const U=(ne,Z)=>{const Y=t.parse(ne,m);if(Y==null||!t.isValid(Y))return null;const le=Lm({utils:t,localeText:n,localizedDigits:F,format:m,date:Y,formatDensity:g,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:S,isRtl:o});return Im(t,Y,le,Z,!1)},J=a.parseValueStr(X,N.referenceValue,U),Q=a.updateReferenceValue(t,J,N.referenceValue);W({value:J,referenceValue:Q,sections:R(J,N.sections)})},_=({activeSection:X,newSectionValue:U,shouldGoToNextSection:J})=>{J&&V<N.sections.length-1&&A(V+1);const Q=a.getActiveDateManager(t,N,X),ne=H(V,U),Z=Q.getSections(ne),Y=jL(t,Z,F);let le,ee;if(Y!=null&&t.isValid(Y)){const te=Im(t,Y,Z,Q.referenceDate,!0);le=Q.getNewValuesFromNewActiveDate(te),ee=!0}else le=Q.getNewValuesFromNewActiveDate(Y),ee=(Y!=null&&!t.isValid(Y))!=(Q.date!=null&&!t.isValid(Q.date));return ee?W($({},le,{sections:ne})):v(te=>$({},te,le,{sections:ne,tempValueStrAndroid:null}))},ae=X=>v(U=>$({},U,{tempValueStrAndroid:X}));return D.useEffect(()=>{const X=R(N.value);v(U=>$({},U,{sections:X}))},[m,t.locale,o]),D.useEffect(()=>{let X;i.areValuesEqual(t,N.value,T)?X=i.getTimezone(t,N.value)!==i.getTimezone(t,T):X=!0,X&&v(U=>$({},U,{value:T,referenceValue:a.updateReferenceValue(t,T,U.referenceValue),sections:R(T)}))},[T]),{state:N,activeSectionIndex:V,parsedSelectedSections:M,setSelectedSections:A,clearValue:w,clearActiveSection:G,updateSectionValue:_,updateValueFromValueStr:re,setTempAndroidValueStr:ae,getSectionsFromValue:R,sectionsValueBoundaries:B,localizedDigits:F,timezone:k}},wF=5e3,zo=e=>e.saveQuery!=null,IF=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=At(),[s,l]=D.useState(null),u=Pe(()=>l(null));D.useEffect(()=>{s!=null&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),D.useEffect(()=>{if(s!=null){const m=setTimeout(()=>u(),wF);return()=>{clearTimeout(m)}}return()=>{}},[s,u]);const c=({keyPressed:m,sectionIndex:g},y,x)=>{const E=m.toLowerCase(),C=e[g];if(s!=null&&(!x||x(s.value))&&s.sectionIndex===g){const k=`${s.value}${E}`,T=y(k,C);if(!zo(T))return l({sectionIndex:g,value:k,sectionType:C.type}),T}const S=y(E,C);return zo(S)&&!S.saveQuery?(u(),null):(l({sectionIndex:g,value:E,sectionType:C.type}),zo(S)?null:S)},p=m=>{const g=(E,C,S)=>{const k=C.filter(T=>T.toLowerCase().startsWith(S));return k.length===0?{saveQuery:!1}:{sectionValue:k[0],shouldGoToNextSection:k.length===1}},y=(E,C,S,k)=>{const T=O=>Ob(a,i,C.type,O);if(C.contentType==="letter")return g(C.format,T(C.format),E);if(S&&k!=null&&Mb(a,S).contentType==="letter"){const O=T(S),F=g(S,O,E);return zo(F)?{saveQuery:!1}:$({},F,{sectionValue:k(F.sectionValue,O)})}return{saveQuery:!1}};return c(m,(E,C)=>{switch(C.type){case"month":{const S=k=>Dm(a,k,a.formats.month,C.format);return y(E,C,a.formats.month,S)}case"weekDay":{const S=(k,T)=>T.indexOf(k).toString();return y(E,C,a.formats.weekday,S)}case"meridiem":return y(E,C);default:return{saveQuery:!1}}})},h=m=>{const g=(x,E)=>{const C=ko(x,r),S=Number(C),k=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(S>k.maximum)return{saveQuery:!1};if(S<k.minimum)return{saveQuery:!0};const T=S*10>k.maximum||C.length===k.maximum.toString().length;return{sectionValue:Nb(a,S,k,r,E),shouldGoToNextSection:T}};return c(m,(x,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return g(x,E);if(E.type==="month"){Fb(a,"digit","month","MM");const C=g(x,{type:E.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(zo(C))return C;const S=Dm(a,C.sectionValue,"MM",E.format);return $({},C,{sectionValue:S})}if(E.type==="weekDay"){const C=g(x,E);if(zo(C))return C;const S=Ul(a,E.format)[Number(C.sectionValue)-1];return $({},C,{sectionValue:S})}return{saveQuery:!1}},x=>km(x,r))};return{applyCharacterEditing:Pe(m=>{const g=e[m.sectionIndex],x=km(m.keyPressed,r)?h($({},m,{keyPressed:Qd(m.keyPressed,r)})):p(m);if(x==null){o(null);return}t({activeSection:g,newSectionValue:x.sectionValue,shouldGoToNextSection:x.shouldGoToNextSection})}),resetCharacterQuery:u}},AF=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:p,applyCharacterEditing:h,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:g,state:y,clearActiveSection:x,clearValue:E,updateSectionValue:C,updateValueFromValueStr:S,sectionOrder:k,areAllSectionsEmpty:T,sectionsValueBoundaries:O}=e,F=D.useRef(null),B=rt(r,F),R=Fr(),N=At(),v=Zn(),[L,I]=D.useState(!1),A=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;const ee=document.getSelection();if(!ee)return;if(g==null){ee.rangeCount>0&&F.current.getRoot().contains(ee.getRangeAt(0).startContainer)&&ee.removeAllRanges(),L&&F.current.getRoot().blur();return}if(!F.current.getRoot().contains(hn(document)))return;const te=new window.Range;let xe;g==="all"?xe=F.current.getRoot():y.sections[g].type==="empty"?xe=F.current.getSectionContainer(g):xe=F.current.getSectionContent(g),te.selectNodeContents(xe),xe.focus(),ee.removeAllRanges(),ee.addRange(te)},getActiveSectionIndexFromDOM:()=>{const ee=hn(document);return!ee||!F.current||!F.current.getRoot().contains(ee)?null:F.current.getSectionIndexFromDOMElement(ee)},focusField:(ee=0)=>{if(!F.current||A.getActiveSectionIndexFromDOM()!=null)return;const te=jc(ee,y.sections);I(!0),F.current.getSectionContent(te).focus()},setSelectedSections:ee=>{if(!F.current)return;const te=jc(ee,y.sections);I((te==="all"?0:te)!==null),m(ee)},isFieldFocused:()=>{const ee=hn(document);return!!F.current&&F.current.getRoot().contains(ee)}}),[g,m,y.sections,L]),M=Pe(ee=>{if(!F.current)return;const te=y.sections[ee];F.current.getSectionContent(ee).innerHTML=te.value||te.placeholder,A.syncSelectionToDOM()}),V=Pe((ee,...te)=>{ee.isDefaultPrevented()||!F.current||(I(!0),i?.(ee,...te),g==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){m(k.startIndex);return}let pe=0,be=0;for(;be<xe&&pe<y.sections.length;){const se=y.sections[pe];pe+=1,be+=`${se.startSeparator}${se.value||se.placeholder}${se.endSeparator}`.length}m(pe-1)}):L?F.current.getRoot().contains(ee.target)||m(k.startIndex):(I(!0),m(k.startIndex)))}),W=Pe(ee=>{if(s?.(ee),!F.current||g!=="all")return;const xe=ee.target.textContent??"";F.current.getRoot().innerHTML=y.sections.map(pe=>`${pe.startSeparator}${pe.value||pe.placeholder}${pe.endSeparator}`).join(""),A.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(f(),E(),m("all")):xe.length>1?S(xe):(g==="all"&&m(0),h({keyPressed:xe,sectionIndex:0}))}),H=Pe(ee=>{if(l?.(ee),n||g!=="all"){ee.preventDefault();return}const te=ee.clipboardData.getData("text");ee.preventDefault(),f(),S(te)}),w=Pe((...ee)=>{if(a?.(...ee),L||!F.current)return;I(!0),F.current.getSectionIndexFromDOMElement(hn(document))!=null||m(k.startIndex)}),G=Pe((...ee)=>{o?.(...ee),setTimeout(()=>{if(!F.current)return;const te=hn(document);!F.current.getRoot().contains(te)&&(I(!1),m(null))})}),re=Pe(ee=>te=>{te.isDefaultPrevented()||m(ee)}),_=Pe(ee=>{ee.preventDefault()}),ae=Pe(ee=>()=>{m(ee)}),X=Pe(ee=>{if(ee.preventDefault(),n||t||typeof g!="number")return;const te=y.sections[g],xe=ee.clipboardData.getData("text"),pe=/^[a-zA-Z]+$/.test(xe),be=/^[0-9]+$/.test(xe),se=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);te.contentType==="letter"&&pe||te.contentType==="digit"&&be||te.contentType==="digit-with-letter"&&se?(f(),C({activeSection:te,newSectionValue:xe,shouldGoToNextSection:!0})):!pe&&!be&&(f(),S(xe))}),U=Pe(ee=>{ee.preventDefault(),ee.dataTransfer.dropEffect="none"}),J=Pe(ee=>{if(!F.current)return;const te=ee.target,xe=te.textContent??"",pe=F.current.getSectionIndexFromDOMElement(te),be=y.sections[pe];if(n||!F.current){M(pe);return}if(xe.length===0){if(be.value===""){M(pe);return}const se=ee.nativeEvent.inputType;if(se==="insertParagraph"||se==="insertLineBreak"){M(pe);return}f(),x();return}h({keyPressed:xe,sectionIndex:pe}),M(pe)});qt(()=>{if(!(!L||!F.current)){if(g==="all")F.current.getRoot().focus();else if(typeof g=="number"){const ee=F.current.getSectionContent(g);ee&&ee.focus()}}},[g,L]);const Q=D.useMemo(()=>y.sections.reduce((ee,te)=>(ee[te.type]=O[te.type]({currentDate:null,contentType:te.contentType,format:te.format}),ee),{}),[O,y.sections]),ne=g==="all",Z=D.useMemo(()=>y.sections.map((ee,te)=>{const xe=!ne&&!t&&!n;return{container:{"data-sectionindex":te,onClick:re(te)},content:{tabIndex:ne||te>0?-1:0,contentEditable:!ne&&!t&&!n,role:"spinbutton",id:`${v}-${ee.type}`,"aria-labelledby":`${v}-${ee.type}`,"aria-readonly":n,"aria-valuenow":YL(ee,N),"aria-valuemin":Q[ee.type].minimum,"aria-valuemax":Q[ee.type].maximum,"aria-valuetext":ee.value?qL(ee,N):R.empty,"aria-label":R[ee.type],"aria-disabled":t,spellCheck:xe?!1:void 0,autoCapitalize:xe?"off":void 0,autoCorrect:xe?"off":void 0,[parseInt(D.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:ee.value||ee.placeholder,onInput:J,onPaste:X,onFocus:ae(te),onDragOver:U,onMouseUp:_,inputMode:ee.contentType==="letter"?"text":"numeric"},before:{children:ee.startSeparator},after:{children:ee.endSeparator}}}),[y.sections,ae,X,U,J,re,_,t,n,ne,R,N,Q,v]),Y=Pe(ee=>{S(ee.target.value)}),le=D.useMemo(()=>T?"":p.getV7HiddenInputValueFromSections(y.sections),[T,y.sections,p]);return D.useEffect(()=>{if(F.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
202
+ `));c&&F.current&&F.current.getSectionContent(k.startIndex).focus()},[]),{interactions:A,returnedValue:{autoFocus:c,readOnly:n,focused:u??L,sectionListRef:B,onBlur:G,onClick:V,onFocus:w,onInput:W,onPaste:H,enableAccessibleFieldDOMStructure:!0,elements:Z,tabIndex:g===0?-1:0,contentEditable:ne,value:le,onChange:Y,areAllSectionsEmpty:T}}},Ko=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),PF=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=Xd(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=Ko(u).length,p=u.length,h=Ko(l),f=o+(h===""?0:l.indexOf(h[0]))+s.startSeparator.length,m=f+h.length;i.push($({},s,{start:r,end:r+c,startInInput:f,endInInput:m})),r+=c,o+=p}return i},RF=e=>{const t=zn(),n=D.useRef(void 0),r=D.useRef(void 0),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:p=!1},parsedSelectedSections:h,activeSectionIndex:f,state:m,fieldValueManager:g,valueManager:y,applyCharacterEditing:x,resetCharacterQuery:E,updateSectionValue:C,updateValueFromValueStr:S,clearActiveSection:k,clearValue:T,setTempAndroidValueStr:O,setSelectedSections:F,getSectionsFromValue:B,areAllSectionsEmpty:R,localizedDigits:N}=e,v=D.useRef(null),L=rt(l,v),I=D.useMemo(()=>PF(m.sections,N,t),[m.sections,N,t]),A=D.useMemo(()=>({syncSelectionToDOM:()=>{if(!v.current)return;if(h==null){v.current.scrollLeft&&(v.current.scrollLeft=0);return}if(v.current!==hn(document))return;const J=v.current.scrollTop;if(h==="all")v.current.select();else{const Q=I[h],ne=Q.type==="empty"?Q.startInInput-Q.startSeparator.length:Q.startInInput,Z=Q.type==="empty"?Q.endInInput+Q.endSeparator.length:Q.endInInput;(ne!==v.current.selectionStart||Z!==v.current.selectionEnd)&&v.current===hn(document)&&v.current.setSelectionRange(ne,Z),clearTimeout(r.current),r.current=setTimeout(()=>{v.current&&v.current===hn(document)&&v.current.selectionStart===v.current.selectionEnd&&(v.current.selectionStart!==ne||v.current.selectionEnd!==Z)&&A.syncSelectionToDOM()})}v.current.scrollTop=J},getActiveSectionIndexFromDOM:()=>{const J=v.current.selectionStart??0,Q=v.current.selectionEnd??0;if(J===0&&Q===0)return null;const ne=J<=I[0].startInInput?1:I.findIndex(Z=>Z.startInInput-Z.startSeparator.length>J);return ne===-1?I.length-1:ne-1},focusField:(J=0)=>{hn(document)!==v.current&&(v.current?.focus(),F(J))},setSelectedSections:J=>F(J),isFieldFocused:()=>v.current===hn(document)}),[v,h,I,F]),M=()=>{const J=v.current.selectionStart??0;let Q;J<=I[0].startInInput||J>=I[I.length-1].endInInput?Q=1:Q=I.findIndex(Z=>Z.startInInput-Z.startSeparator.length>J);const ne=Q===-1?I.length-1:Q-1;F(ne)},V=Pe((...J)=>{o?.(...J);const Q=v.current;clearTimeout(n.current),n.current=setTimeout(()=>{!Q||Q!==v.current||f==null&&(Q.value.length&&Number(Q.selectionEnd)-Number(Q.selectionStart)===Q.value.length?F("all"):M())})}),W=Pe((J,...Q)=>{J.isDefaultPrevented()||(i?.(J,...Q),M())}),H=Pe(J=>{if(a?.(J),J.preventDefault(),c||p)return;const Q=J.clipboardData.getData("text");if(typeof h=="number"){const ne=m.sections[h],Z=/^[a-zA-Z]+$/.test(Q),Y=/^[0-9]+$/.test(Q),le=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Q);if(ne.contentType==="letter"&&Z||ne.contentType==="digit"&&Y||ne.contentType==="digit-with-letter"&&le){E(),C({activeSection:ne,newSectionValue:Q,shouldGoToNextSection:!0});return}if(Z||Y)return}E(),S(Q)}),w=Pe((...J)=>{s?.(...J),F(null)}),G=Pe(J=>{if(c)return;const Q=J.target.value;if(Q===""){E(),T();return}const ne=J.nativeEvent.data,Z=ne&&ne.length>1,Y=Z?ne:Q,le=Ko(Y);if(h==="all"&&F(f),f==null||Z){S(Z?ne:le);return}let ee;if(h==="all"&&le.length===1)ee=le;else{const te=Ko(g.getV6InputValueFromSections(I,N,t));let xe=-1,pe=-1;for(let ve=0;ve<te.length;ve+=1)xe===-1&&te[ve]!==le[ve]&&(xe=ve),pe===-1&&te[te.length-ve-1]!==le[le.length-ve-1]&&(pe=ve);const be=I[f];if(xe<be.start||te.length-pe-1>be.end)return;const Re=le.length-te.length+be.end-Ko(be.endSeparator||"").length;ee=le.slice(be.start+Ko(be.startSeparator||"").length,Re)}if(ee.length===0){VL()&&O(Y),E(),k();return}x({keyPressed:ee,sectionIndex:f})}),re=D.useMemo(()=>u!==void 0?u:g.getV6InputValueFromSections(B(y.emptyValue),N,t),[u,g,B,y.emptyValue,N,t]),_=D.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,N,t),[m.sections,g,m.tempValueStrAndroid,N,t]);D.useEffect(()=>(v.current&&v.current===hn(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const ae=D.useMemo(()=>f==null||m.sections[f].contentType==="letter"?"text":"numeric",[f,m.sections]),U=!(v.current&&v.current===hn(document))&&R;return{interactions:A,returnedValue:{readOnly:c,onBlur:w,onClick:W,onFocus:V,onPaste:H,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:re,inputMode:ae,autoComplete:"off",value:U?"":_,onChange:G}}},MF=e=>{const t=At(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:p},fieldValueManager:h,valueManager:f,validator:m}=e,g=zn(),y=DF(e),{state:x,activeSectionIndex:E,parsedSelectedSections:C,setSelectedSections:S,clearValue:k,clearActiveSection:T,updateSectionValue:O,setTempAndroidValueStr:F,sectionsValueBoundaries:B,localizedDigits:R,timezone:N}=y,v=IF({sections:x.sections,updateSectionValue:O,sectionsValueBoundaries:B,localizedDigits:R,setTempAndroidValueStr:F,timezone:N}),{resetCharacterQuery:L}=v,I=f.areValuesEqual(t,x.value,f.emptyValue),A=i?AF:RF,M=D.useMemo(()=>WL(x.sections,g&&!i),[x.sections,g,i]),{returnedValue:V,interactions:W}=A($({},e,y,v,{areAllSectionsEmpty:I,sectionOrder:M})),H=Pe(X=>{if(l?.(X),!a)switch(!0){case((X.ctrlKey||X.metaKey)&&String.fromCharCode(X.keyCode)==="A"&&!X.shiftKey&&!X.altKey):{X.preventDefault(),S("all");break}case X.key==="ArrowRight":{if(X.preventDefault(),C==null)S(M.startIndex);else if(C==="all")S(M.endIndex);else{const U=M.neighbors[C].rightIndex;U!==null&&S(U)}break}case X.key==="ArrowLeft":{if(X.preventDefault(),C==null)S(M.endIndex);else if(C==="all")S(M.startIndex);else{const U=M.neighbors[C].leftIndex;U!==null&&S(U)}break}case X.key==="Delete":{if(X.preventDefault(),s)break;C==null||C==="all"?k():T(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(X.key):{if(X.preventDefault(),s||E==null)break;C==="all"&&S(E);const U=x.sections[E],J=h.getActiveDateManager(t,x,U),Q=_L(t,N,U,X.key,B,R,J.date,{minutesStep:o});O({activeSection:U,newSectionValue:Q,shouldGoToNextSection:!1});break}}});qt(()=>{W.syncSelectionToDOM()});const{hasValidationError:w}=Ub({props:n,validator:m,timezone:N,value:x.value,onError:n.onError}),G=D.useMemo(()=>u!==void 0?u:w,[w,u]);D.useEffect(()=>{!G&&E==null&&L()},[x.referenceValue,E,G]),D.useEffect(()=>{x.tempValueStrAndroid!=null&&E!=null&&(L(),T())},[x.sections]),D.useImperativeHandle(r,()=>({getSections:()=>x.sections,getActiveSectionIndex:W.getActiveSectionIndexFromDOM,setSelectedSections:W.setSelectedSections,focusField:W.focusField,isFieldFocused:W.isFieldFocused}));const re=Pe((X,...U)=>{X.preventDefault(),p?.(X,...U),k(),W.isFieldFocused()?S(M.startIndex):W.focusField(0)}),_={onKeyDown:H,onClear:re,error:G,clearable:!!(c&&!I&&!s&&!a)},ae={disabled:a,readOnly:s};return $({},e.forwardedProps,_,ae,V)},OF=["clearable","onClear","InputProps","sx","slots","slotProps"],LF=["ownerState"],NF=e=>{const t=Fr(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=$e(e,OF),u=a?.clearButton??er,c=nt({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=$e(c,LF),h=a?.clearIcon??xF,f=nt({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return $({},l,{InputProps:$({},o,{endAdornment:d.jsxs(D.Fragment,{children:[n&&d.jsx(zb,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:d.jsx(u,$({},p,{onClick:r,children:d.jsx(h,$({fontSize:"small"},f))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},FF=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],_F=(e,t)=>D.useMemo(()=>{const n=$({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return FF.forEach(o),$b.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),BF=e=>{const t=At(),n=Ya();return $({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Hn(t,e.minDate,n.minDate),maxDate:Hn(t,e.maxDate,n.maxDate)})},jF=e=>{const t=BF(e),{forwardedProps:n,internalProps:r}=_F(t,"date");return MF({forwardedProps:n,internalProps:r,valueManager:pr,fieldValueManager:GL,validator:Ka,valueType:"date"})};function $F(e){return _e("MuiPickersTextField",e)}Me("MuiPickersTextField",["root","focused","disabled","error","required"]);function HF(e){return _e("MuiPickersInputBase",e)}const ni=Me("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function UF(e){return _e("MuiPickersSectionList",e)}const qi=Me("MuiPickersSectionList",["root","section","sectionContent"]),zF=["slots","slotProps","elements","sectionListRef"],Xb=oe("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Zb=oe("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Jb=oe("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),ey=oe("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),VF=e=>{const{classes:t}=e;return Ne({root:["root"],section:["section"],sectionContent:["sectionContent"]},UF,t)};function WF(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=t?.section??Zb,a=nt({elementType:i,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=t?.sectionContent??ey,l=nt({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Jb,c=nt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),p=nt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return d.jsxs(i,$({},a,{children:[d.jsx(u,$({},c)),d.jsx(s,$({},l)),d.jsx(u,$({},p))]}))}const qF=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=$e(r,zF),u=VF(r),c=D.useRef(null),p=rt(n,c),h=g=>{if(!c.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return c.current};D.useImperativeHandle(s,()=>({getRoot(){return h("getRoot")},getSectionContainer(g){return h("getSectionContainer").querySelector(`.${qi.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return h("getSectionContent").querySelector(`.${qi.section}[data-sectionindex="${g}"] .${qi.sectionContent}`)},getSectionIndexFromDOMElement(g){const y=h("getSectionIndexFromDOMElement");if(g==null||!y.contains(g))return null;let x=null;return g.classList.contains(qi.section)?x=g:g.classList.contains(qi.sectionContent)&&(x=g.parentElement),x==null?null:Number(x.dataset.sectionindex)}}));const f=o?.root??Xb,m=nt({elementType:f,externalSlotProps:i?.root,externalForwardedProps:l,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return d.jsx(f,$({},m,{children:m.contentEditable?a.map(({content:g,before:y,after:x})=>`${y.children}${g.children}${x.children}`).join(""):d.jsx(D.Fragment,{children:a.map((g,y)=>d.jsx(WF,{slots:o,slotProps:i,element:g,classes:u},y))})}))}),YF=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],KF=e=>Math.round(e*1e5)/1e5,ql=oe("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${KF(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),tp=oe(Xb,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),GF=oe(Zb,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),QF=oe(ey,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),XF=oe(Jb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),ZF=oe("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})($({},vL)),JF=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,p={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${ke(s)}`,l==="small"&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ne(p,HF,o)},np=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:u,startAdornment:c,renderSuffix:p,slots:h,slotProps:f,contentEditable:m,tabIndex:g,onInput:y,onPaste:x,onKeyDown:E,name:C,readOnly:S,inputProps:k,inputRef:T,sectionListRef:O}=r,F=$e(r,YF),B=D.useRef(null),R=rt(n,B),N=rt(k?.ref,T),v=zn(),L=qn();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const I=w=>{if(L.disabled){w.stopPropagation();return}L.onFocus?.(w)};D.useEffect(()=>{L&&L.setAdornedStart(!!c)},[L,c]),D.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const A=$({},r,L,{isRtl:v}),M=JF(A),V=h?.root||ql,W=nt({elementType:V,externalSlotProps:f?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":L.error,ref:R},className:M.root,ownerState:A}),H=h?.input||tp;return d.jsxs(V,$({},W,{children:[c,d.jsx(qF,{sectionListRef:O,elements:o,contentEditable:m,tabIndex:g,className:M.sectionsContainer,onFocus:I,onBlur:L.onBlur,onInput:y,onPaste:x,onKeyDown:E,slots:{root:H,section:GF,sectionContent:QF,sectionSeparator:XF},slotProps:{root:{ownerState:A},sectionContent:{className:ni.sectionContent},sectionSeparator:({position:w})=>({className:w==="before"?ni.sectionBefore:ni.sectionAfter})}}),u,p?p($({},L)):null,d.jsx(ZF,$({name:C,className:M.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:L.required,disabled:L.disabled},k,{ref:N}))]}))});function e_(e){return _e("MuiPickersOutlinedInput",e)}const Gn=$({},ni,Me("MuiPickersOutlinedInput",["root","notchedOutline","input"])),t_=["children","className","label","notched","shrink"],n_=oe("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Nm=oe("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),r_=oe("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function o_(e){const{className:t,label:n}=e,r=$e(e,t_),o=n!=null&&n!=="",i=$({},e,{withLabel:o});return d.jsx(n_,$({"aria-hidden":!0,className:t},r,{ownerState:i,children:d.jsx(r_,{ownerState:i,children:o?d.jsx(Nm,{children:n}):d.jsx(Nm,{className:"notranslate",children:"​"})})}))}const i_=["label","autoFocus","ownerState","notched"],a_=oe(ql,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Gn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Gn.focused} .${Gn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Gn.disabled}`]:{[`& .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Gn.error} .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${Gn.focused}:not(.${Gn.error}) .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),s_=oe(tp,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),l_=e=>{const{classes:t}=e,r=Ne({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},e_,t);return $({},t,r)},ty=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=$e(r,i_),l=qn(),u=$({},r,i,l,{color:l?.color||"primary"}),c=l_(u);return d.jsx(np,$({slots:{root:a_,input:s_},renderSuffix:p=>d.jsx(o_,{shrink:!!(a||p.adornedStart||p.focused||p.filled),notched:!!(a||p.adornedStart||p.focused||p.filled),className:c.notchedOutline,label:o!=null&&o!==""&&l?.required?d.jsxs(D.Fragment,{children:[o," ","*"]}):o,ownerState:u})},s,{label:o,classes:c,ref:n}))});ty.muiName="Input";function u_(e){return _e("MuiPickersFilledInput",e)}const io=$({},ni,Me("MuiPickersFilledInput",["root","underline","input"])),c_=["label","autoFocus","disableUnderline","ownerState"],d_=oe(ql,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dt.shouldForwardProp(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${io.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${io.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>({props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${io.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${io.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${io.disabled}, .${io.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${io.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),p_=oe(tp,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),f_=e=>{const{classes:t,disableUnderline:n}=e,o=Ne({root:["root",!n&&"underline"],input:["input"]},u_,t);return $({},t,o)},ny=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=$e(r,c_),l=qn(),u=$({},r,a,l,{color:l?.color||"primary"}),c=f_(u);return d.jsx(np,$({slots:{root:d_,input:p_},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:c,ref:n}))});ny.muiName="Input";function h_(e){return _e("MuiPickersFilledInput",e)}const Yi=$({},ni,Me("MuiPickersInput",["root","input"])),m_=["label","autoFocus","disableUnderline","ownerState"],g_=oe(ql,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Yi.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Yi.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Yi.disabled}, .${Yi.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Yi.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),b_=e=>{const{classes:t,disableUnderline:n}=e,o=Ne({root:["root",!n&&"underline"],input:["input"]},h_,t);return $({},t,o)},ry=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=$e(r,m_),l=qn(),u=$({},r,a,l,{disableUnderline:i,color:l?.color||"primary"}),c=b_(u);return d.jsx(np,$({slots:{root:g_}},s,{label:o,classes:c,ref:n}))});ry.muiName="Input";const y_=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],x_={standard:ry,filled:ny,outlined:ty},E_=oe(rl,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),C_=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Ne({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},$F,r)},T_=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:u=!1,variant:c="outlined",required:p=!1,InputProps:h,inputProps:f,inputRef:m,sectionListRef:g,elements:y,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:S,onPaste:k,onInput:T,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:R,focused:N,value:v,onChange:L,fullWidth:I,id:A,name:M,helperText:V,FormHelperTextProps:W,label:H,InputLabelProps:w}=r,G=$e(r,y_),re=D.useRef(null),_=rt(n,re),ae=Zn(A),X=V&&ae?`${ae}-helper-text`:void 0,U=H&&ae?`${ae}-label`:void 0,J=$({},r,{color:s,disabled:l,error:u,focused:N,required:p,variant:c}),Q=C_(J),ne=x_[c];return d.jsxs(E_,$({className:Ae(Q.root,a),ref:_,focused:N,onFocus:o,onBlur:i,disabled:l,variant:c,error:u,color:s,fullWidth:I,required:p,ownerState:J},G,{children:[d.jsx(nl,$({htmlFor:ae,id:U},w,{children:H})),d.jsx(ne,$({elements:y,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:S,onInput:T,onPaste:k,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:R,value:v,onChange:L,id:ae,fullWidth:I,inputProps:f,inputRef:m,sectionListRef:g,label:H,name:M,role:"group","aria-labelledby":U,"aria-describedby":X,"aria-live":X?"polite":void 0},h)),V&&d.jsx(ab,$({id:X},W,{children:V}))]}))}),v_=["enableAccessibleFieldDOMStructure"],S_=["InputProps","readOnly"],k_=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],D_=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=$e(e,v_);if(t){const{InputProps:p,readOnly:h}=n,f=$e(n,S_);return $({},f,{InputProps:$({},p??{},{readOnly:h})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=$e(n,k_);return $({},c,{InputProps:$({},s??{},{readOnly:a}),inputProps:$({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},w_=["slots","slotProps","InputProps","inputProps"],oy=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=$e(r,w_),u=r,c=o?.textField??(t.enableAccessibleFieldDOMStructure?T_:tt),p=nt({elementType:c,externalSlotProps:i?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});p.inputProps=$({},s,p.inputProps),p.InputProps=$({},a,p.InputProps);const h=jF(p),f=D_(h),m=NF($({},f,{slots:o,slotProps:i}));return d.jsx(c,$({},m))}),iy=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Po();return D.useCallback(u=>Ka({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},I_=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return $({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),$({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return $({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return $({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},A_=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:p}=e,h=At(),f=D.useRef(I_(!!u,i,h)).current,m=D.useMemo(()=>pr.getInitialReferenceValue({value:t,utils:h,timezone:p,props:e,referenceDate:n,granularity:sr.day}),[n,p]),[g,y]=D.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"});D.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const x=D.useCallback(T=>{y($({type:"changeMonth"},T)),l&&l(T.newMonth)},[l]),E=D.useCallback(T=>{const O=T;h.isSameMonth(O,g.currentMonth)||x({newMonth:h.startOfMonth(O),direction:h.isAfterDay(O,g.currentMonth)?"left":"right"})},[g.currentMonth,x,h]),C=iy({shouldDisableDate:c,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:p}),S=D.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),k=Pe((T,O)=>{C(T)||y({type:"changeFocusedDay",focusedDay:T,withoutMonthSwitchingAnimation:O})});return{referenceDate:m,calendarState:g,changeMonth:E,changeFocusedDay:k,isDateDisabled:C,onMonthSwitchingAnimationEnd:S,handleChangeMonth:x}},P_=e=>_e("MuiPickersFadeTransitionGroup",e);Me("MuiPickersFadeTransitionGroup",["root"]);const R_=e=>{const{classes:t}=e;return Ne({root:["root"]},P_,t)},M_=oe(za,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ay(e){const t=kt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=R_(t),s=Gr();return o?n:d.jsx(M_,{className:Ae(a.root,r),children:d.jsx(vo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}function O_(e){return _e("MuiPickersDay",e)}const ao=Me("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),L_=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],N_=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return Ne({root:["root",t&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},O_,l)},sy=({theme:e})=>$({},e.typography.caption,{width:Ia,height:Ia,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${ao.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${ao.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${ao.disabled}:not(.${ao.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${ao.disabled}&.${ao.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Vl}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${ao.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),ly=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},F_=oe(To,{name:"MuiPickersDay",slot:"Root",overridesResolver:ly})(sy),__=oe("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:ly})(({theme:e})=>$({},sy({theme:e}),{opacity:0,pointerEvents:"none"})),Ki=()=>{},B_=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:c,onClick:p,onDaySelect:h,onFocus:f=Ki,onBlur:m=Ki,onKeyDown:g=Ki,onMouseDown:y=Ki,onMouseEnter:x=Ki,outsideCurrentMonth:E,selected:C=!1,showDaysOutsideCurrentMonth:S=!1,children:k,today:T=!1}=r,O=$e(r,L_),F=$({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:u,selected:C,showDaysOutsideCurrentMonth:S,today:T}),B=N_(F),R=At(),N=D.useRef(null),v=rt(N,n);qt(()=>{o&&!s&&!c&&!E&&N.current.focus()},[o,s,c,E]);const L=A=>{y(A),E&&A.preventDefault()},I=A=>{s||h(a),E&&A.currentTarget.focus(),p&&p(A)};return E&&!S?d.jsx(__,{className:Ae(B.root,B.hiddenDaySpacingFiller,i),ownerState:F,role:O.role}):d.jsx(F_,$({className:Ae(B.root,i),ref:v,centerRipple:!0,disabled:s,tabIndex:C?0:-1,onKeyDown:A=>g(A,a),onFocus:A=>f(A,a),onBlur:A=>m(A,a),onMouseEnter:A=>x(A,a),onClick:I,onMouseDown:L},O,{ownerState:F,children:k||R.format(a,"dayOfMonth")}))}),j_=D.memo(B_),$_=e=>_e("MuiPickersSlideTransition",e),Pn=Me("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),H_=["children","className","reduceAnimations","slideDirection","transKey","classes"],U_=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ne(r,$_,t)},z_=oe(za,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Pn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Pn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Pn.slideEnterActive}`]:t.slideEnterActive},{[`.${Pn.slideExit}`]:t.slideExit},{[`.${Pn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Pn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Pn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Pn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Pn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Pn.slideExit}`]:{transform:"translate(0%)"},[`& .${Pn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Pn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function V_(e){const t=kt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=$e(t,H_),s=U_(t),l=Gr();if(o)return d.jsx("div",{className:Ae(s.root,r),children:n});const u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return d.jsx(z_,{className:Ae(s.root,r),childFactory:c=>D.cloneElement(c,{classNames:u}),role:"presentation",children:d.jsx(Pd,$({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),i)})}const W_=e=>_e("MuiDayCalendar",e);Me("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const q_=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Y_=["ownerState"],K_=e=>{const{classes:t}=e;return Ne({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},W_,t)},uy=(Ia+Vl*2)*6,G_=oe("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Q_=oe("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),X_=oe(ft,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),Z_=oe(ft,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),J_=oe(ft,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>$({},e.typography.caption,{width:Ia,height:Ia,padding:0,margin:`0 ${Vl}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),e7=oe("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:uy}),t7=oe(V_,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:uy}),n7=oe("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),r7=oe("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Vl}px 0`,display:"flex",justifyContent:"center"});function o7(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=$e(e,q_);const{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:h,slots:f,slotProps:m,timezone:g}=t,y=At(),x=zl(g),E=r!==null&&y.isSameDay(n,r),C=o.some(v=>y.isSameDay(v,n)),S=y.isSameDay(n,x),k=f?.day??j_,T=nt({elementType:k,externalSlotProps:m?.day,additionalProps:$({disableHighlightToday:c,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:p,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:$({},t,{day:n,selected:C})}),O=$e(T,Y_),F=D.useMemo(()=>u||i(n),[u,i,n]),B=D.useMemo(()=>y.getMonth(n)!==a,[y,n,a]),R=D.useMemo(()=>{const v=y.startOfMonth(y.setMonth(n,a));return h?y.isSameDay(n,y.startOfWeek(v)):y.isSameDay(n,v)},[a,n,h,y]),N=D.useMemo(()=>{const v=y.endOfMonth(y.setMonth(n,a));return h?y.isSameDay(n,y.endOfWeek(v)):y.isSameDay(n,v)},[a,n,h,y]);return d.jsx(k,$({},O,{day:n,disabled:F,autoFocus:s&&E,today:S,outsideCurrentMonth:B,isFirstVisibleCell:R,isLastVisibleCell:N,selected:C,tabIndex:E?0:-1,"aria-selected":C,"aria-current":S?"date":void 0}))}function i7(e){const t=kt({props:e,name:"MuiDayCalendar"}),n=At(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:p,reduceAnimations:h,renderLoading:f=()=>d.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:y,disableFuture:x,minDate:E,maxDate:C,shouldDisableDate:S,shouldDisableMonth:k,shouldDisableYear:T,dayOfWeekFormatter:O=pe=>n.format(pe,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:B,gridLabelId:R,displayWeekNumber:N,fixedWeekNumber:v,autoFocus:L,timezone:I}=t,A=zl(I),M=K_(t),V=zn(),W=iy({shouldDisableDate:S,shouldDisableMonth:k,shouldDisableYear:T,minDate:E,maxDate:C,disablePast:y,disableFuture:x,timezone:I}),H=Fr(),[w,G]=kn({name:"DayCalendar",state:"hasFocus",controlled:F,default:L??!1}),[re,_]=D.useState(()=>s||A),ae=Pe(pe=>{p||u(pe)}),X=pe=>{W(pe)||(r(pe),_(pe),B?.(!0),G(!0))},U=Pe((pe,be)=>{switch(pe.key){case"ArrowUp":X(n.addDays(be,-7)),pe.preventDefault();break;case"ArrowDown":X(n.addDays(be,7)),pe.preventDefault();break;case"ArrowLeft":{const se=n.addDays(be,V?1:-1),Re=n.addMonths(be,V?1:-1),ve=ga({utils:n,date:se,minDate:V?se:n.startOfMonth(Re),maxDate:V?n.endOfMonth(Re):se,isDateDisabled:W,timezone:I});X(ve||se),pe.preventDefault();break}case"ArrowRight":{const se=n.addDays(be,V?-1:1),Re=n.addMonths(be,V?-1:1),ve=ga({utils:n,date:se,minDate:V?n.startOfMonth(Re):se,maxDate:V?se:n.endOfMonth(Re),isDateDisabled:W,timezone:I});X(ve||se),pe.preventDefault();break}case"Home":X(n.startOfWeek(be)),pe.preventDefault();break;case"End":X(n.endOfWeek(be)),pe.preventDefault();break;case"PageUp":X(n.addMonths(be,1)),pe.preventDefault();break;case"PageDown":X(n.addMonths(be,-1)),pe.preventDefault();break}}),J=Pe((pe,be)=>X(be)),Q=Pe((pe,be)=>{w&&n.isSameDay(re,be)&&B?.(!1)}),ne=n.getMonth(i),Z=n.getYear(i),Y=D.useMemo(()=>a.filter(pe=>!!pe).map(pe=>n.startOfDay(pe)),[n,a]),le=`${Z}-${ne}`,ee=D.useMemo(()=>D.createRef(),[le]),te=D.useMemo(()=>{const pe=n.startOfMonth(i),be=n.endOfMonth(i);return W(re)||n.isAfterDay(re,be)||n.isBeforeDay(re,pe)?ga({utils:n,date:re,minDate:pe,maxDate:be,disablePast:y,disableFuture:x,isDateDisabled:W,timezone:I}):re},[i,x,y,re,W,n,I]),xe=D.useMemo(()=>{const pe=n.getWeekArray(i);let be=n.addMonths(i,1);for(;v&&pe.length<v;){const se=n.getWeekArray(be),Re=n.isSameDay(pe[pe.length-1][0],se[0][0]);se.slice(Re?1:0).forEach(ve=>{pe.length<v&&pe.push(ve)}),be=n.addMonths(be,1)}return pe},[i,v,n]);return d.jsxs(G_,{role:"grid","aria-labelledby":R,className:M.root,children:[d.jsxs(Q_,{role:"row",className:M.header,children:[N&&d.jsx(Z_,{variant:"caption",role:"columnheader","aria-label":H.calendarWeekNumberHeaderLabel,className:M.weekNumberLabel,children:H.calendarWeekNumberHeaderText}),IL(n,A).map((pe,be)=>d.jsx(X_,{variant:"caption",role:"columnheader","aria-label":n.format(pe,"weekday"),className:M.weekDayLabel,children:O(pe)},be.toString()))]}),l?d.jsx(e7,{className:M.loadingContainer,children:f()}):d.jsx(t7,$({transKey:le,onExited:c,reduceAnimations:h,slideDirection:m,className:Ae(o,M.slideTransition)},g,{nodeRef:ee,children:d.jsx(n7,{ref:ee,role:"rowgroup",className:M.monthContainer,children:xe.map((pe,be)=>d.jsxs(r7,{role:"row",className:M.weekContainer,"aria-rowindex":be+1,children:[N&&d.jsx(J_,{className:M.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(pe[0])),children:H.calendarWeekNumberText(n.getWeekNumber(pe[0]))}),pe.map((se,Re)=>d.jsx(o7,{parentProps:t,day:se,selectedDays:Y,focusableDay:te,onKeyDown:U,onFocus:J,onBlur:Q,onDaySelect:ae,isDateDisabled:W,currentMonthNumber:ne,isViewFocused:w,"aria-colindex":Re+1},se.toString()))]},`week-${pe[0]}`))})}))]})}function a7(e){return _e("MuiPickersMonth",e)}const ps=Me("MuiPickersMonth",["root","monthButton","disabled","selected"]),s7=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],l7=e=>{const{disabled:t,selected:n,classes:r}=e;return Ne({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},a7,r)},u7=oe("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),c7=oe("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${ps.disabled}`]:t.disabled},{[`&.${ps.selected}`]:t.selected}]})(({theme:e})=>$({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ps.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ps.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),d7=D.memo(function(t){const n=kt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:p,onFocus:h,onBlur:f,"aria-current":m,"aria-label":g,slots:y,slotProps:x}=n,E=$e(n,s7),C=D.useRef(null),S=l7(n);qt(()=>{r&&C.current?.focus()},[r]);const k=y?.monthButton??c7,T=nt({elementType:k,externalSlotProps:x?.monthButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:C,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:O=>c(O,l),onKeyDown:O=>p(O,l),onFocus:O=>h(O,l),onBlur:O=>f(O,l)},ownerState:n,className:S.monthButton});return d.jsx(u7,$({className:Ae(S.root,o),ownerState:n},E,{children:d.jsx(k,$({},T))}))});function p7(e){return _e("MuiMonthCalendar",e)}Me("MuiMonthCalendar",["root"]);const f7=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],h7=e=>{const{classes:t}=e;return Ne({root:["root"]},p7,t)};function m7(e,t){const n=At(),r=Ya(),o=kt({props:e,name:t});return $({disableFuture:!1,disablePast:!1},o,{minDate:Hn(n,o.minDate,r.minDate),maxDate:Hn(n,o.maxDate,r.maxDate)})}const g7=oe("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Wl,boxSizing:"border-box"}),b7=D.forwardRef(function(t,n){const r=m7(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:c,maxDate:p,minDate:h,onChange:f,shouldDisableMonth:m,readOnly:g,autoFocus:y=!1,onMonthFocus:x,hasFocus:E,onFocusedViewChange:C,monthsPerRow:S=3,timezone:k,gridLabelId:T,slots:O,slotProps:F}=r,B=$e(r,f7),{value:R,handleValueChange:N,timezone:v}=Jd({name:"MonthCalendar",timezone:k,value:i,defaultValue:a,referenceDate:s,onChange:f,valueManager:pr}),L=zl(v),I=zn(),A=At(),M=D.useMemo(()=>pr.getInitialReferenceValue({value:R,utils:A,props:r,timezone:v,referenceDate:s,granularity:sr.month}),[]),V=r,W=h7(V),H=D.useMemo(()=>A.getMonth(L),[A,L]),w=D.useMemo(()=>R!=null?A.getMonth(R):null,[R,A]),[G,re]=D.useState(()=>w||A.getMonth(M)),[_,ae]=kn({name:"MonthCalendar",state:"hasFocus",controlled:E,default:y??!1}),X=Pe(le=>{ae(le),C&&C(le)}),U=D.useCallback(le=>{const ee=A.startOfMonth(c&&A.isAfter(L,h)?L:h),te=A.startOfMonth(u&&A.isBefore(L,p)?L:p),xe=A.startOfMonth(le);return A.isBefore(xe,ee)||A.isAfter(xe,te)?!0:m?m(xe):!1},[u,c,p,h,L,m,A]),J=Pe((le,ee)=>{if(g)return;const te=A.setMonth(R??M,ee);N(te)}),Q=Pe(le=>{U(A.setMonth(R??M,le))||(re(le),X(!0),x&&x(le))});D.useEffect(()=>{re(le=>w!==null&&le!==w?w:le)},[w]);const ne=Pe((le,ee)=>{switch(le.key){case"ArrowUp":Q((12+ee-3)%12),le.preventDefault();break;case"ArrowDown":Q((12+ee+3)%12),le.preventDefault();break;case"ArrowLeft":Q((12+ee+(I?1:-1))%12),le.preventDefault();break;case"ArrowRight":Q((12+ee+(I?-1:1))%12),le.preventDefault();break}}),Z=Pe((le,ee)=>{Q(ee)}),Y=Pe((le,ee)=>{G===ee&&X(!1)});return d.jsx(g7,$({ref:n,className:Ae(W.root,o),ownerState:V,role:"radiogroup","aria-labelledby":T},B,{children:Kd(A,R??M).map(le=>{const ee=A.getMonth(le),te=A.format(le,"monthShort"),xe=A.format(le,"month"),pe=ee===w,be=l||U(le);return d.jsx(d7,{selected:pe,value:ee,onClick:J,onKeyDown:ne,autoFocus:_&&ee===G,disabled:be,tabIndex:ee===G&&!be?0:-1,onFocus:Z,onBlur:Y,"aria-current":H===ee?"date":void 0,"aria-label":xe,monthsPerRow:S,slots:O,slotProps:F,children:te},te)})}))});function y7(e){return _e("MuiPickersYear",e)}const fs=Me("MuiPickersYear",["root","yearButton","selected","disabled"]),x7=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],E7=e=>{const{disabled:t,selected:n,classes:r}=e;return Ne({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},y7,r)},C7=oe("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),T7=oe("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${fs.disabled}`]:t.disabled},{[`&.${fs.selected}`]:t.selected}]})(({theme:e})=>$({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:dt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${fs.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${fs.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),v7=D.memo(function(t){const n=kt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:u,onClick:c,onKeyDown:p,onFocus:h,onBlur:f,"aria-current":m,slots:g,slotProps:y}=n,x=$e(n,x7),E=D.useRef(null),C=E7(n);qt(()=>{r&&E.current?.focus()},[r]);const S=g?.yearButton??T7,k=nt({elementType:S,externalSlotProps:y?.yearButton,additionalProps:{children:i,disabled:a,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:T=>c(T,l),onKeyDown:T=>p(T,l),onFocus:T=>h(T,l),onBlur:T=>f(T,l)},ownerState:n,className:C.yearButton});return d.jsx(C7,$({className:Ae(C.root,o),ownerState:n},x,{children:d.jsx(S,$({},k))}))});function S7(e){return _e("MuiYearCalendar",e)}Me("MuiYearCalendar",["root"]);const k7=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],D7=e=>{const{classes:t}=e;return Ne({root:["root"]},S7,t)};function w7(e,t){const n=At(),r=Ya(),o=kt({props:e,name:t});return $({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Hn(n,o.minDate,r.minDate),maxDate:Hn(n,o.maxDate,r.maxDate)})}const I7=oe("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Wl,maxHeight:eF,boxSizing:"border-box",position:"relative"}),A7=D.forwardRef(function(t,n){const r=w7(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:u,disableFuture:c,disablePast:p,maxDate:h,minDate:f,onChange:m,readOnly:g,shouldDisableYear:y,onYearFocus:x,hasFocus:E,onFocusedViewChange:C,yearsOrder:S="asc",yearsPerRow:k,timezone:T,gridLabelId:O,slots:F,slotProps:B}=r,R=$e(r,k7),{value:N,handleValueChange:v,timezone:L}=Jd({name:"YearCalendar",timezone:T,value:a,defaultValue:s,referenceDate:l,onChange:m,valueManager:pr}),I=zl(L),A=zn(),M=At(),V=D.useMemo(()=>pr.getInitialReferenceValue({value:N,utils:M,props:r,timezone:L,referenceDate:l,granularity:sr.year}),[]),W=r,H=D7(W),w=D.useMemo(()=>M.getYear(I),[M,I]),G=D.useMemo(()=>N!=null?M.getYear(N):null,[N,M]),[re,_]=D.useState(()=>G||M.getYear(V)),[ae,X]=kn({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),U=Pe(se=>{X(se),C&&C(se)}),J=D.useCallback(se=>{if(p&&M.isBeforeYear(se,I)||c&&M.isAfterYear(se,I)||f&&M.isBeforeYear(se,f)||h&&M.isAfterYear(se,h))return!0;if(!y)return!1;const Re=M.startOfYear(se);return y(Re)},[c,p,h,f,I,y,M]),Q=Pe((se,Re)=>{if(g)return;const ve=M.setYear(N??V,Re);v(ve)}),ne=Pe(se=>{J(M.setYear(N??V,se))||(_(se),U(!0),x?.(se))});D.useEffect(()=>{_(se=>G!==null&&se!==G?G:se)},[G]);const Z=S!=="desc"?k*1:k*-1,Y=A&&S==="asc"||!A&&S==="desc"?-1:1,le=Pe((se,Re)=>{switch(se.key){case"ArrowUp":ne(Re-Z),se.preventDefault();break;case"ArrowDown":ne(Re+Z),se.preventDefault();break;case"ArrowLeft":ne(Re-Y),se.preventDefault();break;case"ArrowRight":ne(Re+Y),se.preventDefault();break}}),ee=Pe((se,Re)=>{ne(Re)}),te=Pe((se,Re)=>{re===Re&&U(!1)}),xe=D.useRef(null),pe=rt(n,xe);D.useEffect(()=>{if(o||xe.current===null)return;const se=xe.current.querySelector('[tabindex="0"]');if(!se)return;const Re=se.offsetHeight,ve=se.offsetTop,ze=xe.current.clientHeight,De=xe.current.scrollTop,Tt=ve+Re;Re>ze||ve<De||(xe.current.scrollTop=Tt-ze/2-Re/2)},[o]);const be=M.getYearRange([f,h]);return S==="desc"&&be.reverse(),d.jsx(I7,$({ref:pe,className:Ae(H.root,i),ownerState:W,role:"radiogroup","aria-labelledby":O},R,{children:be.map(se=>{const Re=M.getYear(se),ve=Re===G,ze=u||J(se);return d.jsx(v7,{selected:ve,value:Re,onClick:Q,onKeyDown:le,autoFocus:ae&&Re===re,disabled:ze,tabIndex:Re===re&&!ze?0:-1,onFocus:ee,onBlur:te,"aria-current":w===Re?"date":void 0,yearsPerRow:k,slots:F,slotProps:B,children:M.format(se,"year")},M.format(se,"year"))})}))}),P7=e=>_e("MuiPickersCalendarHeader",e),R7=Me("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function M7(e){return _e("MuiPickersArrowSwitcher",e)}Me("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const O7=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],L7=["ownerState"],N7=["ownerState"],F7=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),_7=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Fm=oe(er,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),B7=e=>{const{classes:t}=e;return Ne({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},M7,t)},j7=D.forwardRef(function(t,n){const r=zn(),o=kt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:c,onGoToNext:p,nextLabel:h,isPreviousDisabled:f,isPreviousHidden:m,onGoToPrevious:g,previousLabel:y,labelId:x}=o,E=$e(o,O7),C=o,S=B7(C),k={isDisabled:u,isHidden:c,goTo:p,label:h},T={isDisabled:f,isHidden:m,goTo:g,label:y},O=s?.previousIconButton??Fm,F=nt({elementType:O,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"end",onClick:T.goTo},ownerState:$({},C,{hidden:T.isHidden}),className:Ae(S.button,S.previousIconButton)}),B=s?.nextIconButton??Fm,R=nt({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:$({},C,{hidden:k.isHidden}),className:Ae(S.button,S.nextIconButton)}),N=s?.leftArrowIcon??gF,v=nt({elementType:N,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:S.leftArrowIcon}),L=$e(v,L7),I=s?.rightArrowIcon??bF,A=nt({elementType:I,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:S.rightArrowIcon}),M=$e(A,N7);return d.jsxs(F7,$({ref:n,className:Ae(S.root,a),ownerState:C},E,{children:[d.jsx(O,$({},F,{children:r?d.jsx(I,$({},M)):d.jsx(N,$({},L))})),i?d.jsx(ft,{variant:"subtitle1",component:"span",id:x,children:i}):d.jsx(_7,{className:S.spacer,ownerState:C}),d.jsx(B,$({},R,{children:r?d.jsx(N,$({},L)):d.jsx(I,$({},M))}))]}))});function $7(e,{disableFuture:t,maxDate:n,timezone:r}){const o=At();return D.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function H7(e,{disablePast:t,minDate:n,timezone:r}){const o=At();return D.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const U7=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],z7=["ownerState"],V7=e=>{const{classes:t}=e;return Ne({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},P7,t)},W7=oe("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),q7=oe("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>$({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Y7=oe("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),K7=oe(er,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${R7.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),G7=oe(mF,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Q7=D.forwardRef(function(t,n){const r=Fr(),o=At(),i=kt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:u,disableFuture:c,disablePast:p,maxDate:h,minDate:f,onMonthChange:m,onViewChange:g,view:y,reduceAnimations:x,views:E,labelId:C,className:S,timezone:k,format:T=`${o.formats.month} ${o.formats.year}`}=i,O=$e(i,U7),F=i,B=V7(i),R=a?.switchViewButton??K7,N=nt({elementType:R,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:F,className:B.switchViewButton}),v=a?.switchViewIcon??G7,L=nt({elementType:v,externalSlotProps:s?.switchViewIcon,ownerState:F,className:B.switchViewIcon}),I=$e(L,z7),A=()=>m(o.addMonths(l,1),"left"),M=()=>m(o.addMonths(l,-1),"right"),V=$7(l,{disableFuture:c,maxDate:h,timezone:k}),W=H7(l,{disablePast:p,minDate:f,timezone:k}),H=()=>{if(!(E.length===1||!g||u))if(E.length===2)g(E.find(G=>G!==y)||E[0]);else{const G=E.indexOf(y)!==0?0:1;g(E[G])}};if(E.length===1&&E[0]==="year")return null;const w=o.formatByString(l,T);return d.jsxs(W7,$({},O,{ownerState:F,className:Ae(B.root,S),ref:n,children:[d.jsxs(q7,{role:"presentation",onClick:H,ownerState:F,"aria-live":"polite",className:B.labelContainer,children:[d.jsx(ay,{reduceAnimations:x,transKey:w,children:d.jsx(Y7,{id:C,ownerState:F,className:B.label,children:w})}),E.length>1&&!u&&d.jsx(R,$({},N,{children:d.jsx(v,$({},I))}))]}),d.jsx(vo,{in:y==="day",appear:!x,enter:!x,children:d.jsx(j7,{slots:a,slotProps:s,onGoToPrevious:M,isPreviousDisabled:W,previousLabel:r.previousMonth,onGoToNext:A,isNextDisabled:V,nextLabel:r.nextMonth})})]}))}),X7=oe("div")({overflow:"hidden",width:Wl,maxHeight:ep,display:"flex",flexDirection:"column",margin:"0 auto"}),Z7=e=>_e("MuiDateCalendar",e);Me("MuiDateCalendar",["root","viewTransitionContainer"]);const J7=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],e9=e=>{const{classes:t}=e;return Ne({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Z7,t)};function t9(e,t){const n=At(),r=Ya(),o=Vb(),i=kt({props:e,name:t});return $({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>d.jsx("span",{children:"..."})),minDate:Hn(n,i.minDate,r.minDate),maxDate:Hn(n,i.maxDate,r.maxDate)})}const n9=oe(X7,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:ep}),r9=oe(ay,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),o9=D.forwardRef(function(t,n){const r=At(),o=Zn(),i=t9(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:u,referenceDate:c,disableFuture:p,disablePast:h,onChange:f,onYearChange:m,onMonthChange:g,reduceAnimations:y,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,view:S,views:k,openTo:T,className:O,disabled:F,readOnly:B,minDate:R,maxDate:N,disableHighlightToday:v,focusedView:L,onFocusedViewChange:I,showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:V,slots:W,slotProps:H,loading:w,renderLoading:G,displayWeekNumber:re,yearsOrder:_,yearsPerRow:ae,monthsPerRow:X,timezone:U}=i,J=$e(i,J7),{value:Q,handleValueChange:ne,timezone:Z}=Jd({name:"DateCalendar",timezone:U,value:l,defaultValue:u,referenceDate:c,onChange:f,valueManager:pr}),{view:Y,setView:le,focusedView:ee,setFocusedView:te,goToNextView:xe,setValueAndGoToNextView:pe}=Wb({view:S,views:k,openTo:T,onChange:ne,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:I}),{referenceDate:be,calendarState:se,changeFocusedDay:Re,changeMonth:ve,handleChangeMonth:ze,isDateDisabled:De,onMonthSwitchingAnimationEnd:Tt}=A_({value:Q,referenceDate:c,reduceAnimations:y,onMonthChange:g,minDate:R,maxDate:N,shouldDisableDate:x,disablePast:h,disableFuture:p,timezone:Z}),at=F&&Q||R,qe=F&&Q||N,ce=`${o}-grid-label`,Ce=ee!==null,Oe=W?.calendarHeader??Q7,He=nt({elementType:Oe,externalSlotProps:H?.calendarHeader,additionalProps:{views:k,view:Y,currentMonth:se.currentMonth,onViewChange:le,onMonthChange:(We,Dt)=>ze({newMonth:We,direction:Dt}),minDate:at,maxDate:qe,disabled:F,disablePast:h,disableFuture:p,reduceAnimations:y,timezone:Z,labelId:ce},ownerState:i}),je=Pe(We=>{const Dt=r.startOfMonth(We),Ot=r.endOfMonth(We),Et=De(We)?ga({utils:r,date:We,minDate:r.isBefore(R,Dt)?Dt:R,maxDate:r.isAfter(N,Ot)?Ot:N,disablePast:h,disableFuture:p,isDateDisabled:De,timezone:Z}):We;Et?(pe(Et,"finish"),g?.(Dt)):(xe(),ve(Dt)),Re(Et,!0)}),Le=Pe(We=>{const Dt=r.startOfYear(We),Ot=r.endOfYear(We),Et=De(We)?ga({utils:r,date:We,minDate:r.isBefore(R,Dt)?Dt:R,maxDate:r.isAfter(N,Ot)?Ot:N,disablePast:h,disableFuture:p,isDateDisabled:De,timezone:Z}):We;Et?(pe(Et,"finish"),m?.(Et)):(xe(),ve(Dt)),Re(Et,!0)}),Je=Pe(We=>ne(We&&sl(r,We,Q??be),"finish",Y));D.useEffect(()=>{Q!=null&&r.isValid(Q)&&ve(Q)},[Q]);const yt=i,ht=e9(yt),ue={disablePast:h,disableFuture:p,maxDate:N,minDate:R},ye={disableHighlightToday:v,readOnly:B,disabled:F,timezone:Z,gridLabelId:ce,slots:W,slotProps:H},Te=D.useRef(Y);D.useEffect(()=>{Te.current!==Y&&(ee===Te.current&&te(Y,!0),Te.current=Y)},[ee,te,Y]);const Be=D.useMemo(()=>[Q],[Q]);return d.jsxs(n9,$({ref:n,className:Ae(ht.root,O),ownerState:yt},J,{children:[d.jsx(Oe,$({},He,{slots:W,slotProps:H})),d.jsx(r9,{reduceAnimations:y,className:ht.viewTransitionContainer,transKey:Y,ownerState:yt,children:d.jsxs("div",{children:[Y==="year"&&d.jsx(A7,$({},ue,ye,{value:Q,onChange:Le,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>te("year",We),yearsOrder:_,yearsPerRow:ae,referenceDate:be})),Y==="month"&&d.jsx(b7,$({},ue,ye,{hasFocus:Ce,className:O,value:Q,onChange:je,shouldDisableMonth:E,onFocusedViewChange:We=>te("month",We),monthsPerRow:X,referenceDate:be})),Y==="day"&&d.jsx(i7,$({},se,ue,ye,{onMonthSwitchingAnimationEnd:Tt,onFocusedDayChange:Re,reduceAnimations:y,selectedDays:Be,onSelectedDaysChange:Je,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>te("day",We),showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:V,displayWeekNumber:re,loading:w,renderLoading:G}))]})})]}))}),ri=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:p,disablePast:h,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:S,onYearChange:k,yearsOrder:T,yearsPerRow:O,slots:F,slotProps:B,loading:R,renderLoading:N,disableHighlightToday:v,readOnly:L,disabled:I,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:V,autoFocus:W,fixedWeekNumber:H,displayWeekNumber:w,timezone:G})=>d.jsx(o9,{view:e,onViewChange:t,views:n.filter(Tm),focusedView:r&&Tm(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:p,disablePast:h,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:S,onYearChange:k,yearsOrder:T,yearsPerRow:O,slots:F,slotProps:B,loading:R,renderLoading:N,disableHighlightToday:v,readOnly:L,disabled:I,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:V,autoFocus:W,fixedWeekNumber:H,displayWeekNumber:w,timezone:G}),cy=D.forwardRef(function(t,n){const r=Fr(),o=At(),i=jb(t,"MuiDesktopDatePicker"),a=$({day:ri,month:ri,year:ri},i.viewRenderers),s=$({},i,{viewRenderers:a,format:Gd(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:$({openPickerIcon:yF,field:oy},i.slots),slotProps:$({},i.slotProps,{field:u=>$({},Fn(i.slotProps?.field,u),Hb(i),{ref:n}),toolbar:$({hidden:!0},i.slotProps?.toolbar)})}),{renderPicker:l}=hF({props:s,valueManager:pr,valueType:"date",getOpenDialogAriaText:_b({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Ka});return l()});cy.propTypes={autoFocus:de.bool,className:de.string,closeOnSelect:de.bool,dayOfWeekFormatter:de.func,defaultValue:de.object,disabled:de.bool,disableFuture:de.bool,disableHighlightToday:de.bool,disableOpenPicker:de.bool,disablePast:de.bool,displayWeekNumber:de.bool,enableAccessibleFieldDOMStructure:de.any,fixedWeekNumber:de.number,format:de.string,formatDensity:de.oneOf(["dense","spacious"]),inputRef:Y1,label:de.node,loading:de.bool,localeText:de.object,maxDate:de.object,minDate:de.object,monthsPerRow:de.oneOf([3,4]),name:de.string,onAccept:de.func,onChange:de.func,onClose:de.func,onError:de.func,onMonthChange:de.func,onOpen:de.func,onSelectedSectionsChange:de.func,onViewChange:de.func,onYearChange:de.func,open:de.bool,openTo:de.oneOf(["day","month","year"]),orientation:de.oneOf(["landscape","portrait"]),readOnly:de.bool,reduceAnimations:de.bool,referenceDate:de.object,renderLoading:de.func,selectedSections:de.oneOfType([de.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),de.number]),shouldDisableDate:de.func,shouldDisableMonth:de.func,shouldDisableYear:de.func,showDaysOutsideCurrentMonth:de.bool,slotProps:de.object,slots:de.object,sx:de.oneOfType([de.arrayOf(de.oneOfType([de.func,de.object,de.bool])),de.func,de.object]),timezone:de.string,value:de.object,view:de.oneOf(["day","month","year"]),viewRenderers:de.shape({day:de.func,month:de.func,year:de.func}),views:de.arrayOf(de.oneOf(["day","month","year"]).isRequired),yearsOrder:de.oneOf(["asc","desc"]),yearsPerRow:de.oneOf([3,4])};const i9=oe(Or)({[`& .${pa.container}`]:{outline:0},[`& .${pa.paper}`]:{outline:0,minWidth:Wl}}),a9=oe(Nr)({"&:first-of-type":{padding:0}});function s9(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=o?.dialog??i9,s=o?.mobileTransition??vo;return d.jsx(a,$({open:r,onClose:n},i?.dialog,{TransitionComponent:s,TransitionProps:i?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:i?.mobilePaper,children:d.jsx(a9,{children:t})}))}const l9=["props","getOpenDialogAriaText"],u9=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=$e(e,l9);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:p,onSelectedSectionsChange:h,timezone:f,name:m,label:g,inputRef:y,readOnly:x,disabled:E,localeText:C}=t,S=D.useRef(null),k=Zn(),T=i?.toolbar?.hidden??!1,{open:O,actions:F,layoutProps:B,renderCurrentView:R,fieldProps:N,contextValue:v}=qb($({},r,{props:t,fieldRef:S,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,I=nt({elementType:L,externalSlotProps:i?.field,additionalProps:$({},N,T&&{id:k},!(E||x)&&{onClick:F.onOpen,onKeyDown:EN(F.onOpen)},{readOnly:x??!0,disabled:E,className:a,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:p,onSelectedSectionsChange:h,timezone:f,label:g,name:m},y?{inputRef:y}:{}),ownerState:t});I.inputProps=$({},I.inputProps,{"aria-label":n(N.value)});const A=$({textField:o.textField},I.slots),M=o.layout??Gb;let V=k;T&&(g?V=`${k}-label`:V=void 0);const W=$({},i,{toolbar:$({},i?.toolbar,{titleId:k}),mobilePaper:$({"aria-labelledby":V},i?.mobilePaper)}),H=rt(S,I.unstableFieldRef);return{renderPicker:()=>d.jsxs(Qb,{contextValue:v,localeText:C,children:[d.jsx(L,$({},I,{slots:A,slotProps:W,unstableFieldRef:H})),d.jsx(s9,$({},F,{open:O,slots:o,slotProps:W,children:d.jsx(M,$({},B,W?.layout,{slots:o,slotProps:W,children:R()}))}))]})}},dy=D.forwardRef(function(t,n){const r=Fr(),o=At(),i=jb(t,"MuiMobileDatePicker"),a=$({day:ri,month:ri,year:ri},i.viewRenderers),s=$({},i,{viewRenderers:a,format:Gd(o,i,!1),slots:$({field:oy},i.slots),slotProps:$({},i.slotProps,{field:u=>$({},Fn(i.slotProps?.field,u),Hb(i),{ref:n}),toolbar:$({hidden:!1},i.slotProps?.toolbar)})}),{renderPicker:l}=u9({props:s,valueManager:pr,valueType:"date",getOpenDialogAriaText:_b({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Ka});return l()});dy.propTypes={autoFocus:de.bool,className:de.string,closeOnSelect:de.bool,dayOfWeekFormatter:de.func,defaultValue:de.object,disabled:de.bool,disableFuture:de.bool,disableHighlightToday:de.bool,disableOpenPicker:de.bool,disablePast:de.bool,displayWeekNumber:de.bool,enableAccessibleFieldDOMStructure:de.any,fixedWeekNumber:de.number,format:de.string,formatDensity:de.oneOf(["dense","spacious"]),inputRef:Y1,label:de.node,loading:de.bool,localeText:de.object,maxDate:de.object,minDate:de.object,monthsPerRow:de.oneOf([3,4]),name:de.string,onAccept:de.func,onChange:de.func,onClose:de.func,onError:de.func,onMonthChange:de.func,onOpen:de.func,onSelectedSectionsChange:de.func,onViewChange:de.func,onYearChange:de.func,open:de.bool,openTo:de.oneOf(["day","month","year"]),orientation:de.oneOf(["landscape","portrait"]),readOnly:de.bool,reduceAnimations:de.bool,referenceDate:de.object,renderLoading:de.func,selectedSections:de.oneOfType([de.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),de.number]),shouldDisableDate:de.func,shouldDisableMonth:de.func,shouldDisableYear:de.func,showDaysOutsideCurrentMonth:de.bool,slotProps:de.object,slots:de.object,sx:de.oneOfType([de.arrayOf(de.oneOfType([de.func,de.object,de.bool])),de.func,de.object]),timezone:de.string,value:de.object,view:de.oneOf(["day","month","year"]),viewRenderers:de.shape({day:de.func,month:de.func,year:de.func}),views:de.arrayOf(de.oneOf(["day","month","year"]).isRequired),yearsOrder:de.oneOf(["asc","desc"]),yearsPerRow:de.oneOf([3,4])};const c9=["desktopModeMediaQuery"],Os=D.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=CN}=r,i=$e(r,c9);return Pb(o,{defaultMatches:!0})?d.jsx(cy,$({ref:n},i)):d.jsx(dy,$({ref:n},i))});var Ls={exports:{}},d9=Ls.exports,_m;function p9(){return _m||(_m=1,(function(e,t){(function(n,r){e.exports=r()})(d9,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,a,s){var l=a.prototype;s.utc=function(g){var y={date:g,utc:!0,args:arguments};return new a(y)},l.utc=function(g){var y=s(this.toDate(),{locale:this.$L,utc:!0});return g?y.add(this.utcOffset(),n):y},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g)};var c=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else c.call(this)};var p=l.utcOffset;l.utcOffset=function(g,y){var x=this.$utils().u;if(x(g))return this.$u?0:x(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=(function(k){k===void 0&&(k="");var T=k.match(r);if(!T)return null;var O=(""+T[0]).match(o)||["-",0,0],F=O[0],B=60*+O[1]+ +O[2];return B===0?0:F==="+"?B:-B})(g),g===null))return this;var E=Math.abs(g)<=16?60*g:g;if(E===0)return this.utc(y);var C=this.clone();if(y)return C.$offset=E,C.$u=!1,C;var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(E+S,n)).$offset=E,C.$x.$localOffset=S,C};var h=l.format;l.format=function(g){var y=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var f=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var m=l.diff;l.diff=function(g,y,x){if(g&&this.$u===g.$u)return m.call(this,g,y,x);var E=this.local(),C=s(g).local();return m.call(E,C,y,x)}}}))})(Ls)),Ls.exports}var f9=p9();const py=Xn(f9);bt.extend(py);function Uu(e){switch(e){case"Star":return["Equals","Contains"];case"MinMax":return["Equals","Less Than","Greater Than","Between"];case"DateMinMax":return["Equals","Before","After","Between"];case"Retrieval":return["Semantic Search"];case"Boolean":return["Equals"];case"NONE":default:return[]}}function h9(e){return e==="DateMinMax"}function zu(e){return e==="Between"}function fy({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const i=()=>n?.matchType?n.matchType:e.defaultMatchType?e.defaultMatchType:e.filterType==="DateMinMax"?"Between":Uu(e.filterType)[0]||"Equals",[a,s]=q.useState(i()),[l,u]=q.useState(n?.value??""),[c,p]=q.useState(n?.value2??""),[h,f]=q.useState([]),[m,g]=q.useState(!1),[y,x]=q.useState(""),[E,C]=q.useState(!1),[S,k]=q.useState(!1),T=q.useRef(null),O=q.useRef(0),[F,B]=q.useState(!1);q.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const w=y.trim();if(w.length<=2){f([]),C(!1);return}return T.current&&clearTimeout(T.current),T.current=setTimeout(async()=>{O.current+=1;const G=O.current;g(!0);try{const re=await o(w,e);G===O.current&&f(re)}catch(re){G===O.current&&(console.error("Retrieval failed",re),f([]))}finally{G===O.current&&(g(!1),C(!0))}},500),()=>{T.current&&clearTimeout(T.current)}},[y,e,o]),q.useEffect(()=>{n===null?(u(""),p(""),s(e.defaultMatchType??(e.filterType==="DateMinMax"?"Between":Uu(e.filterType)[0]||"Equals"))):n&&(s(n.matchType),u(n.value??""),p(n.value2??""))},[n,e.filterType,e.defaultMatchType]);const R=Uu(e.filterType),N=h9(e.filterType),v=zu(a),L=N&&t.length>=2&&t[0].value instanceof Date?bt.utc(t[0].value):void 0,I=N&&t.length>=2&&t[1].value instanceof Date?bt.utc(t[1].value):void 0,A=e.filterType==="MinMax"&&t.length>=2&&typeof t[0].value=="number"?t[0].value:void 0,M=e.filterType==="MinMax"&&t.length>=2&&typeof t[1].value=="number"?t[1].value:void 0;if(R.length===0)return null;const V=w=>{const G=w.target.value;s(G),zu(G)||p(""),l&&r({dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:G,value:l,...zu(G)&&c&&{value2:c}})},W=(w,G)=>{u(w??""),G!==void 0&&p(G??"");const re=Array.isArray(w)&&w.length===0;r(!re&&w!==""&&w!==null&&w!==void 0?{dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:a,value:w,...v&&G&&{value2:G}}:null)},H=()=>{u(""),p(""),r(null)};return d.jsxs(It,{sx:{display:"flex",flexDirection:"column",gap:1.5,fontSize:"0.75rem","& .MuiInputBase-root":{fontSize:"0.75rem"},"& .MuiInputBase-input":{padding:"6px 10px"},"& .MuiSelect-select":{padding:"6px 10px !important"},"& .MuiAutocomplete-input":{padding:"0 !important"},"& .MuiAutocomplete-root .MuiInputBase-root":{padding:"5px 10px",minHeight:"29.5px",boxSizing:"border-box",flexWrap:"wrap"},"& .MuiChip-root":{height:"16px",margin:"0 2px 0 0"},"& .MuiChip-label":{fontSize:"0.7rem",padding:"0 6px"},"& .MuiChip-deleteIcon":{fontSize:"14px",margin:"0 2px 0 -4px"},"& .MuiInputLabel-root":{fontSize:"0.75rem",transform:"translate(10px, 6px) scale(1)"},"& .MuiInputLabel-shrink":{fontSize:"0.85rem",transform:"translate(14px, -9px) scale(0.75)"},"& .MuiOutlinedInput-notchedOutline legend":{fontSize:"0.65rem"},"& .MuiFormHelperText-root":{fontSize:"0.65rem",marginTop:"2px"},"& .MuiSvgIcon-root":{fontSize:"1.25rem"}},children:[d.jsxs(It,{sx:{fontWeight:600,color:e.required&&!n?"error.main":"text.primary"},children:[e.label??e.dimensionName,e.required&&d.jsx(It,{component:"span",sx:{color:n?"text.secondary":"error.main",fontWeight:400,fontSize:"0.7rem",ml:.5},children:"(required)"})]}),e.filterType!=="Boolean"&&!e.defaultMatchType&&R.length>1&&d.jsxs(rl,{size:"small",fullWidth:!0,children:[d.jsx(nl,{children:"Match Type"}),d.jsx(ol,{value:a,label:"Match Type",onChange:V,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:R.map(w=>d.jsx(Qt,{value:w,children:w},w))})]}),e.filterType==="Star"&&a==="Equals"&&d.jsx(_c,{multiple:!0,size:"small",options:t,getOptionLabel:w=>typeof w=="string"?w:typeof w=="object"&&w!==null&&"value"in w?String(w.value):String(w),value:Array.isArray(l)?l.map(w=>t.find(G=>G.value===w)||w):l?[t.find(w=>w.value===l)||l]:[],onChange:(w,G)=>{const re=G.map(_=>typeof _=="string"?_:_&&typeof _=="object"&&"value"in _?_.value:_);W(re)},noOptionsText:"No matches found",renderInput:w=>d.jsx(tt,{...w,size:"small",label:"Values",placeholder:"Select values..."}),freeSolo:!e.values||e.values.length===0,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="Star"&&a==="Contains"&&d.jsx(tt,{size:"small",label:"Search Text",value:l,onChange:w=>u(w.target.value),onBlur:()=>W(l),onKeyDown:w=>{w.key==="Enter"&&W(l)},placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&d.jsxs(rl,{size:"small",fullWidth:!0,children:[d.jsx(nl,{children:"Value"}),d.jsxs(ol,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:w=>{const G=w.target.value;G==="true"?W(!0):G==="false"?W(!1):H()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[d.jsx(Qt,{value:"",children:d.jsx("em",{children:"Blank"})}),d.jsx(Qt,{value:"true",children:"True"}),d.jsx(Qt,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&a==="Semantic Search"&&d.jsx(_c,{multiple:!0,size:"small",options:h,loading:m,getOptionLabel:w=>typeof w=="string"?w:typeof w=="object"&&w!==null&&"value"in w?String(w.value):String(w),value:Array.isArray(l)?l.map(w=>h.find(re=>re.value===w)||{value:w}):l?[{value:l}]:[],onInputChange:(w,G)=>{x(G)},onChange:(w,G)=>{const re=G.map(_=>typeof _=="string"?_:_&&typeof _=="object"&&"value"in _?_.value:_);W(re)},noOptionsText:y.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:w=>d.jsx(tt,{...w,size:"small",label:"Search Values",placeholder:"Type to search...",onFocus:()=>k(!0),onBlur:()=>k(!1),helperText:S&&!m&&E&&h.length===0?"No matches found":void 0,InputProps:{...w.InputProps,endAdornment:d.jsxs(d.Fragment,{children:[m?d.jsx(Od,{color:"inherit",size:20}):null,w.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:w=>w,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!v&&d.jsx(tt,{size:"small",type:"number",label:"Value",value:l,onChange:w=>W(parseFloat(w.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:A,max:M},helperText:F&&A!==void 0&&M!==void 0?`Valid range: [${A} - ${M}]`:void 0}),e.filterType==="MinMax"&&v&&d.jsxs(It,{sx:{display:"flex",flexDirection:"column",gap:1},children:[d.jsxs(It,{sx:{display:"flex",gap:1,alignItems:"center"},children:[d.jsx(tt,{size:"small",type:"number",label:"From",value:l,onChange:w=>W(parseFloat(w.target.value)||"",c),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:A,max:c||M}}),d.jsx(It,{children:"to"}),d.jsx(tt,{size:"small",type:"number",label:"To",value:c,onChange:w=>W(l,parseFloat(w.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||A,max:M}})]}),F&&A!==void 0&&M!==void 0&&d.jsxs(ft,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",A," - ",M,"]"]})]}),N&&!v&&d.jsx(ll,{dateAdapter:Bc,children:d.jsx(Os,{label:"Date",value:l instanceof Date?bt.utc(l):null,onChange:w=>{w===null?W(null):w.isValid()&&W(w.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:L,maxDate:l instanceof Date?void 0:I,referenceDate:a==="After"&&L?L:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:F&&L&&I?`Valid range: [${L.format("YYYY-MM-DD")} - ${I.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),N&&v&&d.jsx(ll,{dateAdapter:Bc,children:d.jsxs(It,{sx:{display:"flex",flexDirection:"column",gap:1},children:[d.jsxs(It,{sx:{display:"flex",gap:1,alignItems:"center"},children:[d.jsx(It,{sx:{flex:1,minWidth:0},children:d.jsx(Os,{label:"From",value:l instanceof Date?bt.utc(l):null,onChange:w=>{w===null?W(null,c):w.isValid()&&W(w.utc().toDate(),c)},timezone:"UTC",minDate:l instanceof Date?void 0:L,maxDate:c instanceof Date?bt.utc(c):l instanceof Date?void 0:I,referenceDate:L,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),d.jsx(It,{children:"to"}),d.jsx(It,{sx:{flex:1,minWidth:0},children:d.jsx(Os,{label:"To",value:c instanceof Date?bt.utc(c):null,onChange:w=>{w===null?W(l,null):w.isValid()&&W(l,w.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?bt.utc(l):c instanceof Date?void 0:L,maxDate:c instanceof Date?void 0:I,referenceDate:l instanceof Date?bt.utc(l):L,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),F&&L&&I&&d.jsxs(ft,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",L.format("YYYY-MM-DD")," -"," ",I.format("YYYY-MM-DD"),"]"]})]})})]})}function m9(e){const t=new Set,n=e.schema?.fields;if(!n)return t;for(const r of n)"kind"in r&&r.kind==="join"&&r.name&&t.add(r.name);return t}function hy(e){if(!e)return null;for(const t of e)if(t.startsWith("##(filters)")){const n=t.slice(11).trim();try{const r=JSON.parse(n);if(Array.isArray(r)){const o=[];for(const i of r)if(typeof i=="string"){const a=i.indexOf(".");a>0&&a<i.length-1&&o.push({source:i.substring(0,a),dimension:i.substring(a+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function my(e){if(e.startsWith("#(filter)")){const t=e.slice(9).trim();try{const n=JSON.parse(t);if(n.type)return n}catch(n){console.error(`Failed to parse "${e}" annotation:`,n)}}return null}function g9(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function gy(e){const t=new Map;let n="";for(const r of e)if(r.type==="code"){if(!n&&r.text){const o=r.text.match(/import\s+(?:\{[^}]*\}\s+from\s+)?['"]([^'"]+)['"]/);o&&(n=o[1])}if(r.newSources&&r.newSources.length>0)for(const o of r.newSources)try{const i=JSON.parse(o);i.name&&t.set(i.name,i)}catch(i){console.error("Failed to parse SourceInfo:",i)}}return{sourceInfoMap:t,modelPath:n}}function by(e,t,n){const r=[];for(const{source:o,dimension:i}of t){const a=e.get(o);if(!a){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}const s=a.schema?.fields;if(!s){r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}const l=s.find(p=>p.name===i);if(!l){console.warn(`Dimension "${i}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:i,filterType:"Star"});continue}let u="Star",c;if("annotations"in l&&l.annotations){for(const p of l.annotations)if(p.value){const h=my(p.value);h&&(u=h.type);const f=g9(p.value);f&&(c=f)}}r.push({source:o,model:n,dimensionName:i,filterType:u,label:c})}return r}function b9(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:i,source:a,matchType:s,value:l,value2:u}=o,p=a&&a!==n?`\`${a}\`.\`${i}\``:`\`${i}\``,h=l instanceof Date,f=(m,g=!1)=>m==null?"null":g&&m instanceof Date?`@${m.getFullYear()}-${String(m.getMonth()+1).padStart(2,"0")}-${String(m.getDate()).padStart(2,"0")}`:typeof m=="string"?`'${m.replace(/'/g,"\\'")}'`:typeof m=="boolean"?m?"true":"false":String(m);switch(s){case"Equals":case"Semantic Search":return Array.isArray(l)&&l.length>0?`(${l.map(g=>`${p} = ${f(g,h)}`).join(" or ")})`:`${p} = ${f(l,h)}`;case"Contains":return typeof l=="string"?`${p} ~ f'%${l.replace(/'/g,"\\'")}%'`:`${p} = ${f(l)}`;case"After":case"Greater Than":return`${p} > ${f(l,h)}`;case"Before":case"Less Than":return`${p} < ${f(l,h)}`;case"Between":return u!==void 0?`${p} >= ${f(l,h)} and ${p} <= ${f(u,h)}`:`${p} >= ${f(l,h)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function y9(e){const t=e.match(/run\s*:\s*(\w+)\s*->/);if(t)return t[1];const n=e.match(/^\s*(\w+)\s*->/m);return n?n[1]:null}function x9(e,t){return`${e.trimEnd()} + {where: ${t}}`}const yy=lt(d.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),xy=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[1]||t;if(r.length<=120)return r;const o=r.substring(0,120).split(" ");return o.pop(),o.join(" ")+"..."},Ey=(e,t)=>{const n=(e.readme||void 0)?.split(`
203
+ `)??[];return n.length===0&&(n.push(`# ${e.name}`),n.push("")),(e.readme?.length??0)>0&&t?n.splice(2,1,t):t&&n.push(t),n.join(`
204
+ `)};function E9(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=Nl();D.useEffect(()=>{if(!o)return;function x(E){E.defaultPrevented||E.key==="Escape"&&r?.(E,"escapeKeyDown")}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[o,r]);const s=Pe((x,E)=>{r?.(x,E)}),l=Pe(x=>{!r||x==null||a.start(x,()=>{s(null,"timeout")})});D.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const u=x=>{r?.(x,"clickaway")},c=a.clear,p=D.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),h=x=>E=>{const C=x.onBlur;C?.(E),p()},f=x=>E=>{const C=x.onFocus;C?.(E),c()},m=x=>E=>{const C=x.onMouseEnter;C?.(E),c()},g=x=>E=>{const C=x.onMouseLeave;C?.(E),p()};return D.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",p),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",c)}},[n,o,p,c]),{getRootProps:(x={})=>{const E={...on(e),...on(x)};return{role:"presentation",...x,...E,onBlur:h(E),onFocus:f(E),onMouseEnter:m(E),onMouseLeave:g(E)}},onClickAway:u}}function Bm(e){return e.substring(2).toLowerCase()}function C9(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function T9(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=D.useRef(!1),s=D.useRef(null),l=D.useRef(!1),u=D.useRef(!1);D.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=rt(ki(t),s),p=Pe(m=>{const g=u.current;u.current=!1;const y=Ut(s.current);if(!l.current||!s.current||"clientX"in m&&C9(m,y))return;if(a.current){a.current=!1;return}let x;m.composedPath?x=m.composedPath().includes(s.current):x=!y.documentElement.contains(m.target)||s.current.contains(m.target),!x&&(n||!g)&&o(m)}),h=m=>g=>{u.current=!0;const y=t.props[m];y&&y(g)},f={ref:c};return i!==!1&&(f[i]=h(i)),D.useEffect(()=>{if(i!==!1){const m=Bm(i),g=Ut(s.current),y=()=>{a.current=!0};return g.addEventListener(m,p),g.addEventListener("touchmove",y),()=>{g.removeEventListener(m,p),g.removeEventListener("touchmove",y)}}},[p,i]),r!==!1&&(f[r]=h(r)),D.useEffect(()=>{if(r!==!1){const m=Bm(r),g=Ut(s.current);return g.addEventListener(m,p),()=>{g.removeEventListener(m,p)}}},[p,r]),D.cloneElement(t,f)}function v9(e){return _e("MuiSnackbarContent",e)}Me("MuiSnackbarContent",["root","message","action"]);const S9=e=>{const{classes:t}=e;return Ne({root:["root"],action:["action"],message:["message"]},v9,t)},k9=oe(Ao,{name:"MuiSnackbarContent",slot:"Root"})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Xu(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Xu(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),D9=oe("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),w9=oe("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),I9=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,u=r,c=S9(u);return d.jsxs(k9,{role:s,elevation:6,className:Ae(c.root,i),ownerState:u,ref:n,...l,children:[d.jsx(D9,{className:c.message,ownerState:u,children:a}),o?d.jsx(w9,{className:c.action,ownerState:u,children:o}):null]})});function A9(e){return _e("MuiSnackbar",e)}Me("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const P9=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ke(n.vertical)}${ke(n.horizontal)}`]};return Ne(r,A9,t)},R9=oe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ke(n.anchorOrigin.vertical)}${ke(n.anchorOrigin.horizontal)}`]]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),M9=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiSnackbar"}),o=Gr(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:c,className:p,ClickAwayListenerProps:h,ContentProps:f,disableWindowBlurListener:m=!1,message:g,onBlur:y,onClose:x,onFocus:E,onMouseEnter:C,onMouseLeave:S,open:k,resumeHideDuration:T,slots:O={},slotProps:F={},TransitionComponent:B,transitionDuration:R=i,TransitionProps:{onEnter:N,onExited:v,...L}={},...I}=r,A={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:u,disableWindowBlurListener:m,TransitionComponent:B,transitionDuration:R},M=P9(A),{getRootProps:V,onClickAway:W}=E9({...A}),[H,w]=D.useState(!0),G=ee=>{w(!0),v&&v(ee)},re=(ee,te)=>{w(!1),N&&N(ee,te)},_={slots:{transition:B,...O},slotProps:{content:f,clickAwayListener:h,transition:L,...F}},[ae,X]=st("root",{ref:n,className:[M.root,p],elementType:R9,getSlotProps:V,externalForwardedProps:{..._,...I},ownerState:A}),[U,{ownerState:J,...Q}]=st("clickAwayListener",{elementType:T9,externalForwardedProps:_,getSlotProps:ee=>({onClickAway:(...te)=>{const xe=te[0];ee.onClickAway?.(...te),!xe?.defaultMuiPrevented&&W(...te)}}),ownerState:A}),[ne,Z]=st("content",{elementType:I9,shouldForwardComponentProp:!0,externalForwardedProps:_,additionalProps:{message:g,action:a},ownerState:A}),[Y,le]=st("transition",{elementType:va,externalForwardedProps:_,getSlotProps:ee=>({onEnter:(...te)=>{ee.onEnter?.(...te),re(...te)},onExited:(...te)=>{ee.onExited?.(...te),G(...te)}}),additionalProps:{appear:!0,in:k,timeout:R,direction:s==="top"?"down":"up"},ownerState:A});return!k&&H?null:d.jsx(U,{...Q,...O.clickAwayListener&&{ownerState:J},children:d.jsx(ae,{...X,children:d.jsx(Y,{...le,children:c||d.jsx(ne,{...Z})})})})});function jm(){const[e,t]=q.useState(!1),{apiClients:n}=ut.useServer(),[r,o]=q.useState(""),i=()=>{t(!0)},a=()=>{t(!1)},s=Rr.useQueryClient(),l=ur({async mutationFn(c){return n.environments.createEnvironment({name:c.name,readme:Ey({name:c.name,readme:""},c.description)})},onSuccess(){a(),s.invalidateQueries({queryKey:["environments"]}),o("Environment created successfully")},onError(c){o(c instanceof Error?c.message:"An unknown error occurred")}}),u=async c=>{c.preventDefault();const p=new FormData(c.currentTarget),h=p.get("name")?.toString(),f=p.get("description")?.toString();if(!h)throw new Error("Name is required");l.mutate({name:h,description:f})};return d.jsxs(q.Fragment,{children:[d.jsx(Lt,{variant:"contained",onClick:i,startIcon:d.jsx(bn.AddCircleRounded,{}),sx:{mt:2,color:"white"},children:"Create New Environment"}),d.jsxs(Or,{open:e,onClose:a,children:[d.jsx(Zr,{children:"Create New Environment"}),d.jsxs(Nr,{children:[d.jsx(Va,{children:"Add a new environment to start exploring semantic models and analyzing data."}),d.jsxs("form",{onSubmit:u,id:"environment-form",children:[d.jsx(tt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",type:"text",fullWidth:!0,variant:"standard"}),d.jsx(tt,{margin:"dense",id:"description",name:"description",label:"Environment Description",placeholder:"Explore semantic models, run queries, and build dashboards",type:"text",fullWidth:!0,variant:"standard"})]})]}),d.jsxs(Lr,{children:[d.jsx(Lt,{disabled:l.isPending,onClick:a,children:"Cancel"}),d.jsx(Lt,{type:"submit",form:"environment-form",loading:l.isPending,children:"Create Environment"})]})]}),d.jsx(M9,{open:r!=="",autoHideDuration:6e3,onClose:()=>o(""),message:r})]})}function O9({environment:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=ut.useServer(),i=Rr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},c=ur({mutationFn:()=>o.environments.deleteEnvironment(e.name),onSuccess(){u(),i.invalidateQueries({queryKey:["environments"]}),s("Environment deleted successfully")},onError(p){s(p instanceof Error?p.message:"An unknown error occurred")}});return d.jsxs(q.Fragment,{children:[d.jsxs(P.MenuItem,{onClick:l,children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Delete,{fontSize:"small"})}),d.jsx(P.ListItemText,{children:"Delete"})]}),d.jsxs(Or,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[d.jsx(Zr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Environment"}),d.jsx(er,{"aria-label":"close",onClick:u,sx:p=>({position:"absolute",right:8,top:8,color:p.palette.grey[500]}),children:d.jsx(Ir,{})}),d.jsx(Nr,{dividers:!0,children:d.jsxs(ft,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),d.jsxs(Lr,{children:[d.jsx(Lt,{variant:"outlined",onClick:u,style:{borderColor:ho.teal,color:ho.teal},children:"Cancel"}),d.jsx(Lt,{loading:c.isPending,variant:"contained",autoFocus:!0,onClick:()=>c.mutate(),color:"error",children:"Delete"})]}),d.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})]})}function L9({environment:e,onCloseDialog:t}){const[n,r]=q.useState(!1),{apiClients:o}=ut.useServer(),i=Rr.useQueryClient(),[a,s]=q.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},c=ur({async mutationFn(h){return o.environments.updateEnvironment(e.name,{name:e.name,readme:Ey({name:e.name,readme:e.readme},h.description)})},onSuccess(){u(),i.invalidateQueries({queryKey:["environments"]}),s("Environment updated successfully")},onError(h){s(h instanceof Error?h.message:"An unknown error occurred")}}),p=h=>{h.preventDefault();const m=new FormData(h.currentTarget).get("description")?.toString();c.mutate({description:m})};return d.jsxs(q.Fragment,{children:[d.jsxs(P.MenuItem,{onClick:l,children:[d.jsx(P.ListItemIcon,{children:d.jsx(bn.Edit,{fontSize:"small"})}),d.jsx(P.ListItemText,{children:"Edit"})]}),d.jsxs(Or,{open:n,onClose:u,children:[d.jsx(Zr,{children:"Edit Environment"}),d.jsxs(Nr,{children:[d.jsx(Va,{children:"Edit this environment's description."}),d.jsxs("form",{onSubmit:p,id:"environment-form",children:[d.jsx(tt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),d.jsx(tt,{margin:"dense",id:"description",name:"description",label:"Environment Description",type:"text",fullWidth:!0,variant:"standard",defaultValue:xy(e.readme)})]})]}),d.jsxs(Lr,{children:[d.jsx(Lt,{disabled:c.isPending,onClick:u,children:"Cancel"}),d.jsx(Lt,{type:"submit",form:"environment-form",loading:c.isPending,children:"Save Changes"})]})]}),d.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>s(""),message:a})]})}const N9=[{title:"Ad-hoc analysis",body:"Browse semantic sources, build queries, and run nested logic in Explorer — no code.",href:"https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis"},{title:"Notebook dashboards",body:"Code-first dashboards using Malloy notebooks. Versioned alongside your models.",href:"https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards"},{title:"AI data agents",body:"Expose models via MCP so agents can discover sources and ask well-formed questions.",href:"https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents"}];function F9({onClickEnvironment:e}){const{apiClients:t,mutable:n}=ut.useServer(),{data:r,isSuccess:o,isError:i,error:a}=Wt({queryKey:["environments"],queryFn:()=>t.environments.listEnvironments()});if(i)return d.jsx(cn,{error:a,context:"Environments List"});if(!o)return d.jsx(un,{text:"Loading environments..."});const s=r.data??[];return d.jsxs(P.Container,{maxWidth:"md",sx:{py:6},children:[d.jsxs(P.Box,{sx:{mb:5},children:[d.jsx(P.Typography,{variant:"h3",component:"h1",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Publisher"}),d.jsx(P.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"The open-source semantic model server for the Malloy data language."}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{maxWidth:720,lineHeight:1.6},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),d.jsx(P.Grid,{container:!0,spacing:4,sx:{mb:5},children:N9.map(l=>d.jsx(P.Grid,{size:{xs:12,md:4},children:d.jsxs(P.Stack,{spacing:1,children:[d.jsx(P.Typography,{variant:"body2",component:"a",href:l.href,target:"_blank",rel:"noopener noreferrer",sx:{fontWeight:500,color:"text.primary",textDecoration:"none","&:hover":{textDecoration:"underline"}},children:l.title}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6},children:l.body})]})},l.title))}),d.jsx(P.Divider,{sx:{my:4}}),s.length>0?d.jsxs(P.Box,{sx:{mb:4},children:[d.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[d.jsxs(P.Box,{children:[d.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:.5},children:"Environments"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published environments available on this server"})]}),n&&d.jsx(jm,{})]}),d.jsx(P.Grid,{container:!0,spacing:2,children:s.map(l=>d.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:d.jsx(_9,{environment:l,onClickEnvironment:e})},l.name))})]}):d.jsxs(P.Box,{sx:{mb:4},children:[d.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Get started"}),d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:3,maxWidth:600},children:"Create your first Malloy environment to start exploring semantic models and building data experiences."}),n?d.jsx(jm,{}):d.jsx(P.Button,{variant:"contained",color:"primary",href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn how to create models"})]}),d.jsx(P.Divider,{sx:{my:4}}),d.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",d.jsx(P.Box,{component:"a",href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",sx:{color:"text.primary",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute."]})]})}function _9({environment:e,onClickEnvironment:t}){const{mutable:n}=ut.useServer(),[r,o]=q.useState(null),i=!!r,a=xy(e.readme),s=c=>{e.name&&t&&t(`/${e.name}/`,c)},l=c=>{c.stopPropagation(),o(c.currentTarget)},u=()=>{o(null)};return d.jsx(P.Card,{variant:"outlined",onClick:s,sx:{height:"100%",cursor:"pointer",borderRadius:3,borderColor:"divider",boxShadow:"none",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:2,borderColor:"primary.main"}},children:d.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:d.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[d.jsx(P.Box,{sx:{width:36,height:36,borderRadius:1.5,bgcolor:"grey.100",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"text.primary"},children:d.jsx(yy,{sx:{fontSize:20}})}),d.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[d.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),d.jsx(P.Tooltip,{title:a,followCursor:!0,enterDelay:1e3,children:d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:a})})]}),n&&d.jsxs(d.Fragment,{children:[d.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Environment actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:d.jsx(bn.MoreVert,{fontSize:"small"})}),d.jsxs(P.Menu,{anchorEl:r,open:i,onClose:u,onClick:c=>c.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[d.jsx(L9,{environment:e,onCloseDialog:u}),d.jsx(O9,{environment:e,onCloseDialog:u})]})]})]})})})}const ul=lt(d.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),B9=lt(d.jsx("path",{d:"M8 5v14l11-7z"}));function Cy({open:e,onClose:t,result:n,title:r="Results"}){return d.jsxs(P.Dialog,{open:e,onClose:t,maxWidth:!1,fullWidth:!0,sx:{"& .MuiDialog-paper":{width:"95vw",height:"95vh",maxWidth:"none"}},children:[d.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r,d.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:d.jsx(Ir,{})})]}),d.jsx(P.DialogContent,{sx:{height:"calc(95vh - 120px)",overflow:"auto",padding:"0 16px"},children:d.jsx(Si,{result:n,maxHeight:800,maxResultSize:1e6})})]})}function j9({queryName:e,annotations:t,resourceUri:n,runOnDemand:r=!1,maxResultSize:o=0}){const[i,a]=q.useState(),[s,l]=q.useState(!1),[u,c]=q.useState(!1),{packageName:p,environmentName:h,versionId:f,modelPath:m}=Mt(n),{apiClients:g}=ut.useServer(),{data:y,isSuccess:x,isLoading:E}=Wt({queryKey:["namedQueryResult",n,e],queryFn:()=>g.models.executeQueryModel(h,p,m,{query:void 0,sourceName:void 0,queryName:e,versionId:f}),enabled:r?u:!0});return q.useEffect(()=>{if(t&&t.length>0){const C=t.map(S=>`// ${S}`).join(`
205
+ `);Zs(C,"typescript").then(S=>{a(S)})}},[t]),d.jsxs(nc,{children:[i&&d.jsx(P.Box,{sx:{marginBottom:"16px"},children:d.jsx(P.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:d.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:i}})})}),d.jsxs(P.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[d.jsx(P.Typography,{variant:"body2",sx:{fontSize:"15px",fontWeight:"600",color:"#495057",padding:"8px 16px",backgroundColor:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef"},children:e}),d.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>l(!0),children:d.jsx(ul,{sx:{fontSize:"18px",color:"text.secondary"}})})]}),d.jsxs(gs,{sx:{position:"relative"},children:[r&&!u&&d.jsxs(P.Box,{sx:{padding:"40px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Click Run to execute the query"}),d.jsx(P.Button,{variant:"contained",startIcon:d.jsx(B9,{}),onClick:()=>c(!0),sx:{backgroundColor:"#1976d2","&:hover":{backgroundColor:"#1565c0"},textTransform:"none",fontSize:"14px",fontWeight:600,padding:"8px 24px"},children:"Run Query"})]}),(!r||u)&&E&&d.jsx(P.Box,{sx:{padding:"20px",textAlign:"center"},children:d.jsx(P.Typography,{children:"Loading results..."})}),(!r||u)&&x&&y?.data?.result&&d.jsx(Si,{result:y.data.result,maxHeight:600,maxResultSize:o})]}),d.jsx(Cy,{open:s,onClose:()=>l(!1),result:y?.data?.result||"",title:`Query: ${e}`})]})}function rp(e,t=!0){const{modelPath:n,environmentName:r,packageName:o,versionId:i}=Mt(e),{apiClients:a}=ut.useServer();return Wt({queryKey:["package",r,o,n,i],queryFn:async()=>(await a.models.getModel(r,o,n,i)).data,enabled:t})}function op({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:i}){const[a,s]=q.useState(r);q.useEffect(()=>{s(r)},[r]);const{data:l,isError:u,isLoading:c,error:p}=rp(i,!e),{modelPath:h}=Mt(i),f=e||l;if(c&&!e)return d.jsx(un,{text:"Fetching Model..."});if(u&&!e)return console.log("error",p),d.jsx(cn,{error:p,context:`ModelExplorer > ${h}`});if(!f)return d.jsx(un,{text:"Loading..."});const m=(f?.sourceInfos||[]).map((y,x)=>{try{return JSON.parse(y)?.name||`Source ${x+1}`}catch{return`Source ${x+1}`}}),g=m[a]||"";return d.jsxs(Us,{variant:"outlined",children:[d.jsx(p0,{children:d.jsx(P.Stack,{sx:{flexDirection:"row"},children:d.jsx(_c,{size:"small",id:"size-small-standard",disablePortal:!0,options:m,value:g,onChange:(y,x)=>{if(!x)return;const E=m.indexOf(x);E>=0&&(s(E),o?.(E))},renderInput:y=>d.jsx(tt,{...y}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),d.jsx(Gc,{children:d.jsxs(P.Stack,{spacing:2,component:"section",children:[Array.isArray(f.sourceInfos)&&f.sourceInfos.length>0&&d.jsx(wd,{sourceAndPaths:f.sourceInfos.map(y=>({sourceInfo:JSON.parse(y),modelPath:h})),selectedSourceIndex:a,existingQuery:n,onQueryChange:t,resourceUri:i}),d.jsx(P.Box,{height:"5px"})]})})]})}function ip({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:i=!0,existingQuery:a,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}){return d.jsxs(P.Dialog,{open:e,onClose:t,fullScreen:!0,children:[d.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o,d.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:d.jsx(Ir,{})})]}),d.jsx(P.DialogContent,{children:i?d.jsx(op,{resourceUri:n,data:r,existingQuery:a,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}):d.jsx("div",{children:"No valid import statement found in cell"})})]})}function $9({onChange:e,resourceUri:t,runOnDemand:n=!1,maxResultSize:r=0}){const{modelPath:o}=Mt(t),{data:i,isError:a,isLoading:s,error:l}=rp(t),[u,c]=q.useState(!1),[p,h]=q.useState(),[f,m]=q.useState(0),[g,y]=q.useState("");if(s)return d.jsx(un,{text:"Fetching Model..."});if(a)return console.log("error",l),d.jsx(cn,{error:l,context:`Model > ${o}`});const x=S=>{h(S),e&&e(S)},E=S=>{m(S)},C=()=>{const S=window.location.href;navigator.clipboard.writeText(S).then(()=>y("URL copied to clipboard!")).catch(()=>y("Failed to copy URL"))};return d.jsxs(d.Fragment,{children:[d.jsxs(P.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(i?.sourceInfos)&&i.sourceInfos.length>0&&d.jsxs(P.Stack,{spacing:2,component:"section",children:[d.jsxs(P.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[d.jsx(P.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),d.jsx(P.Tooltip,{title:"Click to copy link",children:d.jsx(Qc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer"},onClick:C})})]}),d.jsx(op,{data:i,onChange:x,onSourceChange:E,existingQuery:p,initialSelectedSourceIndex:f,resourceUri:t}),d.jsx(P.IconButton,{sx:{position:"absolute",top:"90px",right:"4px",backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",zIndex:2},onClick:()=>c(!0),children:d.jsx(ul,{sx:{fontSize:"18px",color:"text.secondary",marginBottom:"5px"}})})]}),i?.queries?.length>0&&d.jsxs(P.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[d.jsx(P.Box,{sx:{padding:"0 0 16px 0"},children:d.jsx(P.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),i.queries.map(S=>d.jsx(j9,{queryName:S.name,annotations:S.annotations,resourceUri:t,runOnDemand:n,maxResultSize:r},S.name))]}),d.jsx(ip,{open:u,onClose:()=>c(!1),resourceUri:t,data:i,title:`Model: ${o.split("/").pop()}`,existingQuery:p,initialSelectedSourceIndex:f,onChange:x,onSourceChange:E})]}),d.jsx(P.Snackbar,{open:g!=="",autoHideDuration:6e3,onClose:()=>y(""),message:g})]})}function Ty(e,t){return`${e}:${t}`}function Pr(e){return Ty(e.source,e.filterName??e.dimensionName)}function vy(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function nr(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${vy(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function H9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${nr(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${nr(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${vy(r)}%'`:Array.isArray(r)?"":`${i} = ${nr(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${nr(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${nr(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${nr(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${nr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${nr(r,a)} and ${i} <= ${nr(o,a)}`:`${i} >= ${nr(r,a)}`;default:return""}}function U9(e){const t=new Map;for(const n of e){const r=`${n.source}|${n.model}`,o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function z9(e,t,n,r){const o=t.filter(u=>(u.filterType==="Star"||u.filterType==="MinMax"||u.filterType==="DateMinMax")&&!u.values);if(o.length===0)return"";const a=[...new Set(o.map(u=>u.dimensionName))].map(u=>`\`${u}\``).join(", "),s=r?.filter(u=>u.source===e)||[],l=s.length>0?s.map(u=>H9(u)).filter(u=>u.length>0).join(" and "):"";return`
206
+ run: ${e} -> {
207
+ ${l?`where: ${l}`:""}
208
+ index: ${a}
209
+ } -> {
210
+ select: *
211
+ order_by: weight desc
212
+
213
+ limit: ${n}
214
+ }
215
+ `}function V9(e,t){const n=new Map;for(const c of t){const p=Pr(c);n.set(p,[])}const r=JSON.parse(e),o=r.schema.fields,i=new Map;o.forEach((c,p)=>{i.set(c.name,p)});const a=c=>{if(!c)return null;switch(c.kind){case"string_cell":return c.string_value??null;case"number_cell":return c.number_value??null;case"boolean_cell":return c.boolean_value??null;case"null_cell":return null;default:return console.log("Unknown cell kind: "+c.kind),null}},l=(r.data?.array_value||[]).map(c=>{const p={};return c.kind==="record_cell"&&c.record_value&&c.record_value.forEach((h,f)=>{const m=o[f]?.name;if(m){const g=a(h);m==="fieldName"&&typeof g=="string"?p.fieldName=g:m==="fieldPath"&&typeof g=="string"?p.fieldPath=g:m==="fieldType"&&typeof g=="string"?p.fieldType=g:m==="fieldValue"&&typeof g=="string"?p.fieldValue=g:m==="weight"&&typeof g=="number"&&(p.weight=g)}}),p}),u=l.length===0||l.every(c=>!c.fieldName);for(const c of t){if(c.filterType==="NONE"||c.filterType==="Retrieval")continue;const p=l.filter(f=>{const m=f.fieldName||"",g=f.fieldPath||"";if(m===c.dimensionName||g===c.dimensionName||m.toLowerCase()===c.dimensionName.toLowerCase()||g.toLowerCase()===c.dimensionName.toLowerCase())return!0;const y=g.split(".").pop()||"";return y===c.dimensionName||y.toLowerCase()===c.dimensionName.toLowerCase()});if(p.length===0)continue;const h=Pr(c);if(c.filterType==="Star"){const f=p.filter(m=>m.fieldType==="string").map(m=>({value:m.fieldValue??"",count:m.weight})).sort((m,g)=>(g.count??0)-(m.count??0));n.set(h,f)}else if(c.filterType==="MinMax"){console.log("MinMax dimensionEntries: "+JSON.stringify(p,null,2)),console.log("All MinMax dimension entries fieldTypes:",p.map(m=>m.fieldType));const f=p.find(m=>m.fieldType==="number");if(console.log("numericEntry: "+JSON.stringify(f,null,2)),f?.fieldValue){const m=f.fieldValue,g=m.split(" to ");if(console.log("rangeParts: "+g),g.length===2){const y=[{value:parseFloat(g[0])},{value:parseFloat(g[1])}];n.set(h,y)}else console.warn(`Could not parse numeric range for ${c.dimensionName}: ${m}`)}else console.warn(`No numeric entry found for ${c.dimensionName}. Available entries:`,p)}else if(c.filterType==="DateMinMax"){const f=p.find(m=>m.fieldType==="date"||m.fieldType==="timestamp"||m.fieldType==="string");if(console.log("dateEntry: "+JSON.stringify(f,null,2)),console.log("All date dimension entries fieldTypes:",p.map(m=>m.fieldType)),f?.fieldValue){const m=f.fieldValue,g=m.split(" to ");if(console.log("date rangeParts: "+g),g.length===2){const y=[{value:new Date(g[0].trim())},{value:new Date(g[1].trim())}];n.set(h,y)}else console.warn(`Could not parse date range for ${c.dimensionName}: ${m}`)}else console.warn(`No date entry found for ${c.dimensionName}. Available entries:`,p)}}return{values:n,noRowsMatchedFilter:u}}function ap(e){const{environment:t,package:n,dimensionSpecs:r,versionId:o,enabled:i=!0,indexLimit:a=1e4,activeFilters:s=[]}=e,l=q.useMemo(()=>U9(r),[r]),u=q.useMemo(()=>{const g=[];for(const[y,x]of l){const[E,C]=y.split("|"),S=z9(E,x,a,s);S?g.push({key:y,source:E,model:C,query:S,specs:x}):console.log("No query for source: ",E,"model: ",C)}return g},[l,a,s]),c=q.useMemo(()=>i&&u.length>0&&r.some(g=>g.filterType==="Star"||g.filterType==="MinMax"||g.filterType==="DateMinMax"),[i,u,r]),{apiClients:p}=ut.useServer(),h=Wt({queryKey:["dimensionalFilter",t,n,r,o,s],queryFn:async()=>{if(!c){const E=new Map;for(const C of r){const S=Pr(C);E.set(S,[])}return{values:E,noRowsMatchedFilter:!1}}const g=await Promise.all(u.map(async E=>{const C=await p.models.executeQueryModel(t,n,E.model,{query:E.query,versionId:o,bypassFilters:!0});return{config:E,result:V9(C.data.result,E.specs)}})),y=new Map;let x=!1;for(const{result:E}of g){for(const[C,S]of E.values)y.set(C,S);E.noRowsMatchedFilter&&(x=!0)}return{values:y,noRowsMatchedFilter:x}},enabled:c,staleTime:300*1e3,placeholderData:g=>g}),f=h.data?.values;return{data:q.useMemo(()=>{const g=new Map;for(const y of r){const x=Pr(y);y.values?g.set(x,y.values.map(E=>({value:E}))):g.set(x,[])}if(f)for(const[y,x]of f)x.length>0&&g.set(y,x);return g},[r,f]),noRowsMatchedFilter:h.data?.noRowsMatchedFilter??!1,isLoading:c?h.isPending:!1,isError:c?h.isError:!1,error:c?h.error:null,refetch:h.refetch}}function Sy(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function rr(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${Sy(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function W9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${rr(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${rr(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${Sy(r)}%'`:Array.isArray(r)?"":`${i} = ${rr(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${rr(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${rr(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${rr(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${rr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${rr(r,a)} and ${i} <= ${rr(o,a)}`:`${i} >= ${rr(r,a)}`;default:return""}}function sp(e){const{dimensionSpecs:t}=e,[n,r]=q.useState(()=>{const u=new Map;return t.forEach(c=>{const p=Pr(c);u.set(p,{spec:c,selection:null})}),u});q.useEffect(()=>{r(u=>{const c=new Map;return t.forEach(p=>{const h=Pr(p),f=u.get(h);c.set(h,{spec:p,selection:f?.selection??null})}),c})},[t]);const o=q.useCallback((u,c)=>{r(p=>{const h=new Map(p),f=h.get(u);return f&&h.set(u,{...f,selection:c}),h})},[]),i=q.useCallback(u=>{o(u,null)},[o]),a=q.useCallback(()=>{r(u=>{const c=new Map(u);return c.forEach((p,h)=>{c.set(h,{...p,selection:null})}),c})},[]),s=q.useCallback(()=>{const u=[];return n.forEach(c=>{c.selection&&u.push(c.selection)}),u},[n]),l=q.useCallback(()=>{const u=s();if(u.length===0)return"";const c=u.map(p=>W9(p)).filter(p=>p.length>0);return c.length===0?"":`where ${c.join(" and ")}`},[s]);return{filterStates:n,updateFilter:o,clearFilter:i,clearAllFilters:a,getActiveFilters:s,generateWhereClause:l}}function ky(e){const[t,n]=q.useState(()=>new Map);q.useEffect(()=>{n(s=>{const l=new Set(e.map(c=>c.name).filter(c=>!!c)),u=new Map;return s.forEach((c,p)=>{l.has(p)&&u.set(p,c)}),u})},[e]);const r=q.useCallback((s,l)=>{n(u=>{const c=new Map(u);return l===null?c.delete(s):c.set(s,l),c})},[]),o=q.useCallback(s=>{n(l=>{if(!l.has(s))return l;const u=new Map(l);return u.delete(s),u})},[]),i=q.useCallback(()=>{n(s=>s.size===0?s:new Map)},[]),a=q.useCallback(()=>{const s=new Map;return t.forEach((l,u)=>{l!=null&&s.set(u,l)}),s},[t]);return{givenValues:t,updateGiven:r,clearGiven:o,clearAll:i,getActiveGivens:a}}function Dy(e){return q.useMemo(()=>{if(!e?.sources?.length)return[];const t=new Map;for(const n of e.sources)if(n.givens?.length)for(const r of n.givens)r.name&&!t.has(r.name)&&t.set(r.name,r);return Array.from(t.values())},[e])}const q9=lt(d.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));bt.extend(py);function Y9(e){const t=(e.annotations??[]).filter(r=>r.trim().startsWith("#("));if(t.length===0)return;const n=[];for(const r of t){const o=r.trim(),i=o.match(/description="([^"]*)"/);if(i){n.push(i[1]);continue}const a=o.replace(/^#\(/,"").replace(/\)\s*$/,"").trim();a&&n.push(a)}return n.length>0?n.join(`
216
+ `):void 0}function K9({given:e,value:t,onChange:n}){const r=e.name??"",o=e.type??"string",i=Y9(e);if(o==="boolean"){const s=t===!0;return d.jsx(P.FormControlLabel,{control:d.jsx(P.Checkbox,{checked:s,onChange:l=>n(l.target.checked)}),label:r})}if(o==="number"){const s=typeof t=="number"?t:"";return d.jsx(P.TextField,{label:r,type:"number",value:s,onChange:l=>{const u=l.target.value;n(u===""?null:Number(u))},helperText:i,slotProps:{input:{endAdornment:s!==""&&d.jsx($m,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}if(o==="date"||o==="timestamp"||o==="timestamptz"){const s=t instanceof Date?bt.utc(t):null;return d.jsx(ll,{dateAdapter:Bc,children:d.jsx(Os,{label:r,value:s,onChange:l=>n(l?l.toDate():null),slotProps:{textField:{fullWidth:!0,size:"small",helperText:i},field:{clearable:!0,onClear:()=>n(null)}}})})}if(o.startsWith("array<")){const s=Array.isArray(t)?t.map(String):[];return d.jsx(P.Autocomplete,{multiple:!0,freeSolo:!0,options:[],value:s,onChange:(l,u)=>n(u.length===0?null:u),renderInput:l=>d.jsx(P.TextField,{...l,label:r,size:"small",helperText:i}),fullWidth:!0})}const a=typeof t=="string"?t:"";return d.jsx(P.TextField,{label:r,value:a,onChange:s=>{const l=s.target.value;n(l===""?null:l)},placeholder:o.startsWith("filter<")?o:void 0,helperText:i,slotProps:{input:{endAdornment:a!==""&&d.jsx($m,{onClear:()=>n(null)})}},fullWidth:!0,size:"small"})}function $m({onClear:e}){return d.jsx(P.InputAdornment,{position:"end",children:d.jsx(P.IconButton,{size:"small","aria-label":"clear value",onClick:e,edge:"end",children:d.jsx(q9,{fontSize:"small"})})})}function G9({givens:e,values:t,onChange:n,onClearAll:r}){if(e.length===0)return null;const o=t.size>0;return d.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[d.jsxs(P.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[d.jsx(P.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:"#333"},children:"Parameters"}),o&&d.jsx(P.Button,{variant:"text",size:"small",onClick:r,sx:{textTransform:"none"},children:"Reset"})]}),d.jsx(P.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:3},children:e.map(i=>d.jsx(P.Box,{children:d.jsx(K9,{given:i,value:i.name?t.get(i.name):void 0,onChange:a=>i.name&&n(i.name,a)})},i.name))})]})}const Q9=lt(d.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}));function lp(e){const{environmentName:t,packageName:n}=Mt(e.resourceUri);if(!t||!n)throw new Error("Environment and Package name must be provided for query embedding.");return JSON.stringify({...e})}function X9({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:o,height:i}=JSON.parse(e),{modelPath:a}=Mt(o);if(!a||!t&&(!r||!n)||typeof a!="string")throw new Error("Invalid embedded query result: "+e);return d.jsx(wy,{query:t,sourceName:n,queryName:r,resourceUri:o,height:i})}function wy({query:e,sourceName:t,queryName:n,resourceUri:r,height:o=400}){const{modelPath:i,environmentName:a,packageName:s,versionId:l}=Mt(r),{apiClients:u}=ut.useServer();if(!a||!s)throw new Error("No environment or package name provided. A resource URI must be provided.");const{data:c,isSuccess:p,isError:h,error:f}=Wt({queryKey:[r,e,t,n],queryFn:()=>u.models.executeQueryModel(a,s,i,{query:e,sourceName:t,queryName:n,versionId:l})});return d.jsxs(d.Fragment,{children:[!p&&!h&&d.jsx(un,{text:"Fetching Query Results..."}),p&&d.jsx(q.Suspense,{fallback:d.jsx("div",{children:"Loading..."}),children:d.jsx(Si,{result:c.data.result,maxHeight:o})}),h&&d.jsx(cn,{context:`${a} > ${s} > ${i}`,error:f})]})}function Z9({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:o,maxResultSize:i,isExecuting:a}){const[s,l]=q.useState(!1),[u,c]=q.useState(!1),[p,h]=q.useState(!1),[f,m]=q.useState(),[g,y]=q.useState(),[x,E]=q.useState(!1),[C,S]=q.useState(""),k=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,T=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,O=L=>L.split(`
217
+ `).filter(I=>!I.trimStart().startsWith("##")).join(`
218
+ `),F=!!e.text&&(k.test(e.text)||T.test(e.text)),B=()=>{if(!e.newSources||e.newSources.length===0)return 0;let L=[],I="";if(e.text){const A=e.text.match(k);A&&(L=A[1].split(",").map(V=>V.trim()));const M=e.text.match(T);M&&(I=M[1].trim())}for(let A=0;A<e.newSources.length;A++)try{const M=JSON.parse(e.newSources[A]);if(L.length>0&&L.includes(M.name)||I&&I===M.path)return A}catch{continue}return 0},R=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,N=lp({query:e.text,resourceUri:r});q.useEffect(()=>{e.type==="code"&&Zs(O(e.text),"malloy").then(L=>{m(L)})},[e]),q.useEffect(()=>{Zs(N,"typescript").then(L=>{y(L)})},[N]);const v=()=>{const L=window.location.href;navigator.clipboard.writeText(L).then(()=>S("URL copied to clipboard!")).catch(()=>S("Failed to copy URL"))};return e.type==="markdown"&&d.jsx(nc,{children:d.jsxs(P.Box,{sx:{"& h1, & h2, & h3, & h4, & h5, & h6":{fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"16px"},"& h1":{fontSize:"28px"},"& h2":{fontSize:"24px"},"& h3":{fontSize:"20px"},"& p":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& ul, & ol":{color:"#333333",lineHeight:"1.7",marginBottom:"8px",fontSize:"16px"},"& li":{marginBottom:"4px"}},children:[o===0?d.jsxs(P.Stack,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:[d.jsx(_s,{children:e.text}),d.jsx(P.Tooltip,{title:"Click to copy link",children:d.jsx(Qc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer",marginTop:"26px"},onClick:v})})]}):d.jsx(_s,{children:e.text}),d.jsx(P.Snackbar,{open:C!=="",autoHideDuration:6e3,onClose:()=>S(""),message:C})]})})||e.type==="code"&&d.jsxs(nc,{children:[(!t||!n&&e.result||e.newSources&&e.newSources.length>0)&&d.jsx(P.Stack,{sx:{flexDirection:"column",gap:"8px",marginBottom:"2px"},children:e.newSources&&e.newSources.length>0&&d.jsx(gs,{sx:{position:"relative",padding:"0"},children:d.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[f&&d.jsx("span",{dangerouslySetInnerHTML:{__html:f},style:{fontFamily:"monospace",fontSize:"14px",flex:1,marginRight:"8px"}}),F&&d.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",flexShrink:0},onClick:()=>E(!0),children:d.jsx(ul,{sx:{fontSize:"18px",color:"text.secondary"}})})]})})}),d.jsx(ip,{open:x,onClose:()=>E(!1),title:"Data Sources",hasValidImport:F,resourceUri:r,data:R,initialSelectedSourceIndex:B()}),d.jsxs(P.Dialog,{open:s,onClose:()=>l(!1),maxWidth:"lg",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Malloy Code",d.jsx(P.IconButton,{onClick:()=>l(!1),sx:{color:"text.secondary"},children:d.jsx(Ir,{})})]}),d.jsx(P.DialogContent,{children:d.jsx(P.Box,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",padding:"16px",fontFamily:"monospace",fontSize:"14px",lineHeight:"1.5",overflow:"auto",maxHeight:"70vh",backgroundColor:"#ffffff"},children:d.jsx("pre",{className:"code-display",style:{margin:0},dangerouslySetInnerHTML:{__html:f}})})})]}),d.jsxs(P.Dialog,{open:u,onClose:()=>c(!1),maxWidth:"lg",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Embeddable Code",d.jsx(P.IconButton,{onClick:()=>c(!1),sx:{color:"text.secondary"},children:d.jsx(Ir,{})})]}),d.jsx(P.DialogContent,{children:d.jsxs(P.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},children:[d.jsx(P.Typography,{component:"div",sx:{fontSize:"12px",fontFamily:"monospace","& .line":{textWrap:"wrap"},flex:1},dangerouslySetInnerHTML:{__html:g}}),d.jsx(P.Tooltip,{title:"Copy Embeddable Code",children:d.jsx(P.IconButton,{sx:{width:"24px",height:"24px",marginLeft:"8px",color:"text.secondary"},onClick:()=>{navigator.clipboard.writeText(N)},children:d.jsx(Q9,{})})})]})})]}),d.jsx(Cy,{open:p,onClose:()=>h(!1),result:e.result||"",title:"Results"}),a&&!e.result&&!F&&!(e.newSources&&e.newSources.length>0)&&d.jsx(gs,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:200},children:d.jsx(P.CircularProgress,{size:32})}),e.result&&d.jsxs(gs,{sx:{position:"relative"},children:[d.jsx(P.Box,{sx:{paddingTop:"24px"},children:d.jsx(Si,{result:e.result,maxHeight:700,maxResultSize:i})}),d.jsxs(P.Stack,{sx:{position:"absolute",top:"8px",right:"8px",flexDirection:"row",gap:"8px",alignItems:"center",zIndex:2},children:[!t&&d.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:L=>{L.stopPropagation(),l(!0)},children:d.jsx(b0,{sx:{fontSize:"18px",color:"text.secondary"}})}),d.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>h(!0),children:d.jsx(ul,{sx:{fontSize:"18px",color:"text.secondary"}})})]})]})]})}const J9=4;function Iy({resourceUri:e,maxResultSize:t=0,retrievalFn:n}){const{apiClients:r}=ut.useServer(),{environmentName:o,packageName:i,versionId:a,modelPath:s}=Mt(e),{data:l,isSuccess:u,isError:c,error:p}=Wt({queryKey:[e],queryFn:async()=>(await r.notebooks.getNotebook(o,i,s,a)).data}),[h,f]=q.useState([]),[m,g]=q.useState(!1),[y,x]=q.useState(null),E=q.useMemo(()=>l?hy(l.annotations):null,[l]),C=q.useMemo(()=>l?.notebookCells?gy(l.notebookCells):null,[l]),S=q.useMemo(()=>C?.sourceInfoMap??new Map,[C]),k=C?.modelPath??null,T=q.useMemo(()=>{const _=new Map;if(!l?.sources)return _;for(const ae of l.sources)if(ae.name&&ae.filters&&ae.filters.length>0){const X=ae.filters.filter(U=>!U.implicit);X.length>0&&_.set(ae.name,X)}return _},[l]),O=T.size>0,F=q.useMemo(()=>{if(O&&k){const _=[];for(const[ae,X]of T)for(const U of X??[]){if(!U.dimension||!U.type)continue;let J;const Q=U.dimensionType;Q==="boolean"?J="Boolean":Q==="date"||Q==="timestamp"||Q==="timestamptz"?J="DateMinMax":Q==="number"?J=U.type==="equal"||U.type==="in"?"Star":"MinMax":J={equal:"Star",in:"Star",like:"Star",greater_than:"MinMax",less_than:"MinMax"}[U.type]??"Star";const Z={equal:"Equals",in:"Equals",like:"Contains",greater_than:J==="DateMinMax"?"After":"Greater Than",less_than:J==="DateMinMax"?"Before":"Less Than"}[U.type],Y=U.name!==U.dimension?U.name:void 0;_.push({source:ae,model:k,dimensionName:U.dimension,filterType:J,label:Y,filterName:U.name??U.dimension,defaultMatchType:Z,required:U.required??!1})}return _}return!E||S.size===0||!k?[]:by(S,E.filters,k)},[O,T,E,S,k]),{filterStates:B,updateFilter:R,getActiveFilters:N}=sp({dimensionSpecs:F}),v=q.useMemo(()=>N(),[B,N]),L=Dy(l),{givenValues:I,updateGiven:A,clearAll:M}=ky(L);q.useMemo(()=>{const _=new Map;for(const ae of F){const X=Pr(ae);_.set(X,ae.source)}return _},[F]);const{data:V}=ap({environment:o,package:i,dimensionSpecs:F,versionId:a,enabled:F.length>0}),W=q.useCallback(_=>{if(_.length===0)return;const ae=U=>U instanceof Date?U.toISOString().slice(0,10):String(U),X={};for(const U of _){const J=U.filterName??U.dimensionName,Q=U.value;Array.isArray(Q)?X[J]=Q.map(ae):Q!=null&&(X[J]=ae(Q))}return Object.keys(X).length>0?JSON.stringify(X):void 0},[]),H=q.useCallback(_=>{if(_.size===0)return;const ae=U=>U instanceof Date?U.toISOString().slice(0,10):Array.isArray(U)?U.map(J=>ae(J)):U,X={};return _.forEach((U,J)=>{U!=null&&(X[J]=ae(U))}),Object.keys(X).length>0?JSON.stringify(X):void 0},[]),w=q.useCallback(async(_=[],ae=new Map)=>{if(!u||!l?.notebookCells)return;f(J=>J.length===0?l.notebookCells.map(Q=>({...Q})):J.map(Q=>({...Q,result:void 0}))),g(!0),x(null);const X=O?W(_):void 0,U=H(ae);try{const J=[];for(let ne=0;ne<l.notebookCells.length;ne++){const Z=l.notebookCells[ne];if(Z.type==="markdown")continue;const Y=ne,le=async()=>{try{const te=(await r.notebooks.executeNotebookCell(o,i,s,Y,a,X,void 0,U)).data,xe=te.result,pe=Z.newSources||te.newSources;f(be=>{const se=[...be];return se[Y]||(se[Y]={...Z}),se[Y]={...se[Y],result:xe,newSources:pe},se})}catch(ee){console.error(`Error executing cell ${Y}:`,ee)}};J.push(le)}const Q=[];for(const ne of J){const Z=ne().then(()=>{Q.splice(Q.indexOf(Z),1)});Q.push(Z),Q.length>=J9&&await Promise.race(Q)}await Promise.all(Q)}catch(J){console.error("Error executing notebook cells:",J),x(J)}finally{g(!1)}},[u,l,O,W,H,o,i,s,a,r.notebooks]);q.useEffect(()=>{!u||!l?.notebookCells||w([],new Map)},[u,l,w]);const G=q.useRef("");q.useEffect(()=>{const _=JSON.stringify({filters:v.map(ae=>({dim:ae.dimensionName,type:ae.matchType,val:ae.value,val2:ae.value2})),givens:Array.from(I.entries()).sort(([ae],[X])=>ae.localeCompare(X))});if(_!==G.current){if(G.current===""&&v.length===0&&I.size===0){G.current=_;return}G.current=_,m||w(v,I)}},[v,I,m,w]);const re=q.useCallback(_=>ae=>{R(_,ae)},[R]);return F.some(_=>_.filterType==="Retrieval"),d.jsx(LE,{children:d.jsx(NE,{children:d.jsxs(P.Stack,{spacing:3,component:"section",children:[d.jsx(G9,{givens:L,values:I,onChange:A,onClearAll:M}),F.length>0&&V&&d.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[d.jsx(P.Typography,{variant:"subtitle2",sx:{fontWeight:600,mb:2,color:"#333"},children:"Filters"}),d.jsx(P.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:3},children:F.map(_=>{const ae=Pr(_),X=V.get(ae)||[],U=B.get(ae);return _.filterType==="Retrieval"&&!n?null:d.jsx(P.Box,{children:d.jsx(fy,{spec:_,values:X,selection:U?.selection,onChange:re(ae),retrievalFn:n})},ae)})})]}),!u&&!c&&d.jsx(un,{text:"Fetching Notebook..."}),u&&(h.length>0?h:l?.notebookCells||[]).map((_,ae)=>d.jsx(Z9,{cell:_,index:ae,resourceUri:e,maxResultSize:t,isExecuting:m},ae)),c&&p.status===404&&d.jsxs(P.Typography,{variant:"body2",sx:{color:"text.secondary"},children:[d.jsx("code",{children:`${o} > ${i} > ${s}`})," ","not found."]}),c&&p.status!==404&&d.jsx(cn,{error:p,context:`${o} > ${i} > ${s}`}),y&&d.jsx(cn,{error:{message:y.message,status:500,name:"ExecutionError"},context:"Notebook Execution"})]})})})}const eB=lt(d.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}));function Vu({type:e,size:t=18,sx:n,...r}){return d.jsxs(Hs,{...r,viewBox:"0 0 24 24",sx:{width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...n},children:[e==="report"&&d.jsx(tB,{}),e==="model"&&d.jsx(nB,{}),e==="data"&&d.jsx(rB,{})]})}function tB(){return d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M14 3 H6 a2 2 0 0 0 -2 2 v14 a2 2 0 0 0 2 2 h12 a2 2 0 0 0 2 -2 V9 z"}),d.jsx("path",{d:"M14 3 v4 a2 2 0 0 0 2 2 h4"}),d.jsx("path",{d:"M8 17 v-3"}),d.jsx("path",{d:"M12 17 v-6"}),d.jsx("path",{d:"M16 17 v-4"})]})}function nB(){return d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M12 3 L4 7 v10 l8 4 l8 -4 V7 z"}),d.jsx("path",{d:"M4 7 l8 4 l8 -4"}),d.jsx("path",{d:"M12 11 v10"})]})}function rB(){return d.jsxs(d.Fragment,{children:[d.jsx("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"2"}),d.jsx("path",{d:"M3.5 9.5 H20.5"}),d.jsx("path",{d:"M9.5 3.5 V20.5"})]})}const Hm="README.malloynb";function oB({onClickPackageFile:e,resourceUri:t,retrievalFn:n}){const{apiClients:r}=ut.useServer(),o=e??(k=>{window.location.href=k}),{environmentName:i,packageName:a,versionId:s}=Mt(t),[l,u]=q.useState(null),c=Wt({queryKey:["package",i,a,s],queryFn:()=>r.packages.getPackage(i,a,s,!1)}),p=Wt({queryKey:["notebooks",i,a,s],queryFn:()=>r.notebooks.listNotebooks(i,a,s)}),h=Wt({queryKey:["models",i,a,s],queryFn:()=>r.models.listModels(i,a,s)}),f=Wt({queryKey:["databases",i,a,s],queryFn:()=>r.databases.listDatabases(i,a,s)}),m=(p.data?.data??[]).slice().sort((k,T)=>k.path.localeCompare(T.path)),g=(h.data?.data??[]).slice().sort((k,T)=>k.path.localeCompare(T.path)),y=(f.data?.data??[]).slice().sort((k,T)=>k.path.localeCompare(T.path)),x=c.data?.data?.description??"",E=m.some(k=>k.path===Hm),C=Ua({environmentName:i,packageName:a,versionId:s,modelPath:Hm}),S=!p.isSuccess&&!p.isError;return c.isError?d.jsx(cn,{error:c.error,context:`${i} > ${a}`}):d.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:3,py:6},children:[d.jsxs(P.Box,{sx:{mb:4},children:[d.jsxs(P.Link,{onClick:k=>o(`/${i}/`,k),underline:"none",sx:{display:"inline-flex",alignItems:"center",gap:.5,cursor:"pointer",color:"text.secondary",fontSize:"0.875rem",mb:2,"&:hover":{color:"primary.main"}},children:[d.jsx(eB,{sx:{fontSize:18}}),"Back to ",i]}),d.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:a}),x&&d.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:x})]}),S&&d.jsx(un,{text:"Loading package..."}),!S&&d.jsxs(d.Fragment,{children:[d.jsxs(Wu,{title:"Governed Reports",count:m.length,children:[m.map(k=>d.jsx(qu,{icon:d.jsx(Vu,{type:"report"}),tint:ho.teal,label:k.path,onClick:T=>o(k.path,T)},k.path)),m.length===0&&d.jsx(Yu,{label:"No notebooks"})]}),d.jsxs(Wu,{title:"Semantic Models",count:g.length,children:[g.map(k=>d.jsx(qu,{icon:d.jsx(Vu,{type:"model"}),tint:ho.orange,label:k.path,onClick:T=>o(k.path,T)},k.path)),g.length===0&&d.jsx(Yu,{label:"No models"})]}),d.jsxs(Wu,{title:"Package Data",count:y.length,children:[y.map(k=>d.jsx(qu,{icon:d.jsx(Vu,{type:"data"}),tint:ho.darkBlue,label:k.path,rightLabel:iB(k.info.rowCount),onClick:()=>u(k)},k.path)),y.length===0&&d.jsx(Yu,{label:"No data files"})]}),E&&d.jsx(P.Box,{sx:{mt:6},children:d.jsx(Iy,{resourceUri:C,retrievalFn:n})})]}),d.jsxs(P.Dialog,{open:l!==null,onClose:()=>u(null),maxWidth:"sm",fullWidth:!0,children:[d.jsxs(P.DialogTitle,{sx:{pr:6},children:[l?.path,d.jsx(P.IconButton,{"aria-label":"close",onClick:()=>u(null),sx:{position:"absolute",right:8,top:8},children:d.jsx(Ir,{fontSize:"small"})})]}),d.jsx(P.DialogContent,{children:l?.info?.columns&&d.jsxs(P.Table,{size:"small",children:[d.jsx(P.TableHead,{children:d.jsxs(P.TableRow,{children:[d.jsx(P.TableCell,{children:"Column"}),d.jsx(P.TableCell,{children:"Type"})]})}),d.jsx(P.TableBody,{children:l.info.columns.map(k=>d.jsxs(P.TableRow,{children:[d.jsx(P.TableCell,{component:"th",scope:"row",children:k.name}),d.jsx(P.TableCell,{children:k.type})]},k.name))})]})})]})]})}function Wu({title:e,count:t,children:n}){return d.jsxs(P.Box,{sx:{mb:4},children:[d.jsxs(P.Stack,{direction:"row",alignItems:"baseline",spacing:1,sx:{mb:1},children:[d.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:e}),d.jsxs(P.Typography,{variant:"caption",color:"text.secondary",children:["(",t,")"]})]}),d.jsx(P.Box,{children:n})]})}function qu({icon:e,tint:t,label:n,rightLabel:r,onClick:o}){const i=!!o,a=s=>{o&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o(s))};return d.jsxs(P.Box,{onClick:o,onKeyDown:i?a:void 0,role:i?"button":void 0,tabIndex:i?0:void 0,sx:{display:"flex",alignItems:"center",gap:1.5,py:1,px:1,mx:-1,cursor:i?"pointer":"default",borderRadius:1.5,transition:"background-color 0.1s","&:hover":i?{backgroundColor:"grey.100"}:void 0,"&:focus-visible":i?{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}:void 0},children:[d.jsx(P.Box,{sx:{width:32,height:32,borderRadius:1,bgcolor:t,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e}),d.jsx(P.Typography,{variant:"body2",sx:{fontFamily:OE,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),r&&d.jsx(P.Typography,{variant:"caption",color:"text.secondary",sx:{flexShrink:0},children:r})]})}function Yu({label:e}){return d.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{py:1,fontStyle:"italic"},children:e})}function iB(e){return e>=1e9?`${(e/1e9).toFixed(1)} B rows`:e>=1e6?`${(e/1e6).toFixed(1)} M rows`:e>=1e3?`${(e/1e3).toFixed(1)} K rows`:`${e} rows`}function aB(e){return _e("MuiCollapse",e)}Me("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const sB=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ne(r,aB,n)},lB=oe("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Ze(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),uB=oe("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),cB=oe("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Aa=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:u,in:c,onEnter:p,onEntered:h,onEntering:f,onExit:m,onExited:g,onExiting:y,orientation:x="vertical",style:E,timeout:C=r0.standard,TransitionComponent:S=Wn,...k}=r,T={...r,orientation:x,collapsedSize:s},O=sB(T),F=Gr(),B=Nl(),R=D.useRef(null),N=D.useRef(),v=typeof s=="number"?`${s}px`:s,L=x==="horizontal",I=L?"width":"height",A=D.useRef(null),M=rt(n,A),V=U=>J=>{if(U){const Q=A.current;J===void 0?U(Q):U(Q,J)}},W=()=>R.current?R.current[L?"clientWidth":"clientHeight"]:0,H=V((U,J)=>{R.current&&L&&(R.current.style.position="absolute"),U.style[I]=v,p&&p(U,J)}),w=V((U,J)=>{const Q=W();R.current&&L&&(R.current.style.position="");const{duration:ne,easing:Z}=ui({style:E,timeout:C,easing:u},{mode:"enter"});if(C==="auto"){const Y=F.transitions.getAutoHeightDuration(Q);U.style.transitionDuration=`${Y}ms`,N.current=Y}else U.style.transitionDuration=typeof ne=="string"?ne:`${ne}ms`;U.style[I]=`${Q}px`,U.style.transitionTimingFunction=Z,f&&f(U,J)}),G=V((U,J)=>{U.style[I]="auto",h&&h(U,J)}),re=V(U=>{U.style[I]=`${W()}px`,m&&m(U)}),_=V(g),ae=V(U=>{const J=W(),{duration:Q,easing:ne}=ui({style:E,timeout:C,easing:u},{mode:"exit"});if(C==="auto"){const Z=F.transitions.getAutoHeightDuration(J);U.style.transitionDuration=`${Z}ms`,N.current=Z}else U.style.transitionDuration=typeof Q=="string"?Q:`${Q}ms`;U.style[I]=v,U.style.transitionTimingFunction=ne,y&&y(U)}),X=U=>{C==="auto"&&B.start(N.current||0,U),o&&o(A.current,U)};return d.jsx(S,{in:c,onEnter:H,onEntered:G,onEntering:w,onExit:re,onExited:_,onExiting:ae,addEndListener:X,nodeRef:A,timeout:C==="auto"?null:C,...k,children:(U,{ownerState:J,...Q})=>d.jsx(lB,{as:l,className:Ae(O.root,a,{entered:O.entered,exited:!c&&v==="0px"&&O.hidden}[U]),style:{[L?"minWidth":"minHeight"]:v,...E},ref:M,ownerState:{...T,state:U},...Q,children:d.jsx(uB,{ownerState:{...T,state:U},className:O.wrapper,ref:R,children:d.jsx(cB,{ownerState:{...T,state:U},className:O.wrapperInner,children:i})})})})});Aa&&(Aa.muiSupportAuto=!0);function dB(e){return _e("PrivateSwitchBase",e)}Me("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const pB=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${ke(o)}`],input:["input"]};return Ne(i,dB,t)},fB=oe(To,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),hB=oe("input",{name:"MuiSwitchBase",shouldForwardProp:dn})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),mB=D.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:u=!1,icon:c,id:p,inputProps:h,inputRef:f,name:m,onBlur:g,onChange:y,onFocus:x,readOnly:E,required:C=!1,tabIndex:S,type:k,value:T,slots:O={},slotProps:F={},...B}=t,[R,N]=kn({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),v=qn(),L=X=>{x&&x(X),v&&v.onFocus&&v.onFocus(X)},I=X=>{g&&g(X),v&&v.onBlur&&v.onBlur(X)},A=X=>{if(X.nativeEvent.defaultPrevented)return;const U=X.target.checked;N(U),y&&y(X,U)};let M=s;v&&typeof M>"u"&&(M=v.disabled);const V=k==="checkbox"||k==="radio",W={...t,checked:R,disabled:M,disableFocusRipple:l,edge:u},H=pB(W),w={slots:O,slotProps:{input:h,...F}},[G,re]=st("root",{ref:n,elementType:fB,className:H.root,shouldForwardComponentProp:!0,externalForwardedProps:{...w,component:"span",...B},getSlotProps:X=>({...X,onFocus:U=>{X.onFocus?.(U),L(U)},onBlur:U=>{X.onBlur?.(U),I(U)}}),ownerState:W,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:M,role:void 0,tabIndex:null}}),[_,ae]=st("input",{ref:f,elementType:hB,className:H.input,externalForwardedProps:w,getSlotProps:X=>({...X,onChange:U=>{X.onChange?.(U),A(U)}}),ownerState:W,additionalProps:{autoFocus:r,checked:o,defaultChecked:a,disabled:M,id:V?p:void 0,name:m,readOnly:E,required:C,tabIndex:S,type:k,...k==="checkbox"&&T===void 0?{}:{value:T}}});return d.jsxs(G,{...re,children:[d.jsx(_,{...ae}),R?i:c]})}),gB=lt(d.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),bB=lt(d.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),yB=lt(d.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function xB(e){return _e("MuiCheckbox",e)}const Ku=Me("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),EB=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${ke(r)}`,`size${ke(o)}`]},a=Ne(i,xB,t);return{...t,...a}},CB=oe(mB,{shouldForwardProp:e=>dn(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ke(n.size)}`],n.color!=="default"&&t[`color${ke(n.color)}`]]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(sn()).map(([t])=>({props:{color:t},style:{[`&.${Ku.checked}, &.${Ku.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Ku.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),TB=d.jsx(bB,{}),vB=d.jsx(gB,{}),SB=d.jsx(yB,{}),Ay=D.forwardRef(function(t,n){const r=Ke({props:t,name:"MuiCheckbox"}),{checkedIcon:o=TB,color:i="primary",icon:a=vB,indeterminate:s=!1,indeterminateIcon:l=SB,inputProps:u,size:c="medium",disableRipple:p=!1,className:h,slots:f={},slotProps:m={},...g}=r,y=s?l:a,x=s?l:o,E={...r,disableRipple:p,color:i,indeterminate:s,size:c},C=EB(E),S=m.input??u,[k,T]=st("root",{ref:n,elementType:CB,className:Ae(C.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:m,...g},ownerState:E,additionalProps:{type:"checkbox",icon:D.cloneElement(y,{fontSize:y.props.fontSize??c}),checkedIcon:D.cloneElement(x,{fontSize:x.props.fontSize??c}),disableRipple:p,slots:f,slotProps:{input:d0(typeof S=="function"?S(E):S,{"data-indeterminate":s})}}});return d.jsx(k,{...T,classes:C})});function Py(e){return kt}const Ry=D.createContext(null);function kB(e){const{value:t,children:n}=e;return d.jsx(Ry.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const Ro=()=>{const e=D.useContext(Ry);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
219
+ `));return e},DB=({props:e})=>{const{instance:t}=Ro(),{label:n,itemId:r}=e,[o,i]=D.useState(n),a=t.isItemBeingEdited(r);return D.useEffect(()=>{a||i(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:s,interactions:l})=>t.isItemEditable(r)?{value:o??"","data-element":"labelInput",onChange:f=>{s.onChange?.(f),i(f.target.value)},onKeyDown:f=>{if(s.onKeyDown?.(f),f.defaultMuiPrevented)return;const m=f.target;f.key==="Enter"&&m.value?l.handleSaveItemLabel(f,m.value):f.key==="Escape"&&l.handleCancelItemLabelEditing(f)},onBlur:f=>{s.onBlur?.(f),!f.defaultMuiPrevented&&f.target.value&&l.handleSaveItemLabel(f,f.target.value)},autoFocus:!0,type:"text"}:{}}}},Bn=({instance:e,state:t,setState:n,params:r})=>{const o=D.useRef(t.editedItemId),i=p=>o.current===p,a=p=>{n(h=>$({},h,{editedItemId:p})),o.current=p},s=p=>p===t.editedItemId,l=!!r.isItemEditable,u=p=>{if(p==null||!l)return!1;const h=e.getItem(p);return h?typeof r.isItemEditable=="function"?r.isItemEditable(h):!!r.isItemEditable:!1},c=(p,h)=>{if(!h)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",p].join(`
220
+ `));n(f=>{const m=f.items.itemMetaMap[p];return m.label!==h?$({},f,{items:$({},f.items,{itemMetaMap:$({},f.items.itemMetaMap,{[p]:$({},m,{label:h})})})}):f}),r.onItemLabelChange&&r.onItemLabelChange(p,h)};return{instance:{setEditedItemId:a,isItemBeingEdited:s,updateItemLabel:c,isItemEditable:u,isTreeViewEditable:l,isItemBeingEditedRef:i},publicAPI:{updateItemLabel:c}}};Bn.itemPlugin=DB;Bn.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return $({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};Bn.getInitialState=()=>({editedItemId:null});Bn.params={onItemLabelChange:!0,isItemEditable:!0};const yo=(e,t)=>e.getAvailablePlugins().has(t),My=e=>Array.isArray(e)?e.length>0&&e.some(My):!!e,wB=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:o}=Ro(),i={expandable:My(t),expanded:n.isItemExpanded(e),focused:n.isItemFocused(e),selected:n.isItemSelected(e),disabled:n.isItemDisabled(e),editing:n?.isItemBeingEdited?n?.isItemBeingEdited(e):!1,editable:n.isItemEditable?n.isItemEditable(e):!1},a=f=>{if(i.disabled)return;i.focused||n.focusItem(f,e);const m=r&&(f.shiftKey||f.ctrlKey||f.metaKey);i.expandable&&!(m&&n.isItemExpanded(e))&&n.toggleItemExpansion(f,e)},s=f=>{if(i.disabled)return;!i.focused&&!i.editing&&n.focusItem(f,e),r&&(f.shiftKey||f.ctrlKey||f.metaKey)?f.shiftKey?n.expandSelectionRange(f,e):n.selectItem({event:f,itemId:e,keepExistingSelection:!0}):n.selectItem({event:f,itemId:e,shouldBeSelected:!0})},l=f=>{const m=f.nativeEvent.shiftKey;r&&m?n.expandSelectionRange(f,e):n.selectItem({event:f,itemId:e,keepExistingSelection:r,shouldBeSelected:f.target.checked})},u=()=>{yo(n,Bn)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:s,handleCheckboxSelection:l,toggleItemEditing:u,handleSaveItemLabel:(f,m)=>{yo(n,Bn)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,m),u(),n.focusItem(f,e))},handleCancelItemLabelEditing:f=>{yo(n,Bn)&&n.isItemBeingEditedRef(e)&&(u(),n.focusItem(f,e))}},status:i,publicAPI:o}},up=D.createContext(()=>-1),Oy=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Ly=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(t);if(o===0)return n.parentId;let i=o-1;for(;!e.isItemNavigable(r[i])&&i>=0;)i-=1;if(i===-1)return n.parentId==null?null:Ly(e,n.parentId);let a=r[i],s=Oy(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&s!=null;)a=s,s=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Ns=(e,t)=>{if(e.isItemExpanded(t)){const r=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(r!=null)return r}let n=e.getItemMeta(t);for(;n!=null;){const r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(n.id);if(o<r.length-1){let i=o+1;for(;!e.isItemNavigable(r[i])&&i<r.length-1;)i+=1;if(e.isItemNavigable(r[i]))return r[i]}n=e.getItemMeta(n.parentId)}return null},Ny=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=Oy(e,n);if(r==null)return t;t=r}return t},Pa=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),Fy=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),o=e.getItemMeta(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],a=[o.id];let s=r.parentId,l=o.parentId,u=a.indexOf(s)!==-1,c=i.indexOf(l)!==-1,p=!0,h=!0;for(;!c&&!u;)p&&(i.push(s),u=a.indexOf(s)!==-1,p=s!==null,!u&&p&&(s=e.getItemMeta(s).parentId)),h&&!u&&(a.push(l),c=i.indexOf(l)!==-1,h=l!==null,!c&&h&&(l=e.getItemMeta(l).parentId));const f=u?s:l,m=e.getItemOrderedChildrenIds(f),g=i[i.indexOf(f)-1],y=a[a.indexOf(f)-1];return m.indexOf(g)<m.indexOf(y)?[t,n]:[n,t]},IB=(e,t,n)=>{const r=l=>{if(e.isItemExpandable(l)&&e.isItemExpanded(l))return e.getItemOrderedChildrenIds(l)[0];let u=e.getItemMeta(l);for(;u!=null;){const c=e.getItemOrderedChildrenIds(u.parentId),p=e.getItemIndex(u.id);if(p<c.length-1)return c[p+1];u=e.getItemMeta(u.parentId)}throw new Error("Invalid range")},[o,i]=Fy(e,t,n),a=[o];let s=o;for(;s!==i;)s=r(s),e.isItemDisabled(s)||a.push(s);return a},AB=e=>{let t=Pa(e);const n=[];for(;t!=null;)n.push(t),t=Ns(e,t);return n},Ra=(e,t)=>t!==e.closest('*[role="treeitem"]');let Um=0;const PB=()=>(Um+=1,`mui-tree-view-${Um}`),cp=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,RB=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:o},selection:{disableSelection:i,checkboxSelection:a},expansion:{expansionTrigger:s},treeId:l,instance:u,publicAPI:c}=Ro(),p=D.useContext(up),{id:h,itemId:f,label:m,children:g,rootRef:y}=e,{rootRef:x,contentRef:E,propsEnhancers:C}=t(e),{interactions:S,status:k}=wB({itemId:f,children:g}),T=D.useRef(null),O=D.useRef(null),F=rt(y,x,T),B=rt(E,O),R=D.useRef(null),N=cp({itemId:f,treeId:l,id:h}),v=u.canItemBeTabbed(f)?0:-1,L={rootRefObject:T,contentRefObject:O,interactions:S},I=Z=>Y=>{if(Z.onFocus?.(Y),Y.defaultMuiPrevented)return;const le=!k.disabled||r;!k.focused&&le&&Y.currentTarget===Y.target&&u.focusItem(Y,f)},A=Z=>Y=>{if(Z.onBlur?.(Y),Y.defaultMuiPrevented)return;const le=u.getItemDOMElement(f);k.editing||Y.relatedTarget&&Ra(Y.relatedTarget,le)&&(Y.target&&Y.target?.dataset?.element==="labelInput"&&Ra(Y.target,le)||Y.relatedTarget?.dataset?.element==="labelInput")||u.removeFocusedItem()},M=Z=>Y=>{Z.onKeyDown?.(Y),!(Y.defaultMuiPrevented||Y.target?.dataset?.element==="labelInput")&&u.handleItemKeyDown(Y,f)},V=Z=>Y=>{Z.onDoubleClick?.(Y),!Y.defaultMuiPrevented&&S.toggleItemEditing()},W=Z=>Y=>{Z.onClick?.(Y),n?.(Y,f),!(Y.defaultMuiPrevented||R.current?.contains(Y.target))&&(s==="content"&&S.handleExpansion(Y),a||S.handleSelection(Y))},H=Z=>Y=>{Z.onMouseDown?.(Y),!Y.defaultMuiPrevented&&(Y.shiftKey||Y.ctrlKey||Y.metaKey||k.disabled)&&Y.preventDefault()},w=Z=>Y=>{Z.onChange?.(Y),!Y.defaultMuiPrevented&&(i||k.disabled||S.handleCheckboxSelection(Y))},G=Z=>Y=>{Z.onClick?.(Y),!Y.defaultMuiPrevented&&s==="iconContainer"&&S.handleExpansion(Y)};return{getRootProps:(Z={})=>{const Y=$({},on(e),on(Z));let le;k.selected?le=!0:i||k.disabled?le=void 0:le=!1;const ee=$({},Y,{ref:F,role:"treeitem",tabIndex:v,id:N,"aria-expanded":k.expandable?k.expanded:void 0,"aria-selected":le,"aria-disabled":k.disabled||void 0},Z,{onFocus:I(Y),onBlur:A(Y),onKeyDown:M(Y)});o&&(ee.style={"--TreeView-itemDepth":typeof p=="function"?p(f):p});const te=C.root?.($({},L,{externalEventHandlers:Y}))??{};return $({},ee,te)},getContentProps:(Z={})=>{const Y=on(Z),le=$({},Y,Z,{ref:B,onClick:W(Y),onMouseDown:H(Y),status:k});o&&(le.indentationAtItemLevel=!0);const ee=C.content?.($({},L,{externalEventHandlers:Y}))??{};return $({},le,ee)},getGroupTransitionProps:(Z={})=>{const Y=on(Z),le=$({},Y,{unmountOnExit:!0,component:"ul",role:"group",in:k.expanded,children:g},Z);return o&&(le.indentationAtItemLevel=!0),le},getIconContainerProps:(Z={})=>{const Y=on(Z);return $({},Y,Z,{onClick:G(Y)})},getCheckboxProps:(Z={})=>{const Y=on(Z);return $({},Y,{visible:a,ref:R,checked:k.selected,disabled:i||k.disabled,tabIndex:-1},Z,{onChange:w(Y)})},getLabelProps:(Z={})=>{const Y=$({},on(Z)),le=$({},Y,{children:m},Z,{onDoubleClick:V(Y)});return u.isTreeViewEditable&&(le.editable=k.editable),le},getLabelInputProps:(Z={})=>{const Y=on(Z),le=C.labelInput?.({rootRefObject:T,contentRefObject:O,externalEventHandlers:Y,interactions:S})??{};return $({},Z,le)},getDragAndDropOverlayProps:(Z={})=>{const Y=on(Z),le=C.dragAndDropOverlay?.($({},L,{externalEventHandlers:Y}))??{};return $({},Z,le)},rootRef:F,status:k,publicAPI:c}},MB=RB;function _y(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:o,disableSelection:i},expansion:{expansionTrigger:a}}=Ro(),s=t.isItemExpandable(e),l=t.isItemExpanded(e),u=t.isItemFocused(e),c=t.isItemSelected(e),p=t.isItemDisabled(e),h=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,f=t.isItemEditable?t.isItemEditable(e):!1,m=k=>{if(!p){u||t.focusItem(k,e);const T=r&&(k.shiftKey||k.ctrlKey||k.metaKey);s&&!(T&&t.isItemExpanded(e))&&t.toggleItemExpansion(k,e)}},g=k=>{p||(!u&&!h&&t.focusItem(k,e),r&&(k.shiftKey||k.ctrlKey||k.metaKey)?k.shiftKey?t.expandSelectionRange(k,e):t.selectItem({event:k,itemId:e,keepExistingSelection:!0}):t.selectItem({event:k,itemId:e,shouldBeSelected:!0}))},y=k=>{if(i||p)return;const T=k.nativeEvent.shiftKey;r&&T?t.expandSelectionRange(k,e):t.selectItem({event:k,itemId:e,keepExistingSelection:r,shouldBeSelected:k.target.checked})},x=k=>{(k.shiftKey||k.ctrlKey||k.metaKey||p)&&k.preventDefault()},E=()=>{yo(t,Bn)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:p,expanded:l,selected:c,focused:u,editable:f,editing:h,disableSelection:i,checkboxSelection:o,handleExpansion:m,handleSelection:g,handleCheckboxSelection:y,handleContentClick:n,preventSelection:x,expansionTrigger:a,toggleItemEditing:E,handleSaveItemLabel:(k,T)=>{yo(t,Bn)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,T),E(),t.focusItem(k,e))},handleCancelItemLabelEditing:k=>{yo(t,Bn)&&t.isItemBeingEditedRef(e)&&(E(),t.focusItem(k,e))}}}const OB=oe("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>dt.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:dt.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function LB(e){return e.action==null?null:d.jsx(OB,$({},e))}const NB=oe("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>$({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),FB=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],By=D.forwardRef(function(t,n){const{classes:r,className:o,displayIcon:i,expansionIcon:a,icon:s,label:l,itemId:u,onClick:c,onMouseDown:p,dragAndDropOverlayProps:h,labelInputProps:f}=t,m=$e(t,FB),{disabled:g,expanded:y,selected:x,focused:E,editing:C,editable:S,disableSelection:k,checkboxSelection:T,handleExpansion:O,handleSelection:F,handleCheckboxSelection:B,handleContentClick:R,preventSelection:N,expansionTrigger:v,toggleItemEditing:L}=_y(u),I=s||a||i,A=D.useRef(null),M=H=>{N(H),p&&p(H)},V=H=>{R?.(H,u),!A.current?.contains(H.target)&&(v==="content"&&O(H),T||F(H),c&&c(H))},W=H=>{H.defaultMuiPrevented||L()};return d.jsxs("div",$({},m,{className:Ae(r.root,o,y&&r.expanded,x&&r.selected,E&&r.focused,g&&r.disabled,C&&r.editing,S&&r.editable),onClick:V,onMouseDown:M,ref:n,children:[d.jsx("div",{className:r.iconContainer,children:I}),T&&d.jsx(Ay,{className:r.checkbox,checked:x,onChange:B,disabled:g||k,ref:A,tabIndex:-1}),C?d.jsx(NB,$({},f,{className:r.labelInput})):d.jsx("div",$({className:r.label},S&&{onDoubleClick:W},{children:l})),h&&d.jsx(LB,$({},h))]}))});function _B(e){return _e("MuiTreeItem",e)}const Cr=Me("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),jy=lt(d.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),$y=lt(d.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function dp(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:o}=Ro();return r({children:t,itemId:n,instance:o})}dp.propTypes={children:de.node,itemId:de.string.isRequired};const BB=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],jB=["ownerState"],$B=["ownerState"],HB=["ownerState"],UB=Py(),zB=e=>{const{classes:t}=e;return Ne({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},_B,t)},VB=oe("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),WB=oe(By,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${Cr.iconContainer}`]:t.iconContainer},t.label&&{[`& .${Cr.label}`]:t.label}],shouldForwardProp:e=>Yr(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Cr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Cr.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cr.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Cr.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${Cr.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Cr.label}`]:$({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${Cr.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),qB=oe(Aa,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Yr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),YB=D.forwardRef(function(t,n){const{icons:r,runItemPlugins:o,items:{disabledItemsFocusable:i,indentationAtItemLevel:a},selection:{disableSelection:s},expansion:{expansionTrigger:l},treeId:u,instance:c}=Ro(),p=D.useContext(up),h=UB({props:t,name:"MuiTreeItem"}),{children:f,className:m,slots:g,slotProps:y,ContentComponent:x=By,ContentProps:E,itemId:C,id:S,label:k,onClick:T,onMouseDown:O,onBlur:F,onKeyDown:B}=h,R=$e(h,BB),{expanded:N,focused:v,selected:L,disabled:I,editing:A,handleExpansion:M,handleCancelItemLabelEditing:V,handleSaveItemLabel:W}=_y(C),{contentRef:H,rootRef:w,propsEnhancers:G}=o(h),re=D.useRef(null),_=D.useRef(null),ae=rt(n,w,re),X=rt(E?.ref,H,_),U={expandIcon:g?.expandIcon??r.slots.expandIcon??jy,collapseIcon:g?.collapseIcon??r.slots.collapseIcon??$y,endIcon:g?.endIcon??r.slots.endIcon,icon:g?.icon,groupTransition:g?.groupTransition},J=Te=>Array.isArray(Te)?Te.length>0&&Te.some(J):!!Te,Q=J(f),ne=$({},h,{expanded:N,focused:v,selected:L,disabled:I,indentationAtItemLevel:a}),Z=zB(ne),Y=U.groupTransition??void 0,le=nt({elementType:Y,ownerState:{},externalSlotProps:y?.groupTransition,additionalProps:$({unmountOnExit:!0,in:N,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:Z.groupTransition}),ee=Te=>{l==="iconContainer"&&M(Te)},te=N?U.collapseIcon:U.expandIcon,xe=nt({elementType:te,ownerState:{},externalSlotProps:Te=>N?$({},Fn(r.slotProps.collapseIcon,Te),Fn(y?.collapseIcon,Te)):$({},Fn(r.slotProps.expandIcon,Te),Fn(y?.expandIcon,Te)),additionalProps:{onClick:ee}}),pe=$e(xe,jB),be=Q&&te?d.jsx(te,$({},pe)):null,se=Q?void 0:U.endIcon,Re=nt({elementType:se,ownerState:{},externalSlotProps:Te=>Q?{}:$({},Fn(r.slotProps.endIcon,Te),Fn(y?.endIcon,Te))}),ve=$e(Re,$B),ze=se?d.jsx(se,$({},ve)):null,De=U.icon,Tt=nt({elementType:De,ownerState:{},externalSlotProps:y?.icon}),at=$e(Tt,HB),qe=De?d.jsx(De,$({},at)):null;let ce;L?ce=!0:s||I?ce=void 0:ce=!1;function Ce(Te){!v&&(!I||i)&&Te.currentTarget===Te.target&&c.focusItem(Te,C)}function Oe(Te){F?.(Te),!(A||Te.relatedTarget&&Ra(Te.relatedTarget,re.current)&&(Te.target&&Te.target?.dataset?.element==="labelInput"&&Ra(Te.target,re.current)||Te.relatedTarget?.dataset?.element==="labelInput"))&&c.removeFocusedItem()}const He=Te=>{B?.(Te),Te.target?.dataset?.element!=="labelInput"&&c.handleItemKeyDown(Te,C)},je=cp({itemId:C,treeId:u,id:S}),Le=c.canItemBeTabbed(C)?0:-1,Je={rootRefObject:re,contentRefObject:_,interactions:{handleSaveItemLabel:W,handleCancelItemLabelEditing:V}},yt=G.root?.($({},Je,{externalEventHandlers:on(R)}))??{},ht=G.content?.($({},Je,{externalEventHandlers:on(E)}))??{},ue=G.dragAndDropOverlay?.($({},Je,{externalEventHandlers:{}}))??{},ye=G.labelInput?.($({},Je,{externalEventHandlers:{}}))??{};return d.jsx(dp,{itemId:C,children:d.jsxs(VB,$({className:Ae(Z.root,m),role:"treeitem","aria-expanded":Q?N:void 0,"aria-selected":ce,"aria-disabled":I||void 0,id:je,tabIndex:Le},R,{ownerState:ne,onFocus:Ce,onBlur:Oe,onKeyDown:He,ref:ae,style:a?$({},R.style,{"--TreeView-itemDepth":typeof p=="function"?p(C):p}):R.style},yt,{children:[d.jsx(WB,$({as:x,classes:{root:Z.content,expanded:Z.expanded,selected:Z.selected,focused:Z.focused,disabled:Z.disabled,editable:Z.editable,editing:Z.editing,iconContainer:Z.iconContainer,label:Z.label,labelInput:Z.labelInput,checkbox:Z.checkbox},label:k,itemId:C,onClick:T,onMouseDown:O,icon:qe,expansionIcon:be,displayIcon:ze,ownerState:ne},E,ht,ue.action==null?{}:{dragAndDropOverlayProps:ue},ye.value==null?{}:{labelInputProps:ye},{ref:X})),f&&d.jsx(qB,$({as:Y},le,{children:f}))]}))})});function KB(e){const{slots:t,slotProps:n,status:r}=e,o=Ro(),i=$({},o.icons.slots,{expandIcon:o.icons.slots.expandIcon??jy,collapseIcon:o.icons.slots.collapseIcon??$y}),a=o.icons.slotProps;let s;t?.icon?s="icon":r.expandable?r.expanded?s="collapseIcon":s="expandIcon":s="endIcon";const l=t?.[s]??i[s],u=nt({elementType:l,externalSlotProps:c=>$({},Fn(a[s],c),Fn(n?.[s],c)),ownerState:{}});return l?d.jsx(l,$({},u)):null}const GB=["visible"],QB=oe("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),XB=oe("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Yr(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:dt.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),ZB=oe("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Yr(e)&&e!=="editable"})(({theme:e})=>$({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),JB=oe("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});oe(Aa,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Yr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});oe(D.forwardRef((e,t)=>{const{visible:n}=e,r=$e(e,GB);return n?d.jsx(Ay,$({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function ej(e){return _e("MuiRichTreeView",e)}Me("MuiRichTreeView",["root"]);const tj=(e,t)=>{const n=D.useRef({}),[r,o]=D.useState(()=>{const a={};return e.forEach(s=>{s.models&&Object.entries(s.models).forEach(([l,u])=>{n.current[l]={isControlled:t[l]!==void 0,getDefaultValue:u.getDefaultValue},a[l]=u.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(n.current).map(([a,s])=>{const l=t[a]??r[a];return[a,{value:l,setControlledValue:u=>{s.isControlled||o(c=>$({},c,{[a]:u}))}}]}))};class nj{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const rj=e=>e.isPropagationStopped!==void 0,Hy=()=>{const[e]=D.useState(()=>new nj),t=D.useCallback((...r)=>{const[o,i,a={}]=r;a.defaultMuiPrevented=!1,!(rj(a)&&a.isPropagationStopped())&&e.emit(o,i,a)},[e]),n=D.useCallback((r,o)=>(e.on(r,o),()=>{e.removeListener(r,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Hy.params={};const Uy=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Uy.params={};const pp=({params:e,state:t,setState:n})=>{D.useEffect(()=>{n(o=>o.id.treeId===e.id&&o.id.treeId!==void 0?o:$({},o,{id:$({},o.id,{treeId:e.id??PB()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};pp.params={id:!0};pp.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const oj=[Hy,Uy,pp],ij=["slots","slotProps","apiRef","experimentalFeatures"],aj=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:o},plugins:i}=e,a=$e(e.props,ij);const s={};i.forEach(h=>{Object.assign(s,h.params)});const l={},u={};Object.keys(a).forEach(h=>{const f=a[h];s[h]?l[h]=f:u[h]=f});const c=o??{},p=i.reduce((h,f)=>f.getDefaultizedParams?f.getDefaultizedParams({params:h,experimentalFeatures:c}):h,l);return{apiRef:r,forwardedProps:u,pluginParams:p,slots:t??{},slotProps:n??{},experimentalFeatures:c}},sj=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:s=>{let l=null,u=null;const c=[],p={};e.forEach(m=>{if(!m.itemPlugin)return;const g=m.itemPlugin({props:s,rootRef:l,contentRef:u});g?.rootRef&&(l=g.rootRef),g?.contentRef&&(u=g.contentRef),g?.propsEnhancers&&(c.push(g.propsEnhancers),Object.keys(g.propsEnhancers).forEach(y=>{p[y]=!0}))});const h=m=>g=>{const y={};return c.forEach(x=>{const E=x[m];E!=null&&Object.assign(y,E(g))}),y},f=Object.fromEntries(Object.keys(p).map(m=>[m,h(m)]));return{contentRef:u,rootRef:l,propsEnhancers:f}},wrapItem:({itemId:s,children:l})=>{let u=l;for(let c=e.length-1;c>=0;c-=1){const p=e[c];p.wrapItem&&(u=p.wrapItem({itemId:s,children:u,instance:t}))}return u},wrapRoot:({children:s})=>{let l=s;for(let u=e.length-1;u>=0;u-=1){const c=e[u];c.wrapRoot&&(l=c.wrapRoot({children:l,instance:t}))}return l},instance:t,rootRef:r,publicAPI:n});function lj(e){const t=D.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const uj=({plugins:e,rootRef:t,props:n})=>{const r=[...oj,...e],{pluginParams:o,forwardedProps:i,apiRef:a,experimentalFeatures:s,slots:l,slotProps:u}=aj({plugins:r,props:n}),c=tj(r,o),h=D.useRef({}).current,f=lj(a),m=D.useRef(null),g=rt(m,t),y=sj({plugins:r,instance:h,publicAPI:f,rootRef:m}),[x,E]=D.useState(()=>{const T={};return r.forEach(O=>{O.getInitialState&&Object.assign(T,O.getInitialState(o))}),T}),C=[],S=T=>{const O=T({instance:h,params:o,slots:l,slotProps:u,experimentalFeatures:s,state:x,setState:E,rootRef:m,models:c,plugins:r});O.getRootProps&&C.push(O.getRootProps),O.publicAPI&&Object.assign(f,O.publicAPI),O.instance&&Object.assign(h,O.instance),O.contextValue&&Object.assign(y,O.contextValue)};return r.forEach(S),{getRootProps:(T={})=>{const O=$({role:"tree"},i,T,{ref:g});return C.forEach(F=>{Object.assign(O,F(T))}),O},rootRef:g,contextValue:y,instance:h}},cj=(e,t,n)=>{e.$$publishEvent(t,n)},Go="__TREE_VIEW_ROOT_PARENT_ID__",dj=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},pj=["children"],zy=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const o={},i={},a={[Go]:[]},s=(u,c,p)=>{const h=r?r(u):u.id;if(h==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(u)].join(`
221
+ `));if(o[h]!=null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${h}"`].join(`
222
+ `));const f=n?n(u):u.label;if(f==null)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(u)].join(`
223
+ `));o[h]={id:h,label:f,parentId:p,idAttribute:void 0,expandable:!!u.children?.length,disabled:t?t(u):!1,depth:c},i[h]=u;const m=p??Go;a[m]||(a[m]=[]),a[m].push(h),u.children?.forEach(g=>s(g,c+1,h))};e.forEach(u=>s(u,0,null));const l={};return Object.keys(a).forEach(u=>{l[u]=dj(a[u])}),{itemMetaMap:o,itemMap:i,itemOrderedChildrenIds:a,itemChildrenIndexes:l}},Ga=({instance:e,params:t,state:n,setState:r,experimentalFeatures:o})=>{const i=D.useCallback(x=>n.items.itemMetaMap[x],[n.items.itemMetaMap]),a=D.useCallback(x=>n.items.itemMap[x],[n.items.itemMap]),s=D.useCallback(()=>{const x=E=>{const C=n.items.itemMap[E],S=$e(C,pj),k=n.items.itemOrderedChildrenIds[E];return k&&(S.children=k.map(x)),S};return n.items.itemOrderedChildrenIds[Go].map(x)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),l=D.useCallback(x=>{if(x==null)return!1;let E=e.getItemMeta(x);if(!E)return!1;if(E.disabled)return!0;for(;E.parentId!=null;)if(E=e.getItemMeta(E.parentId),E.disabled)return!0;return!1},[e]),u=D.useCallback(x=>{const E=e.getItemMeta(x).parentId??Go;return n.items.itemChildrenIndexes[E][x]},[e,n.items.itemChildrenIndexes]),c=D.useCallback(x=>n.items.itemOrderedChildrenIds[x??Go]??[],[n.items.itemOrderedChildrenIds]),p=x=>{const E=e.getItemMeta(x);return E==null?null:document.getElementById(cp({treeId:n.id.treeId,itemId:x,id:E.idAttribute}))},h=x=>t.disabledItemsFocusable?!0:!e.isItemDisabled(x),f=D.useRef(!1),m=D.useCallback(()=>{f.current=!0},[]),g=D.useCallback(()=>f.current,[]);return D.useEffect(()=>{e.areItemUpdatesPrevented()||r(x=>{const E=zy({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(x.items.itemMetaMap).forEach(C=>{E.itemMetaMap[C.id]||cj(e,"removeItem",{id:C.id})}),$({},x,{items:E})})},[e,r,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:a,getItemDOMElement:p,getItemTree:s,getItemOrderedChildrenIds:c},instance:{getItemMeta:i,getItem:a,getItemTree:s,getItemsToRender:()=>{const x=E=>{const C=n.items.itemMetaMap[E];return{label:C.label,itemId:C.id,id:C.idAttribute,children:n.items.itemOrderedChildrenIds[E]?.map(x)}};return n.items.itemOrderedChildrenIds[Go].map(x)},getItemIndex:u,getItemDOMElement:p,getItemOrderedChildrenIds:c,isItemDisabled:l,isItemNavigable:h,preventItemUpdates:m,areItemUpdatesPrevented:g},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:o.indentationAtItemLevel??!1}}}};Ga.getInitialState=e=>({items:zy({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Ga.getDefaultizedParams=({params:e})=>$({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Ga.wrapRoot=({children:e,instance:t})=>d.jsx(up.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Ga.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const Yl=({instance:e,params:t,models:n})=>{const r=D.useMemo(()=>{const p=new Map;return n.expandedItems.value.forEach(h=>{p.set(h,!0)}),p},[n.expandedItems.value]),o=(p,h)=>{t.onExpandedItemsChange?.(p,h),n.expandedItems.setControlledValue(h)},i=D.useCallback(p=>r.has(p),[r]),a=D.useCallback(p=>!!e.getItemMeta(p)?.expandable,[e]),s=Pe((p,h)=>{const f=e.isItemExpanded(h);e.setItemExpansion(p,h,!f)}),l=Pe((p,h,f)=>{if(e.isItemExpanded(h)===f)return;let g;f?g=[h].concat(n.expandedItems.value):g=n.expandedItems.value.filter(y=>y!==h),t.onItemExpansionToggle&&t.onItemExpansionToggle(p,h,f),o(p,g)}),u=(p,h)=>{const f=e.getItemMeta(h),g=e.getItemOrderedChildrenIds(f.parentId).filter(x=>e.isItemExpandable(x)&&!e.isItemExpanded(x)),y=n.expandedItems.value.concat(g);g.length>0&&(t.onItemExpansionToggle&&g.forEach(x=>{t.onItemExpansionToggle(p,x,!0)}),o(p,y))},c=D.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:l},instance:{isItemExpanded:i,isItemExpandable:a,setItemExpansion:l,toggleItemExpansion:s,expandAllSiblings:u},contextValue:{expansion:{expansionTrigger:c}}}};Yl.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const fj=[];Yl.getDefaultizedParams=({params:e})=>$({},e,{defaultExpandedItems:e.defaultExpandedItems??fj});Yl.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Fs=e=>Array.isArray(e)?e:e!=null?[e]:[],Gu=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Kl=({instance:e,params:t,models:n})=>{const r=D.useRef(null),o=D.useRef({}),i=D.useMemo(()=>{const g=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(y=>{g.set(y,!0)}):n.selectedItems.value!=null&&g.set(n.selectedItems.value,!0),g},[n.selectedItems.value]),a=(g,y)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const x=y.filter(C=>!e.isItemSelected(C)),E=n.selectedItems.value.filter(C=>!y.includes(C));x.forEach(C=>{t.onItemSelectionToggle(g,C,!0)}),E.forEach(C=>{t.onItemSelectionToggle(g,C,!1)})}else y!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(g,n.selectedItems.value,!1),y!=null&&t.onItemSelectionToggle(g,y,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(g,y),n.selectedItems.setControlledValue(y)},s=g=>i.has(g),l=({event:g,itemId:y,keepExistingSelection:x=!1,shouldBeSelected:E})=>{if(t.disableSelection)return;let C;if(x){const S=Fs(n.selectedItems.value),k=e.isItemSelected(y);k&&(E===!1||E==null)?C=S.filter(T=>T!==y):!k&&(E===!0||E==null)?C=[y].concat(S):C=S}else E===!1||E==null&&e.isItemSelected(y)?C=t.multiSelect?[]:null:C=t.multiSelect?[y]:y;a(g,C),r.current=y,o.current={}},u=(g,[y,x])=>{if(t.disableSelection||!t.multiSelect)return;let E=Fs(n.selectedItems.value).slice();Object.keys(o.current).length>0&&(E=E.filter(T=>!o.current[T]));const C=Gu(E),S=IB(e,y,x),k=S.filter(T=>!C[T]);E=E.concat(k),a(g,E),o.current=Gu(S)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:l},instance:{isItemSelected:s,selectItem:l,selectAllNavigableItems:g=>{if(t.disableSelection||!t.multiSelect)return;const y=AB(e);a(g,y),o.current=Gu(y)},expandSelectionRange:(g,y)=>{if(r.current!=null){const[x,E]=Fy(e,y,r.current);u(g,[x,E])}},selectRangeFromStartToItem:(g,y)=>{u(g,[Pa(e),y])},selectRangeFromItemToEnd:(g,y)=>{u(g,[y,Ny(e)])},selectItemFromArrowNavigation:(g,y,x)=>{if(t.disableSelection||!t.multiSelect)return;let E=Fs(n.selectedItems.value).slice();Object.keys(o.current).length===0?(E.push(x),o.current={[y]:!0,[x]:!0}):(o.current[y]||(o.current={}),o.current[x]?(E=E.filter(C=>C!==y),delete o.current[y]):(E.push(x),o.current[x]=!0)),a(g,E)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Kl.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const hj=[];Kl.getDefaultizedParams=({params:e})=>$({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?hj:null)});Kl.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};const zm=1e3;class mj{constructor(t=zm){this.timeouts=new Map,this.cleanupTimeout=zm,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class gj{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class bj{}function yj(e){let t=0;return function(r,o,i){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new gj:new mj);const[a]=D.useState(new bj),s=D.useRef(null),l=D.useRef(void 0);l.current=i;const u=D.useRef(null);if(!s.current&&l.current){const c=(p,h)=>{h.defaultMuiPrevented||l.current?.(p,h)};s.current=r.$$subscribeEvent(o,c),t+=1,u.current={cleanupToken:t},e.registry.register(a,()=>{s.current?.(),s.current=null,u.current=null},u.current)}else!l.current&&s.current&&(s.current(),s.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));D.useEffect(()=>{if(!s.current&&l.current){const c=(p,h)=>{h.defaultMuiPrevented||l.current?.(p,h)};s.current=r.$$subscribeEvent(o,c)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{s.current?.(),s.current=null}},[r,o])}}const xj={registry:null},Ej=yj(xj),Vy=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Vy(t.shadowRoot):t:null},Cj=(e,t)=>{let n=Fs(t).find(r=>{if(!e.isItemNavigable(r))return!1;const o=e.getItemMeta(r);return o&&(o.parentId==null||e.isItemExpanded(o.parentId))});return n==null&&(n=Pa(e)),n},fp=({instance:e,params:t,state:n,setState:r,models:o,rootRef:i})=>{const a=Cj(e,o.selectedItems.value),s=Pe(y=>{const x=typeof y=="function"?y(n.focusedItemId):y;n.focusedItemId!==x&&r(E=>$({},E,{focusedItemId:x}))}),l=D.useCallback(()=>!!i.current&&i.current.contains(Vy(Ut(i.current))),[i]),u=D.useCallback(y=>n.focusedItemId===y&&l(),[n.focusedItemId,l]),c=y=>{const x=e.getItemMeta(y);return x&&(x.parentId==null||e.isItemExpanded(x.parentId))},p=(y,x)=>{const E=e.getItemDOMElement(x);E&&E.focus(),s(x),t.onItemFocus&&t.onItemFocus(y,x)},h=Pe((y,x)=>{c(x)&&p(y,x)}),f=Pe(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const x=e.getItemDOMElement(n.focusedItemId);x&&x.blur()}s(null)}),m=y=>y===a;Ej(e,"removeItem",({id:y})=>{n.focusedItemId===y&&p(null,a)});const g=y=>x=>{y.onFocus?.(x),!x.defaultMuiPrevented&&x.target===x.currentTarget&&p(x,a)};return{getRootProps:y=>({onFocus:g(y)}),publicAPI:{focusItem:h},instance:{isItemFocused:u,canItemBeTabbed:m,focusItem:h,removeFocusedItem:f}}};fp.getInitialState=()=>({focusedItemId:null});fp.params={onItemFocus:!0};function Tj(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Wy=({instance:e,params:t,state:n})=>{const r=zn(),o=D.useRef({}),i=Pe(c=>{o.current=c(o.current)});D.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const c={},p=h=>{c[h.id]=h.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(p),o.current=c},[n.items.itemMetaMap,t.getItemId,e]);const a=(c,p)=>{const h=p.toLowerCase(),f=x=>{const E=Ns(e,x);return E===null?Pa(e):E};let m=null,g=f(c);const y={};for(;m==null&&!y[g];)o.current[g]===h?m=g:(y[g]=!0,g=f(g));return m},s=c=>!t.disableSelection&&!e.isItemDisabled(c),l=c=>!e.isItemDisabled(c)&&e.isItemExpandable(c);return{instance:{updateFirstCharMap:i,handleItemKeyDown:(c,p)=>{if(c.defaultMuiPrevented||c.altKey||Ra(c.target,c.currentTarget))return;const h=c.ctrlKey||c.metaKey,f=c.key;switch(!0){case(f===" "&&s(p)):{c.preventDefault(),t.multiSelect&&c.shiftKey?e.expandSelectionRange(c,p):e.selectItem({event:c,itemId:p,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case f==="Enter":{yo(e,Bn)&&e.isItemEditable(p)&&!e.isItemBeingEdited(p)?e.setEditedItemId(p):l(p)?(e.toggleItemExpansion(c,p),c.preventDefault()):s(p)&&(t.multiSelect?(c.preventDefault(),e.selectItem({event:c,itemId:p,keepExistingSelection:!0})):e.isItemSelected(p)||(e.selectItem({event:c,itemId:p}),c.preventDefault()));break}case f==="ArrowDown":{const m=Ns(e,p);m&&(c.preventDefault(),e.focusItem(c,m),t.multiSelect&&c.shiftKey&&s(m)&&e.selectItemFromArrowNavigation(c,p,m));break}case f==="ArrowUp":{const m=Ly(e,p);m&&(c.preventDefault(),e.focusItem(c,m),t.multiSelect&&c.shiftKey&&s(m)&&e.selectItemFromArrowNavigation(c,p,m));break}case(f==="ArrowRight"&&!r||f==="ArrowLeft"&&r):{if(h)return;if(e.isItemExpanded(p)){const m=Ns(e,p);m&&(e.focusItem(c,m),c.preventDefault())}else l(p)&&(e.toggleItemExpansion(c,p),c.preventDefault());break}case(f==="ArrowLeft"&&!r||f==="ArrowRight"&&r):{if(h)return;if(l(p)&&e.isItemExpanded(p))e.toggleItemExpansion(c,p),c.preventDefault();else{const m=e.getItemMeta(p).parentId;m&&(e.focusItem(c,m),c.preventDefault())}break}case f==="Home":{s(p)&&t.multiSelect&&h&&c.shiftKey?e.selectRangeFromStartToItem(c,p):e.focusItem(c,Pa(e)),c.preventDefault();break}case f==="End":{s(p)&&t.multiSelect&&h&&c.shiftKey?e.selectRangeFromItemToEnd(c,p):e.focusItem(c,Ny(e)),c.preventDefault();break}case f==="*":{e.expandAllSiblings(c,p),c.preventDefault();break}case(String.fromCharCode(c.keyCode)==="A"&&h&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(c),c.preventDefault();break}case(!h&&!c.shiftKey&&Tj(f)):{const m=a(p,f);m!=null&&(e.focusItem(c,m),c.preventDefault());break}}}}}};Wy.params={};const qy=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});qy.params={};const vj=[Ga,Yl,Kl,fp,Wy,qy,Bn],Sj=["ownerState"];function kj({slots:e,slotProps:t,label:n,id:r,itemId:o,itemsToRender:i}){const a=e?.item??YB,s=nt({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:o,id:r,label:n},ownerState:{itemId:o,label:n}}),l=$e(s,Sj),u=D.useMemo(()=>i?d.jsx(Yy,{itemsToRender:i,slots:e,slotProps:t}):null,[i,e,t]);return d.jsx(a,$({},l,{children:u}))}function Yy(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return d.jsx(D.Fragment,{children:t.map(o=>d.jsx(kj,{slots:n,slotProps:r,label:o.label,id:o.id,itemId:o.itemId,itemsToRender:o.children},o.itemId))})}const Dj=Py(),wj=e=>{const{classes:t}=e;return Ne({root:["root"]},ej,t)},Ij=oe("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),Aj=D.forwardRef(function(t,n){const r=Dj({props:t,name:"MuiRichTreeView"}),{getRootProps:o,contextValue:i,instance:a}=uj({plugins:vj,rootRef:n,props:r}),{slots:s,slotProps:l}=r,u=wj(r),c=s?.root??Ij,p=nt({elementType:c,externalSlotProps:l?.root,className:u.root,getSlotProps:o,ownerState:r});return d.jsx(kB,{value:i,children:d.jsx(c,$({},p,{children:d.jsx(Yy,{slots:s,slotProps:l,itemsToRender:a.getItemsToRender()})}))})}),Pj=lt([d.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),d.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Rj=lt(d.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),Mj=lt(d.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),Oj=lt(d.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function Lj({items:e,defaultExpandedItems:t,onClickTreeNode:n}){return d.jsx(Aj,{items:jj(e,n),defaultExpandedItems:t,slots:{item:Bj}})}const Nj=Vm.animated(Aa);function Fj(e){const t=Vm.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return d.jsx(Nj,{style:t,...e})}function _j({item:e,...t}){const n=d.jsxs(ZB,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&d.jsx(yy,{})||e.fileType==="notebook"&&d.jsx(Pj,{})||e.fileType==="model"&&d.jsx(Oj,{})||e.fileType=="database"&&d.jsx(Mj,{})||d.jsx(Rj,{}),d.jsx(P.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?d.jsx(P.Tooltip,{title:e.error,placement:"right",children:n}):n}const Bj=D.forwardRef(function(t,n){const{id:r,itemId:o,label:i,children:a,disabled:s,...l}=t,{getRootProps:u,getContentProps:c,getLabelProps:p,getIconContainerProps:h,getGroupTransitionProps:f,status:m,publicAPI:g}=MB({id:r,itemId:o,children:a,label:i,disabled:s,rootRef:n}),y=g.getItem(o);return m.selected=!1,m.focused=!1,d.jsx(dp,{itemId:o,children:d.jsxs(QB,{...u(l),children:[d.jsxs(XB,{...c(),...y.link&&{onClick:x=>y.link(x)},sx:{pointerEvents:!y.selectable&&"none"},children:[d.jsx(JB,{...h(),children:d.jsx(KB,{status:m})}),d.jsx(_j,{...p({item:y})})]}),a&&d.jsx(Fj,{...f()})]})})});function jj(e,t){const n=new Map;return e.map(r=>{let o=n;const i=r.path.split("/");i.forEach((a,s)=>{s===i.length-1?o.set(a,r):(o.has(a)||o.set(a,new Map),o=o.get(a))})}),Ky(n,"",t)}function Ky(e,t,n){const r=[];return e.forEach((o,i)=>{const a=i.endsWith(".malloy")&&"model"||i.endsWith(".malloynb")&&"notebook"||i.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const s=o;r.push({id:t+i,label:i,fileType:a,link:a==="model"||a==="notebook"?l=>n(t+i,l):void 0,selectable:a==="model"||a==="notebook",error:"error"in s?s.error:void 0})}else{const s=t+i+"/";r.push({id:s,label:i,fileType:"directory",selectable:!0,link:void 0,children:Ky(o,s,n)})}}),r}const $j=["notebooks/","models/"];function Hj({onClickModelFile:e,resourceUri:t}){const{environmentName:n,packageName:r,versionId:o}=Mt(t),{apiClients:i}=ut.useServer(),{data:a,isError:s,error:l,isSuccess:u}=Wt({queryKey:["models",n,r,o],queryFn:()=>i.models.listModels(n,r,o)});return d.jsx(h0,{children:d.jsxs(m0,{children:[d.jsx(g0,{children:"Semantic Models"}),d.jsxs(P.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!u&&!s&&d.jsx(un,{text:"Fetching Models..."}),s&&d.jsx(cn,{error:l,context:`${n} > ${r} > Models`}),u&&a.data.length>0&&d.jsx(Lj,{items:a.data.sort((c,p)=>c.path.localeCompare(p.path)),onClickTreeNode:e,defaultExpandedItems:$j}),u&&a.data.length===0&&d.jsx(P.Typography,{variant:"body2",children:"No models found"})]})]})})}const Uj=async e=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:e,onError:r=>{console.error("Error rendering visualization:",typeof r,r)}}).createViz()};function zj({result:e,height:t,onDrill:n,onSizeChange:r}){const o=q.useRef(null),i=q.useRef(!1);return q.useLayoutEffect(()=>{if(!o.current||!e)return;let a=!0;const s=o.current;for(;s.firstChild;)s.removeChild(s.firstChild);i.current=!1;let l=null,u=null;const c=()=>{if(i.current||!a||!s.firstElementChild)return;const h=s.firstElementChild.firstElementChild;if(!h)return;const f=h.firstElementChild;let m=h.scrollHeight||h.offsetHeight||0;f&&h.classList.contains("malloy-dashboard")&&(m=f.scrollHeight||f.offsetHeight||0),m>0&&(i.current=!0,r&&r(m))};return Uj(n).then(p=>{if(a){l=new MutationObserver(()=>{u&&clearTimeout(u),u=setTimeout(()=>{c(),l?.disconnect()},100)}),l.observe(s,{childList:!0,subtree:!0,attributes:!0});try{p.setResult(JSON.parse(e)),p.render(s)}catch(h){console.error("Error rendering visualization:",h),l?.disconnect()}}}).catch(p=>{console.error("Failed to create renderer:",p)}),()=>{a=!1,l?.disconnect(),u&&clearTimeout(u)}},[e,n,r]),d.jsx("div",{ref:o,style:{width:"100%",height:t?`${t}px`:"400px"}})}function Gy(e){return typeof window>"u"?d.jsx(P.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):d.jsx(q.Suspense,{fallback:d.jsx(P.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:d.jsx(zj,{...e})})}const Vj=Object.freeze(Object.defineProperty({__proto__:null,default:Gy},Symbol.toStringTag,{value:"Module"}));function Qy(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function or(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${Qy(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function Wj(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,i=`\`${t}\``,a=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${i} = ${or(l,a)}`).join(" or ")})`:Array.isArray(r)?"":`${i} = ${or(r,a)}`;case"Contains":return typeof r=="string"?`${i} ~ f'%${Qy(r)}%'`:Array.isArray(r)?"":`${i} = ${or(r)}`;case"After":return Array.isArray(r)?"":`${i} > ${or(r,a)}`;case"Before":return Array.isArray(r)?"":`${i} < ${or(r,a)}`;case"Greater Than":return Array.isArray(r)?"":`${i} > ${or(r)}`;case"Less Than":return Array.isArray(r)?"":`${i} < ${or(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${i} >= ${or(r,a)} and ${i} <= ${or(o,a)}`:`${i} >= ${or(r,a)}`;default:return""}}function qj(e){if(e.length===0)return"";const t=e.map(n=>Wj(n)).filter(n=>n.length>0);return t.length===0?"":t.join(" and ")}function Yj(e,t,n,r=1e3){const o=qj(t),a=n&&n.length>0?`group_by: ${n.map(s=>`\`${s}\``).join(", ")}`:"select: *";return o?`
224
+ run: ${e} -> {
225
+ where: ${o}
226
+ ${a}
227
+ limit: ${r}
228
+ }
229
+ `:`
230
+ run: ${e} -> {
231
+ ${a}
232
+ limit: ${r}
233
+ }
234
+ `}function Xy(e){const{environment:t,package:n,model:r,source:o,filterSelections:i,fields:a,limit:s=1e3}=e,[l,u]=q.useState(null),c=q.useMemo(()=>Yj(o,i,a,s),[o,i,a,s]),p=q.useMemo(()=>Ua({environmentName:t,packageName:n,modelPath:r}),[t,n,r]),h=i.length>0,f=q.useCallback(()=>{if(!h){u(null);return}const m=lp({resourceUri:p,query:c});u(m)},[h,p,c]);return{embeddedQueryResult:l,queryString:c,resourceUri:p,executeQuery:f,canExecute:h}}function Kj(e,t=5e3){const n=e.dimensionSpecs[0]?.source??"",r=e.dimensionSpecs[0]?.model??"",{filterStates:o,updateFilter:i,clearAllFilters:a,getActiveFilters:s}=sp({dimensionSpecs:e.dimensionSpecs}),l=q.useMemo(()=>s(),[o,s]),{data:u,noRowsMatchedFilter:c,isLoading:p,isError:h,error:f,refetch:m}=ap({environment:e.environment,package:e.package,indexLimit:e.indexLimit,dimensionSpecs:e.dimensionSpecs,versionId:e.versionId,activeFilters:l}),g=p&&!u,{embeddedQueryResult:y,queryString:x,executeQuery:E,canExecute:C}=Xy({environment:e.environment,package:e.package,model:r,source:n,filterSelections:l,limit:t,fields:e.selectFields});return{filterStates:o,updateFilter:i,clearAllFilters:a,activeFilters:l,data:u,noRowsMatchedFilter:c,isLoading:p,isInitialLoading:g,isError:h,error:f,refetch:m,embeddedQueryResult:y,queryString:x,executeQuery:E,canExecute:C}}function Gj({modelPath:e,query:t,sourceName:n,queryName:r,enabled:o=!0,resourceUri:i}){const{environmentName:a,packageName:s,versionId:l}=Mt(i),{apiClients:u}=ut.useServer(),{data:c,isSuccess:p,isError:h,error:f,isLoading:m}=Wt({queryKey:["rawQueryData",a,s,e,l,t,n,r],queryFn:()=>u.models.executeQueryModel(a,s,e,{query:t,sourceName:n,queryName:r,versionId:l}),enabled:o});return{data:p&&c?.data?.result?(()=>{try{return JSON.parse(c.data.result).data?.array_value||[]}catch(y){return console.error("Failed to parse query result:",y),[]}})():[],isSuccess:p,isError:h,error:f,isLoading:m}}exports.AnalyzePackageButton=x4;exports.BrowserWorkbookStorage=y4;exports.ConnectionExplorer=gb;exports.DimensionFilter=fy;exports.EmbeddedQueryResult=X9;exports.Environment=i8;exports.Home=F9;exports.Loading=un;exports.Model=$9;exports.ModelExplorer=op;exports.ModelExplorerDialog=ip;exports.Models=Hj;exports.Notebook=Iy;exports.Package=oB;exports.Packages=bb;exports.QueryResult=wy;exports.RenderedResult=Gy;exports.ResultContainer=Si;exports.SourceExplorerComponent=H1;exports.SourcesExplorer=wd;exports.Workbook=g4;exports.WorkbookList=V1;exports.WorkbookManager=Xo;exports.WorkbookStorageProvider=f4;exports.ccount=fc;exports.createEmbeddedQueryResult=lp;exports.encodeResourceUri=Ua;exports.extractDimensionSpecs=by;exports.extractSourceFromQuery=y9;exports.find=Fa;exports.generateFilterClause=b9;exports.getDimensionKey=Pr;exports.getJoinedSources=m9;exports.html=gi;exports.htmlVoidElements=Lg;exports.injectWhereClause=x9;exports.makeDimensionKey=Ty;exports.parseAllSourceInfos=gy;exports.parseDimensionFilterAnnotation=my;exports.parseNotebookFilterAnnotation=hy;exports.parseResourceUri=Mt;exports.stringify=Cl;exports.stringify$1=Tl;exports.svg=Qr;exports.useDimensionFilters=sp;exports.useDimensionFiltersFromSpec=Kj;exports.useDimensionFiltersQuery=Xy;exports.useDimensionalFilterRangeData=ap;exports.useGivensForm=ky;exports.useModelData=rp;exports.useModelGivens=Dy;exports.useRawQueryData=Gj;exports.useRouterClickHandler=z1;exports.whitespace=Xc;exports.zwitch=Al;